zhs 2 år sedan
förälder
incheckning
56b7a15d12

+ 8 - 5
src/main/java/com/tld/service/impl/WarehousingServiceImpl.java

@@ -390,7 +390,7 @@ public class WarehousingServiceImpl implements WarehousingService {
                     .setNum(notice.getWarehousingNum())
                     .setStorageCode(storageCode)
                     .setWbs(notice.getWbs())
-                    .setOrderCode(notice1.getProductionCode());
+                    .setProductionCode(notice1.getProductionCode());
             warehousingMapper.addProduct(warehousingVirtual);//入库流水 半成品
 
             ReturnWarehousing returnWarehousing = new ReturnWarehousing()
@@ -867,11 +867,14 @@ public class WarehousingServiceImpl implements WarehousingService {
             String wllbCode = askGoodsMapper.getMing(code);
             //判断物料是否录入
             MaterialClass materialClass = warehousingMapper.getMateriaIsExist(wllbCode);
-            if(materialClass.getWllbClass().equals("圆柱终端")){
-                map.put("msg", "500");
-                map.put("errMsg", "请扫描托码");
-                return map;
+            if(materialClass != null){
+                if(materialClass.getWllbClass().equals("圆柱终端")){
+                    map.put("msg", "500");
+                    map.put("errMsg", "请扫描托码");
+                    return map;
+                }
             }
+            map.put("data", materialClass);
             map.put("msg", "200");
         } catch (Exception e) {
             e.printStackTrace();

+ 3 - 3
src/main/resources/mapper/WarehousingMapper.xml

@@ -715,8 +715,8 @@
     <!-- 产成品入库 -->
     <insert id="addHalf">
         insert into tld_half(wllb_code, produc_date, produc_batch, capacity, user_id, storage_location_code, scrq,
-                             serial, seq, attribute, storage_code, wbs)
-            value (#{wllbCode},#{producDate},#{producDate},#{num},#{userId},#{storageLocationCode},now(),#{serial},#{seq},#{attribute},#{storageCode},#{wbs})
+                             serial, seq, attribute, storage_code, wbs, production_code)
+            value (#{wllbCode},#{producDate},#{producDate},#{num},#{userId},#{storageLocationCode},now(),#{serial},#{seq},#{attribute},#{storageCode},#{wbs},#{productionCode})
     </insert>
     <!-- 查询虚拟表数据进行入库 -->
     <select id="getVirtualNotice" resultType="com.tld.model.WarehousingVirtual">
@@ -855,7 +855,7 @@
     <!-- 修改报工单入库数量 -->
     <update id="updateNotice">
         update tld_notice
-        set warehousing_num = #{warehousingNum}
+        set warehousing_num = (warehousing_num + 0) + #{warehousingNum}
         where notice_id = #{noticeId}
           and material_id = #{materialId}
     </update>