|
@@ -1,12 +1,15 @@
|
|
package com.xjrsoft.module.material.service.impl;
|
|
package com.xjrsoft.module.material.service.impl;
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
import com.xjrsoft.module.material.dto.AddMaterialTaskAssignDto;
|
|
import com.xjrsoft.module.material.dto.AddMaterialTaskAssignDto;
|
|
import com.xjrsoft.module.material.dto.MaterialAssignUserDto;
|
|
import com.xjrsoft.module.material.dto.MaterialAssignUserDto;
|
|
import com.xjrsoft.module.material.dto.MaterialTaskAssignApprovedDto;
|
|
import com.xjrsoft.module.material.dto.MaterialTaskAssignApprovedDto;
|
|
import com.xjrsoft.module.material.entity.MaterialTask;
|
|
import com.xjrsoft.module.material.entity.MaterialTask;
|
|
|
|
+import com.xjrsoft.module.material.entity.MaterialTaskAppendix;
|
|
import com.xjrsoft.module.material.entity.MaterialTaskAssign;
|
|
import com.xjrsoft.module.material.entity.MaterialTaskAssign;
|
|
|
|
+import com.xjrsoft.module.material.mapper.MaterialTaskAppendixMapper;
|
|
import com.xjrsoft.module.material.mapper.MaterialTaskAssignMapper;
|
|
import com.xjrsoft.module.material.mapper.MaterialTaskAssignMapper;
|
|
import com.xjrsoft.module.material.mapper.MaterialTaskMapper;
|
|
import com.xjrsoft.module.material.mapper.MaterialTaskMapper;
|
|
import com.xjrsoft.module.material.service.IMaterialTaskAssignService;
|
|
import com.xjrsoft.module.material.service.IMaterialTaskAssignService;
|
|
@@ -19,9 +22,10 @@ import java.util.Optional;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
-public class MaterialTaskAssignServiceImpl extends MPJBaseServiceImpl<MaterialTaskAssignMapper, MaterialTaskAssign> implements IMaterialTaskAssignService {
|
|
|
|
|
|
+public class MaterialTaskAssignServiceImpl extends MPJBaseServiceImpl<MaterialTaskAssignMapper, MaterialTaskAssign> implements IMaterialTaskAssignService {
|
|
private final MaterialTaskAssignMapper materialTaskAssignMapper;
|
|
private final MaterialTaskAssignMapper materialTaskAssignMapper;
|
|
private final MaterialTaskMapper materialTaskMapper;
|
|
private final MaterialTaskMapper materialTaskMapper;
|
|
|
|
+ private final MaterialTaskAppendixMapper appendixMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -101,6 +105,11 @@ public class MaterialTaskAssignServiceImpl extends MPJBaseServiceImpl<Material
|
|
}
|
|
}
|
|
if (dto.getStatus() == 2) {//重做
|
|
if (dto.getStatus() == 2) {//重做
|
|
materialTaskAssign.setStatus(4);
|
|
materialTaskAssign.setStatus(4);
|
|
|
|
+
|
|
|
|
+ appendixMapper.delete(
|
|
|
|
+ new QueryWrapper<MaterialTaskAppendix>().lambda()
|
|
|
|
+ .eq(MaterialTaskAppendix::getMaterialTaskId, materialTaskAssign.getId())
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
materialTaskAssignMapper.updateById(materialTaskAssign);
|
|
materialTaskAssignMapper.updateById(materialTaskAssign);
|