Browse Source

[CODE]: 修改业务bug

maxianghua 4 years ago
parent
commit
417ed1bb9b

+ 0 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseOutStockController.java

@@ -122,9 +122,6 @@ public class TWarehouseOutStockController extends BaseController {
         if (StringUtils.isEmpty(tWarehouseBills) || "{}".equals(tWarehouseBills)) {
             return AjaxResult.error("提交失败:请检查主表数据");
         }
-        if (StringUtils.isEmpty(tWarehousebillsitems) || "[]".equals(tWarehousebillsitems)) {
-            return AjaxResult.error("提交失败:请检查库存明细数据");
-        }
         // 获取当前的用户
         LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
         return itWarehouseBillsService.insertTWarehousebills(tWarehouseBills, tWarehousebillsfeesCr,

+ 15 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -290,6 +290,10 @@ public class TWarehousebillsitems extends BaseEntity {
     @Excel(name = "仓库/库区/库位")
     private String fWarehouseInformation;
 
+    /** 原始仓库/库区/库位 */
+    @Excel(name = "仓库/库区/库位")
+    private String fOrgwarehouseInformation;
+
     public void setfId(Long fId) {
         this.fId = fId;
     }
@@ -666,6 +670,15 @@ public class TWarehousebillsitems extends BaseEntity {
         this.fWarehouseInformation = fWarehouseInformation;
     }
 
+
+    public String getfOrgwarehouseInformation() {
+        return fOrgwarehouseInformation;
+    }
+
+    public void setfOrgwarehouseInformation(String fOrgwarehouseInformation) {
+        this.fOrgwarehouseInformation = fOrgwarehouseInformation;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -698,6 +711,8 @@ public class TWarehousebillsitems extends BaseEntity {
                 .append("fGrossweight", getfGrossweight())
                 .append("fNetweight", getfNetweight())
                 .append("fCntrno", getfCntrno())
+                .append("fWarehouseInformation", getfWarehouseInformation())
+                .append("fOrgwarehouseInformation", getfOrgwarehouseInformation())
                 .append("fTruckno", getfTruckno())
                 .append("fBillstatus", getfBillstatus())
                 .append("delFlag", getDelFlag())

+ 1 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -1314,6 +1314,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 fInventoryDays = DateUtils.getDateDay(warehouseBills.getfBillingDeadline(), (Date) item.get("fBsdate"));
             } else {
                 fBillingDays = DateUtils.getDateDay(warehouseBills.getfBillingDeadline(), (Date) item.get("fChargedate"));
+                fInventoryDays = DateUtils.getDateDay(warehouseBills.getfBillingDeadline(), (Date) item.get("fOriginalbilldate"));
             }
             /*if ("KCZZ".equals(fBilltype)) {
             } else {

+ 11 - 3
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -56,11 +56,12 @@
         <result property="fIsInventory" column="f_is_inventory"/>
         <result property="fBusinessType" column="f_business_type"/>
         <result property="fBillingDeadline" column="f_billing_deadline"/>
-        <result property="fWarehouseInformation"    column="f_warehouse_information"    />
+        <result property="fWarehouseInformation"    column="f_warehouse_information"/>
+        <result property="fOrgWarehouseInformation"    column="f_orgwarehouse_information"/>
     </resultMap>
 
     <sql id="selectTWarehousebillsitemsVo">
-        select f_id, f_pid, f_lineno, f_srcid, f_goodsid, f_billno, f_warehouselocid, f_mblno, f_originalbillno, f_bsdate, f_boxno, f_cntqty, f_goodsval, f_cntrtype, f_planvolumn, f_originalbilldate, f_transfer_warehouselocid, f_planqty, f_billingway, f_plangrossweight, f_packagespecs, f_chargedate, f_plannetweight, f_qty, f_grossweight, f_volumn, f_netweight, f_cntrno, f_truckno, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark, f_marks, f_inventory_days, f_storage_fee_deadline, f_amt, f_billing_days, f_driver_name, f_driver_tel, f_driver_id_car, f_serial_number, f_is_pass, f_billtype, f_billing_qty, f_billing_deadline, f_business_type, f_is_inventory , f_warehouse_information from t_warehousebillsitems
+        select f_id, f_pid, f_lineno, f_srcid, f_goodsid, f_billno, f_warehouselocid, f_mblno, f_originalbillno, f_bsdate, f_boxno, f_cntqty, f_goodsval, f_cntrtype, f_planvolumn, f_originalbilldate, f_transfer_warehouselocid, f_planqty, f_billingway, f_plangrossweight, f_packagespecs, f_chargedate, f_plannetweight, f_qty, f_grossweight, f_volumn, f_netweight, f_cntrno, f_truckno, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remark, f_marks, f_inventory_days, f_storage_fee_deadline, f_amt, f_billing_days, f_driver_name, f_driver_tel, f_driver_id_car, f_serial_number, f_is_pass, f_billtype, f_billing_qty, f_billing_deadline, f_business_type, f_is_inventory , f_warehouse_information, f_orgwarehouse_information from t_warehousebillsitems
     </sql>
 
     <select id="selectTWarehousebillsitemsList" parameterType="TWarehousebillsitems"
@@ -88,6 +89,8 @@
             <if test="fIsInventory != null ">and f_is_inventory = #{fIsInventory}</if>
             <if test="fPackagespecs != null ">and f_packagespecs = #{fPackagespecs}</if>
             <if test="fBusinessType != null "> and f_business_type = #{fBusinessType}</if>
+            <if test="fWarehouseInformation != null "> and f_warehouse_information = #{fWarehouseInformation}</if>
+            <if test="fOrgWarehouseInformation != null "> and f_orgwarehouse_information = #{fOrgWarehouseInformation}</if>
             <if test="fPlangrossweight != null ">and f_plangrossweight = #{fPlangrossweight}</if>
             <if test="fPlannetweight != null ">and f_plannetweight = #{fPlannetweight}</if>
             <if test="fQty != null ">and f_qty = #{fQty}</if>
@@ -156,7 +159,8 @@
             item.f_truckno AS fTruckno,
             item.f_billstatus AS fBillstatus,
             item.remark ,
-            item.f_warehouse_information AS fWarehouseInformation
+            item.f_warehouse_information AS fWarehouseInformation,
+            item.f_orgwarehouse_information AS fOrgwarehouseInformation
         from
             t_warehousebillsitems item
             LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
@@ -227,6 +231,7 @@
             <if test="fBusinessType != null">f_business_type,</if>
             <if test="fIsInventory != null">f_is_inventory,</if>
             <if test="fWarehouseInformation != null">f_warehouse_information,</if>
+            <if test="fOrgwarehouseInformation != null">f_orgwarehouse_information,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fPid != null">#{fPid},</if>
@@ -280,6 +285,7 @@
             <if test="fBusinessType != null">#{fBusinessType},</if>
             <if test="fIsInventory != null">#{fIsInventory},</if>
             <if test="fWarehouseInformation != null">#{fWarehouseInformation},</if>
+            <if test="fOrgwarehouseInformation != null">#{fOrgwarehouseInformation},</if>
         </trim>
     </insert>
 
@@ -337,6 +343,7 @@
             <if test="fBillingDeadline != null">f_billing_deadline = #{fBillingDeadline},</if>
             <if test="fBusinessType != null">f_business_type = #{fBusinessType},</if>
             <if test="fWarehouseInformation != null">f_warehouse_information = #{fWarehouseInformation},</if>
+            <if test="fOrgwarehouseInformation != null">f_orgwarehouse_information = #{fOrgwarehouseInformation},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -372,6 +379,7 @@
             item.f_billing_days AS fBillingDays,
             item.f_is_inventory AS fIsInventory,
             item.f_qty AS fQty,
+            item.f_orgwarehouse_information AS fOrgwarehouseInformation,
             item.f_grossweight AS fGrossweight,
             item.f_netweight AS fNetweight,
             item.f_billtype AS fBilltype,