|
@@ -1,8 +1,10 @@
|
|
|
package com.rongwei.bscommon.sys.service.impl;
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.aspose.cells.*;
|
|
|
import com.aspose.cells.Picture;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.google.zxing.BarcodeFormat;
|
|
@@ -17,10 +19,18 @@ import com.lowagie.text.DocumentException;
|
|
|
import com.lowagie.text.pdf.PdfReader;
|
|
|
import com.lowagie.text.pdf.PdfStamper;
|
|
|
import com.rongwei.bscommon.sys.dao.ZhcxSeaBindProofDao;
|
|
|
+import com.rongwei.bscommon.sys.service.ZhcxItpProjectNodeStateService;
|
|
|
+import com.rongwei.bscommon.sys.service.ZhcxItpProjectNodesService;
|
|
|
import com.rongwei.bscommon.sys.service.ZhcxSeaBindProofDetalService;
|
|
|
import com.rongwei.bscommon.sys.service.ZhcxSeaBindProofService;
|
|
|
+import com.rongwei.bscommon.sys.utils.ZhcxCommon;
|
|
|
+import com.rongwei.bsentity.domain.ZhcxItpProjectNodesDo;
|
|
|
import com.rongwei.bsentity.domain.ZhcxSeaBindProofDetalDo;
|
|
|
import com.rongwei.bsentity.domain.ZhcxSeaBindProofDo;
|
|
|
+import com.rongwei.bsentity.dto.OperDto;
|
|
|
+import com.rongwei.bsentity.dto.project.node.RelactionNodeStateBo;
|
|
|
+import com.rongwei.bsentity.dto.seabind.PmAgreeRequest;
|
|
|
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
|
|
|
import com.rongwei.rwcommon.base.exception.CustomException;
|
|
|
import com.rongwei.rwcommon.utils.StringUtils;
|
|
|
import com.rongwei.rwcommoncomponent.excel.aspose.ExcelUtils;
|
|
@@ -53,6 +63,15 @@ public class ZhcxSeaBindProofServiceImpl extends ServiceImpl<ZhcxSeaBindProofDao
|
|
|
@Value("${hb-provider.url}")
|
|
|
private String PreviewUrl;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZhcxItpProjectNodeStateService zhcxItpProjectNodeStateService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ZhcxCommon zhcxCommon;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ZhcxItpProjectNodesService zhcxItpProjectNodesService;
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -406,6 +425,46 @@ public class ZhcxSeaBindProofServiceImpl extends ServiceImpl<ZhcxSeaBindProofDao
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 海绑经理同意
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void pmAgree(PmAgreeRequest req) {
|
|
|
+ final ZhcxSeaBindProofDo bindProof = getById(req.getId());
|
|
|
+ final LambdaQueryWrapper<ZhcxItpProjectNodesDo> queryNodeWrapper = Wrappers.lambdaQuery();
|
|
|
+ queryNodeWrapper.eq(ZhcxItpProjectNodesDo::getProjectid, bindProof)
|
|
|
+ .eq(ZhcxItpProjectNodesDo::getNodename, "整机绑扎完工");
|
|
|
+ ZhcxItpProjectNodesDo nodesDo = zhcxItpProjectNodesService.getOne(queryNodeWrapper);
|
|
|
+
|
|
|
+ if(ObjectUtil.isNull(nodesDo)) {
|
|
|
+ throw new CustomException("项目中报验点不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ SysUserVo user = zhcxCommon.getCurrentUser();
|
|
|
+ OperDto oper = new OperDto();
|
|
|
+ oper.setOperTime(new Date());
|
|
|
+ oper.setOperUser(user);
|
|
|
+
|
|
|
+ List<RelactionNodeStateBo> list = new ArrayList<>();
|
|
|
+ String[] machineNos = bindProof.getCraneno().split(",");
|
|
|
+
|
|
|
+ for(int m = 0, n = machineNos.length; m < n; m++) {
|
|
|
+ list.add(RelactionNodeStateBo.builder()
|
|
|
+ .conclusion("10")
|
|
|
+ .type("sea")
|
|
|
+ .complateTime(oper.getOperTime())
|
|
|
+ .nodeId(nodesDo.getId())
|
|
|
+ .projectId(bindProof.getProjectid())
|
|
|
+ .projectCode(bindProof.getProjectcode())
|
|
|
+ .projectName((bindProof.getProjectname()))
|
|
|
+ .machineNo(machineNos[m])
|
|
|
+ .build());
|
|
|
+ }
|
|
|
+
|
|
|
+ zhcxItpProjectNodeStateService.relationInspection4Init(list, oper);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|