Browse Source

1.添加入库时备案序号,方便导出分类监管时携带备案序号数据
2.账单明细增加计费起始、截止、原始入库日期
3.增加仓储协议对应的客户数据接口
4.调整道合分类监管导出数据规则

nzf 3 years ago
parent
commit
271df6f97d

+ 11 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TCorpsController.java

@@ -19,6 +19,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 客户详情Controller
@@ -44,6 +45,16 @@ public class TCorpsController extends BaseController {
     }
 
     /**
+     * 查询仓储协议所对应的客户数据
+     */
+    @GetMapping("/agreementCorpList")
+    public TableDataInfo agreementCorpList(TCorps tCorps) {
+        startPage();
+        List<Map<String,Object>> list = tCorpsService.selectAgreementCorpList(tCorps);
+        return getDataTable(list);
+    }
+
+    /**
      * 车队使用,查询客户、司机信息
      */
     @GetMapping(value = "/selectCustomerDriverList")

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/reportManagement/TWhgenlegController.java

@@ -68,7 +68,7 @@ public class TWhgenlegController extends BaseController {
     }
 
     /**
-     * 导出分类监管数据
+     * 导出分类监管数据 (暂时只有道合)
      */
     @PreAuthorize("@ss.hasPermi('warehouseBusiness:whgenleg:superviseExport')")
     @Log(title = "分类监管数据导出",businessType = BusinessType.EXPORT)

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TCorpsMapper.java

