value
2024-05-21 826cfd6d1673337b1872632a84443537404917d4
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -30,7 +30,6 @@
import com.yuanchu.mom.service.InsOrderPlanService;
import com.yuanchu.mom.service.InsOrderService;
import com.yuanchu.mom.service.StandardTemplateService;
import com.yuanchu.mom.utils.GiveCode;
import com.yuanchu.mom.utils.JackSonUtil;
import com.yuanchu.mom.utils.MatrixToImageWriter;
import com.yuanchu.mom.utils.QueryWrappers;
@@ -57,7 +56,6 @@
 * 检验任务-业务实现层
 */
@Service
//@AllArgsConstructor
public class InsOrderPlanServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder> implements InsOrderPlanService {
    @Resource
@@ -82,9 +80,6 @@
    @Value("${twoCode}")
    private String twoCode;
    @Resource
    private GiveCode giveCode;
    @Resource
    private InsReportMapper insReportMapper;
@@ -526,7 +521,6 @@
                    }
                    TableRenderData tableRenderData = new TableRenderData();
                    tableRenderData.setRows(rows);
                    System.out.println(rows.size());
                    TableStyle tableStyle = new TableStyle();
                    tableStyle.setColWidths(new int[]{650,1600,2000,750,2800,1100,1100});
                    tableStyle.setWidth("10000");
@@ -589,6 +583,7 @@
            String finalModelStr = modelStr;
            String sampleEn = insSampleMapper.getSampleEn(insOrder.getSample());
            String orderType = insOrderMapper.getEnumLabelByValue(insOrder.getOrderType());
            String formType = insOrderMapper.getEnumLabelByValue(insOrder.getFormType());
            ConfigureBuilder builder = Configure.builder();
            builder.useSpringEL(true);
            List<Map<String, String>> finalDeviceList = deviceList;
@@ -597,6 +592,9 @@
            try {
                signatureUrl = userMapper.selectById(userId).getSignatureUrl();
            }catch (Exception e){
                throw new ErrorException("找不到检验人的签名");
            }
            if(signatureUrl == null || "".equals(signatureUrl)){
                throw new ErrorException("找不到检验人的签名");
            }
            XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render(
@@ -626,6 +624,8 @@
                        put("getTimeEn", monthNames[insOrder.getExamineTime().getMonthValue() - 1] + " " + insOrder.getExamineTime().getDayOfMonth() + ", " + insOrder.getExamineTime().getYear());
                        put("seal1", null);
                        put("seal2", null);
                        put("formTypeCh", formType);
                        put("formTypeEn", insOrder.getFormType());
                    }});
            try {
                String name = insReport.getCode().replace("/", "") + ".docx";