领料出库流程调试
This commit is contained in:
parent
825e65fe0d
commit
0d53867d46
|
|
@ -133,9 +133,9 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
if (!CollectionUtils.isEmpty(details)) {
|
||||
for (LeaseApplyDetails detail : details) {
|
||||
if (detail.getOutNum().compareTo(detail.getAlNum()) == 0) {
|
||||
detail.setStatus("1");
|
||||
detail.setStatus("2");
|
||||
} else {
|
||||
detail.setStatus("0");
|
||||
detail.setStatus("1");
|
||||
}
|
||||
}
|
||||
info.setLeaseApplyDetailsList(details);
|
||||
|
|
@ -168,6 +168,15 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
// 查询领用出库数据
|
||||
List<LeaseApplyInfo> leaseApplyOutList = leaseApplyInfoMapper.selectPublishList(leaseApplyInfo);
|
||||
if (!CollectionUtils.isEmpty(leaseApplyOutList)) {
|
||||
for (LeaseApplyInfo applyInfo : leaseApplyOutList) {
|
||||
if (applyInfo.getPreCountNum().compareTo(applyInfo.getAlNum()) == 0) {
|
||||
applyInfo.setTaskStatus(LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatus());
|
||||
applyInfo.setTaskStatusName(LeaseTaskStatusEnum.LEASE_TASK_FINISHED.getStatusName());
|
||||
} else {
|
||||
applyInfo.setTaskStatus(LeaseTaskStatusEnum.LEASE_TASK_IN_PROGRESS.getStatus());
|
||||
applyInfo.setTaskStatusName(LeaseTaskStatusEnum.LEASE_TASK_IN_PROGRESS.getStatusName());
|
||||
}
|
||||
}
|
||||
list.addAll(leaseApplyOutList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
List<LeaseApplyDetails> details = leaseApplyDetailsMapper.getDetailsPublish(record.getPublishTask());
|
||||
if (!CollectionUtils.isEmpty(details)) {
|
||||
for (LeaseApplyDetails bean : details) {
|
||||
if (bean.getAlNum().compareTo(bean.getNum()) != 0) {
|
||||
if (bean.getAlNum().compareTo(bean.getPreNum()) != 0) {
|
||||
isFinished = false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -443,7 +443,11 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
sltAgreementInfo.setNum(num.add(outNum));
|
||||
res = sltAgreementInfoMapper.updSltInfo(sltAgreementInfo);
|
||||
} else {
|
||||
String agreementId = tmTaskAgreementMapper.getAgreementId(taskId);
|
||||
String agreementId = " ";
|
||||
agreementId = tmTaskAgreementMapper.getAgreementId(taskId);
|
||||
if (StringUtils.isBlank(agreementId)) {
|
||||
agreementId = tmTaskAgreementMapper.selectAgreementId(record.getPublishTask());
|
||||
}
|
||||
String protocol = bmAgreementInfoMapper.getProtocol(agreementId);
|
||||
Type maType = typeMapper.getMaType(record.getTypeId());
|
||||
if (StringUtils.isEmpty(protocol)) {
|
||||
|
|
|
|||
|
|
@ -71,4 +71,11 @@ public interface TmTaskAgreementMapper {
|
|||
* @return
|
||||
*/
|
||||
Long selectAgreementIdByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 根据发布任务ID获取协议ID
|
||||
* @param publishTask
|
||||
* @return
|
||||
*/
|
||||
String selectAgreementId(String publishTask);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,9 +113,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN lease_apply_info lai ON lod.parent_id = lai.id
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info ba ON tta.agreement_id = ba.agreement_id
|
||||
LEFT JOIN slt_agreement_info sai on lod.type_id = sai.type_id
|
||||
LEFT JOIN bm_agreement_info ba ON sai.agreement_id = ba.agreement_id
|
||||
WHERE
|
||||
1 = 1 and mm.ma_status = '2' and mm.type_id = #{typeId}
|
||||
AND ba.unit_id = #{unitId}
|
||||
|
|
|
|||
|
|
@ -422,7 +422,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.type_name AS typeName,
|
||||
mt.unit_name AS unitName,
|
||||
lpd.new_type AS typeId,
|
||||
IFNULL( lpd.num, 0 ) AS outNum,
|
||||
IFNULL( lpd.num, 0 ) AS preNum,
|
||||
IFNULL( lpd.num, 0 ) - IFNULL( SUM( lod.out_num ), 0 ) AS outNum,
|
||||
IFNULL( SUM( lod.out_num ), 0 ) AS alNum,
|
||||
lpd.publish_task AS publishTask
|
||||
FROM
|
||||
|
|
|
|||
|
|
@ -263,8 +263,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bu.unit_name AS leaseUnit,
|
||||
bp.pro_name AS leaseProject,
|
||||
bai.agreement_code AS agreementCode,
|
||||
tt.task_status AS taskStatus,
|
||||
sda.dict_label AS taskStatusName,
|
||||
IFNULL( sum( lpd.num ), 0 ) AS preCountNum,
|
||||
IFNULL( sum( lod.out_num ), 0 ) AS alNum,
|
||||
GROUP_CONCAT( mt1.type_name ) AS maTypeNames,
|
||||
|
|
@ -278,8 +276,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_unit bu ON bu.unit_id = lpd.unit_id
|
||||
LEFT JOIN bm_project bp ON bp.pro_id = lpd.project_id
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||
LEFT JOIN sys_dict_data sda ON tt.task_status = sda.dict_value
|
||||
AND sda.dict_type = 'lease_task_status'
|
||||
LEFT JOIN ma_type mt ON lpd.new_type = mt.type_id
|
||||
AND mt.del_flag = '0'
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
|
|
|
|||
|
|
@ -104,4 +104,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectAgreementIdByTaskId" resultType="java.lang.Long">
|
||||
select agreement_id from tm_task_agreement where task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
<select id="selectAgreementId" resultType="java.lang.String">
|
||||
SELECT bai.agreement_id
|
||||
FROM bm_agreement_info bai
|
||||
LEFT JOIN lease_publish_details lpd ON bai.unit_id = lpd.unit_id
|
||||
AND bai.project_id = lpd.project_id
|
||||
WHERE lpd.publish_task = #{publishTask}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue