瀏覽代碼

【BUG-基础业务逻辑】【其它出入库】【其它出入库,主表成本金额pd_total汇总明细成本金额pd_total】

rainco 7 年之前
父節點
當前提交
b6d4d81fd9
共有 1 個文件被更改,包括 2 次插入8 次删除
  1. 2 8
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

+ 2 - 8
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -757,17 +757,11 @@
   </delete>
 
   <update id="calcProdIn">
-    update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
-    update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <delete id="deleteByInOutNo" >