Commit 4ba9ff4a authored by 韩桐桐's avatar 韩桐桐

fix(jg):bug:登记发起设备未带出制造信息的信用代码;告知书添加系统地址等

parent 1bcb366d
......@@ -91,6 +91,7 @@
jfi.IMPORTED as imported,
jfi.PRODUCE_LICENSE_NUM as produceLicenseNum,
jfi.PRODUCE_COUNTRY as produceCountry,
jfi.produce_unit_credit_code as produceUnitCreditCode,
jci.USC_UNIT_NAME as uscUnitName,
jci.USC_UNIT_CREDIT_CODE as uscUnitCreditCode
......
......@@ -52,8 +52,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
......@@ -148,11 +146,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Value("classpath:/json/urlInfo.json")
public Resource bizTypeInfo;
@Autowired
private TransactionDefinition transactionDefinition;
@Autowired
private PlatformTransactionManager platformTransactionManager;
@Value("${regulatory_code_prefix}")
String REGULATORY_CODE_PREFIX ;
@Autowired
AmosRequestContext amosRequestContext;
......@@ -447,14 +442,15 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
});
}
String doMain = REGULATORY_CODE_PREFIX.substring(0,REGULATORY_CODE_PREFIX.lastIndexOf(":"));
Function<String, String> getValue = key -> installation.getOrDefault(key, "").toString();
// 组装模板变量
Map<String, Object> placeholders = new HashMap<>();
placeholders.put("sequenceNbr", getValue.apply("sequenceNbr"));
placeholders.put("doMain", doMain);
placeholders.put("installUnitName", getValue.apply("installUnitName"));
placeholders.put("informNumber", Objects.toString(getValue.apply("informNumber"), getValue.apply("applyNo")));
placeholders.put("informNumber", "".equals(getValue.apply("informNumber")) ? getValue.apply("applyNo") : getValue.apply("informNumber"));
placeholders.put("productName", getValue.apply("productName"));
placeholders.put("equipType", getValue.apply("equType"));
placeholders.put("equipCode", getValue.apply("equRegisterCode"));
......@@ -478,7 +474,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders.put("installLicenseExpirationDateList", installLicenseExpirationDateList);
// 生成二维码
String qrCode = ImageUtils.generateQRCode(getValue.apply("informNumber"), 300, 300);
String qrCode = ImageUtils.generateQRCode(placeholders.get("informNumber")+"", 300, 300);
placeholders.put("qrCode", qrCode);
// String url = WordTemplateUtils.templateToPdf("installation-notification-report.ftl", placeholders);
......
......@@ -88,37 +88,7 @@
<w:rFonts w:hint="eastAsia"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
<w:t>ID: ${sequenceNbr}</w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:keepNext w:val="0"/>
<w:keepLines w:val="0"/>
<w:pageBreakBefore w:val="0"/>
<w:widowControl w:val="0"/>
<w:kinsoku/>
<w:wordWrap/>
<w:overflowPunct/>
<w:topLinePunct w:val="0"/>
<w:autoSpaceDE/>
<w:autoSpaceDN/>
<w:bidi w:val="0"/>
<w:adjustRightInd/>
<w:snapToGrid/>
<w:spacing w:line="300" w:lineRule="auto"/>
<w:textAlignment w:val="auto"/>
<w:rPr>
<w:rFonts w:hint="default"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
<w:t>附件</w:t>
<w:t>${doMain}</w:t>
</w:r>
</w:p>
<w:p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment