Merge remote-tracking branch 'origin/master'

This commit is contained in:
liang.chao 2024-09-30 11:30:54 +08:00
commit c1f82de915
4 changed files with 9 additions and 5 deletions

View File

@ -551,9 +551,8 @@ public class TmTaskController extends BaseController {
tmTaskService.edit(task); tmTaskService.edit(task);
return AjaxResult.success("修改成功"); return AjaxResult.success("修改成功");
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error("修改失败"); return AjaxResult.error("修改失败"+e.getMessage());
} }
} }
/** /**

View File

@ -71,7 +71,7 @@ public interface TmTaskService{
int updateByPrimaryKeySelective(TmTask record); int updateByPrimaryKeySelective(TmTask record);
int edit(TmTask tmTask); int edit(TmTask tmTask) throws Exception;
int editCq(TmTask tmTask); int editCq(TmTask tmTask);
Integer getAgreementIdByUnit(TmTask task); Integer getAgreementIdByUnit(TmTask task);

View File

@ -1021,7 +1021,7 @@ public class TmTaskServiceImpl implements TmTaskService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int edit(TmTask tmTask) { public int edit(TmTask tmTask) throws Exception {
int res = 0; int res = 0;
//修改任务信息tm_task //修改任务信息tm_task
this.updateByPrimaryKeySelective(tmTask); this.updateByPrimaryKeySelective(tmTask);
@ -1053,6 +1053,7 @@ public class TmTaskServiceImpl implements TmTaskService {
} }
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw new Exception(e.getMessage());
} }
return res; return res;
} }
@ -1198,6 +1199,9 @@ public class TmTaskServiceImpl implements TmTaskService {
Long taskId = task.getTaskId(); Long taskId = task.getTaskId();
if (CollUtil.isNotEmpty(leaseApplyDetails)) { if (CollUtil.isNotEmpty(leaseApplyDetails)) {
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) { for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
if (leaseApplyDetail.getPreNum() == null || leaseApplyDetail.getPreNum().equals(0)) {
return 0;
}
LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo(); LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo();
if (leaseApplyDetail.getCompanyId() == null) { if (leaseApplyDetail.getCompanyId() == null) {
leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompIdCq(String.valueOf(taskId)); leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompIdCq(String.valueOf(taskId));

View File

@ -624,7 +624,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ma_type mt ma_type mt
LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id
WHERE WHERE
EXISTS ( SELECT 1 FROM slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId} AND sai2.STATUS = '0' and sai.lease_type = 0) EXISTS ( SELECT 1 FROM slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId}
AND sai2.STATUS = '0' and sai.lease_type = 0 and sai2.num > 0)
GROUP BY GROUP BY
mt.type_id mt.type_id
</select> </select>