后台代码提交

This commit is contained in:
liuchuan 2023-12-24 15:55:49 +08:00
parent d2b5398d09
commit 1074e16aed
1 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.bonus.sgzb.base.api.domain.TmTask; import com.bonus.sgzb.base.api.domain.TmTask;
import com.bonus.sgzb.common.core.exception.ServiceException;
import com.bonus.sgzb.common.core.utils.DateUtils; import com.bonus.sgzb.common.core.utils.DateUtils;
import com.bonus.sgzb.common.security.utils.SecurityUtils; import com.bonus.sgzb.common.security.utils.SecurityUtils;
import com.bonus.sgzb.material.domain.*; import com.bonus.sgzb.material.domain.*;
@ -13,7 +14,6 @@ import com.bonus.sgzb.material.mapper.*;
import com.bonus.sgzb.material.service.IRepairAuditDetailsService; import com.bonus.sgzb.material.service.IRepairAuditDetailsService;
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO; import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
import com.bonus.sgzb.material.vo.ScrapAudit; import com.bonus.sgzb.material.vo.ScrapAudit;
import javafx.concurrent.Task;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -183,7 +183,11 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
// 添加协议信息表 // 添加协议信息表
TmTaskAgreement taskAgreement = new TmTaskAgreement(); TmTaskAgreement taskAgreement = new TmTaskAgreement();
taskAgreement.setTaskId(task.getTaskId()); taskAgreement.setTaskId(task.getTaskId());
if (tmTaskAgreement.getAgreementId() == null){
throw new ServiceException("缺少协议数据");
}
taskAgreement.setAgreementId(tmTaskAgreement.getAgreementId()); taskAgreement.setAgreementId(tmTaskAgreement.getAgreementId());
taskAgreement.setCreateBy(SecurityUtils.getUsername());
agreementMapper.insertTmTaskAgreement(taskAgreement); agreementMapper.insertTmTaskAgreement(taskAgreement);
// 添加修试后入库任务 // 添加修试后入库任务