Commit 0f2c6f06 by zhanglt

盘盈入库模块,修改明细时自动清除二维码

parent 0926b2e7
...@@ -124,6 +124,9 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe ...@@ -124,6 +124,9 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
@Transactional(readOnly = false) @Transactional(readOnly = false)
public void cleanQr(String infoId) { public void cleanQr(String infoId) {
ProfitWarehousingInfo profitWarehousingInfo = profitWarehousingInfoMapper.get(infoId); ProfitWarehousingInfo profitWarehousingInfo = profitWarehousingInfoMapper.get(infoId);
if(profitWarehousingInfo.getQrCode() == null){
return ;
}
QrCode qrCode = qrCodeMapper.get(profitWarehousingInfo.getQrCode().getId()); QrCode qrCode = qrCodeMapper.get(profitWarehousingInfo.getQrCode().getId());
if (StringUtils.isNotBlank(qrCode.getUrl())) { if (StringUtils.isNotBlank(qrCode.getUrl())) {
try { try {
...@@ -163,7 +166,7 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe ...@@ -163,7 +166,7 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
}else{ }else{
profitWarehousingInfo.preUpdate(); profitWarehousingInfo.preUpdate();
profitWarehousingInfoMapper.update(profitWarehousingInfo); profitWarehousingInfoMapper.update(profitWarehousingInfo);
} cleanQr(profitWarehousingInfo.getId()); }
}else{ }else{
profitWarehousingInfoMapper.delete(profitWarehousingInfo); profitWarehousingInfoMapper.delete(profitWarehousingInfo);
} }
......
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