Browse Source

问题修改

zhs 2 years ago
parent
commit
68f2ccf8e3

+ 2 - 2
src/main/java/com/tld/service/impl/InviteServiceImpl.java

@@ -129,8 +129,8 @@ public class InviteServiceImpl implements InviteService {
         RLock lock = redissonClient.getLock(uniqueCode);
         lock.lock();
         try{
-            List<AskGoods> list = inviteMapper.getVirtualUniqueCode(uniqueCode, type, askGoodsId);
             String removalCode = codeGenerateCk();
+            List<AskGoods> list = inviteMapper.getVirtualUniqueCode(uniqueCode, type, askGoodsId);
             for(AskGoods askGoods : list){
                 askGoods.setStorageCode(removalCode);
                 askGoods.setCompanyNumber(askGoods.getAccountSleeve());
@@ -139,7 +139,7 @@ public class InviteServiceImpl implements InviteService {
                     throw new Exception("库存不存在");
                 }
                 //如果出库库存等于虚拟表库存则删除此库存
-                if(Integer.parseInt(askGoods.getNum()) == Integer.parseInt(inventory.getAmount())){
+                if(Double.parseDouble(askGoods.getNum()) == Double.parseDouble(inventory.getAmount())){
                     inviteMapper.deleteInventory(inventory);
                 } else {
                     inventory.setAmount(askGoods.getNum());

+ 2 - 2
src/main/resources/mapper/InviteMapper.xml

@@ -218,8 +218,8 @@
 
     <!-- 插入出库流水 -->
     <insert id="addRemoval">
-        insert into tld_removal(wllb_code,supplier_id,serial,num,type,user_id,storage_location_code,scrq,process,ask_goods_id,produc_date,department)
-        values(#{wllbCode},#{supplierId},#{serial},#{num},#{type},#{userId},#{storageLocationCode},now(),#{process},#{askGoodsId},#{producDate},#{department})
+        insert into tld_removal(wllb_code,supplier_id,serial,num,type,user_id,storage_location_code,scrq,process,ask_goods_id,produc_date,department,storage_code,wbs)
+        values(#{wllbCode},#{supplierId},#{serial},#{num},#{type},#{userId},#{storageLocationCode},now(),#{process},#{askGoodsId},#{producDate},#{department},#{storageCode},#{wbs})
     </insert>
     <!-- 查询指定物料类型的id -->
     <select id="getMaterialId" resultType="String">