Commit 34b77f4d by 宋祥

1.计划绑定二维码

parent 6cbef9ad
package com.baosight.hpjx.hp.sc.tools;
import com.alibaba.fastjson.JSONObject;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
......@@ -19,6 +18,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC007;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import com.baosight.iplat4j.core.util.NumberUtils;
import org.apache.commons.collections.CollectionUtils;
......@@ -429,11 +429,12 @@ public class HPSCTools {
*/
public static void createQrCode(Long id) throws Exception {
AssertUtils.isNull(id, "节点ID不能为空");
// 生成二维码
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", id);
jsonObject.put("remark", "计划ID");
Map<String, Object> resultMap = QrCodeUtils.create(jsonObject.toJSONString());
// 取配置地址
String url = PlatApplicationContext.getProperty("iplat.planInfo.qrcode.url");
if (StringUtils.isBlank(url)) {
return;
}
Map<String, Object> resultMap = QrCodeUtils.create(String.format(url, id));
Map map = new HashMap();
map.put("id", id);
map.put("qrcodeDocId", resultMap.get("docId"));
......
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