|
|
@ -776,8 +776,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
flagForApproval = isApprovalPass; |
|
|
flagForApproval = isApprovalPass; |
|
|
} |
|
|
} |
|
|
map.put("flagForApproval", flagForApproval); |
|
|
map.put("flagForApproval", flagForApproval); |
|
|
} |
|
|
} else { |
|
|
else { |
|
|
|
|
|
// 设置审批权限
|
|
|
// 设置审批权限
|
|
|
map.put("inType", "mt"); |
|
|
map.put("inType", "mt"); |
|
|
// 获取当前类别物料是否需要审批
|
|
|
// 获取当前类别物料是否需要审批
|
|
|
@ -3196,8 +3195,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
int flagForOpenDepository = record.getFlagForOpenDepository(); |
|
|
int flagForOpenDepository = record.getFlagForOpenDepository(); |
|
|
if (manager1 != null && !"".equals(manager1)) { |
|
|
if (manager1 != null && !"".equals(manager1)) { |
|
|
flagForHasOtherDepository = false; |
|
|
flagForHasOtherDepository = false; |
|
|
} |
|
|
} else { |
|
|
else { |
|
|
|
|
|
if (flagForOpenDepository != 1) { |
|
|
if (flagForOpenDepository != 1) { |
|
|
// 如果是开放仓库
|
|
|
// 如果是开放仓库
|
|
|
|
|
|
|
|
|
@ -3417,8 +3415,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
s = "PangFuZhen,"; |
|
|
s = "PangFuZhen,"; |
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toLong(id), s, userAgent, 1, userKey, token); |
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toLong(id), s, userAgent, 1, userKey, token); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} else if (map.containsKey("balancePosterPass") && !flagForHasOtherDepository) { |
|
|
else if (map.containsKey("balancePosterPass") && !flagForHasOtherDepository) { |
|
|
|
|
|
// 如果是平衡岗人员审批且进入该流程
|
|
|
// 如果是平衡岗人员审批且进入该流程
|
|
|
|
|
|
|
|
|
String result = ""; |
|
|
String result = ""; |
|
|
@ -3538,8 +3535,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
s = "PangFuZhen,"; |
|
|
s = "PangFuZhen,"; |
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toLong(id), s, userAgent, 1, userKey, token); |
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toLong(id), s, userAgent, 1, userKey, token); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} else { |
|
|
else { |
|
|
|
|
|
String result = ""; |
|
|
String result = ""; |
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
String simpleTime = DateUtil.getSimpleTime(new Date()); |
|
|
String simpleTime = DateUtil.getSimpleTime(new Date()); |
|
|
@ -4793,6 +4789,31 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
userByPortById.setMaindeparmentname(departmentByUser.getName()); |
|
|
userByPortById.setMaindeparmentname(departmentByUser.getName()); |
|
|
userByPortMap.put(applicantId, userByPortById); |
|
|
userByPortMap.put(applicantId, userByPortById); |
|
|
} |
|
|
} |
|
|
|
|
|
// 当前物料单价
|
|
|
|
|
|
double mprice = ObjectFormatUtil.divide(applicationInRecord.getMprice(), 100.0, 2); |
|
|
|
|
|
// 获取入库数据
|
|
|
|
|
|
double quantity = ObjectFormatUtil.divide(applicationInRecord.getQuantity(), 100.0, 2); |
|
|
|
|
|
// 获取入库单位
|
|
|
|
|
|
String airUnit = applicationInRecord.getAirUnit(); |
|
|
|
|
|
// 获取入库物料单位
|
|
|
|
|
|
String munit = applicationInRecord.getMunit(); |
|
|
|
|
|
double amounts = 0.0; |
|
|
|
|
|
if (munit.equals(airUnit)) { |
|
|
|
|
|
// 如果是基础单位
|
|
|
|
|
|
amounts = ObjectFormatUtil.multiply(mprice, quantity); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 获取当前对应的拆单记录
|
|
|
|
|
|
Map<String, Object> paramForSplitInfo = new HashMap<>(); |
|
|
|
|
|
paramForSplitInfo.put("mid", applicationInRecord.getMid()); |
|
|
|
|
|
paramForSplitInfo.put("newUnit", airUnit); |
|
|
|
|
|
SplitInfo splitInfo = splitUnitMapper.findSplitInfoByMidAndUnit(paramForSplitInfo); |
|
|
|
|
|
// // 获取当前拆单记录与基础单位进制
|
|
|
|
|
|
int splitInfoScaleQuantity = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1L); |
|
|
|
|
|
BigDecimal bg = new BigDecimal(mprice / splitInfoScaleQuantity * quantity); |
|
|
|
|
|
amounts = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
|
|
} |
|
|
|
|
|
applicationInRecord.setPrice(amounts); |
|
|
|
|
|
|
|
|
String time = DateUtil.TimeStampToDateTime(ObjectFormatUtil.toLong(applicationInRecord.getApplicantTime())); |
|
|
String time = DateUtil.TimeStampToDateTime(ObjectFormatUtil.toLong(applicationInRecord.getApplicantTime())); |
|
|
applicationInRecord.setApplicantName(userByPortById.getName()); |
|
|
applicationInRecord.setApplicantName(userByPortById.getName()); |
|
|
applicationInRecord.setApplicantTime(time); |
|
|
applicationInRecord.setApplicantTime(time); |
|
|
@ -4965,8 +4986,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
UserByPort userByPortById = null; |
|
|
UserByPort userByPortById = null; |
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
userByPortById = userByPortMap.get(applicantId); |
|
|
userByPortById = userByPortMap.get(applicantId); |
|
|
} |
|
|
} else { |
|
|
else { |
|
|
|
|
|
userByPortById = userService.findUserByIdForNoPack(applicantId); |
|
|
userByPortById = userService.findUserByIdForNoPack(applicantId); |
|
|
Administration departmentByUser = administrativeService.getDepartmentByUser(userByPortById); |
|
|
Administration departmentByUser = administrativeService.getDepartmentByUser(userByPortById); |
|
|
userByPortById.setMaindeparmentname(departmentByUser.getName()); |
|
|
userByPortById.setMaindeparmentname(departmentByUser.getName()); |
|
|
@ -5121,8 +5141,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
UserByPort userByPortById = null; |
|
|
UserByPort userByPortById = null; |
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
if (userByPortMap.containsKey(applicantId)) { |
|
|
userByPortById = userByPortMap.get(applicantId); |
|
|
userByPortById = userByPortMap.get(applicantId); |
|
|
} |
|
|
} else { |
|
|
else { |
|
|
|
|
|
userByPortById = userService.findUserByIdForNoPack(applicantId); |
|
|
userByPortById = userService.findUserByIdForNoPack(applicantId); |
|
|
Administration departmentByUser = administrativeService.getDepartmentByUser(userByPortById); |
|
|
Administration departmentByUser = administrativeService.getDepartmentByUser(userByPortById); |
|
|
userByPortById.setMaindeparmentname(departmentByUser.getName()); |
|
|
userByPortById.setMaindeparmentname(departmentByUser.getName()); |
|
|
|