Commit e5ba49af by zhanglt

生成单个盘盈入库明细二维码接口

parent 922bab91
......@@ -87,17 +87,23 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
file .mkdirs();
}
ProfitWarehousingInfo profitWarehousingInfo = profitWarehousingInfoMapper.get(infoId);
GoodsInfo goodsInfo = new GoodsInfo();
goodsInfo.setType(profitWarehousingInfo.getType());
goodsInfo.setName(profitWarehousingInfo.getName());
goodsInfo.setModel(profitWarehousingInfo.getMarking());
String numSeq = CodeUtil.code("WZBM", StaticNumSeq.WZBM);
QrCode qrCode = new QrCode();
qrCode.setCode(numSeq);
qrCode.setState("0");
qrCode.preInsert();
qrCode.setGoodsInfo(goodsInfo);
try {
BuildQcUtil.buildQrOne(qrCode, qrImgPath + "/" + numSeq + ".png", qrImgPath + "/" + numSeq + ".png"); // 生成图片
} catch (IOException e) {
e.printStackTrace();
}
qrCode.setGoodsInfo(new GoodsInfo());
qrCode.setUrl(Global.getAttachmentUrl() + "image/" + numSeq + ".png");
qrCode.preInsert();
qrCodeMapper.insert(qrCode);
qrCode = qrCodeMapper.get(qrCode.getId());
profitWarehousingInfo.setQrCode(qrCode);
......
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