Commit 88bca503 by 胡懿

调整创建二维码

parent 66b839ac
...@@ -128,7 +128,6 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> { ...@@ -128,7 +128,6 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
qrCode.setGoodsInfo(goodsInfo); qrCode.setGoodsInfo(goodsInfo);
qrCode.setState("0"); qrCode.setState("0");
qrCode.setGoodsInfo(goodsInfo);
qrCode.preInsert(); qrCode.preInsert();
try { try {
BuildQcUtil.buildQr(qrCode, qrImgPath + "/" + numSeq + ".png", qrImgPath + "/" + numSeq + "_" + i + ".png"); // 生成图片 BuildQcUtil.buildQr(qrCode, qrImgPath + "/" + numSeq + ".png", qrImgPath + "/" + numSeq + "_" + i + ".png"); // 生成图片
...@@ -138,6 +137,7 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> { ...@@ -138,6 +137,7 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
qrCode.setUrl(Global.getAttachmentUrl() + "image/" + numSeq + "_" + i + ".png"); qrCode.setUrl(Global.getAttachmentUrl() + "image/" + numSeq + "_" + i + ".png");
qrCodeMapper.insert(qrCode); qrCodeMapper.insert(qrCode);
qrCode = qrCodeMapper.get(qrCode.getId());
qrCodeList.add(qrCode); qrCodeList.add(qrCode);
} }
...@@ -148,7 +148,7 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> { ...@@ -148,7 +148,7 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
qrInterval = beginNumSeq + "_" + endNumSeq.substring(13,17); qrInterval = beginNumSeq + "_" + endNumSeq.substring(13,17);
} }
goodsInfo.setQrInterval(qrInterval); // 设置编码区间 goodsInfo.setQrInterval(qrInterval); // 设置编码区间
goodsInfo.preUpdate(); // goodsInfo.preUpdate();
goodsInfoMapper.update(goodsInfo); goodsInfoMapper.update(goodsInfo);
goodsInfo.setQrCodeList(qrCodeList); goodsInfo.setQrCodeList(qrCodeList);
return goodsInfo; return goodsInfo;
......
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