领用无法发布已结算协议
This commit is contained in:
parent
9003c84147
commit
2dc94f20b8
|
|
@ -1072,6 +1072,10 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
try {
|
||||
int result = 0;
|
||||
LeaseApplyInfo leaseApplyInfo = leaseApplyRequestVo.getLeaseApplyInfo();
|
||||
TmTaskAgreement taskAgreement = mapper.getAgreementInfo(leaseApplyInfo);
|
||||
if (taskAgreement == null) {
|
||||
return AjaxResult.error("该协议已结算,无法发布,请重新选择其他领用单位发布");
|
||||
}
|
||||
List<LeaseApplyDetails> leaseApplyDetailsList = leaseApplyRequestVo.getLeaseApplyDetailsList();
|
||||
Long parentId = leaseApplyDetailsList.get(0).getParentId();
|
||||
int thisMonthMaxOrder = mapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth());
|
||||
|
|
|
|||
|
|
@ -1152,12 +1152,16 @@
|
|||
</delete>
|
||||
|
||||
<select id="getAgreementInfo" resultType="com.bonus.material.task.domain.TmTaskAgreement">
|
||||
select
|
||||
agreement_id as agreementId
|
||||
from
|
||||
bm_agreement_info
|
||||
where unit_id = #{unitId} and project_id = #{projectId}
|
||||
limit 1
|
||||
SELECT
|
||||
bai.agreement_id AS agreementId
|
||||
FROM
|
||||
bm_agreement_info bai
|
||||
LEFT JOIN slt_agreement_info sai ON bai.agreement_id = sai.agreement_id
|
||||
WHERE
|
||||
sai.is_slt = '0'
|
||||
AND bai.unit_id = #{unitId}
|
||||
AND bai.project_id = #{projectId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
<select id="selectById" resultType="com.bonus.material.basic.domain.BmProject">
|
||||
select pro_id as proId,
|
||||
|
|
|
|||
|
|
@ -1440,8 +1440,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ma_machine mi
|
||||
INNER JOIN slt_agreement_info sai ON mi.ma_id = sai.ma_id AND sai.end_time is null AND sai.status = '0'
|
||||
INNER JOIN ma_type mt ON sai.type_id = mt.type_id AND mt.`level` = '4'
|
||||
set
|
||||
mi.status = '18', mi.update_time = NOW()
|
||||
set
|
||||
mi.ma_status = '18', mi.update_time = NOW()
|
||||
where
|
||||
sai.agreement_id = #{agreementId} AND mt.jiju_type = #{settlementType}
|
||||
</update>
|
||||
|
|
|
|||
Loading…
Reference in New Issue