新购绑定逻辑修改

This commit is contained in:
syruan 2024-12-25 19:01:03 +08:00
parent 53b3d571db
commit 71678dded4
2 changed files with 11 additions and 0 deletions

View File

@ -149,6 +149,11 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
if (purchaseBindMapper.bindMaCodeByQrCode(purchaseDto) != 1) {
return AjaxResult.error(1115,"绑定maCode时SQL执行失败!");
}
} else {
if (dto.getTypeId() != null) {
purchaseDto.setTypeId(dto.getTypeId());
}
purchaseBindMapper.insert(purchaseDto);
}
if (purchaseStorageMapper.insertMachine(purchaseDto) != 1) {
return AjaxResult.error(1116,"插入maMachine时SQL执行失败!");

View File

@ -51,6 +51,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId != null">
type_id,
</if>
<if test="maCode != null">
ma_code,
</if>
<if test="qrUrl != null">
qr_url,
</if>
@ -71,6 +74,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId != null">
#{typeId},
</if>
<if test="maCode != null">
#{maCode},
</if>
<if test="qrUrl != null">
#{qrUrl},
</if>