소스 검색

2024年1月12日14:47:57

纪新园 1 년 전
부모
커밋
4fbf1a3945

+ 13 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseBills.java

@@ -1376,6 +1376,19 @@ public class TWarehouseBills extends BaseEntity {
 
     private String receiptCode;
 
+    /**
+     * 是否保税
+     */
+    private String whetherBonded;
+
+    public String getWhetherBonded() {
+        return whetherBonded;
+    }
+
+    public void setWhetherBonded(String whetherBonded) {
+        this.whetherBonded = whetherBonded;
+    }
+
     public String getReceiptCode() {
         return receiptCode;
     }

+ 18 - 13
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -10421,13 +10421,15 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         reqBody.put("remark", a.getRemark());
         reqBody.put("storageName", a.getStorageName());
         reqBody.put("storageContractCode", a.getStorageContractCode());
-        reqBody.put("storageContractStart", a.getStorageContractStart());
+//改        reqBody.put("storageContractStart", a.getStorageContractStart());
+        reqBody.put("storageContractStart", a.getfBsdate());
         reqBody.put("storageContractEnd", a.getStorageContractEnd());
 //        reqBody.put("warehouseCode", warehouseMaser.getfNo());
         reqBody.put("warehouseCode", warehouseMaser.getfId());
         reqBody.put("warehouseName", warehouseMaser.getfName());
         reqBody.put("storageRate", a.getStorageRate());
-        reqBody.put("storagePayTime", a.getStoragePayTime());
+        reqBody.put("storagePayTime", a.getfChargedate());
+//改        reqBody.put("storagePayTime", a.getStoragePayTime());
         reqBody.put("insuranceCode", a.getInsuranceCode());
         reqBody.put("insuranceAmount", a.getInsuranceAmount());
         reqBody.put("insuranceStartTime", a.getInsuranceStartTime());
@@ -10446,8 +10448,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         for (SkuItem skuItem : skuItemList) {
             List<CollateralGoodsVO> collateralGoodsList = collateralMapper.selectByPid(skuItem.getId().toString());
             for (CollateralGoodsVO vo : collateralGoodsList) {
-
-
                 // 锁定货物
                 TWhgenleg tWhgenleg = new TWhgenleg();
                 tWhgenleg.setfCorpid(a.getfCorpid());
@@ -10476,13 +10476,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 TWarehouse warehouse = new TWarehouse();
                 warehouse.setfId(warehouse2.getParentId());
                 warehouse = tWarehouseMapper.getOne(warehouse);
-                DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
-                Date date = null;
-                try {
-                    date = df.parse(vo.getFOriginalbilldate());
-                } catch (ParseException e) {
-                    e.printStackTrace();
-                }
 
                 TGoods goods = tGoodsMapper.getById(vo.getGoodsId());
                 Map<String, String> map = new HashMap<>();
@@ -10503,13 +10496,15 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 sysDictData.setDictType("data_goods_category");
                 sysDictData.setDictValue(vo.getSpu());
 
+                //是否保税
+                reqBody.put("whetherBonded", a.getWhetherBonded());
                 goodsMaps.put("spuId", vo.getSpu());
                 goodsMaps.put("skuId", vo.getSku());
                 goodsMaps.put("skuName", goods.getfName());
                 goodsMaps.put("billOfLading", vo.getFMblno());
                 goodsMaps.put("goodsWeight", Double.parseDouble(vo.getFGrossweightD()));
                 goodsMaps.put("goodsQuantity", Integer.parseInt(vo.getFQtyD()));
-                goodsMaps.put("quantityUnit", "托");
+                goodsMaps.put("quantityUnit", "托袋/托");
                 goodsMaps.put("weightUnit", "吨");
                 goodsMaps.put("warehouseCode", warehouse.getfId());
                 goodsMaps.put("warehouseName", warehouse.getfName());
@@ -10522,7 +10517,17 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 goodsMaps.put("preInOutReceiptId", vo.getFOriginalbillno());
                 goodsMaps.put("spuProperties", map);
                 goodsMaps.put("productDate", vo.getFOriginalbilldate());
-                goodsMaps.put("arrivalTime", vo.getFOriginalbilldate());
+                try {
+                    if (ObjectUtils.isNull(vo.getFOriginalbilldate())) {
+                        throw new RuntimeException("入库日期不能为空");
+                    }
+                    DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+                    Date date = df.parse(vo.getFOriginalbilldate());
+                    goodsMaps.put("arrivalTime", df.format(date));
+                    //改goodsMaps.put("arrivalTime", vo.getFOriginalbilldate());
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
                 goodsMaps.put("remark", vo.getRemark());
                 goodsMaps.put("storageLossStandard", "无");
 

+ 2 - 3
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -409,7 +409,7 @@
         TG.f_no AS goodsCode,
         sdd.dict_label AS goodsType,
 
-        '托' AS quantityUnit,
+        '托袋/托' AS quantityUnit,
         IFNULL( ROUND( SUM(TWG.f_netweightD) / 1000, 2 ), 0 ) AS totalNetWeight,
         IFNULL( ROUND( SUM(TWG.f_netweightblc) / 1000, 2 ), 0 ) AS availableWeight,
         '吨' AS weightUnit,
@@ -423,7 +423,6 @@
         <where>
             TW.del_flag = '0'
             and TWG.f_qtyblc > 0
-            and TWG.lock_status ='0'
             <if test="warehouseCode != null  and warehouseCode != ''">and TW.f_id = #{warehouseCode}</if>
             <if test="ownerName != null  and ownerName != ''">and TC.f_name like concat('%', #{ownerName}, '%')</if>
             <if test="goodsName != null  and goodsName != ''">and TG.f_name like concat('%', #{goodsName}, '%')</if>
@@ -468,7 +467,7 @@
         '' AS level,
         TWG.f_qtyD AS totalQuantity,
         TWG.f_qtyblc AS availableQuantity,
-        '托' AS quantityUnit,
+        '托袋/托' AS quantityUnit,
         IFNULL( ROUND( TWG.f_netweightD / 1000, 2 ), 0 ) AS totalNetWeight,
         IFNULL( ROUND( TWG.f_netweightblc / 1000, 2 ), 0 ) AS availableWeight,
         '吨' AS weightUnit,

+ 4 - 2
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -159,6 +159,7 @@
         <result property="auditor" column="auditor"   />
         <result property="operationType" column="operation_type"   />
         <result property="receiptCode" column="receipt_code"   />
+        <result property="whetherBonded" column="whether_bonded"   />
     </resultMap>
 
     <resultMap type="WarehouseBillsVO" id="WarehousebillsVOResult">
@@ -187,7 +188,7 @@
         document_summary,financial_bill_type,checklists, business_code, serial_number, receipt_apply_code, operation_type,
                storage_name, storage_contract_code, storage_contract_start, storage_contract_end, storage_rate, storage_pay_time,
                insurance_code, insurance_amount, insurance_start_time, insurance_end_time, insurer, inventory, operator,
-               auditor, receipt_code from t_warehousebills
+               auditor, receipt_code,whether_bonded from t_warehousebills
     </sql>
 
     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
@@ -767,7 +768,7 @@
             GROUP BY
                 twfc.f_pid
         ) c ON c.f_pid = tw.f_id
-        WHERE 
+        WHERE
             tw.f_billtype = 'QTZW'
         <if test="remark != null  and remark != ''">and tw.remark like concat('%', #{remark}, '%')</if>
         <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
@@ -3533,6 +3534,7 @@
             <if test="operationType != null">operation_type = #{operationType},</if>
             <if test="operationType != null">operation_type = #{operationType},</if>
             <if test="remark != null">remark = #{remark},</if>
+            <if test="whetherBonded != null">whether_bonded = #{whetherBonded},</if>
         </trim>
         where f_id = #{fId}
     </update>