班组退料
This commit is contained in:
parent
e586306296
commit
aba67051f6
|
|
@ -10,6 +10,7 @@ import javax.validation.constraints.NotNull;
|
|||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.archives.service.ArchivesService;
|
||||
|
|
@ -371,6 +372,9 @@ public class BackApplyInfoController extends BaseController {
|
|||
public AjaxResult submitBackApply(@RequestBody BackApplyInfo backApplyInfo) {
|
||||
try {
|
||||
BmUnit unit = taskMapper.selectBmUnitInfo(backApplyInfo);
|
||||
if (unit != null && unit.getTypeId() == null) {
|
||||
throw new ServiceException("单位类型为空");
|
||||
}
|
||||
if (unit != null && unit.getTypeId() == 1731L) {
|
||||
// 班组退料提交
|
||||
return backApplyInfoService.submitBzBackApply(backApplyInfo);
|
||||
|
|
|
|||
|
|
@ -2041,13 +2041,8 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
if (backApplyInfo.getUnitId() == null || backApplyInfo.getProId() == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "参数不能为空");
|
||||
}
|
||||
BmUnit queryUnitInfo = bmUnitMapper.selectBmUnitByUnitId(backApplyInfo.getUnitId());
|
||||
if (queryUnitInfo.getTypeId() == null) {
|
||||
throw new ServiceException("单位类型为空");
|
||||
}
|
||||
// 如果单位类型为班组,则查询该班在机具签署✍️的协议ID
|
||||
LeaseOutDetails leaseOutDetail = new LeaseOutDetails();
|
||||
if (queryUnitInfo.getTypeId() == 1731L) {
|
||||
// 查询班组挂靠的项目部协议信息
|
||||
leaseOutDetail = leaseApplyInfoMapper.selectProjectUnitAgreementIdByTeamAndProject(
|
||||
Math.toIntExact(backApplyInfo.getUnitId()),
|
||||
|
|
@ -2059,7 +2054,6 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
// 把后续流程设置为项目部的协议进行处理
|
||||
backApplyInfo.setAgreementId(leaseOutDetail.getProjectUnitAgreementId());
|
||||
backApplyInfo.setUnitId(leaseOutDetail.getProjectUnitAgreementId());
|
||||
}
|
||||
SelectDto dto = new SelectDto();
|
||||
dto.setProId(backApplyInfo.getProId()).setUnitId(Math.toIntExact(backApplyInfo.getUnitId()));
|
||||
List<AgreementVo> list = mapper.getAgreementInfoByIdBack(dto);
|
||||
|
|
|
|||
Loading…
Reference in New Issue