|
|
|
@ -1,6 +1,5 @@ |
|
|
|
package com.dreamchaser.depository_manage.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.dreamchaser.depository_manage.config.PublicConfig; |
|
|
|
import com.dreamchaser.depository_manage.config.QyWxConfig; |
|
|
|
@ -767,8 +766,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
flagForApproval = isApprovalPass; |
|
|
|
} |
|
|
|
map.put("flagForApproval", flagForApproval); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 设置审批权限
|
|
|
|
map.put("inType", "mt"); |
|
|
|
// 获取当前类别物料是否需要审批
|
|
|
|
@ -842,7 +840,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
Integer updateInventoryInfoForApproval(Map<String, Object> map, double quantity, Material materialById, Place placeById) { |
|
|
|
log.info("入库审批后要修改的数据: "+JSONObject.toJSONString(map)+JSONObject.toJSONString(materialById)+JSONObject.toJSONString(placeById)); |
|
|
|
log.info("入库审批后要修改的数据: " + JSONObject.toJSONString(map) + JSONObject.toJSONString(materialById) + JSONObject.toJSONString(placeById)); |
|
|
|
// 获取当前入库的物料id
|
|
|
|
Integer newInMid = ObjectFormatUtil.toInteger(map.get("newInMid")); |
|
|
|
// 获取当前入库记录id
|
|
|
|
@ -2498,9 +2496,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
// 将主订单插入到redis中
|
|
|
|
redisPool.getRedisTemplateByDb(15).opsForHash().put("record:" + recordP.getId(), "minRecord", minRecordByMain.toString()); |
|
|
|
map.put("state", "仓储中心负责人审核通过"); |
|
|
|
map.put("state", userByPort.getName()+"审核通过"); |
|
|
|
if (flagForDepartmentHeadPass || flagForOpenDepository == 2) { |
|
|
|
map.put("state", "部门负责人审核通过"); |
|
|
|
map.put("state", userByPort.getName()+"审核通过"); |
|
|
|
map.put("departmentheadTime", DateUtil.DateTimeToTimeStamp(simpleTime)); |
|
|
|
map.put("depositoryManagerPass", 4); |
|
|
|
map.put("departmenthead", userByPort.getId()); |
|
|
|
@ -2512,10 +2510,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
updateInventoryForOutRefused(recordP); |
|
|
|
map.put("depositoryManagerPass", 2); |
|
|
|
map.put("pass", 2); |
|
|
|
map.put("state", "仓储中心负责人审核未通过"); |
|
|
|
map.put("state", userByPort.getName() + "审核未通过"); |
|
|
|
if (flagForDepartmentHeadPass || flagForOpenDepository == 2) { |
|
|
|
map.put("departmentheadPass", 2); |
|
|
|
map.put("state", "部门负责人审核未通过"); |
|
|
|
map.put("state", userByPort.getName() + "审核未通过"); |
|
|
|
map.put("departmentheadTime", DateUtil.DateTimeToTimeStamp(simpleTime)); |
|
|
|
map.put("departmenthead", userByPort.getId()); |
|
|
|
map.put("depositoryManagerPass", 4); |
|
|
|
@ -2553,7 +2551,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
} else { |
|
|
|
map.put("state", "待仓储中心负责人审核"); |
|
|
|
// 获取仓储中心负责人标签的用户userId
|
|
|
|
List<String> qyWxLabelUserList = QyWxConfig.getQyWxLabelUserList(userAgent); |
|
|
|
List<String> qyWxLabelUserList = QyWxConfig.getQyWxLabelUserListForLabelName(userAgent, "仓储中心负责人"); |
|
|
|
for (String s : qyWxLabelUserList) { |
|
|
|
Map<String, Object> userByQyWxUserId = PublicConfig.findUserByQyWxUserId(s); |
|
|
|
UserByPort user = (UserByPort) userByQyWxUserId.get("user"); |
|
|
|
@ -2568,7 +2566,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
updateInventoryForOutRefused(recordP); |
|
|
|
map.put("pass", 2); |
|
|
|
map.put("departmentheadPass", 2); |
|
|
|
map.put("state", "部门负责人审核未通过"); |
|
|
|
map.put("state", userByPort.getName() + "审核未通过"); |
|
|
|
redisPool.getRedisTemplateByDb(14).delete("wms_QyWxMessage_" + spNo); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -3044,7 +3042,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
updateInventoryForOutRefused(record); |
|
|
|
result = "驳回"; |
|
|
|
map.put("pass", 2); |
|
|
|
map.put("state", "部门负责人审核未通过"); |
|
|
|
map.put("state", userToken.getName()+"审核未通过"); |
|
|
|
} |
|
|
|
|
|
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
|
@ -3327,10 +3325,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
// 将主订单插入到redis中
|
|
|
|
redisPool.getRedisTemplateByDb(15).opsForHash().put("record:" + record.getId(), "minRecord", minRecordByMain.toString()); |
|
|
|
map.put("state", "仓储中心负责人审核通过"); |
|
|
|
map.put("state", userToken.getName()+"审核通过"); |
|
|
|
|
|
|
|
if (flagFordepartmentTime || flagForOpenDepository == 2) { |
|
|
|
map.put("state", "部门负责人审核通过"); |
|
|
|
map.put("state", userToken.getName()+"审核通过"); |
|
|
|
map.put("departmentheadTime", DateUtil.DateTimeToTimeStamp(simpleTime)); |
|
|
|
map.put("depositoryManagerPass", 4); |
|
|
|
map.put("departmenthead", userToken.getId()); |
|
|
|
@ -3341,9 +3339,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
updateInventoryForOutRefused(record); |
|
|
|
result = "驳回"; |
|
|
|
map.put("pass", 2); |
|
|
|
map.put("state", "仓储中心负责人审核未通过"); |
|
|
|
map.put("state", userToken.getName()+"审核未通过"); |
|
|
|
if (flagFordepartmentTime) { |
|
|
|
map.put("state", "部门负责人审核未通过"); |
|
|
|
map.put("state", userToken.getName()+"审核未通过"); |
|
|
|
map.put("departmenthead", userToken.getId()); |
|
|
|
map.put("departmentheadPass", 2); |
|
|
|
map.put("departmentheadTime", DateUtil.DateTimeToTimeStamp(simpleTime)); |
|
|
|
@ -3567,7 +3565,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
// 如果点击的是驳回
|
|
|
|
map.put("pass", 2); |
|
|
|
map.put("departmentheadPass", 2); |
|
|
|
map.put("state", "部门负责人审核未通过"); |
|
|
|
map.put("state", userByPort.getName()+"审核未通过"); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
@ -3782,13 +3780,13 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
// 将主订单插入到redis中
|
|
|
|
redisPool.getRedisTemplateByDb(15).opsForHash().put("record:" + recordP.getId(), "minRecord", minRecordByMain.toString()); |
|
|
|
map.put("state", "仓储中心负责人审核通过"); |
|
|
|
map.put("state", userByPort.getName()+"审核通过"); |
|
|
|
} else { |
|
|
|
// 如果是不通过
|
|
|
|
updateInventoryForOutRefused(recordP); |
|
|
|
map.put("depositoryManagerPass", 2); |
|
|
|
map.put("pass", 2); |
|
|
|
map.put("state", "仓储中心负责人审核未通过"); |
|
|
|
map.put("state", userByPort.getName()+"审核未通过"); |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("id", outId); |
|
|
|
|