|
|
@ -754,7 +754,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); |
|
|
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost,null,null); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null); |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -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"); |
|
|
// 获取当前类别物料是否需要审批
|
|
|
// 获取当前类别物料是否需要审批
|
|
|
@ -794,7 +793,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
paramForGetUserByPost.put("position", uid); |
|
|
paramForGetUserByPost.put("position", uid); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost,null,null); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, null, null); |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -1922,7 +1921,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 强行完成出库
|
|
|
// 强行完成出库
|
|
|
|
|
|
|
|
|
// 获取当前出库人员
|
|
|
// 获取当前出库人员
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(outRecordMin.getCheckId(),userKey,token); |
|
|
UserByPort userByPort = PublicConfig.FindUserById(outRecordMin.getCheckId(), userKey, token); |
|
|
|
|
|
|
|
|
outRecord.setPass(1); |
|
|
outRecord.setPass(1); |
|
|
updateApplicationMinOutInfo(id, outRecordMin, outRecord, (double) (quantity), userByPort, placeById.getId(), userAgent, userKey, token); |
|
|
updateApplicationMinOutInfo(id, outRecordMin, outRecord, (double) (quantity), userByPort, placeById.getId(), userAgent, userKey, token); |
|
|
@ -1941,7 +1940,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
for (RoleAndMaterialType mt : materialTypeIdForIn |
|
|
for (RoleAndMaterialType mt : materialTypeIdForIn |
|
|
) { |
|
|
) { |
|
|
// 获取管理员数据
|
|
|
// 获取管理员数据
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(mt.getUid(),userKey,token); |
|
|
UserByPort userByPort = PublicConfig.FindUserById(mt.getUid(), userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -1959,7 +1958,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
for (RoleAndDepository mt : materialTypeIdForIn |
|
|
for (RoleAndDepository mt : materialTypeIdForIn |
|
|
) { |
|
|
) { |
|
|
// 获取管理员数据
|
|
|
// 获取管理员数据
|
|
|
UserByPort userByPort = PublicConfig.FindUserById(mt.getUserId(),userKey,token); |
|
|
UserByPort userByPort = PublicConfig.FindUserById(mt.getUserId(), userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -2368,7 +2367,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
Long uid = ObjectFormatUtil.toLong(s); |
|
|
Long uid = ObjectFormatUtil.toLong(s); |
|
|
UserByPort depositoryManager = PublicConfig.FindUserById(uid,userKey,token); |
|
|
UserByPort depositoryManager = PublicConfig.FindUserById(uid, userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = depositoryManager.getEmptype(); |
|
|
int emptype = depositoryManager.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -2818,7 +2817,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
map.put("balancePosterTime", DateUtil.DateTimeToTimeStamp(simpleTime)); |
|
|
map.put("balancePosterTime", DateUtil.DateTimeToTimeStamp(simpleTime)); |
|
|
map.put("balancePoster", userByPort.getId()); |
|
|
map.put("balancePoster", userByPort.getId()); |
|
|
// 获取综合办负责人
|
|
|
// 获取综合办负责人
|
|
|
List<UserByPort> departmentHeadByUser = userService.getDepartmentHeaderByIdForNoPack(268L ); |
|
|
List<UserByPort> departmentHeadByUser = userService.getDepartmentHeaderByIdForNoPack(268L); |
|
|
StringBuilder departmentId = new StringBuilder(); |
|
|
StringBuilder departmentId = new StringBuilder(); |
|
|
for (UserByPort byPort : departmentHeadByUser) { |
|
|
for (UserByPort byPort : departmentHeadByUser) { |
|
|
departmentId.append(byPort.getId()).append(","); |
|
|
departmentId.append(byPort.getId()).append(","); |
|
|
@ -3098,7 +3097,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 获取当前转移物料仓库
|
|
|
// 获取当前转移物料仓库
|
|
|
Depository depositoryRecordById = depositoryMapper.findDepositoryById(material.getDepositoryId()); |
|
|
Depository depositoryRecordById = depositoryMapper.findDepositoryById(material.getDepositoryId()); |
|
|
// Administration company = administrativeService.findAdministrationById(userByPort.getMaindeparment());
|
|
|
// Administration company = administrativeService.findAdministrationById(userByPort.getMaindeparment());
|
|
|
Administration company = PublicConfig.getCompany(userByPort.getMaindeparment(),userKey,token); |
|
|
Administration company = PublicConfig.getCompany(userByPort.getMaindeparment(), userKey, token); |
|
|
// 生成出库订单
|
|
|
// 生成出库订单
|
|
|
map.put("code", createCode(depositoryRecordById.getDname(), "outOrderNumber", "out", company.getName())); |
|
|
map.put("code", createCode(depositoryRecordById.getDname(), "outOrderNumber", "out", company.getName())); |
|
|
Object placeId = map.get("fromPlaceId"); |
|
|
Object placeId = map.get("fromPlaceId"); |
|
|
@ -3188,7 +3187,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
|
List<ApplicationOutRecordMin> minByParent = depositoryRecordMapper.findApplicationOutRecordMinByParent(record.getId()); |
|
|
List<ApplicationOutRecordMin> minByParent = depositoryRecordMapper.findApplicationOutRecordMinByParent(record.getId()); |
|
|
// 获取申请用户
|
|
|
// 获取申请用户
|
|
|
UserByPort applicantUser = PublicConfig.FindUserById(record.getApplicantId(),userKey,token); |
|
|
UserByPort applicantUser = PublicConfig.FindUserById(record.getApplicantId(), userKey, token); |
|
|
// 用于标志该仓库是否为前置仓下的仓库
|
|
|
// 用于标志该仓库是否为前置仓下的仓库
|
|
|
boolean flagForHasOtherDepository = true; //默认是前置仓下的仓库
|
|
|
boolean flagForHasOtherDepository = true; //默认是前置仓下的仓库
|
|
|
// 获取当前出库是否为开放出库
|
|
|
// 获取当前出库是否为开放出库
|
|
|
@ -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) { |
|
|
// 如果是开放仓库
|
|
|
// 如果是开放仓库
|
|
|
|
|
|
|
|
|
@ -3277,7 +3275,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
String adminorg = depositoryById.getAdminorg(); |
|
|
String adminorg = depositoryById.getAdminorg(); |
|
|
|
|
|
|
|
|
// List<UserByPort> departmentHeadByUser = userService.getDepartmentHeaderByIdForNoPack(ObjectFormatUtil.toLong(adminorg));
|
|
|
// List<UserByPort> departmentHeadByUser = userService.getDepartmentHeaderByIdForNoPack(ObjectFormatUtil.toLong(adminorg));
|
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(ObjectFormatUtil.toLong(adminorg),userKey,token); |
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(ObjectFormatUtil.toLong(adminorg), userKey, token); |
|
|
|
|
|
|
|
|
for (UserByPort departmentHead : departmentHeadByUser |
|
|
for (UserByPort departmentHead : departmentHeadByUser |
|
|
) { |
|
|
) { |
|
|
@ -3293,7 +3291,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取仓储中心负责人
|
|
|
// 获取仓储中心负责人
|
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(361L,userKey,token); |
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(361L, userKey, token); |
|
|
|
|
|
|
|
|
for (UserByPort userByPort : departmentHeadByUser) { |
|
|
for (UserByPort userByPort : departmentHeadByUser) { |
|
|
depositoryManager.append(userByPort.getId()).append(","); |
|
|
depositoryManager.append(userByPort.getId()).append(","); |
|
|
@ -3342,7 +3340,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
if ("".equals(depositorymanager)) { |
|
|
if ("".equals(depositorymanager)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort depositoryManage = PublicConfig.FindUserById(ObjectFormatUtil.toLong(depositorymanager),userKey,token); |
|
|
UserByPort depositoryManage = PublicConfig.FindUserById(ObjectFormatUtil.toLong(depositorymanager), userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = depositoryManage.getEmptype(); |
|
|
int emptype = depositoryManage.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -3401,7 +3399,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
if ("".equals(s)) { |
|
|
if ("".equals(s)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort userByPort = PublicConfig.FindUserById(ObjectFormatUtil.toLong(s),userKey,token); |
|
|
UserByPort userByPort = PublicConfig.FindUserById(ObjectFormatUtil.toLong(s), userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -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 = ""; |
|
|
@ -3438,7 +3435,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取综合办负责人
|
|
|
// 获取综合办负责人
|
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(268L,userKey,token); |
|
|
List<UserByPort> departmentHeadByUser = PublicConfig.findDepartmentHeadByUser(268L, userKey, token); |
|
|
|
|
|
|
|
|
for (UserByPort userByPort : departmentHeadByUser) { |
|
|
for (UserByPort userByPort : departmentHeadByUser) { |
|
|
depositoryManager.append(userByPort.getId()).append(","); |
|
|
depositoryManager.append(userByPort.getId()).append(","); |
|
|
@ -3463,7 +3460,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
if ("".equals(depositorymanager)) { |
|
|
if ("".equals(depositorymanager)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort depositoryManage = PublicConfig.FindUserById(ObjectFormatUtil.toLong(depositorymanager),userKey,token); |
|
|
UserByPort depositoryManage = PublicConfig.FindUserById(ObjectFormatUtil.toLong(depositorymanager), userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = depositoryManage.getEmptype(); |
|
|
int emptype = depositoryManage.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -3522,7 +3519,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
if ("".equals(s)) { |
|
|
if ("".equals(s)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort userByPort = PublicConfig.FindUserById(ObjectFormatUtil.toLong(s),userKey,token); |
|
|
UserByPort userByPort = PublicConfig.FindUserById(ObjectFormatUtil.toLong(s), userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -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()); |
|
|
@ -3642,7 +3638,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
paramForGetUserByPost.put("position", roleAndMaterialType.getUid()); |
|
|
paramForGetUserByPost.put("position", roleAndMaterialType.getUid()); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost,userKey,token); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -3665,7 +3661,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
|
for (Long integer : userIdByDid) { |
|
|
for (Long integer : userIdByDid) { |
|
|
// 获取仓库管理员信息
|
|
|
// 获取仓库管理员信息
|
|
|
UserByPort manager = PublicConfig.FindUserById(integer,userKey,token); |
|
|
UserByPort manager = PublicConfig.FindUserById(integer, userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = manager.getEmptype(); |
|
|
int emptype = manager.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -3729,7 +3725,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
// 定义用于获取当前岗位下的人的参数map
|
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
Map<String, Object> paramForGetUserByPost = new HashMap<>(); |
|
|
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); |
|
|
paramForGetUserByPost.put("position", roleAndDepository.getUserId()); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost,userKey,token); |
|
|
List<UserByPort> userByPortList = PublicConfig.FindUserByMap(paramForGetUserByPost, userKey, token); |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
for (UserByPort userByPort : userByPortList) { |
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -3754,7 +3750,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 修改redis中用户的数据
|
|
|
// 修改redis中用户的数据
|
|
|
updateRedisDataForUserManager(integer, minRecordKey); |
|
|
updateRedisDataForUserManager(integer, minRecordKey); |
|
|
// 获取仓库管理员信息
|
|
|
// 获取仓库管理员信息
|
|
|
UserByPort manager = PublicConfig.FindUserById(integer,userKey,token); |
|
|
UserByPort manager = PublicConfig.FindUserById(integer, userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = manager.getEmptype(); |
|
|
int emptype = manager.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -3792,7 +3788,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
if ("".equals(s)) { |
|
|
if ("".equals(s)) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
UserByPort userByPort = PublicConfig.FindUserById(ObjectFormatUtil.toLong(s),userKey,token); |
|
|
UserByPort userByPort = PublicConfig.FindUserById(ObjectFormatUtil.toLong(s), userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = userByPort.getEmptype(); |
|
|
int emptype = userByPort.getEmptype(); |
|
|
if (emptype > 10) { |
|
|
if (emptype > 10) { |
|
|
@ -3839,7 +3835,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
SendQyWxMessageThreadPool.execute(() -> { |
|
|
SendQyWxMessageThreadPool.execute(() -> { |
|
|
// 获取responseCode(key为申请人number)
|
|
|
// 获取responseCode(key为申请人number)
|
|
|
//获取部门负责人信息
|
|
|
//获取部门负责人信息
|
|
|
UserByPort departHead = PublicConfig.FindUserById(ObjectFormatUtil.toLong(record.getDepartmenthead()),userKey,token); |
|
|
UserByPort departHead = PublicConfig.FindUserById(ObjectFormatUtil.toLong(record.getDepartmenthead()), userKey, token); |
|
|
// 获取用户的用工关系
|
|
|
// 获取用户的用工关系
|
|
|
int emptype = departHead.getEmptype(); |
|
|
int emptype = departHead.getEmptype(); |
|
|
if (emptype <= 10) { |
|
|
if (emptype <= 10) { |
|
|
@ -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); |
|
|
@ -4941,9 +4962,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 当前单的总额
|
|
|
// 当前单的总额
|
|
|
double amounts = 0.0; |
|
|
double amounts = 0.0; |
|
|
// 当前物料单价
|
|
|
// 当前物料单价
|
|
|
double mprice = ObjectFormatUtil.divide(recordP.getMprice(),100.0,2); |
|
|
double mprice = ObjectFormatUtil.divide(recordP.getMprice(), 100.0, 2); |
|
|
// 当前出库数
|
|
|
// 当前出库数
|
|
|
double quantity = ObjectFormatUtil.divide(recordP.getQuantity(),100.0,2); |
|
|
double quantity = ObjectFormatUtil.divide(recordP.getQuantity(), 100.0, 2); |
|
|
if ("-1".equals(unit) || unit.equals("")) { |
|
|
if ("-1".equals(unit) || unit.equals("")) { |
|
|
amounts = ObjectFormatUtil.multiply(mprice, quantity); |
|
|
amounts = ObjectFormatUtil.multiply(mprice, quantity); |
|
|
} else { |
|
|
} else { |
|
|
@ -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()); |
|
|
@ -5097,9 +5117,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 当前单的总额
|
|
|
// 当前单的总额
|
|
|
double amounts = 0.0; |
|
|
double amounts = 0.0; |
|
|
// 当前物料单价
|
|
|
// 当前物料单价
|
|
|
double mprice = ObjectFormatUtil.divide(recordP.getMprice(),100.0,2); |
|
|
double mprice = ObjectFormatUtil.divide(recordP.getMprice(), 100.0, 2); |
|
|
// 当前出库数
|
|
|
// 当前出库数
|
|
|
double quantity = ObjectFormatUtil.divide(recordP.getQuantity(),100.0,2); |
|
|
double quantity = ObjectFormatUtil.divide(recordP.getQuantity(), 100.0, 2); |
|
|
if ("-1".equals(unit) || unit.equals("")) { |
|
|
if ("-1".equals(unit) || unit.equals("")) { |
|
|
amounts = ObjectFormatUtil.multiply(mprice, quantity); |
|
|
amounts = ObjectFormatUtil.multiply(mprice, quantity); |
|
|
} else { |
|
|
} else { |
|
|
@ -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()); |
|
|
|