Compare commits
2 Commits
ffeea860d9
...
ccbed741c7
| Author | SHA1 | Date |
|---|---|---|
|
|
ccbed741c7 | |
|
|
b0a4f046fd |
|
|
@ -130,4 +130,10 @@ public class BackApplyDetails extends BaseEntity {
|
|||
private Long firstId;
|
||||
|
||||
List<MaCodeDto> maVos;
|
||||
|
||||
@ApiModelProperty(value = "签名URL")
|
||||
private String signUrl;
|
||||
|
||||
@ApiModelProperty(value = "签名类型")
|
||||
private int signType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutSign;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -221,4 +222,9 @@ public class BackApplyInfo implements Serializable {
|
|||
|
||||
@ApiModelProperty(value = "制单人签名类型 手写0 和 图片上传1")
|
||||
private int signType;
|
||||
|
||||
/**
|
||||
* 审核签名集合
|
||||
*/
|
||||
private List<LeaseOutSign> approveSignList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.bonus.common.biz.constant.GlobalConstants;
|
|||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.biz.domain.TypeTreeNode;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutSign;
|
||||
import com.bonus.common.biz.enums.*;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
|
|
@ -119,16 +120,16 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
backApplyInfo.setUserId(userId == 0 ? null : userId);
|
||||
}*/
|
||||
|
||||
// 设置审批人签名url,目前固定查询夏成刚签名信息
|
||||
BackApplyInfo info = backApplyInfoMapper.getDirectAuditUrl(backApplyInfo);
|
||||
if (info != null && StringUtils.isNotBlank(info.getDirectAuditSignUrl())) {
|
||||
backApplyInfo.setDirectAuditSignType(info.getDirectAuditSignType());
|
||||
if (!info.getDirectAuditSignUrl().startsWith("http")) {
|
||||
backApplyInfo.setDirectAuditSignUrl("data:image/png;base64," + info.getDirectAuditSignUrl());
|
||||
} else {
|
||||
backApplyInfo.setDirectAuditSignUrl(info.getDirectAuditSignUrl());
|
||||
}
|
||||
}
|
||||
// // 设置审批人签名url,目前固定查询夏成刚签名信息
|
||||
// BackApplyInfo info = backApplyInfoMapper.getDirectAuditUrl(backApplyInfo);
|
||||
// if (info != null && StringUtils.isNotBlank(info.getDirectAuditSignUrl())) {
|
||||
// backApplyInfo.setDirectAuditSignType(info.getDirectAuditSignType());
|
||||
// if (!info.getDirectAuditSignUrl().startsWith("http")) {
|
||||
// backApplyInfo.setDirectAuditSignUrl("data:image/png;base64," + info.getDirectAuditSignUrl());
|
||||
// } else {
|
||||
// backApplyInfo.setDirectAuditSignUrl(info.getDirectAuditSignUrl());
|
||||
// }
|
||||
// }
|
||||
|
||||
// 设置退料人签名url
|
||||
if (StringUtils.isNotBlank(backApplyInfo.getBackSignUrl())) {
|
||||
|
|
@ -188,6 +189,23 @@ 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)) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -224,16 +242,16 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
backApplyInfo.setUserId(userId == 0 ? null : userId);
|
||||
}*/
|
||||
|
||||
// 设置审批人签名url,目前固定查询夏成刚签名信息
|
||||
BackApplyInfo info = backApplyInfoMapper.getDirectAuditUrl(backApplyInfo);
|
||||
if (info != null && StringUtils.isNotBlank(info.getDirectAuditSignUrl())) {
|
||||
backApplyInfo.setDirectAuditSignType(info.getDirectAuditSignType());
|
||||
if (!info.getDirectAuditSignUrl().startsWith("http")) {
|
||||
backApplyInfo.setDirectAuditSignUrl("data:image/png;base64," + info.getDirectAuditSignUrl());
|
||||
} else {
|
||||
backApplyInfo.setDirectAuditSignUrl(info.getDirectAuditSignUrl());
|
||||
}
|
||||
}
|
||||
// // 设置审批人签名url,目前固定查询夏成刚签名信息
|
||||
// BackApplyInfo info = backApplyInfoMapper.getDirectAuditUrl(backApplyInfo);
|
||||
// if (info != null && StringUtils.isNotBlank(info.getDirectAuditSignUrl())) {
|
||||
// backApplyInfo.setDirectAuditSignType(info.getDirectAuditSignType());
|
||||
// if (!info.getDirectAuditSignUrl().startsWith("http")) {
|
||||
// backApplyInfo.setDirectAuditSignUrl("data:image/png;base64," + info.getDirectAuditSignUrl());
|
||||
// } else {
|
||||
// backApplyInfo.setDirectAuditSignUrl(info.getDirectAuditSignUrl());
|
||||
// }
|
||||
// }
|
||||
|
||||
// 设置退料人签名url
|
||||
if (StringUtils.isNotBlank(backApplyInfo.getBackSignUrl())) {
|
||||
|
|
@ -293,6 +311,24 @@ 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)) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -284,6 +284,15 @@ public class LeaseTaskController extends BaseController {
|
|||
return success(service.selectLeaseApplyInfoById(id, keyWord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据业务单号查询业务联系单
|
||||
*/
|
||||
@ApiOperation(value = "根据业务单号查询业务联系单")
|
||||
@GetMapping(value = "/getBusinessFormByCode")
|
||||
public AjaxResult getBusinessFormByCode(LeaseApplyInfo leaseApplyInfo) {
|
||||
return service.getBusinessFormByCode(leaseApplyInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改领用任务
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -342,4 +342,11 @@ public interface LeaseTaskMapper {
|
|||
* @return
|
||||
*/
|
||||
int deleteRecord(Integer recordId);
|
||||
|
||||
/**
|
||||
* 根据业务联系单号查询任务id
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
LeaseApplyInfo getIdByBusinessCode(LeaseApplyInfo leaseApplyInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,5 +171,12 @@ public interface ILeaseTaskService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult revoke(LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
/**
|
||||
* 根据业务单号查询业务联系单
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getBusinessFormByCode(LeaseApplyInfo leaseApplyInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1407,6 +1407,26 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getBusinessFormByCode(LeaseApplyInfo leaseApplyInfo) {
|
||||
try {
|
||||
//业务联系单号是否为空
|
||||
if (StringUtils.isEmpty(leaseApplyInfo.getBusinessCode())) {
|
||||
return AjaxResult.error("业务联系单查询失败, 业务联系单号不能为空");
|
||||
}
|
||||
//业务联系单号查出的数据是否为空
|
||||
LeaseApplyInfo leaseApplyInfo1 = mapper.getIdByBusinessCode(leaseApplyInfo);
|
||||
if (leaseApplyInfo1 == null || leaseApplyInfo1.getId() == null) {
|
||||
return AjaxResult.error("业务联系单查询失败, 业务联系单号不存在");
|
||||
}
|
||||
LeaseApplyRequestVo leaseApplyRequestVo = selectLeaseApplyInfoById(leaseApplyInfo1.getId(), "");
|
||||
return AjaxResult.success(leaseApplyRequestVo);
|
||||
} catch (Exception e) {
|
||||
log.error("业务联系单查询失败:", e);
|
||||
return AjaxResult.error("业务联系单查询失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成发布批次任务
|
||||
* @param thisMonthMaxOrder
|
||||
|
|
|
|||
|
|
@ -213,7 +213,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bcd.create_time AS createTime,
|
||||
bcd.remark AS remark,
|
||||
mt.manage_type AS manageType,
|
||||
mt3.type_id AS firstId
|
||||
mt3.type_id AS firstId,
|
||||
su.sign_url as signUrl,
|
||||
su.sign_type as signType
|
||||
FROM
|
||||
back_check_details bcd
|
||||
LEFT JOIN back_apply_info bai ON bcd.parent_id = bai.id
|
||||
|
|
@ -221,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = 0
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id and mt2.del_flag = 0
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = 0
|
||||
left join sys_user su on su.user_id = mt2.keep_user_id
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_repair mtr ON mtr.type_id = bcd.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -1315,4 +1315,12 @@
|
|||
WHERE
|
||||
si.business_id= #{recordId}
|
||||
</select>
|
||||
<select id="getIdByBusinessCode" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
lease_apply_info
|
||||
WHERE
|
||||
`code`=#{businessCode}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue