退料单查询审核人

This commit is contained in:
hayu 2025-10-10 21:50:14 +08:00
parent d1235dcc06
commit fb20d8517f
4 changed files with 115 additions and 25 deletions

View File

@ -34,6 +34,8 @@ public class BackApplyInfo implements Serializable {
@ApiModelProperty(value = "登录用户id")
private Long userId;
private Long deptId;
/** ID */
private Long id;

View File

@ -189,13 +189,25 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
processBackApplyDetailsSimple(details, typeNumMap, typeCodeMap, allFileInfoMap, newCodeList, maIdCodeMap);
}
//获取审核人
List<LeaseOutSign> approveSignList = backApplyDetailsList.stream()
.filter(detail -> detail.getSignUrl() != null)
.map(detail -> new LeaseOutSign(detail.getSignType(), detail.getSignUrl()))
.distinct() // 去重操作
.collect(Collectors.toList());
if (!org.springframework.util.CollectionUtils.isEmpty(approveSignList)) {
if (backApplyDetailsList.size()>0){
//获取审核人--设备类型绑定的库管班班长
BackApplyInfo backApplyInfo2 = mapper.selectCheckPerson(backApplyDetailsList.get(0));
if (backApplyInfo2!=null){
BackApplyDetails backApplyDetails = null;
if (backApplyInfo2.getDeptId()==107){
//李勇
//查询人员签名
backApplyDetails = mapper.selectSignUrlByUserId(118);
} else if (backApplyInfo2.getDeptId()==336){
//王国宝
backApplyDetails = mapper.selectSignUrlByUserId(455);
} else if (backApplyInfo2.getDeptId()==106 || backApplyInfo2.getDeptId()==335){
//刘春杰
backApplyDetails = mapper.selectSignUrlByUserId(1549);
}
if (backApplyDetails != null && backApplyDetails.getSignUrl() != null) {
List<LeaseOutSign> approveSignList = new ArrayList<>();
approveSignList.add(new LeaseOutSign(backApplyDetails.getSignType(), backApplyDetails.getSignUrl()));
for (LeaseOutSign leaseOutSign : approveSignList) {
if (StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) {
if (!leaseOutSign.getOutSignUrl().startsWith("http")) {
@ -205,6 +217,25 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
}
backApplyRequestVo.getBackApplyInfo().setApproveSignList(approveSignList);
}
}
}
// //获取审核人
// List<LeaseOutSign> approveSignList = backApplyDetailsList.stream()
// .filter(detail -> detail.getSignUrl() != null)
// .map(detail -> new LeaseOutSign(detail.getSignType(), detail.getSignUrl()))
// .distinct() // 去重操作
// .collect(Collectors.toList());
// if (!org.springframework.util.CollectionUtils.isEmpty(approveSignList)) {
// for (LeaseOutSign leaseOutSign : approveSignList) {
// if (StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) {
// if (!leaseOutSign.getOutSignUrl().startsWith("http")) {
// leaseOutSign.setOutSignUrl("data:image/png;base64," + leaseOutSign.getOutSignUrl());
// }
// }
// }
// backApplyRequestVo.getBackApplyInfo().setApproveSignList(approveSignList);
// }
backApplyRequestVo.setBackApplyDetailsList(backApplyDetailsList);
}
@ -310,14 +341,25 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
for (BackApplyDetails details : backApplyDetailsList) {
processBackApplyDetailsSimple(details, typeNumMap, typeCodeMap, allFileInfoMap, newCodeList, maIdCodeMap);
}
//获取审核人
List<LeaseOutSign> approveSignList = backApplyDetailsList.stream()
.filter(detail -> detail.getSignUrl() != null)
.map(detail -> new LeaseOutSign(detail.getSignType(), detail.getSignUrl()))
.distinct() // 去重操作
.collect(Collectors.toList());
if (!org.springframework.util.CollectionUtils.isEmpty(approveSignList)) {
if (backApplyDetailsList.size()>0){
//获取审核人--设备类型绑定的库管班班长
BackApplyInfo backApplyInfo2 = mapper.selectCheckPerson(backApplyDetailsList.get(0));
if (backApplyInfo2!=null){
BackApplyDetails backApplyDetails = null;
if (backApplyInfo2.getDeptId()==107){
//李勇
//查询人员签名
backApplyDetails = mapper.selectSignUrlByUserId(118);
} else if (backApplyInfo2.getDeptId()==336){
//王国宝
backApplyDetails = mapper.selectSignUrlByUserId(455);
} else if (backApplyInfo2.getDeptId()==106 || backApplyInfo2.getDeptId()==335){
//刘春杰
backApplyDetails = mapper.selectSignUrlByUserId(1549);
}
if (backApplyDetails != null && backApplyDetails.getSignUrl() != null) {
List<LeaseOutSign> approveSignList = new ArrayList<>();
approveSignList.add(new LeaseOutSign(backApplyDetails.getSignType(), backApplyDetails.getSignUrl()));
for (LeaseOutSign leaseOutSign : approveSignList) {
if (StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) {
if (!leaseOutSign.getOutSignUrl().startsWith("http")) {
@ -327,6 +369,26 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
}
backApplyRequestVo.getBackApplyInfo().setApproveSignList(approveSignList);
}
}
}
// //获取审核人
// List<LeaseOutSign> approveSignList = backApplyDetailsList.stream()
// .filter(detail -> detail.getSignUrl() != null)
// .map(detail -> new LeaseOutSign(detail.getSignType(), detail.getSignUrl()))
// .distinct() // 去重操作
// .collect(Collectors.toList());
// if (!org.springframework.util.CollectionUtils.isEmpty(approveSignList)) {
// for (LeaseOutSign leaseOutSign : approveSignList) {
// if (StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) {
// if (!leaseOutSign.getOutSignUrl().startsWith("http")) {
// leaseOutSign.setOutSignUrl("data:image/png;base64," + leaseOutSign.getOutSignUrl());
// }
// }
// }
// backApplyRequestVo.getBackApplyInfo().setApproveSignList(approveSignList);
// }
backApplyRequestVo.setBackApplyDetailsList(backApplyDetailsList);

View File

@ -3,6 +3,7 @@ package com.bonus.material.common.mapper;
import com.bonus.common.biz.domain.ProjectTreeNode;
import com.bonus.common.biz.domain.TreeNode;
import com.bonus.common.biz.domain.TypeTreeNode;
import com.bonus.material.back.domain.BackApplyDetails;
import com.bonus.material.back.domain.BackApplyInfo;
import com.bonus.material.basic.domain.BmProject;
import com.bonus.material.basic.domain.BmUnit;
@ -380,4 +381,7 @@ public interface SelectMapper {
*/
List<String> getUnsettledProId();
BackApplyInfo selectCheckPerson(BackApplyDetails details);
BackApplyDetails selectSignUrlByUserId(int userId);
}

View File

@ -1193,4 +1193,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- )-->
<!-- AND bp.pro_id IS NOT NULL-->
</select>
<select id="selectCheckPerson" resultType="com.bonus.material.back.domain.BackApplyInfo">
SELECT
mtr.user_id as userId,
su.dept_id as deptId
FROM
ma_type_repair mtr
LEFT JOIN sys_user su on su.user_id=mtr.user_id
WHERE
mtr.type_id=#{typeId}
and (su.dept_id='107' or su.dept_id='336' or su.dept_id='106' or su.dept_id='335')
GROUP BY su.dept_id
LIMIT 1
</select>
<select id="selectSignUrlByUserId" resultType="com.bonus.material.back.domain.BackApplyDetails">
SELECT
sign_url as signUrl,
sign_type as signType
FROM
sys_user
WHERE
user_id=#{userId}
</select>
</mapper>