Browse Source

添加日志修改功能

lwx_dev
erdanergou 3 years ago
parent
commit
0423f4a80f
  1. 38
      src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java

38
src/main/java/com/dreamchaser/depository_manage/service/impl/QyWxOperationService.java

@ -14,12 +14,14 @@ import com.dreamchaser.depository_manage.utils.DateUtil;
import com.dreamchaser.depository_manage.utils.HttpUtils; import com.dreamchaser.depository_manage.utils.HttpUtils;
import com.dreamchaser.depository_manage.utils.LinkInterfaceUtil; import com.dreamchaser.depository_manage.utils.LinkInterfaceUtil;
import com.dreamchaser.depository_manage.utils.ObjectFormatUtil; import com.dreamchaser.depository_manage.utils.ObjectFormatUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
@Slf4j
@Service @Service
public class QyWxOperationService { public class QyWxOperationService {
@ -236,6 +238,7 @@ public class QyWxOperationService {
// 将返回结果转为json对象 // 将返回结果转为json对象
JSONObject jsonObject = JSON.parseObject(s1); JSONObject jsonObject = JSON.parseObject(s1);
log.info("发送企业微信出库消息结果"+s1);
// 返回 // 返回
return jsonObject; return jsonObject;
} }
@ -705,6 +708,7 @@ public class QyWxOperationService {
// 将返回结果转为json对象 // 将返回结果转为json对象
JSONObject jsonObject = JSON.parseObject(s1); JSONObject jsonObject = JSON.parseObject(s1);
log.info("发送企业微信盘点消息结果"+s1);
// 返回 // 返回
return jsonObject; return jsonObject;
@ -787,6 +791,7 @@ public class QyWxOperationService {
// 将返回结果转为json对象 // 将返回结果转为json对象
JSONObject jsonObject = JSON.parseObject(s1); JSONObject jsonObject = JSON.parseObject(s1);
log.info("发送企业微信抄送结果:"+s1);
// 返回 // 返回
return jsonObject; return jsonObject;
@ -901,6 +906,7 @@ public class QyWxOperationService {
// 将返回结果转为json对象 // 将返回结果转为json对象
JSONObject jsonObject = JSON.parseObject(s1); JSONObject jsonObject = JSON.parseObject(s1);
log.info("抄送库存盘点消息结果"+s1);
// 返回 // 返回
return jsonObject; return jsonObject;
@ -995,7 +1001,7 @@ public class QyWxOperationService {
// 将返回结果转为json对象 // 将返回结果转为json对象
JSONObject jsonObject = JSON.parseObject(s1); JSONObject jsonObject = JSON.parseObject(s1);
log.info("发送库存盘点错误消息结果"+s1);
// 返回 // 返回
return jsonObject; return jsonObject;
} }
@ -1130,12 +1136,13 @@ public class QyWxOperationService {
// 将返回结果转为json对象 // 将返回结果转为json对象
JSONObject jsonObject = JSON.parseObject(s1); JSONObject jsonObject = JSON.parseObject(s1);
log.info("抄送库存盘点转移消息结果"+s1);
// 返回 // 返回
return jsonObject; return jsonObject;
} }
// 获取文本卡片模板
public TemplateCard_text_notice getTextNoticeCard(Integer outMinId, Integer quantity,String userKey,String token) { public TemplateCard_text_notice getTextNoticeCard(Integer outMinId, Integer quantity,String userKey,String token) {
// 需要出库的子订单 // 需要出库的子订单
ApplicationOutRecordMin recordMin = depositoryRecordMapper.findApplicationOutMinById(outMinId); ApplicationOutRecordMin recordMin = depositoryRecordMapper.findApplicationOutMinById(outMinId);
@ -1300,6 +1307,7 @@ public class QyWxOperationService {
// 将返回结果转为json对象 // 将返回结果转为json对象
JSONObject jsonObject = JSON.parseObject(s1); JSONObject jsonObject = JSON.parseObject(s1);
log.info("给仓库管理员发送出库通知结果:"+s1);
// 返回 // 返回
return jsonObject; return jsonObject;
} }
@ -1445,7 +1453,7 @@ public class QyWxOperationService {
// 用于设置部门负责人流程 // 用于设置部门负责人流程
Approval_template_approver approval_template_approver_departMentHeader = new Approval_template_approver(); Approval_template_approver approval_template_approver_departMentHeader = new Approval_template_approver();
approval_template_approver_departMentHeader.setAttr(1); approval_template_approver_departMentHeader.setAttr(1);
userIdList = new ArrayList<>(Collections.singleton("PangFuZhen")); // userIdList = new ArrayList<>(Collections.singleton("PangFuZhen"));
approval_template_approver_departMentHeader.setUserid(userIdList); approval_template_approver_departMentHeader.setUserid(userIdList);
@ -1781,7 +1789,7 @@ public class QyWxOperationService {
} }
otherDepartmentIdList.add(departmentHeadWorkwechat); otherDepartmentIdList.add(departmentHeadWorkwechat);
} }
otherDepartmentIdList = new ArrayList<String>(Collections.singleton("PangFuZhen")); // otherDepartmentIdList = new ArrayList<String>(Collections.singleton("PangFuZhen"));
// 用于设置其他部门负责人审批 // 用于设置其他部门负责人审批
@ -1864,6 +1872,7 @@ public class QyWxOperationService {
String s = HttpUtils.doPost(url, jsonString); String s = HttpUtils.doPost(url, jsonString);
JSONObject jsonObject = JSONObject.parseObject(s); JSONObject jsonObject = JSONObject.parseObject(s);
jsonObject.put("otherDepartmentIdList", JSONObject.toJSONString(otherDepartmentIdList)); jsonObject.put("otherDepartmentIdList", JSONObject.toJSONString(otherDepartmentIdList));
log.info("发送出库审批结果:"+s);
return jsonObject; return jsonObject;
} }
@ -1933,7 +1942,7 @@ public class QyWxOperationService {
// 用于设置部门负责人流程 // 用于设置部门负责人流程
Approval_template_approver approval_template_approver_departMentHeader = new Approval_template_approver(); Approval_template_approver approval_template_approver_departMentHeader = new Approval_template_approver();
approval_template_approver_departMentHeader.setAttr(1); approval_template_approver_departMentHeader.setAttr(1);
userIdList = new ArrayList<>(Collections.singleton("PangFuZhen")); // userIdList = new ArrayList<>(Collections.singleton("PangFuZhen"));
approval_template_approver_departMentHeader.setUserid(userIdList); approval_template_approver_departMentHeader.setUserid(userIdList);
@ -2332,6 +2341,7 @@ public class QyWxOperationService {
String s = HttpUtils.doPost(url, jsonString); String s = HttpUtils.doPost(url, jsonString);
JSONObject jsonObject = JSONObject.parseObject(s); JSONObject jsonObject = JSONObject.parseObject(s);
jsonObject.put("otherDepartmentIdList", JSONObject.toJSONString(otherDepartmentIdList)); jsonObject.put("otherDepartmentIdList", JSONObject.toJSONString(otherDepartmentIdList));
log.info("发送出库审批(立即出库)结果:"+s);
return jsonObject; return jsonObject;
} }
@ -2643,13 +2653,13 @@ public class QyWxOperationService {
// 获取处理的仓储负责人 // 获取处理的仓储负责人
List<String> notifyerList = new ArrayList<>(); List<String> notifyerList = new ArrayList<>();
// // 查询负责人 // // 查询负责人
// String user = userToken.getWorkwechat(); String user = userToken.getWorkwechat();
// if (user == null || "".equals(user)) { if (user == null || "".equals(user)) {
// user = userToken.getWechat(); user = userToken.getWechat();
// } }
// notifyerList.add(user); notifyerList.add(user);
workwechat = "PangFuZhen"; // workwechat = "PangFuZhen";
notifyerList.add(workwechat); // notifyerList.add(workwechat);
approvalTemplate.setNotifyer(notifyerList); approvalTemplate.setNotifyer(notifyerList);
//抄送方式:1-提单时抄送(默认值); 2-单据通过后抄送;3-提单和单据通过后抄送。仅use_template_approver为0时生效。 //抄送方式:1-提单时抄送(默认值); 2-单据通过后抄送;3-提单和单据通过后抄送。仅use_template_approver为0时生效。
@ -2663,6 +2673,7 @@ public class QyWxOperationService {
String s = HttpUtils.doPost(url, jsonString); String s = HttpUtils.doPost(url, jsonString);
JSONObject jsonObject = JSONObject.parseObject(s); JSONObject jsonObject = JSONObject.parseObject(s);
log.info("发送入库审批结果:"+s);
return jsonObject; return jsonObject;
} }
@ -3108,6 +3119,7 @@ public class QyWxOperationService {
String s = HttpUtils.doPost(url, jsonString); String s = HttpUtils.doPost(url, jsonString);
JSONObject jsonObject = JSONObject.parseObject(s); JSONObject jsonObject = JSONObject.parseObject(s);
log.info("发送库存盘点审批结果:"+s);
return jsonObject; return jsonObject;
} }
@ -3243,7 +3255,7 @@ public class QyWxOperationService {
// 将返回结果转为json对象 // 将返回结果转为json对象
JSONObject jsonObject = JSON.parseObject(s1); JSONObject jsonObject = JSON.parseObject(s1);
log.info("用于当在系统内进行审批后向其他所有用户发送消息结果:"+s1);
// 返回 // 返回
return jsonObject; return jsonObject;
} }

Loading…
Cancel
Save