|
|
|
@ -766,8 +766,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
flagForApproval = isApprovalPass; |
|
|
|
} |
|
|
|
map.put("flagForApproval", flagForApproval); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 设置审批权限
|
|
|
|
map.put("inType", "mt"); |
|
|
|
// 获取当前类别物料是否需要审批
|
|
|
|
@ -1059,7 +1058,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
// 如果是按基础单位出库
|
|
|
|
|
|
|
|
if (istransfer == 1) {// 如果是库存转移
|
|
|
|
if (istransfer == 1) { |
|
|
|
// 如果是库存转移
|
|
|
|
|
|
|
|
// 获取库存转移订单
|
|
|
|
TransferRecord transferRecordById = transferRecordMapper.findTransferRecordById(applicationOutMinById.getTransferId()); |
|
|
|
placeId = transferRecordById.getFromPlaceId();// 获取转出库位
|
|
|
|
@ -1091,7 +1092,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
placeAndMaterialByMidAndPid = placeMapper.findPlaceAndMaterialByMidAndPid(params); |
|
|
|
if (placeAndMaterialByMidAndPid != null) { |
|
|
|
// 如果当前库位存在该物料
|
|
|
|
if (placeAndMaterialByMidAndPid.getQuantity() < trueOut) { |
|
|
|
if (placeAndMaterialByMidAndPid.getQuantity() < trueOut * 100) { |
|
|
|
// 如果当前库位数量不足
|
|
|
|
flag = false; |
|
|
|
} |
|
|
|
@ -1103,7 +1104,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
} |
|
|
|
} |
|
|
|
// 如果物料数量可以出库并且库位数量充足
|
|
|
|
if (inventory.getQuantity() >= trueOut && flag) { |
|
|
|
if (inventory.getQuantity() >= trueOut * 100 && flag) { |
|
|
|
// 当前出库数量
|
|
|
|
double quantity = trueOut * 100; |
|
|
|
inventory.setQuantity(inventory.getQuantity() - (int) quantity); |
|
|
|
@ -2076,6 +2077,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
*/ |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
void updateApplicationMinOutInfo(Integer id, ApplicationOutRecordMin applicationOutMinById, ApplicationOutRecord record, Double trueOut, UserByPort userByPort, Integer placeId, String userAgent, String userKey, String token) { |
|
|
|
log.info("要出库的子订单数据id:" + id + ",出库数量:" + trueOut + "出库人:" + userByPort.getName() + ":" + userByPort.getNumber()); |
|
|
|
String redisMinRecordKey = "minRecord:" + id; // 设置redis中子订单键值
|
|
|
|
// 修改当前已经出库的数量
|
|
|
|
applicationOutMinById.setTrueOut((int) ((trueOut * 100) + applicationOutMinById.getTrueOut())); |
|
|
|
@ -2112,6 +2114,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
} else { |
|
|
|
redisPool.getRedisTemplateByDb(15).opsForHash().put(otherManager, "minRecord", minRecord); |
|
|
|
} |
|
|
|
log.info("用户Id为:" + item + "的用户,剩余的出库任务为:" + minRecord); |
|
|
|
} |
|
|
|
// 删除已完成的订单
|
|
|
|
redisPool.getRedisTemplateByDb(15).delete(redisMinRecordKey); |
|
|
|
@ -2411,12 +2414,11 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
SendQyWxMessageThreadPool.execute(() -> { |
|
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent, userKey, token); |
|
|
|
String redisOutKey = "wms_notificationOut_" + applicationOutRecordMin.getId(); |
|
|
|
Map<String,String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
Map<String, String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
redisPool.getRedisTemplateByDb(14).opsForHash().putAll(redisOutKey, stringObjectMap); |
|
|
|
redisPool.getRedisTemplateByDb(14).expire(redisOutKey, 72, TimeUnit.HOURS); |
|
|
|
}); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是通过仓库
|
|
|
|
|
|
|
|
|
|
|
|
@ -2492,7 +2494,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
SendQyWxMessageThreadPool.execute(() -> { |
|
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent, userKey, token); |
|
|
|
String redisOutKey = "wms_notificationOut_" + applicationOutRecordMin.getId(); |
|
|
|
Map<String,String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
Map<String, String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
redisPool.getRedisTemplateByDb(14).opsForHash().putAll(redisOutKey, stringObjectMap); |
|
|
|
redisPool.getRedisTemplateByDb(14).expire(redisOutKey, 72, TimeUnit.HOURS); |
|
|
|
}); |
|
|
|
@ -2534,8 +2536,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
// 将当前redis中存储的spno删除
|
|
|
|
redisPool.getRedisTemplateByDb(14).delete("wms_QyWxMessage_" + spNo); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是前两个审批节点
|
|
|
|
|
|
|
|
//定义处理时间
|
|
|
|
@ -3226,8 +3227,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
s = "PangFuZhen,"; |
|
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(id), s, userAgent, 1, userKey, token); |
|
|
|
}); |
|
|
|
} |
|
|
|
else if (map.containsKey("balancePosterPass") && !flagForHasOtherDepository) { |
|
|
|
} else if (map.containsKey("balancePosterPass") && !flagForHasOtherDepository) { |
|
|
|
// 如果是平衡岗人员审批且进入该流程
|
|
|
|
|
|
|
|
String result = ""; |
|
|
|
@ -3333,8 +3333,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
s = "PangFuZhen,"; |
|
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(id), s, userAgent, 1, userKey, token); |
|
|
|
}); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
String result = ""; |
|
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
|
String simpleTime = DateUtil.getSimpleTime(new Date()); |
|
|
|
@ -3473,7 +3472,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
SendQyWxMessageThreadPool.execute(() -> { |
|
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent, userKey, token); |
|
|
|
String redisOutKey = "wms_notificationOut_" + applicationOutRecordMin.getId(); |
|
|
|
Map<String,String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
Map<String, String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
redisPool.getRedisTemplateByDb(14).opsForHash().putAll(redisOutKey, stringObjectMap); |
|
|
|
redisPool.getRedisTemplateByDb(14).expire(redisOutKey, 72, TimeUnit.HOURS); |
|
|
|
}); |
|
|
|
@ -3552,7 +3551,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
SendQyWxMessageThreadPool.execute(() -> { |
|
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent, userKey, token); |
|
|
|
String redisOutKey = "wms_notificationOut_" + applicationOutRecordMin.getId(); |
|
|
|
Map<String,String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
Map<String, String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
redisPool.getRedisTemplateByDb(14).opsForHash().putAll(redisOutKey, stringObjectMap); |
|
|
|
redisPool.getRedisTemplateByDb(14).expire(redisOutKey, 72, TimeUnit.HOURS); |
|
|
|
}); |
|
|
|
@ -3951,7 +3950,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
SendQyWxMessageThreadPool.execute(() -> { |
|
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent, userKey, token); |
|
|
|
String redisOutKey = "wms_notificationOut_" + applicationOutRecordMin.getId(); |
|
|
|
Map<String,String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
Map<String, String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
redisPool.getRedisTemplateByDb(14).opsForHash().putAll(redisOutKey, stringObjectMap); |
|
|
|
redisPool.getRedisTemplateByDb(14).expire(redisOutKey, 72, TimeUnit.HOURS); |
|
|
|
}); |
|
|
|
@ -4029,7 +4028,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
SendQyWxMessageThreadPool.execute(() -> { |
|
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent, userKey, token); |
|
|
|
String redisOutKey = "wms_notificationOut_" + applicationOutRecordMin.getId(); |
|
|
|
Map<String,String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
Map<String, String> stringObjectMap = PublicConfig.returnMapString(jsonObject); |
|
|
|
redisPool.getRedisTemplateByDb(14).opsForHash().putAll(redisOutKey, stringObjectMap); |
|
|
|
redisPool.getRedisTemplateByDb(14).expire(redisOutKey, 72, TimeUnit.HOURS); |
|
|
|
}); |
|
|
|
|