changhaoning 1 год назад
Родитель
Сommit
5eb0d1f103

+ 4 - 4
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml

@@ -375,7 +375,7 @@
         Left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
         left join dkic_b.t_mst_customer tmc on tpi.cus_id = tmc.cus_id
         left join dkic_b.t_mst_dictionary_data tmd on tmd.data_id = tpi.into_reason
-        left join t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
+        left join dkic_b.t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
     </sql>
 
 
@@ -399,7 +399,7 @@
         Left join dkic_b.t_mst_staff tms1 on tms1.staff_id = tpi.make_staff
         Left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
         left join dkic_b.t_mst_dictionary_data tmd on tmd.data_id = tpi.into_reason
-        left join t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
+        left join dkic_b.t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
         WHERE tpi.into_id = #{id}::uuid
         and tpi.flg_valid
     </select>
@@ -998,7 +998,7 @@
         LEFT JOIN sys.t_data_kind tdktype   ON tdktype.kind_code = tpi.into_type
         Left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
         left join dkic_b.t_mst_dictionary_data tmd on tmd.data_id = tpi.into_reason
-        left join t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
+        left join dkic_b.t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
     </sql>
 <!--    采购退货用-->
     <select id="selectByInboundReturnCond" resultMap="BaseResultMapInboundReturnResponse">
@@ -1057,7 +1057,7 @@
         Left join dkic_b.t_mst_staff tms1 on tms1.staff_id = tpi.make_staff
         Left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
         left join dkic_b.t_mst_dictionary_data tmd on tmd.data_id = tpi.into_reason
-        left join t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
+        left join dkic_b.t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
         WHERE tpi.into_id = #{intoId}::uuid AND tpi.flg_valid = true
     </select>
 

+ 2 - 2
src/main/java/com/dk/mdm/service/ivt/inbound/InboundPurchaseService.java

@@ -1281,7 +1281,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
         //入库状态
         String intoStatus = null;
         //入库中+已入库 小于 总数
-        if (intoingQty.add(intoingQty).compareTo(sumQty) < 0) {
+        if (intoingQty.add(intoQty).compareTo(sumQty) < 0) {
             //入库中
             intoStatus = Constant.IntoStatus.RUKUZHONG.getName();
         }
@@ -1291,7 +1291,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
             intoStatus = Constant.IntoStatus.DAIRUKU.getName();
         }
         //入库中+已入库 等于 总数
-        else if (intoingQty.add(intoingQty).compareTo(sumQty) == 0) {
+        else if (intoingQty.add(intoQty).compareTo(sumQty) == 0) {
             //已入库
             intoStatus = Constant.IntoStatus.YIRUKU.getName();
         }