Commit e073bd4b authored by tianbo's avatar tianbo

fix:隐患详情、企业详情二维码改为图片

parent 29cd3843
......@@ -523,7 +523,7 @@ public class DPSubServiceImpl {
e.printStackTrace();
}
}
String color = null;
String color = "grey";
if (!ValidationUtil.isEmpty(problemTime)) {
try {
qrcode.put("text", DateUtil.formatDate(DateUtil.smartFormat(problemTime), "yyyy-MM-dd"));
......@@ -537,6 +537,11 @@ public class DPSubServiceImpl {
} else if ("异常".equals(problemStatus) || "未处理".equals(problemStatus)) {
color = "red";
}
// 处理隐患和企业详情码:改为固定图片。后期待定义二维码及页面内容后再改为二维码
if (!ValidationUtil.isEmpty(qrcode.getString("picUrl"))) {
JSONObject picUrls = qrcode.getJSONObject("picUrl");
qrcode.put("url", picUrls.getString(color));
}
qrcode.put("value", !ValidationUtil.isEmpty(result.get("SUPERVISORY_CODE")) ? supervisionCodePrefix + result.get("SUPERVISORY_CODE") : result.get("USE_ORG_CODE"));
qrcode.put("status", problemStatus);
qrcode.put("color", color);
......
......@@ -78,8 +78,14 @@
"title": "{useUnit}",
"status": [],
"qrcode": {
"title": "企业二维码",
"problem": []
"title": "",
"problem": [],
"picUrl": {
"red": "/upload/tzs/dpscreen/images/安全守护-红.png",
"grey": "/upload/tzs/dpscreen/images/安全守护-灰.png",
"orange": "/upload/tzs/dpscreen/images/安全守护-橙.png",
"green": "/upload/tzs/dpscreen/images/安全守护-绿.png"
}
},
"keyParams": [
{ "key": "unitType", "label": "单位类型" },
......
......@@ -78,8 +78,14 @@
"keyinfo": {
"title": "{principalUnit}",
"qrcode": {
"title": "监管码",
"problem": []
"title": "",
"problem": [],
"picUrl": {
"red": "/upload/tzs/dpscreen/images/安全守护-红.png",
"grey": "/upload/tzs/dpscreen/images/安全守护-灰.png",
"orange": "/upload/tzs/dpscreen/images/安全守护-橙.png",
"green": "/upload/tzs/dpscreen/images/安全守护-绿.png"
}
},
"keyParams": [
{ "key": "sourceType", "label": "隐患主体类型" },
......
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