Commit bc4fe3aa by 胡懿

修复分批入库台账信息不正确的问题

parent 5dd248c7
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
s.name AS "shelves.name", s.name AS "shelves.name",
warehouse.name AS "warehouse.name", warehouse.name AS "warehouse.name",
qr.code AS "qrCode.code" qr.code AS "qrCode.code",
qr.state AS "qrCode.state"
</sql> </sql>
<sql id="storageInfoJoins"> <sql id="storageInfoJoins">
...@@ -56,6 +57,9 @@ ...@@ -56,6 +57,9 @@
<if test="storage != null and storage.id != null and storage.id != ''"> <if test="storage != null and storage.id != null and storage.id != ''">
AND a.storage_id = #{storage.id} AND a.storage_id = #{storage.id}
</if> </if>
<if test="goodsInfo != null and goodsInfo.id != null and goodsInfo.id != ''">
AND a.goods_info_id = #{goodsInfo.id}
</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
AND a.name LIKE AND a.name LIKE
<if test="dbName == 'oracle'">'%'||#{name}||'%'</if> <if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
...@@ -65,12 +69,12 @@ ...@@ -65,12 +69,12 @@
<if test="type != null and type.id != null and type.id != ''"> <if test="type != null and type.id != null and type.id != ''">
AND a.type_id = #{type.id} AND a.type_id = #{type.id}
</if> </if>
<if test="shelves != null and shelves.id != null and shelves.id != ''"> <if test="shelves != null and shelves.id != null and shelves.id != ''">
AND a.shelves_id = #{shelves.id} AND a.shelves_id = #{shelves.id}
</if> </if>
<if test="goodsInfo != null and goodsInfo.id != null and goodsInfo.id != ''">
AND a.goods_info_id = #{goodsInfo.id}
</if>
<if test="model != null and model != ''"> <if test="model != null and model != ''">
AND a.model LIKE AND a.model LIKE
<if test="dbName == 'oracle'">'%'||#{model}||'%'</if> <if test="dbName == 'oracle'">'%'||#{model}||'%'</if>
......
...@@ -123,6 +123,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> { ...@@ -123,6 +123,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
*/ */
public List<StorageInfo> findInfoBycountStorage(CountStorageInfo countStorageInfo) { public List<StorageInfo> findInfoBycountStorage(CountStorageInfo countStorageInfo) {
StorageInfo storageInfo = new StorageInfo(); StorageInfo storageInfo = new StorageInfo();
storageInfo.setStorage(countStorageInfo.getStorage());
storageInfo.setShelves(countStorageInfo.getShelves()); storageInfo.setShelves(countStorageInfo.getShelves());
storageInfo.setGoodsInfo(countStorageInfo.getGoodsInfo()); storageInfo.setGoodsInfo(countStorageInfo.getGoodsInfo());
storageInfo.setPage(countStorageInfo.getPage()); storageInfo.setPage(countStorageInfo.getPage());
...@@ -147,6 +148,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> { ...@@ -147,6 +148,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
continue; continue;
} }
GoodsInfo goodsInfo = storageInfo.getGoodsInfo(); GoodsInfo goodsInfo = storageInfo.getGoodsInfo();
goodsInfo = goodsInfoMapper.get(goodsInfo.getId());
if (StorageInfo.DEL_FLAG_NORMAL.equals(storageInfo.getDelFlag())){ if (StorageInfo.DEL_FLAG_NORMAL.equals(storageInfo.getDelFlag())){
if (StringUtils.isBlank(storageInfo.getId())){ if (StringUtils.isBlank(storageInfo.getId())){
storageInfo.setStorage(storage); storageInfo.setStorage(storage);
......
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