|
@@ -11,6 +11,7 @@ import cn.hutool.core.util.ZipUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
+import com.rongwei.bscommon.sys.feign.BsPlatformService;
|
|
import com.rongwei.bscommon.sys.service.*;
|
|
import com.rongwei.bscommon.sys.service.*;
|
|
import com.rongwei.bscommon.sys.utils.ZhcxCommon;
|
|
import com.rongwei.bscommon.sys.utils.ZhcxCommon;
|
|
import com.rongwei.bsentity.domain.*;
|
|
import com.rongwei.bsentity.domain.*;
|
|
@@ -97,6 +98,12 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
@Autowired
|
|
@Autowired
|
|
private ZhcxItpProjectNodesService itpProjectNodesService;
|
|
private ZhcxItpProjectNodesService itpProjectNodesService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private BsPlatformService bsPlatformService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private ZhcxOutsideInspectionSyncRecordService syncRecordService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 保存外部报验单
|
|
* 保存外部报验单
|
|
*
|
|
*
|
|
@@ -1112,7 +1119,45 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public void sync2SubmissionPlatform(OutsideInspactionSyncReqquest req) {
|
|
public void sync2SubmissionPlatform(OutsideInspactionSyncReqquest req) {
|
|
- List<OutsideInspactionSyncDto> inspection = dao.getInspection(req);
|
|
|
|
|
|
+ List<OutsideInspactionSyncDto> syncDtoList = dao.getInspection(req);
|
|
|
|
+
|
|
|
|
+ if(ObjectUtil.isEmpty(syncDtoList)) {
|
|
|
|
+ return ;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<ZhcxOutsideInspectionSyncRecordDo> recordList = new ArrayList<>(syncDtoList.size());
|
|
|
|
+ for(OutsideInspactionSyncDto sync : syncDtoList) {
|
|
|
|
+ //接收,有条件接收
|
|
|
|
+ if("10".equals(sync.getInspectionconclusion()) || "30".equals(sync.getInspectionconclusion())) {
|
|
|
|
+ sync.setInspectionconclusion("ACC");
|
|
|
|
+ }
|
|
|
|
+ //拒收
|
|
|
|
+ else if("20".equals(sync.getInspectionconclusion())) {
|
|
|
|
+ sync.setInspectionconclusion("REJ");
|
|
|
|
+ }
|
|
|
|
+ sync.setBase("长兴分公司");
|
|
|
|
+
|
|
|
|
+ //itp报验并且是外协点
|
|
|
|
+ //非itp报验点并且分包商为驻外分包商
|
|
|
|
+ if(("itp".equals(sync.getLaunchtype()) && "true".equals(sync.getIssupp()))
|
|
|
|
+ || ("unitp".equals(sync.getLaunchtype()) && "驻外分包商".equals(sync.getSubcontractortype()))
|
|
|
|
+ ) {
|
|
|
|
+ sync.setIssupp("y");
|
|
|
|
+ } else {
|
|
|
|
+ sync.setIssupp("n");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ZhcxOutsideInspectionSyncRecordDo record = new ZhcxOutsideInspectionSyncRecordDo();
|
|
|
|
+ record.setId(SecurityUtil.getUUID());
|
|
|
|
+ record.setSyncstate("3");
|
|
|
|
+ record.setItpid(sync.getId());
|
|
|
|
+ record.setDeleted("0");
|
|
|
|
+ recordList.add(record);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bsPlatformService.syncOutsideInpection(syncDtoList);
|
|
|
|
+ //保存同步记录
|
|
|
|
+ syncRecordService.saveBatch(recordList);
|
|
}
|
|
}
|
|
|
|
|
|
private void getIds(String files, List<String> fileIds) {
|
|
private void getIds(String files, List<String> fileIds) {
|