|
@@ -29,6 +29,7 @@ import com.rongwei.rwcommoncomponent.excel.vo.FormData;
|
|
|
import com.rongwei.rwcommoncomponent.file.service.SysFileItemService;
|
|
|
import com.rongwei.rwcommonentity.commonservers.domain.SysFileItemDo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
@@ -82,6 +83,8 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
|
|
|
|
|
|
@Autowired
|
|
|
private ZhcxCommissionCheckBaseInfoTreeService zhcxCommissionCheckBaseInfoTreeService;
|
|
|
+ @Autowired
|
|
|
+ private ZhcxCommissionCheckDetailTreeService zhcxCommissionCheckDetailTreeService;
|
|
|
|
|
|
@Autowired
|
|
|
private ExcelUtils excelUtils;
|
|
@@ -141,10 +144,15 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
|
|
|
.eq(ZhcxCommissionCheckBaseInfoTreeDo::getBaseinfoid,productTypeId);
|
|
|
List<ZhcxCommissionCheckBaseInfoTreeDo> list = zhcxCommissionCheckBaseInfoTreeService.list(queryWrapper);
|
|
|
if(list.size() > 0){
|
|
|
+ List<ZhcxCommissionCheckDetailTreeDo> targetList = new ArrayList<>();
|
|
|
list.forEach(tree -> {
|
|
|
- tree.setId(tree.getId()+check.getProjectcode());
|
|
|
+ tree.setId(tree.getId()+check.getProjectcode()).setBaseinfoid(check.getProjectcode());
|
|
|
+ ZhcxCommissionCheckDetailTreeDo target = new ZhcxCommissionCheckDetailTreeDo(); // 初始化一个目标对象
|
|
|
+ BeanUtils.copyProperties(tree, target);
|
|
|
+ targetList.add(target);
|
|
|
});
|
|
|
- zhcxCommissionCheckBaseInfoTreeService.saveBatch(list);
|
|
|
+ //zhcxCommissionCheckBaseInfoTreeService.saveBatch(list);
|
|
|
+ zhcxCommissionCheckDetailTreeService.saveBatch(targetList);
|
|
|
}
|
|
|
// 试车子表
|
|
|
List<ZhcxCommissionCheckDetailDo> checkDetails = checkDTO.getCheckDetails();
|
|
@@ -165,10 +173,10 @@ public class ZhcxCommissionCheckServiceImpl extends ServiceImpl<ZhcxCommissionCh
|
|
|
// 正片开始
|
|
|
for (ZhcxCommissionCheckParameterSetDetalDo setDetail : setDetails) {
|
|
|
// 试车检查主表机号判断 如果该机已存在就返回
|
|
|
- LambdaQueryWrapper<ZhcxCommissionCheckDo> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(ZhcxCommissionCheckDo::getDeleted,"0")
|
|
|
+ LambdaQueryWrapper<ZhcxCommissionCheckDo> queryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper1.eq(ZhcxCommissionCheckDo::getDeleted,"0")
|
|
|
.eq(ZhcxCommissionCheckDo::getMachineid,setDetail.getMachineid());
|
|
|
- List<ZhcxCommissionCheckDo> checkDos = this.list(queryWrapper);
|
|
|
+ List<ZhcxCommissionCheckDo> checkDos = this.list(queryWrapper1);
|
|
|
if (!checkDos.isEmpty()){
|
|
|
continue;
|
|
|
}
|