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