Commit 87e91179 by 宋祥

1.fixBug:二维码连接中传计划号

parent a971e3ef
...@@ -217,7 +217,7 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -217,7 +217,7 @@ public class ServiceHPSC003 extends ServiceBase {
HPSCTools.HpSc003.updateStatus(id, HPConstant.planStatus.S_1); HPSCTools.HpSc003.updateStatus(id, HPConstant.planStatus.S_1);
// 生成二维码 // 生成二维码
if (StringUtils.isBlank(dbSc003.getQrcodeDocId())) { if (StringUtils.isBlank(dbSc003.getQrcodeDocId())) {
HPSCTools.HpSc003.createQrCode(id); HPSCTools.HpSc003.createQrCode(dbSc003.getPlanInfoNo());
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("提交成功"); inInfo.setMsg("提交成功");
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
SET SET
QRCODE_DOC_ID = #qrcodeDocId#, QRCODE_DOC_ID = #qrcodeDocId#,
<include refid="updateRevise"/> <include refid="updateRevise"/>
WHERE ID = #id# WHERE PLAN_INFO_NO = #planInfoNo#
</update> </update>
</sqlMap> </sqlMap>
...@@ -426,17 +426,18 @@ public class HPSCTools { ...@@ -426,17 +426,18 @@ public class HPSCTools {
* 生成二维码 * 生成二维码
* *
* @param id * @param id
* @param planInfoNo
*/ */
public static void createQrCode(Long id) throws Exception { public static void createQrCode(String planInfoNo) throws Exception {
AssertUtils.isNull(id, "节点ID不能为空"); AssertUtils.isNull(planInfoNo, "计划号不能为空");
// 取配置地址 // 取配置地址
String url = PlatApplicationContext.getProperty("iplat.planInfo.qrcode.url"); String url = PlatApplicationContext.getProperty("iplat.planInfo.qrcode.url");
if (StringUtils.isBlank(url)) { if (StringUtils.isBlank(url)) {
return; return;
} }
Map<String, Object> resultMap = QrCodeUtils.create(String.format(url, id)); Map<String, Object> resultMap = QrCodeUtils.create(String.format(url, planInfoNo));
Map map = new HashMap(); Map map = new HashMap();
map.put("id", id); map.put("planInfoNo", planInfoNo);
map.put("qrcodeDocId", resultMap.get("docId")); map.put("qrcodeDocId", resultMap.get("docId"));
DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_QRCODE, map); DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_QRCODE, map);
} }
......
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