@@ -35,6 +35,11 @@ public interface TCorpsMapper extends BaseMapper<TCorps> {
     public List<TCorps> selectTCorpsList(TCorps tCorps);
 
     /**
+     * 查询仓储费协议下的所有公司数据
+     */
+    List<Map<String,Object>> selectAgreementCorpList(TCorps tCorps);
+
+    /**
      * 新增客户详情
      *
      * @param tCorps 客户详情

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITCorpsService.java

@@ -32,6 +32,11 @@ public interface ITCorpsService {
     public List<TCorps> selectTCorpsList(TCorps tCorps);
 
     /**
+     * 查询仓储费协议下的所有公司信息
+     */
+    List<Map<String,Object>> selectAgreementCorpList(TCorps tCorps);
+
+    /**
      * 新增客户详情
      *
      * @param tCorps 客户详情

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TCorpsServiceImpl.java

@@ -102,6 +102,11 @@ public class TCorpsServiceImpl implements ITCorpsService {
         return tCorpsMapper.selectTCorpsList(tCorps);
     }
 
+    @Override
+    public List<Map<String, Object>> selectAgreementCorpList(TCorps tCorps) {
+        return tCorpsMapper.selectAgreementCorpList(tCorps);
+    }
+
     /**
      *  车队使用,查询客户、司机信息、车队信息
      * @param fId

+ 13 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWhgenleg.java

@@ -242,6 +242,11 @@ public class TWhgenleg extends BaseEntity {
     @Excel(name = "报关单号")
     private String fCustomno;
 
+    /**
+     * 备案序号
+     */
+    private String fEmsSeqNo;
+
     /** 是否按照箱号 */
     private Long isCntrno;
     /** 是否按照提单号 */
@@ -252,6 +257,14 @@ public class TWhgenleg extends BaseEntity {
     private String timeStartBsdate;
     private String timeEndBsdate;
 
+    public String getfEmsSeqNo() {
+        return fEmsSeqNo;
+    }
+
+    public void setfEmsSeqNo(String fEmsSeqNo) {
+        this.fEmsSeqNo = fEmsSeqNo;
+    }
+
     public Date getfBsdate() {
         return fBsdate;
     }

+ 82 - 80
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/impl/TWhgenlegServiceImpl.java

@@ -64,13 +64,13 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     public AjaxResult superviseExport(TWhgenleg tWhgenleg) {
         List<Map<String,Object>> list = tWhgenlegMapper.selectWhgenlegList(tWhgenleg);
         Date nowDate = new Date();
-        String fileName = "LHHT_STOCKAPPLY_" + new SimpleDateFormat("yyyyMMdd").format(nowDate) + ".FLJGRX";
+        String fileName = "DAOHE_STOCKAPPLY_" + new SimpleDateFormat("yyyyMMdd").format(nowDate) + ".FLJGRX";
         // 应用号
         String APP_CODE = "SAS";
         // 环节号
-        String APP_STEP_ID = "8910000438957";
+        String APP_STEP_ID = "STOCK_APPLY";
         // 序列化类名
-        String CLASS_NAME = "XMLOject";
+        String CLASS_NAME = "XMLObject";
         // 版本号
         String CLASS_VER = "1.0";
         // 生成时间
@@ -82,13 +82,13 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
         // 文件名
         String FILE_ORIGINAL_NAME = fileName;
         // 大小
-        String FILE_SIZE = String.valueOf(getFileSize(fileName));
+        String FILE_SIZE = String.valueOf(getFileSize(getAbsoluteFile(fileName)));
         // 类型
         String XML_TYPE = "W3C";
         // 经营单位代码
-        String TRADE_CODE = "35034092-9";
+        String TRADE_CODE = "3702661504";
         // 经营单位名称
-        String TRADE_NAME = "青岛道合供应链管理有限公司";
+        String TRADE_NAME = "青岛道合供应链";
         // 报送日期
         String APPLY_DATE = new SimpleDateFormat("yyyyMMdd").format(nowDate);
         try {
@@ -111,9 +111,9 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
                             "  <SDEPORT_DATA>\n" +
                             "    <StockRecordMessage>"
             );bw.newLine();
-            // 册号
-            String EMS_NO = "SJK1115";
-            // 册序号
+            // 册号
+            String EMS_NO = "T4258W000197";
+            // 册序号
             String EMS_SEQ_NO = "119000005430521";
             // 仓储物料号
             String WMS_MTS_NO = "TEMU9296408";
@@ -142,31 +142,73 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
             // 货物类型
             String GOODS_TYPE = "1";
             for (Map<String,Object> map : list) {
-                bw.write("      <StockInfo>\n" +
-                        "        <EmsNo>"+ EMS_NO +"</EmsNo>\n" +
-                        "        <EmsSeqNo>"+ EMS_SEQ_NO +"</EmsSeqNo>\n" +
-                        "        <WmsMtsNo>"+ map.get("fMblno") +"</WmsMtsNo>\n" +
-                        "        <GoodsMtsNo>"+ map.get("fMblno") +"</GoodsMtsNo>\n" +
-                        "        <CodeTs>"+ map.get("fGoodsno") +"</CodeTs>\n" +
-                        "        <GoodsName>"+ map.get("fGoodsids") +"</GoodsName>\n" +
-                        "        <GoodsModelDesc>"+ map.get("f_packagespecs") +"</GoodsModelDesc>\n" +
-                        "        <WmsDclUnit>"+ WMS_DCL_UNIT +"</WmsDclUnit>\n" +
-                        "        <WmsDclQty>"+ map.get("fQtyC") +"</WmsDclQty>\n" +
-                        "        <WmsLawUnit>"+ WMS_LAW_UNIT +"</WmsLawUnit>\n" +
-                        "        <WmsLawQty>"+ map.get("fQtyC") +"</WmsLawQty>\n" +
-                        "        <PlaceIds>"+ map.get("fWLID") +"</PlaceIds>\n" +
-                        "        <LocationIds>"+ map.get("fWarehouseids") +"</LocationIds>\n" +
-                        "        <StockStatus>"+ map.get("fLegStatus") +"</StockStatus>\n" +
-                        "        <GoodsType>"+ map.get("goodsPackageId") +"</GoodsType>\n" +
-                        "      </StockInfo>");
-                bw.newLine();
+                if ("保税".equals(map.get("fGoodsType"))) {
+                    if (StringUtils.isNull(map.get("fEmsSeqNo"))) {
+                        bw.write("      <StockInfo>\n" +
+                                "        <EmsNo>"+ map.get("fEmsNo") +"</EmsNo>\n" +
+                                "        <EmsSeqNo></EmsSeqNo>\n" +
+                                "        <WmsMtsNo>"+ map.get("fEmsNo") + "-" + map.get("fGoodsId") + "-" + map.get("fWarehouseNo") +"</WmsMtsNo>\n" +
+                                "        <GoodsMtsNo>"+ map.get("fMblno") +"</GoodsMtsNo>\n" +
+                                "        <CodeTs>"+ map.get("fCodeTs") +"</CodeTs>\n" +
+                                "        <GoodsName>"+ map.get("fGoodsids") +"</GoodsName>\n" +
+                                "        <GoodsModelDesc>"+ map.get("goodsfSpecs") +"</GoodsModelDesc>\n" +
+                                "        <WmsDclUnit>"+ map.get("fWmsDclUnit") +"</WmsDclUnit>\n" +
+                                "        <WmsDclQty>"+ map.get("fNetweightD") +"</WmsDclQty>\n" +
+                                "        <WmsLawUnit>"+ map.get("fWmsLawUnit") +"</WmsLawUnit>\n" +
+                                "        <WmsLawQty>"+ map.get("fNetweightD") +"</WmsLawQty>\n" +
+                                "        <PlaceIds>"+ map.get("fWLID") +"</PlaceIds>\n" +
+                                "        <LocationIds>"+ map.get("fWarehouseNo") +"</LocationIds>\n" +
+                                "        <StockStatus>"+ 1 +"</StockStatus>\n" +
+                                "        <GoodsType>"+ 1 +"</GoodsType>\n" +
+                                "      </StockInfo>");
+                        bw.newLine();
+                    } else {
+                        bw.write("      <StockInfo>\n" +
+                                "        <EmsNo>"+ map.get("fEmsNo") +"</EmsNo>\n" +
+                                "        <EmsSeqNo>"+ map.get("fEmsSeqNo") +"</EmsSeqNo>\n" +
+                                "        <WmsMtsNo>"+ map.get("fEmsNo") + "-" + map.get("fGoodsId") + "-" + map.get("fWarehouseNo") +"</WmsMtsNo>\n" +
+                                "        <GoodsMtsNo>"+ map.get("fMblno") +"</GoodsMtsNo>\n" +
+                                "        <CodeTs>"+ map.get("fCodeTs") +"</CodeTs>\n" +
+                                "        <GoodsName>"+ map.get("fGoodsids") +"</GoodsName>\n" +
+                                "        <GoodsModelDesc>"+ map.get("goodsfSpecs") +"</GoodsModelDesc>\n" +
+                                "        <WmsDclUnit>"+ map.get("fWmsDclUnit") +"</WmsDclUnit>\n" +
+                                "        <WmsDclQty>"+ map.get("fNetweightD") +"</WmsDclQty>\n" +
+                                "        <WmsLawUnit>"+ map.get("fWmsLawUnit") +"</WmsLawUnit>\n" +
+                                "        <WmsLawQty>"+ map.get("fNetweightD") +"</WmsLawQty>\n" +
+                                "        <PlaceIds>"+ map.get("fWLID") +"</PlaceIds>\n" +
+                                "        <LocationIds>"+ map.get("fWarehouseNo") +"</LocationIds>\n" +
+                                "        <StockStatus>"+ 1 +"</StockStatus>\n" +
+                                "        <GoodsType>"+ 1 +"</GoodsType>\n" +
+                                "      </StockInfo>");
+                        bw.newLine();
+                    }
+                } else {
+                    bw.write("      <StockInfo>\n" +
+                            "        <EmsNo></EmsNo>\n" +
+                            "        <EmsSeqNo></EmsSeqNo>\n" +
+                            "        <WmsMtsNo>"+ map.get("fEmsNo") + "-" + map.get("fGoodsId") + "-" + map.get("fWarehouseNo") +"</WmsMtsNo>\n" +
+                            "        <GoodsMtsNo>"+ map.get("fMblno") +"</GoodsMtsNo>\n" +
+                            "        <CodeTs>"+ map.get("fCodeTs") +"</CodeTs>\n" +
+                            "        <GoodsName>"+ map.get("fGoodsids") +"</GoodsName>\n" +
+                            "        <GoodsModelDesc>"+ map.get("goodsfSpecs") +"</GoodsModelDesc>\n" +
+                            "        <WmsDclUnit>"+ map.get("fWmsDclUnit") +"</WmsDclUnit>\n" +
+                            "        <WmsDclQty>"+ map.get("fNetweightD") +"</WmsDclQty>\n" +
+                            "        <WmsLawUnit>"+ map.get("fWmsLawUnit") +"</WmsLawUnit>\n" +
+                            "        <WmsLawQty>"+ map.get("fNetweightD") +"</WmsLawQty>\n" +
+                            "        <PlaceIds>"+ map.get("fWLID") +"</PlaceIds>\n" +
+                            "        <LocationIds>"+ map.get("fWarehouseNo") +"</LocationIds>\n" +
+                            "        <StockStatus>"+ 1 +"</StockStatus>\n" +
+                            "        <GoodsType>"+ 0 +"</GoodsType>\n" +
+                            "      </StockInfo>");
+                    bw.newLine();
+                }
             }
             bw.write(
                     "       <TradeCode>"+ TRADE_CODE +"</TradeCode>\n" +
                             "       <TradeName>"+ TRADE_NAME +"</TradeName>\n" +
                             "       <ApplyDate>"+ APPLY_DATE +"</ApplyDate>"
             );bw.newLine();
-            // 理论申报单位
+            /*// 理论申报单位
             String DCL_UNIT = "035";
             // 理论申报数量
             String DCL_QTY = "154";
@@ -189,7 +231,7 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
                                 "      </SasStockInfo>"
                 );
                 bw.newLine();
-            }
+            }*/
             bw.write(
                     "   </StockRecordMessage>\n" +
                             "  </SDEPORT_DATA>\n" +
@@ -197,6 +239,17 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
             );bw.newLine();
             bw.close();
             fw.close();
+            String path = getAbsoluteFile(fileName);
+            BufferedReader reader = new BufferedReader(new FileReader(path));
+            String lineText = null;
+            PrintStream ps = null;
+            while ((lineText = reader.readLine()) != null) {
+                String newContent = lineText.replace("<FILE_SIZE>-1</FILE_SIZE>","<FILE_SIZE>"+ getFileSize(path) +"</FILE_SIZE>");
+                File newFile = new File(fileName);
+                ps = new PrintStream(new FileOutputStream(newFile,true));
+                ps.println(newContent);
+                ps.flush();
+            }
             return AjaxResult.success(fileName);
         } catch (Exception e) {
             e.printStackTrace();
@@ -204,57 +257,6 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
         }
     }
 
-    /**
-     * 任意位置插入数据
-     * @param path
-     * @param points 指定的位置
-     * @param insertContent 待插入的内容
-     */
-    public void randomInsert(String path, long points, String insertContent) {
-        RandomAccessFile rw = null;
-        BufferedReader reader = null;
-        BufferedWriter writer = null;
-        File temp = null;
-        try {
-            rw = new RandomAccessFile(path,"rw");
-            // 创建临时文件
-            // prefix -- 前缀字符串定义的文件名;必须至少有三个字符长
-            // suffix -- 后缀字符串定义文件的扩展名;如果为null后缀".tmp" 将被使用
-            temp = File.createTempFile("save","null");
-            // 临时文件的读取
-            reader = new BufferedReader(new FileReader(temp));
-            // 临时文件的写入
-            writer = new BufferedWriter(new FileWriter(temp));
-            // 定位到 points,把后面的数据写入临时文件
-            rw.seek(points);
-            byte[] bytes = new byte[100];
-            int num = 0;
-            while ((num = rw.read(bytes)) != -1) {
-                // 将 pos 后面的内容写入临时文件
-                writer.write(new String(bytes, 0, num));
-            }
-            writer.flush();
-            rw.seek(points); // 定位到 points,将插入的内容和临时文件写入 rw
-            rw.write(insertContent.getBytes());
-            String amp = null;
-            while ((amp = reader.readLine()) != null) {
-                // 临时文件已被读取
-                rw.write(amp.getBytes());
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                writer.close();
-                reader.close();
-                rw.close();
-                temp.deleteOnExit();// 关闭流操作和删除临时文件
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
     // 文件大小
     public static long getFileSize(String filename) {
         File file = new File(filename);

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

@@ -252,6 +252,11 @@ public class TWarehouseBills extends BaseEntity {
     private String fCustomno;
 
     /**
+     * 备案序号
+     */
+    private String fEmsSeqNo;
+
+    /**
      * 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择
      */
     @Excel(name = "是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择")
@@ -790,6 +795,14 @@ public class TWarehouseBills extends BaseEntity {
     @TableField(exist = false)
     private List<Long> orderList;
 
+    public String getfEmsSeqNo() {
+        return fEmsSeqNo;
+    }
+
+    public void setfEmsSeqNo(String fEmsSeqNo) {
+        this.fEmsSeqNo = fEmsSeqNo;
+    }
+
     public List<Long> getOrderList() {
         return orderList;
     }

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

@@ -442,6 +442,19 @@ public class TWarehousebillsfees extends BaseEntity {
      */
     private String dateRange;
 
+    /**
+     * 业务编号
+     */
+    private String fSrcBillno;
+
+    public String getfSrcBillno() {
+        return fSrcBillno;
+    }
+
+    public void setfSrcBillno(String fSrcBillno) {
+        this.fSrcBillno = fSrcBillno;
+    }
+
     public String getfTaxrateStr() {
         return fTaxrateStr;
     }

+ 56 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/QueryMenu.java

@@ -42,6 +42,24 @@ public class QueryMenu {
     private Date fReviewDate;
 
     /**
+     * 计费起始日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fChargedate;
+
+    /**
+     * 计费截止日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fBillingDeadline;
+
+    /**
+     * 原始入库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date fOriginalbilldate;
+
+    /**
      * 费用名称
      */
     @Excel(name = "费用名称")
@@ -133,6 +151,12 @@ public class QueryMenu {
     private String fBilltype;
 
     /**
+     * 业务编号
+     */
+    @Excel(name = "业务编号")
+    private String fSrcBillno;
+
+    /**
      * 货物名称
      */
     @Excel(name = "货物名称")
@@ -156,6 +180,38 @@ public class QueryMenu {
     @Excel(name = "发货方")
     private String fShipper;
 
+    public Date getfOriginalbilldate() {
+        return fOriginalbilldate;
+    }
+
+    public void setfOriginalbilldate(Date fOriginalbilldate) {
+        this.fOriginalbilldate = fOriginalbilldate;
+    }
+
+    public Date getfChargedate() {
+        return fChargedate;
+    }
+
+    public void setfChargedate(Date fChargedate) {
+        this.fChargedate = fChargedate;
+    }
+
+    public Date getfBillingDeadline() {
+        return fBillingDeadline;
+    }
+
+    public void setfBillingDeadline(Date fBillingDeadline) {
+        this.fBillingDeadline = fBillingDeadline;
+    }
+
+    public String getfSrcBillno() {
+        return fSrcBillno;
+    }
+
+    public void setfSrcBillno(String fSrcBillno) {
+        this.fSrcBillno = fSrcBillno;
+    }
+
     public String getfShipper() {
         return fShipper;
     }

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

@@ -574,6 +574,9 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             if (StringUtils.isNotEmpty(warehouseBills.getfCustomno())) {
                 tWhgenleg.setfCustomno(warehouseBills.getfCustomno());
             }
+            if (StringUtils.isNotEmpty(warehouseBills.getfEmsSeqNo())) {
+                tWhgenleg.setfEmsSeqNo(warehouseBills.getfEmsSeqNo());
+            }
             if (StringUtils.isNotEmpty(warehouseBills.getRemark())) {
                 tWhgenleg.setRemark(warehouseBills.getRemark());
             }

+ 13 - 0
ruoyi-warehouse/src/main/resources/mapper/basicData/TCorpsMapper.xml

@@ -136,6 +136,19 @@
             ORDER BY CONVERT(f_name USING gbk) asc
     </select>
 
+    <select id="selectAgreementCorpList" parameterType="TCorps" resultType="map">
+        select
+            corp.f_id AS fId,
+            corp.f_name AS fName
+        FROM
+            t_warehouse_agreement agre
+            LEFT JOIN t_corps corp ON corp.f_id = agre.f_corpid
+        <where>
+            <if test="fName != null  and fName != ''"> and corp.f_name like concat('%', #{fName}, '%')</if>
+        </where>
+        GROUP BY corp.f_id
+    </select>
+
     <select id="selectTCorpsById" parameterType="Long" resultMap="TCorpsResult">
         <include refid="selectTCorpsVo"/>
         where f_id = #{fId}

+ 21 - 2
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -45,6 +45,7 @@
         <result property="fOriginalbilldate" column="f_originalbilldate"/>
         <result property="fLocalcntrno" column="f_localcntrno"/>
         <result property="fCustomno" column="f_customno"/>
+        <result property="fEmsSeqNo" column="f_ems_seq_no"/>
     </resultMap>
 
     <resultMap type="CalculateStorageFeesInfoVO" id="StorageFeesInfoResult">
@@ -92,7 +93,7 @@
         select f_id, f_accyear, f_accmonth, f_corpid, f_shipper, f_mblno, f_originalbillno, f_warehouse_locationid, f_goodsid, f_trademodeid, f_preqty,
          f_pregrossweight, f_warehouseid, f_prenetweight, f_bsdate, f_chargedate, f_volumnD, f_qtyD, f_billingway, f_grossweightD, f_netweightD, f_volumnC,
           f_qtyC, f_grossweightC, f_qtyblc, f_grossweightblc, f_netweightC, f_netweightblc, f_cntrno, f_status, del_flag, f_marks, create_by,
-           create_time, update_by, f_volumnblc, update_time, remark, f_business_type, f_originalbilldate, f_localcntrno,f_customno from t_whgenleg
+           create_time, update_by, f_volumnblc, update_time, remark, f_business_type, f_originalbilldate, f_localcntrno,f_customno,f_ems_seq_no from t_whgenleg
     </sql>
 
     <select id="selectTWhgenlegList" parameterType="TWhgenleg" resultMap="TWhgenlegResult">
@@ -216,6 +217,7 @@
             <if test="fBusinessType != null">f_business_type,</if>
             <if test="fOriginalbilldate != null">f_originalbilldate,</if>
             <if test="fLocalcntrno != null">f_localcntrno,</if>
+            <if test="fEmsSeqNo != null">f_ems_seq_no,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fAccyear != null">#{fAccyear},</if>
@@ -258,6 +260,7 @@
             <if test="fBusinessType != null">#{fBusinessType},</if>
             <if test="fOriginalbilldate != null">#{fOriginalbilldate},</if>
             <if test="fLocalcntrno != null">#{fLocalcntrno},</if>
+            <if test="fEmsSeqNo != null">#{fEmsSeqNo},</if>
         </trim>
     </insert>
 
@@ -304,6 +307,7 @@
             <if test="fBusinessType != null">f_business_type = #{fBusinessType},</if>
             <if test="fOriginalbilldate != null">f_originalbilldate = #{fOriginalbilldate},</if>
             <if test="fLocalcntrno != null">f_localcntrno = #{fLocalcntrno},</if>
+            <if test="fEmsSeqNo != null">f_ems_seq_no = #{fEmsSeqNo},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -1069,28 +1073,43 @@
             leg.f_shipper AS fShipper,
             DATE_FORMAT( leg.f_originalbilldate, '%Y-%m-%d' ) AS fOriginalbilldate,
             ware.f_warehouse_information AS fWarehouseids,
+            ware.f_no AS  fWarehouseNo,
             leg.f_mblno AS fMblno,
+            goods.f_id AS fGoodsId,
+            goods.f_ems_no AS fEmsNo,
+            leg.f_ems_seq_no AS fEmsSeqNo,
+            goods.f_goods_ts AS fCodeTs,
+            goods.f_wms_dcl_unit AS fWmsDclUnit,
+            goods.f_wms_law_unit AS fWmsLawUnit,
             goods.f_name AS fGoodsids,
             goods.f_no AS fGoodsno,
             goods.f_packageid AS goodsPackageId,
+            goods.f_specs AS goodsfSpecs,
             leg.f_qtyC AS fQtyC,
             leg.f_warehouse_locationid AS fWLID,
             leg.f_status AS fLegStatus,
             dict.dict_label AS fBusinessTypes,
+            sdict.dict_label AS fGoodsType,
             leg.f_marks AS fMarks,
             leg.f_qtyblc AS fQtyblc,
             leg.f_grossweightblc AS fGrossweightblc,
-            leg.f_netweightblc AS fNetweightblc
+            leg.f_netweightblc AS fNetweightblc,
+            cast(leg.f_netweightD AS DECIMAL) AS fNetweightD
         FROM
             t_whgenleg leg
             LEFT JOIN t_corps corp ON corp.f_id = leg.f_corpid
             LEFT JOIN t_goods goods ON goods.f_id = leg.f_goodsid
             LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouse_locationid
             LEFT JOIN sys_dict_data dict ON dict.dict_value = leg.f_business_type
+            LEFT JOIN sys_dict_data sdict ON sdict.dict_value = leg.f_trademodeid
             LEFT JOIN t_warehouse_area area ON area.f_id = leg.f_warehouse_locationid
+            LEFT JOIN t_warehouse wareN ON wareN.f_id = leg.f_warehouseid
         <where>
             dict.status = '0'
             AND dict.dict_type = 'storage_type'
+            AND sdict.`status` = '0'
+            AND sdict.dict_type = 'data_trademodes'
+            AND	(wareN.f_name = '金龙行库9号库' OR wareN.f_name = '金龙行库10号库')
             <if test="fOriginalbillno != null  and fOriginalbillno != ''">and leg.f_originalbillno = #{fOriginalbillno}</if>
             <if test="fPreqty != null ">and leg.f_preqty = #{fPreqty}</if>
             <if test="fCorpid != null ">and leg.f_corpid = #{fCorpid}</if>

+ 5 - 1
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -41,6 +41,7 @@
         <result property="fEta"    column="f_eta"    />
         <result property="fMarks"    column="f_marks"    />
         <result property="fCustomno"    column="f_customno"    />
+        <result property="fEmsSeqNo"    column="f_ems_seq_no"    />
         <result property="fIfweigh"    column="f_ifweigh"    />
         <result property="fIfpledge"    column="f_ifpledge"    />
         <result property="fIfdamage"    column="f_ifdamage"    />
@@ -144,7 +145,7 @@
     <sql id="selectTWarehousebillsVo">
         select f_id, f_billno, f_customsdeclartion, f_originalbillno, f_deptid, f_bsdeptid, f_contacts, f_tel, f_corpid, f_shipper, f_tocorpid, f_stltypeid, f_bscorpno,
         f_warehouseid, f_storekeeper, f_chargedate, f_bsdate, f_planqty, f_plangrossweight, f_plannetweight, f_planvolumn, f_qty, f_grossweight, f_netweight,
-        f_volumn, f_billingway, f_trademodeid, f_sbu, f_feetunit, f_mblno, f_emblno, f_company, f_marks, f_vslvoy, f_eta, f_customno, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid,
+        f_volumn, f_billingway, f_trademodeid, f_sbu, f_feetunit, f_mblno, f_emblno, f_company, f_marks, f_vslvoy, f_eta, f_customno, f_ems_seq_no, f_ifweigh, f_ifpledge, f_ifdamage, f_bankcorpid,
         f_billtype, f_billstatus, f_items_status, del_flag, create_by, create_time, update_by, update_time, remark, f_billing_deadline, f_product_name, f_review_date,
         f_truckno, f_driver_name, f_driver_tel, f_driver_id_car, f_business_type, f_labour, f_fleet, f_inwarehouseid, f_bstime, f_cartype, f_goodsid, f_new_trademodeid,
         f_loadportid, f_destportid, f_serviceitems, f_invoceobj, f_sign, f_detentioncargo, f_booksmarks, f_shippername, f_shipperattn, f_shippertel, f_consigneername,
@@ -1064,6 +1065,7 @@
             <if test="fEta != null">f_eta,</if>
             <if test="fMarks != null">f_marks,</if>
             <if test="fCustomno != null">f_customno,</if>
+            <if test="fEmsSeqNo != null">f_ems_seq_no,</if>
             <if test="fIfweigh != null">f_ifweigh,</if>
             <if test="fIfpledge != null">f_ifpledge,</if>
             <if test="fIfdamage != null">f_ifdamage,</if>
@@ -1188,6 +1190,7 @@
             <if test="fEta != null">#{fEta},</if>
             <if test="fMarks != null">#{fMarks},</if>
             <if test="fCustomno != null">#{fCustomno},</if>
+            <if test="fEmsSeqNo != null">#{fEmsSeqNo},</if>
             <if test="fIfweigh != null">#{fIfweigh},</if>
             <if test="fIfpledge != null">#{fIfpledge},</if>
             <if test="fIfdamage != null">#{fIfdamage},</if>
@@ -1316,6 +1319,7 @@
             <if test="fEta != null">f_eta = #{fEta},</if>
             <if test="fMarks != null">f_marks = #{fMarks},</if>
             <if test="fCustomno != null">f_customno = #{fCustomno},</if>
+            <if test="fEmsSeqNo != null">f_ems_seq_no = #{fEmsSeqNo},</if>
             <if test="fIfweigh != null">f_ifweigh = #{fIfweigh},</if>
             <if test="fIfpledge != null">f_ifpledge = #{fIfpledge},</if>
             <if test="fIfdamage != null">f_ifdamage = #{fIfdamage},</if>

+ 7 - 1
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml

@@ -58,6 +58,7 @@
         <result property="fStltypeid" column="f_stltypeid"/>
         <result property="fBusinessType" column="f_business_type"/>
         <result property="fSrcTypeId" column="f_src_type_id"/>
+        <result property="fSrcBillno" column="src_bill_no"/>
     </resultMap>
 
     <sql id="selectTWarehousebillsfeesVo">
@@ -916,7 +917,7 @@
         SELECT
         tc.f_name AS corpName,
         tf.f_mblno AS fMblno,
-        tf.f_bsdate AS fBsdate,
+        IF(tf.f_billtype = 'SJRK' || tf.f_billtype = 'SJCK' || tf.f_billtype = 'CKDB' || tf.f_billtype = 'HQZY',tf.f_bsdate, null) AS fBsdate,
         tf.f_review_date AS fReviewDate,
         te.f_name AS feeName,
         tf.f_dc AS fDc,
@@ -937,6 +938,10 @@
         tf.f_product_name AS fProductName,
         tf.f_stltypeid AS fStltypeid,
         tf.remark AS remark,
+        tf.src_bill_no AS fSrcBillno,
+        tf.f_chargedate AS fChargedate,
+        tf.f_billing_deadline AS fBillingDeadline,
+        tf.f_originalbilldate AS fOriginalbilldate,
         CASE
         WHEN tf.f_billstatus = '1' THEN '录入'
         WHEN tf.f_billstatus = '2' THEN '暂存'
@@ -964,6 +969,7 @@
             <if test="fCorpid != null  and fCorpid != ''">and tf.f_corpid = #{fCorpid}</if>
             <if test="fShipper != null  and fShipper != ''">and tw.f_shipper like concat('%',#{fShipper},'%')</if>
             <if test="fStltypeid != null">and tf.f_stltypeid = #{fStltypeid}</if>
+            <if test="fSrcBillno != null">and tf.src_bill_no = #{fSrcBillno}</if>
             <if test='fFeeids != null'>
                 and tf.f_feeid in
                 <foreach item="fFeeid" collection="fFeeids" open="(" separator="," close=")">