Commit 8b20bf62 by liuyang

Merge branch 'dev' of http://git.pseer.com/platform/hp-smart into dev-ly

 Conflicts:
	src/main/java/com/baosight/hpjx/controller/LogInformationController.java
	src/main/java/com/baosight/hpjx/hp/sb/domain/HPSB001.java
	src/main/java/com/baosight/hpjx/hp/sb/domain/HPSB002.java
	src/main/java/com/baosight/hpjx/hp/tc/service/ServiceHPTCP001.java
parents 48a49f27 54633f80
......@@ -58,7 +58,7 @@ public class QrCodeUtils {
*/
public static Map<String, Object> create(String content) throws Exception {
String fileLocation = PlatApplicationContext.getProperty("iplat4j.admin.upload.fileLocation");
if ("S3".equals(fileLocation)) {
if ("S3".equalsIgnoreCase(fileLocation)) {
return createByS3(content);
} else {
return createByLocal(content);
......
......@@ -24,7 +24,6 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
......
......@@ -291,6 +291,29 @@ public class ServiceHPSC003 extends ServiceBase {
}
/**
* 生成二维码
*
* @param inInfo
* @return
*/
public EiInfo generateQrcode(EiInfo inInfo) {
try {
String planInfoNo = inInfo.getString(HPSC003.FIELD_PLAN_INFO_NO);
// 已经生成过,不在重复生产
HPSC003 dbSc003 = HPSCTools.HpSc003.getByNo(planInfoNo);
AssertUtils.isNotEmpty(dbSc003.getQrcodeDocId(), "该计划已存在二维码,请勿重复生成");
// 生成新的二维码
HPSCTools.HpSc003.createQrCode(planInfoNo);
// 刷新页面数据
inInfo = this.query(inInfo);
inInfo.setMsg("生成二维码成功");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成二维码失败");
}
return inInfo;
}
/**
* 扫码显示计划明细
*
* @param inInfo
......
......@@ -20,8 +20,8 @@ $(function () {
}
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\',\'' + item.factoryCode + '\')" >提交</a>';
+ 'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\',\''
+ item.factoryCode + '\')" >提交</a>';
}
/*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
......@@ -42,12 +42,16 @@ $(function () {
}, {
field: "qrcodeDocId",
template: function (item) {
if (isBlank(item.qrcodeDocId)) {
return "";
} else {
let auditStatus = item.status;
if (!isBlank(item.qrcodeDocId)) {
return '<img src="' + downloadHref(item.qrcodeDocId) + '" width="20px" height="20px"'
+ ' onclick="imgClick(\'' + item.qrcodeDocId + '\')" />';
}
if (auditStatus != 0) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="generateQrcode(\'' + item.planInfoNo + '\')" >生成</a>';
}
return "";
}
}],
/**
......@@ -422,6 +426,21 @@ function saveDetail(btn) {
}
/**
* 生成二维码
*
* @param planInfoNo
*/
let generateQrcode = function (planInfoNo) {
let inInfo = __eiInfo;
inInfo.set("planInfoNo", planInfoNo);
JSUtils.submitGridsData("result", "HPSC003", "generateQrcode",
true, function (res) {
message(res.msg);
}, inInfo
);
}
/**
* 图片放大
*/
let imgClick = function (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