Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

lazhaoqian 4 anni fa
parent
commit
322c889bb4
23 ha cambiato i file con 1430 aggiunte e 79 eliminazioni
  1. 2 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/basicData/FleetCarManageController.java
  2. 5 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TStorageFeeCalculationController.java
  3. 6 5
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseGoodsTransferController.java
  4. 5 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseInStockController.java
  5. 5 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseOutStockController.java
  6. 8 4
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseStockTransferController.java
  7. 4 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  8. 16 2
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java
  9. 19 15
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsplansServiceImpl.java
  10. 1 0
      ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsMapper.xml
  11. 10 9
      ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml
  12. 2 1
      ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsplansMapper.xml
  13. 13 6
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  14. 214 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/GoodsTransfer.java
  15. 260 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/InStock.java
  16. 39 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/ListMapToBeanUtils.java
  17. 293 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/OutStock.java
  18. 251 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/StockTransfer.java
  19. 118 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/StorageFee.java
  20. 11 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java
  21. 26 3
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/BillnoSerialServiceImpl.java
  22. 37 1
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java
  23. 85 17
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

+ 2 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/basicData/FleetCarManageController.java

@@ -33,11 +33,9 @@ public class FleetCarManageController extends BaseController
      * 下拉列表查询【车辆】列表id name
      */
     @GetMapping("/list")
-    public TableDataInfo list(FleetCarManage fleetCarManage)
+    public List<FleetCarManage> list(FleetCarManage fleetCarManage)
     {
-        startPage();
-        List<FleetCarManage> list = fleetCarManageService.selectFleetCarManageIdNameList(fleetCarManage);
-        return getDataTable(list);
+        return fleetCarManageService.selectFleetCarManageIdNameList(fleetCarManage);
     }
 
     /**

+ 5 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TStorageFeeCalculationController.java

@@ -15,6 +15,7 @@ import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.warehouseBusiness.domain.TWareHouseExcelItems;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.excel.StorageFee;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -70,11 +71,11 @@ public class TStorageFeeCalculationController extends BaseController {
     @Log(title = "详情主表", businessType = BusinessType.EXPORT)
     @DataScope(deptAlias = "d", userAlias = "u")
     @GetMapping("/export")
-    public AjaxResult export(TWarehouseBills tWarehouseBills) {
+    public AjaxResult export(TWarehouseBills tWarehouseBills) throws Exception {
         tWarehouseBills.setfBilltype("JSCCF");
-        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
-        ExcelUtil<TWarehouseBills> util = new ExcelUtil<TWarehouseBills>(TWarehouseBills.class);
-        return util.exportExcel(list, "warehousebills");
+        List<StorageFee> list = itWarehouseBillsService.storageFeeExport(tWarehouseBills);
+        ExcelUtil<StorageFee> util = new ExcelUtil<StorageFee>(StorageFee.class);
+        return util.exportExcel(list, "仓储费计算");
     }
 
     /**

+ 6 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseGoodsTransferController.java

@@ -14,6 +14,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.excel.GoodsTransfer;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -56,7 +57,6 @@ public class TWarehouseGoodsTransferController extends BaseController {
         return itWarehouseBillsService.getWarehouseInStockBillsNo(tWarehouseBills);
     }
 
-
     /**
      * 导出货转详情主表列表
      */
@@ -65,10 +65,11 @@ public class TWarehouseGoodsTransferController extends BaseController {
     @DataScope(deptAlias = "d", userAlias = "u")
     @GetMapping("/export")
     @RepeatSubmit
-    public AjaxResult export(TWarehouseBills tWarehouseBills) {
-        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
-        ExcelUtil<TWarehouseBills> util = new ExcelUtil<TWarehouseBills>(TWarehouseBills.class);
-        return util.exportExcel(list, "warehousebills");
+    public AjaxResult export(TWarehouseBills tWarehouseBills) throws Exception {
+        tWarehouseBills.setfBilltype("HQZY");
+        List<GoodsTransfer> list = itWarehouseBillsService.goodsTransferExport(tWarehouseBills);
+        ExcelUtil<GoodsTransfer> util = new ExcelUtil<GoodsTransfer>(GoodsTransfer.class);
+        return util.exportExcel(list, "货转");
     }
 
     /**

+ 5 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseInStockController.java

@@ -14,6 +14,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.excel.InStock;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -64,11 +65,11 @@ public class TWarehouseInStockController extends BaseController {
     @Log(title = "详情主表", businessType = BusinessType.EXPORT)
     @DataScope(deptAlias = "d", userAlias = "u")
     @GetMapping("/export")
-    public AjaxResult export(TWarehouseBills tWarehouseBills) {
+    public AjaxResult export(TWarehouseBills tWarehouseBills) throws Exception {
         tWarehouseBills.setfBilltype("SJRK");
-        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
-        ExcelUtil<TWarehouseBills> util = new ExcelUtil<TWarehouseBills>(TWarehouseBills.class);
-        return util.exportExcel(list, "warehousebills");
+        List<InStock> list = itWarehouseBillsService.inStockExport(tWarehouseBills);
+        ExcelUtil<InStock> util = new ExcelUtil<InStock>(InStock.class);
+        return util.exportExcel(list, "入库");
     }
 
     /**

+ 5 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseOutStockController.java

@@ -14,6 +14,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.excel.OutStock;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -89,11 +90,11 @@ public class TWarehouseOutStockController extends BaseController {
     @Log(title = "详情主表", businessType = BusinessType.EXPORT)
     @DataScope(deptAlias = "d", userAlias = "u")
     @GetMapping("/export")
-    public AjaxResult export(TWarehouseBills tWarehouseBills) {
+    public AjaxResult export(TWarehouseBills tWarehouseBills)throws Exception  {
         tWarehouseBills.setfBilltype("SJCK");
-        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
-        ExcelUtil<TWarehouseBills> util = new ExcelUtil<TWarehouseBills>(TWarehouseBills.class);
-        return util.exportExcel(list, "warehousebills");
+        List<OutStock> list = itWarehouseBillsService.outStockExport(tWarehouseBills);
+        ExcelUtil<OutStock> util = new ExcelUtil<>(OutStock.class);
+        return util.exportExcel(list, "出库");
     }
 
     /**

+ 8 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseStockTransferController.java

@@ -14,6 +14,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
+import com.ruoyi.warehouseBusiness.excel.StockTransfer;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -68,15 +69,18 @@ public class TWarehouseStockTransferController extends BaseController {
     @Log(title = "详情主表", businessType = BusinessType.EXPORT)
     @DataScope(deptAlias = "d", userAlias = "u")
     @GetMapping("/export")
-    public AjaxResult export(TWarehouseBills tWarehouseBills) {
+    public AjaxResult export(TWarehouseBills tWarehouseBills) throws Exception {
+        String exportName =null;
         if(tWarehouseBills.getType().equals("1")){
             tWarehouseBills.setfBilltype("CKDB");
+            exportName="调拨";
         }else{
             tWarehouseBills.setfBilltype("HWTG");
+            exportName="货物通关";
         }
-        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
-        ExcelUtil<TWarehouseBills> util = new ExcelUtil<TWarehouseBills>(TWarehouseBills.class);
-        return util.exportExcel(list, "warehousebills");
+        List<StockTransfer> list = itWarehouseBillsService.stockTransferExport(tWarehouseBills);
+        ExcelUtil<StockTransfer> util = new ExcelUtil<>(StockTransfer.class);
+        return util.exportExcel(list, exportName);
     }
 
     /**

+ 4 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@@ -64,6 +64,10 @@ public class SysUser extends BaseEntity
     /** 用户类型(00系统用户)(11微信用户) */
     private String userType;
 
+    /** 用户系统(1仓储、2车队、3凯和) */
+    @Excel(name = "用户系统(1仓储经理、2仓储操作员、10车队经理、11车队操作员)")
+    private String userSystem;
+
     /** 微信唯一Id */
     private String openId;
 

+ 16 - 2
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java

@@ -502,9 +502,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
             billsStatus = 80L;
             JSONArray planJson = JSONArray.parseArray(cars);
             List<Ftmsorderbillscars> tmsorderbillscarsList = JSONObject.parseArray(planJson.toJSONString(), Ftmsorderbillscars.class);
-            int line = 0;
             for (Ftmsorderbillscars s : tmsorderbillscarsList) {
-                line++;
                 s.setOrgId(pId);
                 s.setBillStatus(6L);
                 s.setCreateTime(new Date());
@@ -862,6 +860,22 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
         ftmsorderbillscntrs.setPlanQty(ftmsorderbillscntrs.getPlanQty() - tmsorderbillscars.getCntrQty() + ftmsorderbillscars.getCntrQty());
         ftmsorderbillscntrsMapper.updateftmsorderbillscntrs(ftmsorderbillscntrs);
         Ftmsorderbills ftmsorderbills = ftmsorderbillsMapper.selectftmsorderbillsById(ftmsorderbillsplans.getOrgId());
+        if (StringUtils.isNull(ftmsorderbillscars.getOrderNo())) {
+            // 流水号 是否有回收
+            BillnoDel billnoDel = new BillnoDel();
+            billnoDel.setBillType("SJLSH");
+            BillnoDel billnoDels = billnoDelMapper.selectBillnoDelBillNo(billnoDel);
+            // 如果有数据在删除列表
+            if (StringUtils.isNotNull(billnoDels)) {
+                billnoDelMapper.deleteBillnoDelById(billnoDels.getId());
+                ftmsorderbillscars.setOrderNo(billnoDels.getBillNo());
+            } else {
+                // 生成流水号
+                Date time = new Date();
+                String billNo = billnoSerialServiceImpl.getSerialNumber("SJLSH", time);
+                ftmsorderbillscars.setOrderNo(billNo);
+            }
+        }
         ftmsorderbillscars.setBillStatus(6L);
         ftmsorderbillscars.setPlanDate(new Date());
         ftmsorderbillscars.setUpdateTime(new Date());

+ 19 - 15
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsplansServiceImpl.java

@@ -33,6 +33,13 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
  */
 @Service
 public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansService {
+
+    @Autowired
+    private SysUserMapper sysUserMapper;
+
+    @Autowired
+    private WechatService wechatService;
+
     @Autowired
     private FtmsorderbillsMapper ftmsorderbillsMapper;
 
@@ -60,12 +67,6 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
     @Autowired
     private FtmsorderbillsattachsMapper ftmsorderbillsattachsMapper;
 
-    @Autowired
-    private SysUserMapper sysUserMapper;
-
-    @Autowired
-    private WechatService wechatService;
-
 
     @Override
     public void testt(String phone) {
@@ -283,6 +284,7 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
         Ftmsorderbillscntrs ftmsorderbillscntrs = ftmsorderbillscntrsMapper.selectftmsorderbillscntrsById(tmsorderbillsplans.getPId());
         long qty = ftmsorderbillscntrs.getCntrPlanQty() + tmsorderbillsplans.getCntrQty();
         if (ftmsorderbillscntrs.getCntrBlcQty() < tmsorderbillsplans.getCntrQty()) {
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             return AjaxResult.error("调度数量超出计划箱量不可提交");
         }
         ftmsorderbillscntrs.setCntrPlanQty(qty);
@@ -301,7 +303,7 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
         }
         Map<String, Object> map = new HashMap<>();
         Ftmsorderbillscntrs tmsorderbillscntrs = new Ftmsorderbillscntrs();
-        tmsorderbillscntrs.setId(tmsorderbillsplans.getPId());
+        tmsorderbillscntrs.setOrgId(tmsorderbillsplans.getOrgId());
         map.put("plan", tmsorderbillsplans);
         map.put("cntrs", ftmsorderbillscntrsMapper.selectftmsorderbillscntrsList(tmsorderbillscntrs));
         return AjaxResult.success(map);
@@ -367,7 +369,7 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
         }
         // 计划下达数据
         Ftmsorderbills bills = ftmsorderbillsMapper.selectftmsorderbillsById(tmsorderbillsplans.getOrgId());
-        long cntrQty = tmsorderbillsplans.getCntrQty() - ftmsorderbillsplans.getCntrQty();
+        long cntrQty = ftmsorderbillsplans.getCntrQty() - tmsorderbillsplans.getCntrQty();
         bills.setQtyDisPatch(bills.getQtyDisPatch() + cntrQty);
         if (ftmsorderbillsMapper.updateftmsorderbills(bills) <= 0) {
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -382,8 +384,7 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
         }
         Map<String, Object> map = new HashMap<>();
         Ftmsorderbillscntrs scntrs = new Ftmsorderbillscntrs();
-        scntrs.setId(tmsorderbillsplans.getPId());
-        scntrs.setBillStatus(6L);
+        scntrs.setOrgId(tmsorderbillsplans.getOrgId());
         map.put("plan", tmsorderbillsplans);
         map.put("cntrs", ftmsorderbillscntrsMapper.selectftmsorderbillscntrsList(scntrs));
         return AjaxResult.success(map);
@@ -602,11 +603,14 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
     @Transactional
     public AjaxResult insertftmsorderbills(String tmsorder, String attachs, String fees, String plans, LoginUser loginUser) {
         Ftmsorderbills tmsorderbills = JSONArray.parseObject(tmsorder, Ftmsorderbills.class);
-        tmsorderbills.setBillStatus(60L);
-        tmsorderbills.setUpdateTime(new Date());
-        tmsorderbills.setUpdateBy(loginUser.getUsername());
-        ftmsorderbillsMapper.updateftmsorderbills(tmsorderbills);
-        long pId = tmsorderbills.getId();
+        Ftmsorderbills ftmsorderbills = ftmsorderbillsMapper.selectftmsorderbillsById(tmsorderbills.getId());
+        ftmsorderbills.setTransUserId(loginUser.getUser().getUserId());
+        ftmsorderbills.setTransUserName(loginUser.getUser().getNickName());
+        ftmsorderbills.setBillStatus(60L);
+        ftmsorderbills.setUpdateTime(new Date());
+        ftmsorderbills.setUpdateBy(loginUser.getUsername());
+        ftmsorderbillsMapper.updateftmsorderbills(ftmsorderbills);
+        long pId = ftmsorderbills.getId();
         Ftmsorderbillsfees ftmsorderbillsfees = new Ftmsorderbillsfees();
         ftmsorderbillsfees.setfPid(pId);
         ftmsorderbillsfees.setActId(1010L);

+ 1 - 0
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsMapper.xml

@@ -203,6 +203,7 @@
         <if test="billStatus != null and billStatus != ''">
             AND f.bill_status LIKE "%${billStatus}%"
         </if>
+        ORDER BY f.id desc
     </select>
 
     <select id="selectftmsorderbillsById" parameterType="Long" resultMap="ftmsorderbillsResult">

+ 10 - 9
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml

@@ -413,7 +413,7 @@
             c.order_no orderNo,
             c.mblno,
             c.carreg_no carregNo,
-            driver.name,
+            driver.name driverName,
             c.driver_tel driverTel,
             CASE
             c.order_status
@@ -467,8 +467,6 @@
             t.weight_plan weightPlan,
             t.ysl,
             t.voy,
-            t.pol_id polId,
-            t.pod_id podId,
             t.load_addr loadAddr,
             t.load_date tLoadDate,
             t.load_attn loadAttn,
@@ -482,8 +480,8 @@
             t.un_load_attn unLoadAttn,
             t.un_load_attn_tel unLoadAttnTel,
             dic.dict_label cntrId,
-            pol.dict_label polId,
-            pod.dict_label podId,
+            pol.f_name polId,
+            pod.f_name podId,
             c.accept_date acceptDate,
             c.cntr_qty cntrQty,
             c.off_data offData,
@@ -509,14 +507,16 @@
             LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
             LEFT JOIN t_corps p ON p.f_id = t.corp_id
             LEFT JOIN t_goods g ON g.f_id = t.goods_id
-            LEFT JOIN sys_dict_data pol ON pol.dict_value = t.pol_id
-            AND pol.dict_type = 'port_start'
-            LEFT JOIN sys_dict_data pod ON pod.dict_value = t.pod_id
-            AND pod.dict_type = 'port_end'
+            LEFT JOIN t_address pol ON pol.f_id = t.pol_id
+            AND pol.f_types = 1
+            LEFT JOIN t_address pod ON pod.f_id = t.pod_id
+            AND pod.f_types = 1
             LEFT JOIN sys_dict_data dic ON dic.dict_value = c.cntr_id
             AND dic.dict_type = 'data_cntrId'
             LEFT JOIN fleet_driver_msg driver ON driver.id = c.driver_user_id
         <where>
+            t.bill_status != 3 or t.bill_status != 30
+            AND c.bill_status != 3
             <if test="corpId != null">and t.corp_id = #{corpId}</if>
             <if test="billType != null">and t.bill_type = #{billType}</if>
             <if test="transType != null">and t.trans_type = #{transType}</if>
@@ -640,6 +640,7 @@
             LEFT JOIN t_goods g ON g.f_id = t.goods_id
         where
             c.id = #{id}
+        ORDER BY c.id desc
     </select>
 
     <select id="selectMonthlyOrder" parameterType="ftmsorderbillscars" resultType="Map">

+ 2 - 1
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsplansMapper.xml

@@ -107,7 +107,7 @@
             LEFT JOIN sys_user a ON a.user_id = f.trans_user_id
             LEFT JOIN t_goods g ON g.f_id = f.goods_id
         WHERE
-            f.id != ''
+            plan.bill_status != 3
             <if test="corpId != null and corpId != ''">
                 AND f.corp_id = #{corpId}
             </if>
@@ -141,6 +141,7 @@
             <if test="billStatus != null and billStatus != ''">
                 AND f.bill_status LIKE "%${billStatus}%"
             </if>
+        ORDER BY plan.id desc
     </select>
 
     <select id="selectftmsorderbillsplansCountList" parameterType="ftmsorderbillsplans" resultType="int">

+ 13 - 6
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -13,12 +13,13 @@
 		<result property="phonenumber"  column="phonenumber"  />
 		<result property="sex"          column="sex"          />
 		<result property="avatar"       column="avatar"       />
+		<result property="userSystem"    column="user_system" />
 		<result property="password"     column="password"     />
 		<result property="userType"     column="user_type"    />
 		<result property="openId"     	column="open_id"      />
 		<result property="imgSrc"     	column="img_src"      />
 		<result property="sessionKey" 	column="session_key"  />
-		<result property="relatedNo" 	column="related_no"  />
+		<result property="relatedNo" 	column="related_no"   />
 		<result property="status"       column="status"       />
 		<result property="delFlag"      column="del_flag"     />
 		<result property="loginIp"      column="login_ip"     />
@@ -51,7 +52,7 @@
 	</resultMap>
 
 	<sql id="selectUserVo">
-        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.user_type, u.open_id, u.img_src, u.session_key,
+        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.user_type, u.user_system, u.open_id, u.img_src, u.session_key,
          u.related_no, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
         d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,
         r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
@@ -62,7 +63,7 @@
     </sql>
 
 	<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.user_type, u.open_id, u.img_src, u.session_key, u.related_no, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
+		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.user_type, u.user_system, u.open_id, u.img_src, u.session_key, u.related_no, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
 		left join sys_dept d on u.dept_id = d.dept_id
 		where u.del_flag = '0'
 		<if test="userName != null and userName != ''">
@@ -74,6 +75,9 @@
 		<if test="userType != null and userType != ''">
 			AND u.user_type = #{userType}
 		</if>
+		<if test="userType != null and userType != ''">
+			AND u.user_system = #{userSystem}
+		</if>
 		<if test="openId != null and openId != ''">
 			AND u.open_id = #{openId}
 		</if>
@@ -110,11 +114,11 @@
 	</select>
 
 	<select id="selectUserByopenId" parameterType="String" resultMap="SysUserResult">
-		SELECT user_id, user_name, nick_name, user_type, open_id, open_id, del_flag FROM sys_user WHERE open_id = #{openId}
+		SELECT user_id, user_name, nick_name, user_type, user_system, open_id, open_id, del_flag FROM sys_user WHERE open_id = #{openId}
 	</select>
 
 	<select id="selectUserByTel" parameterType="String" resultMap="SysUserResult">
-		SELECT user_id, user_name, nick_name, user_type, phonenumber, open_id, session_key, del_flag FROM sys_user WHERE phonenumber = #{phonenumber} and user_type = '11'
+		SELECT user_id, user_name, nick_name, user_type, user_system, phonenumber, open_id, session_key, del_flag FROM sys_user WHERE phonenumber = #{phonenumber} and user_type = '11'
 	</select>
 
 	<select id="checkUserNameUnique" parameterType="String" resultType="int">
@@ -129,7 +133,7 @@
 		select user_id, email from sys_user where email = #{email} limit 1
 	</select>
 	<select id="warehouseSelectUserByTel" resultType="com.ruoyi.common.core.domain.entity.SysUser">
-		SELECT user_id, user_name, nick_name, user_type, phonenumber, open_id, session_key, del_flag FROM sys_user WHERE phonenumber = #{phonenumber} and user_type = '00'
+		SELECT user_id, user_name, nick_name, user_type, user_system, phonenumber, open_id, session_key, del_flag FROM sys_user WHERE phonenumber = #{phonenumber} and user_type = '00'
 	</select>
 
 	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
@@ -144,6 +148,7 @@
 		<if test="sex != null and sex != ''">sex,</if>
 		<if test="password != null and password != ''">password,</if>
 		<if test="userType != null and userType != ''">user_type,</if>
+		<if test="userSystem != null and userSystem != ''">user_system,</if>
 		<if test="openId != null and openId != ''">open_id,</if>
 		<if test="imgSrc != null and imgSrc != ''">img_src,</if>
 		<if test="sessionKey != null and sessionKey != ''">session_key,</if>
@@ -163,6 +168,7 @@
 		<if test="sex != null and sex != ''">#{sex},</if>
 		<if test="password != null and password != ''">#{password},</if>
 		<if test="userType != null and userType != ''">#{userType},</if>
+		<if test="userSystem != null and userSystem != ''">#{userSystem},</if>
 		<if test="openId != null and openId != ''">#{openId},</if>
 		<if test="imgSrc != null and imgSrc != ''">#{imgSrc},</if>
 		<if test="sessionKey != null and sessionKey != ''">#{sessionKey},</if>
@@ -185,6 +191,7 @@
 			<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
 			<if test="password != null and password != ''">password = #{password},</if>
 			<if test="userType != null and userType != ''">user_type = #{userType},</if>
+			<if test="userSystem != null and userSystem != ''">user_system = #{userSystem},</if>
 			<if test="openId != null and openId != ''">open_id = #{openId},</if>
 			<if test="imgSrc != null and imgSrc != ''">img_src = #{imgSrc},</if>
 			<if test="sessionKey != null and sessionKey != ''">session_key = #{sessionKey},</if>

+ 214 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/GoodsTransfer.java

@@ -0,0 +1,214 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 入库导出
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class GoodsTransfer {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 创建者
+     */
+    @Excel(name = "制单人")
+    private String createBy;
+
+    /**
+     *  库存明细 1 未入账  2 未完成所有入账  6  已入账
+     */
+    @Excel(name = "货转状态")
+    private String fItemsStatus;
+
+    /**
+     * 客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name
+     */
+    @Excel(name = "货权方")
+    private String fCorpid;
+
+    /**
+     * 客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name
+     */
+    @Excel(name = "转货权方")
+    private String fTocorpid;
+
+
+    /** 明细品名合计 */
+    @Excel(name = "品名")
+    private String fProductName;
+
+    /**
+     * 唛头
+     */
+    @Excel(name = "品牌")
+    private String fMarks;
+
+    /**
+     * 唛头
+     */
+    @Excel(name = "业务编号")
+    private String fBillno;
+
+    /**
+     * 入库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "货转日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fBsdate;
+
+    /**
+     * 仓库
+     */
+    @Excel(name = "贸易方式")
+    private String fTrademodeid;
+
+    /**
+     * 仓库
+     */
+    @Excel(name = "仓库")
+    private String fWarehouseid;
+
+    /**
+     * 件数,由明细表自动合计生成
+     */
+    @Excel(name = "件数")
+    private Integer fQty;
+
+    /**
+     * 毛重,由明细表自动合计生成
+     */
+    @Excel(name = "毛重(KG)")
+    private Float fGrossweight;
+
+    /**
+     * 净重,由明细表自动合计生成
+     */
+    @Excel(name = "净重(KG)")
+    private Float fNetweight;
+
+
+    /**
+     * 状态(数据字典),N 入(出)库中,T入(出)库完成,状态为完成不能删除,状态变化,用邮件、微信通知客户。
+     */
+    @Excel(name = "费用状态")
+    private String fBillstatus;
+
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getfItemsStatus() {
+        return fItemsStatus;
+    }
+
+    public void setfItemsStatus(String fItemsStatus) {
+        this.fItemsStatus = fItemsStatus;
+    }
+
+    public String getfCorpid() {
+        return fCorpid;
+    }
+
+    public void setfCorpid(String fCorpid) {
+        this.fCorpid = fCorpid;
+    }
+
+    public String getfTocorpid() {
+        return fTocorpid;
+    }
+
+    public void setfTocorpid(String fTocorpid) {
+        this.fTocorpid = fTocorpid;
+    }
+
+    public String getfProductName() {
+        return fProductName;
+    }
+
+    public void setfProductName(String fProductName) {
+        this.fProductName = fProductName;
+    }
+
+    public String getfMarks() {
+        return fMarks;
+    }
+
+    public void setfMarks(String fMarks) {
+        this.fMarks = fMarks;
+    }
+
+    public String getfBillno() {
+        return fBillno;
+    }
+
+    public void setfBillno(String fBillno) {
+        this.fBillno = fBillno;
+    }
+
+    public Date getfBsdate() {
+        return fBsdate;
+    }
+
+    public void setfBsdate(Date fBsdate) {
+        this.fBsdate = fBsdate;
+    }
+
+    public String getfWarehouseid() {
+        return fWarehouseid;
+    }
+
+    public void setfWarehouseid(String fWarehouseid) {
+        this.fWarehouseid = fWarehouseid;
+    }
+
+    public Integer getfQty() {
+        return fQty;
+    }
+
+    public void setfQty(Integer fQty) {
+        this.fQty = fQty;
+    }
+
+    public Float getfGrossweight() {
+        return fGrossweight;
+    }
+
+    public void setfGrossweight(Float fGrossweight) {
+        this.fGrossweight = fGrossweight;
+    }
+
+    public Float getfNetweight() {
+        return fNetweight;
+    }
+
+    public void setfNetweight(Float fNetweight) {
+        this.fNetweight = fNetweight;
+    }
+
+    public String getfBillstatus() {
+        return fBillstatus;
+    }
+
+    public void setfBillstatus(String fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getfTrademodeid() {
+        return fTrademodeid;
+    }
+
+    public void setfTrademodeid(String fTrademodeid) {
+        this.fTrademodeid = fTrademodeid;
+    }
+}

+ 260 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/InStock.java

@@ -0,0 +1,260 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 入库导出
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class InStock  {
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 创建者
+     */
+    @Excel(name = "制单人")
+    private String createBy;
+
+    /**
+     *  库存明细 1 未入账  2 未完成所有入账  6  已入账
+     */
+    @Excel(name = "入库状态")
+    private String fItemsStatus;
+
+    /**
+     * 客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name
+     */
+    @Excel(name = "货权方")
+    private String fCorpid;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String fMblno;
+
+    /** 明细品名合计 */
+    @Excel(name = "品名")
+    private String fProductName;
+
+    /**
+     * 唛头
+     */
+    @Excel(name = "品牌")
+    private String fMarks;
+
+    /**
+     * 入(出)库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "入库日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fBsdate;
+
+    /**
+     * 仓库
+     */
+    @Excel(name = "仓库")
+    private String fWarehouseid;
+
+    /**
+     * 计划件数,由明细表自动合计生成
+     */
+    @Excel(name = "计划件数")
+    private Integer fPlanqty;
+
+    /**
+     * 件数,由明细表自动合计生成
+     */
+    @Excel(name = "入库件数")
+    private Integer fQty;
+
+    /**
+     * 毛重,由明细表自动合计生成
+     */
+    @Excel(name = "入库毛重(KG)")
+    private Float fGrossweight;
+
+    /**
+     * 净重,由明细表自动合计生成
+     */
+    @Excel(name = "入库净重(KG)")
+    private Float fNetweight;
+
+    /** 业务类型(存汉字的,用来区别 如: 来车提货,出库装箱  区别) */
+    @Excel(name = "业务类别")
+    private String fBusinessType;
+
+    /**
+     * 状态(数据字典),N 入(出)库中,T入(出)库完成,状态为完成不能删除,状态变化,用邮件、微信通知客户。
+     */
+    @Excel(name = "费用状态")
+    private String fBillstatus;
+
+    /** 车号 */
+    @Excel(name = "车号")
+    private String fTruckno;
+
+    /** 司机名 */
+    @Excel(name = "司机名称")
+    private String fDriverName;
+
+    /** 司机电话 */
+    @Excel(name = "司机电话")
+    private String fDriverTel;
+
+    /** 司机身份证 */
+    @Excel(name = "司机身份证")
+    private String fDriverIdCar;
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getfCorpid() {
+        return fCorpid;
+    }
+
+    public void setfCorpid(String fCorpid) {
+        this.fCorpid = fCorpid;
+    }
+
+    public String getfMblno() {
+        return fMblno;
+    }
+
+    public void setfMblno(String fMblno) {
+        this.fMblno = fMblno;
+    }
+
+    public String getfProductName() {
+        return fProductName;
+    }
+
+    public void setfProductName(String fProductName) {
+        this.fProductName = fProductName;
+    }
+
+    public String getfMarks() {
+        return fMarks;
+    }
+
+    public void setfMarks(String fMarks) {
+        this.fMarks = fMarks;
+    }
+
+    public String getfBillstatus() {
+        return fBillstatus;
+    }
+
+    public void setfBillstatus(String fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getfTruckno() {
+        return fTruckno;
+    }
+
+    public void setfTruckno(String fTruckno) {
+        this.fTruckno = fTruckno;
+    }
+
+    public String getfDriverName() {
+        return fDriverName;
+    }
+
+    public void setfDriverName(String fDriverName) {
+        this.fDriverName = fDriverName;
+    }
+
+    public String getfDriverTel() {
+        return fDriverTel;
+    }
+
+    public void setfDriverTel(String fDriverTel) {
+        this.fDriverTel = fDriverTel;
+    }
+
+    public String getfDriverIdCar() {
+        return fDriverIdCar;
+    }
+
+    public void setfDriverIdCar(String fDriverIdCar) {
+        this.fDriverIdCar = fDriverIdCar;
+    }
+
+    public String getfBusinessType() {
+        return fBusinessType;
+    }
+
+    public void setfBusinessType(String fBusinessType) {
+        this.fBusinessType = fBusinessType;
+    }
+
+
+
+    public String getfItemsStatus() {
+        return fItemsStatus;
+    }
+
+    public void setfItemsStatus(String fItemsStatus) {
+        this.fItemsStatus = fItemsStatus;
+    }
+
+    public Date getfBsdate() {
+        return fBsdate;
+    }
+
+    public void setfBsdate(Date fBsdate) {
+        this.fBsdate = fBsdate;
+    }
+
+    public String getfWarehouseid() {
+        return fWarehouseid;
+    }
+
+    public void setfWarehouseid(String fWarehouseid) {
+        this.fWarehouseid = fWarehouseid;
+    }
+
+    public Integer getfPlanqty() {
+        return fPlanqty;
+    }
+
+    public void setfPlanqty(Integer fPlanqty) {
+        this.fPlanqty = fPlanqty;
+    }
+
+    public Integer getfQty() {
+        return fQty;
+    }
+
+    public void setfQty(Integer fQty) {
+        this.fQty = fQty;
+    }
+
+    public Float getfGrossweight() {
+        return fGrossweight;
+    }
+
+    public void setfGrossweight(Float fGrossweight) {
+        this.fGrossweight = fGrossweight;
+    }
+
+    public Float getfNetweight() {
+        return fNetweight;
+    }
+
+    public void setfNetweight(Float fNetweight) {
+        this.fNetweight = fNetweight;
+    }
+}

+ 39 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/ListMapToBeanUtils.java

@@ -0,0 +1,39 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class ListMapToBeanUtils {
+    /**
+     * List<Map<String, Object>>转List<T>
+     */
+    public static <T> List<T> castMapToBean(List<Map<String, Object>> list, Class<T> clazz) throws Exception {
+        if (list == null || list.size()==0) {
+            return null;
+        }
+        List<T> tList = new ArrayList<T>();
+        // 获取类中声明的所有字段
+        Field[] fields = clazz.getDeclaredFields();
+
+        T t;
+        for (Map<String, Object> map : list) {
+            // 每次都先初始化一遍,然后再设置值
+            t = clazz.newInstance();
+            for (Field field : fields) {
+                // 把序列化的字段去除掉
+                if (!"serialVersionUID".equals(field.getName())) {
+                    // 由于Field都是私有属性,所有需要允许修改
+                    field.setAccessible(true);
+
+                    // 设置值, 类型要和vo中的属性名称对应好,不然会报类型转换错误
+                    field.set(t, map.get(field.getName()));
+                }
+            }
+            tList.add(t); // 把转换好的数据添加到集合中
+        }
+        return tList;
+    }
+
+}

+ 293 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/OutStock.java

@@ -0,0 +1,293 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 入库导出
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class OutStock  {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 创建者
+     */
+    @Excel(name = "制单人")
+    private String createBy;
+
+    /**
+     * 仓管人
+     */
+    @Excel(name = "仓管员")
+    private String fStorekeeper;
+
+    /**
+     *  库存明细 1 未入账  2 未完成所有入账  6  已入账
+     */
+    @Excel(name = "出库状态")
+    private String fItemsStatus;
+
+    /**
+     * 客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name
+     */
+    @Excel(name = "货权方")
+    private String fCorpid;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String fMblno;
+
+    /** 明细品名合计 */
+    @Excel(name = "品名")
+    private String fProductName;
+
+    /**
+     * 唛头
+     */
+    @Excel(name = "品牌")
+    private String fMarks;
+
+    /**
+     * 入库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "出库日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fBsdate;
+
+    /**
+     * 仓库
+     */
+    @Excel(name = "仓库")
+    private String fWarehouseid;
+
+    /**
+     * 计划件数,由明细表自动合计生成
+     */
+    @Excel(name = "计划件数")
+    private Long fPlanqty;
+
+    /**
+     * 件数,由明细表自动合计生成
+     */
+    @Excel(name = "出库件数")
+    private Integer fQty;
+
+    /**
+     * 毛重,由明细表自动合计生成
+     */
+    @Excel(name = "出库毛重(KG)")
+    private Float fGrossweight;
+
+    /**
+     * 净重,由明细表自动合计生成
+     */
+    @Excel(name = "出库净重(KG)")
+    private Float fNetweight;
+
+    /** 车号 */
+    @Excel(name = "车号")
+    private String fTruckno;
+
+    /** 司机名 */
+    @Excel(name = "司机名称")
+    private String fDriverName;
+
+    /** 司机电话 */
+    @Excel(name = "司机电话")
+    private String fDriverTel;
+
+    /** 司机身份证 */
+    @Excel(name = "司机身份证")
+    private String fDriverIdCar;
+
+    /** 业务类型(存汉字的,用来区别 如: 来车提货,出库装箱  区别) */
+    @Excel(name = "业务类别")
+    private String fBusinessType;
+
+    /**
+     * 状态(数据字典),N 入(出)库中,T入(出)库完成,状态为完成不能删除,状态变化,用邮件、微信通知客户。
+     */
+    @Excel(name = "费用状态")
+    private String fBillstatus;
+
+    
+    public String getCreateBy() {
+        return createBy;
+    }
+
+   
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getfStorekeeper() {
+        return fStorekeeper;
+    }
+
+    public void setfStorekeeper(String fStorekeeper) {
+        this.fStorekeeper = fStorekeeper;
+    }
+
+    
+    public String getfCorpid() {
+        return fCorpid;
+    }
+
+    
+    public void setfCorpid(String fCorpid) {
+        this.fCorpid = fCorpid;
+    }
+
+    
+    public String getfMblno() {
+        return fMblno;
+    }
+
+    
+    public void setfMblno(String fMblno) {
+        this.fMblno = fMblno;
+    }
+
+    
+    public String getfProductName() {
+        return fProductName;
+    }
+
+    
+    public void setfProductName(String fProductName) {
+        this.fProductName = fProductName;
+    }
+
+    
+    public String getfMarks() {
+        return fMarks;
+    }
+
+    
+    public void setfMarks(String fMarks) {
+        this.fMarks = fMarks;
+    }
+
+    
+    public String getfTruckno() {
+        return fTruckno;
+    }
+
+    
+    public void setfTruckno(String fTruckno) {
+        this.fTruckno = fTruckno;
+    }
+
+    
+    public String getfDriverName() {
+        return fDriverName;
+    }
+
+    
+    public void setfDriverName(String fDriverName) {
+        this.fDriverName = fDriverName;
+    }
+
+    
+    public String getfDriverTel() {
+        return fDriverTel;
+    }
+
+    
+    public void setfDriverTel(String fDriverTel) {
+        this.fDriverTel = fDriverTel;
+    }
+
+    
+    public String getfDriverIdCar() {
+        return fDriverIdCar;
+    }
+
+    
+    public void setfDriverIdCar(String fDriverIdCar) {
+        this.fDriverIdCar = fDriverIdCar;
+    }
+
+    
+    public String getfBusinessType() {
+        return fBusinessType;
+    }
+
+    
+    public void setfBusinessType(String fBusinessType) {
+        this.fBusinessType = fBusinessType;
+    }
+
+    
+    public String getfBillstatus() {
+        return fBillstatus;
+    }
+
+    
+    public void setfBillstatus(String fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getfItemsStatus() {
+        return fItemsStatus;
+    }
+
+    public void setfItemsStatus(String fItemsStatus) {
+        this.fItemsStatus = fItemsStatus;
+    }
+
+    public Date getfBsdate() {
+        return fBsdate;
+    }
+
+    public void setfBsdate(Date fBsdate) {
+        this.fBsdate = fBsdate;
+    }
+
+    public String getfWarehouseid() {
+        return fWarehouseid;
+    }
+
+    public void setfWarehouseid(String fWarehouseid) {
+        this.fWarehouseid = fWarehouseid;
+    }
+
+    public Long getfPlanqty() {
+        return fPlanqty;
+    }
+
+    public void setfPlanqty(Long fPlanqty) {
+        this.fPlanqty = fPlanqty;
+    }
+
+    public Integer getfQty() {
+        return fQty;
+    }
+
+    public void setfQty(Integer fQty) {
+        this.fQty = fQty;
+    }
+
+    public Float getfGrossweight() {
+        return fGrossweight;
+    }
+
+    public void setfGrossweight(Float fGrossweight) {
+        this.fGrossweight = fGrossweight;
+    }
+
+    public Float getfNetweight() {
+        return fNetweight;
+    }
+
+    public void setfNetweight(Float fNetweight) {
+        this.fNetweight = fNetweight;
+    }
+}

+ 251 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/StockTransfer.java

@@ -0,0 +1,251 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 入库导出
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class StockTransfer {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 创建者
+     */
+    @Excel(name = "制单人")
+    private String createBy;
+
+    /**
+     * 仓管人
+     */
+    @Excel(name = "仓管员")
+    private String fStorekeeper;
+
+    /**
+     *  库存明细 1 未入账  2 未完成所有入账  6  已入账
+     */
+    @Excel(name = "调拨状态")
+    private String fItemsStatus;
+
+    /**
+     * 客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name
+     */
+    @Excel(name = "货权方")
+    private String fCorpid;
+
+    /**
+     * 提单号
+     */
+    @Excel(name = "提单号")
+    private String fMblno;
+
+    /** 明细品名合计 */
+    @Excel(name = "品名")
+    private String fProductName;
+
+    /**
+     * 唛头
+     */
+    @Excel(name = "品牌")
+    private String fMarks;
+
+    /**
+     * 入库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "调拨日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fBsdate;
+
+    /**
+     * 仓库
+     */
+    @Excel(name = "调入仓库")
+    private String fWarehouseid;
+
+    /**
+     * 仓库
+     */
+    @Excel(name = "调出仓库")
+    private String fInwarehouseid;
+
+    /**
+     * 计划件数,由明细表自动合计生成
+     */
+    @Excel(name = "计划调拨件数")
+    private Long fPlanqty;
+
+    /**
+     * 件数,由明细表自动合计生成
+     */
+    @Excel(name = "调拨件数")
+    private Integer fQty;
+
+    /**
+     * 毛重,由明细表自动合计生成
+     */
+    @Excel(name = "调拨毛重(KG)")
+    private Float fGrossweight;
+
+    /**
+     * 净重,由明细表自动合计生成
+     */
+    @Excel(name = "调拨净重(KG)")
+    private Float fNetweight;
+
+
+    /** 业务类型(存汉字的,用来区别 如: 来车提货,出库装箱  区别) */
+    @Excel(name = "业务类别")
+    private String fBusinessType;
+
+    /**
+     * 状态(数据字典),N 入(出)库中,T入(出)库完成,状态为完成不能删除,状态变化,用邮件、微信通知客户。
+     */
+    @Excel(name = "费用状态")
+    private String fBillstatus;
+
+    
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getfStorekeeper() {
+        return fStorekeeper;
+    }
+
+    public void setfStorekeeper(String fStorekeeper) {
+        this.fStorekeeper = fStorekeeper;
+    }
+
+    
+    public String getfCorpid() {
+        return fCorpid;
+    }
+
+    
+    public void setfCorpid(String fCorpid) {
+        this.fCorpid = fCorpid;
+    }
+
+    
+    public String getfMblno() {
+        return fMblno;
+    }
+
+    
+    public void setfMblno(String fMblno) {
+        this.fMblno = fMblno;
+    }
+
+    
+    public String getfProductName() {
+        return fProductName;
+    }
+
+    
+    public void setfProductName(String fProductName) {
+        this.fProductName = fProductName;
+    }
+
+    
+    public String getfMarks() {
+        return fMarks;
+    }
+
+    
+    public void setfMarks(String fMarks) {
+        this.fMarks = fMarks;
+    }
+
+    
+    public String getfBusinessType() {
+        return fBusinessType;
+    }
+
+    
+    public void setfBusinessType(String fBusinessType) {
+        this.fBusinessType = fBusinessType;
+    }
+
+    
+    public String getfBillstatus() {
+        return fBillstatus;
+    }
+
+    
+    public void setfBillstatus(String fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getfItemsStatus() {
+        return fItemsStatus;
+    }
+
+    public void setfItemsStatus(String fItemsStatus) {
+        this.fItemsStatus = fItemsStatus;
+    }
+
+    public Date getfBsdate() {
+        return fBsdate;
+    }
+
+    public void setfBsdate(Date fBsdate) {
+        this.fBsdate = fBsdate;
+    }
+
+    public String getfWarehouseid() {
+        return fWarehouseid;
+    }
+
+    public void setfWarehouseid(String fWarehouseid) {
+        this.fWarehouseid = fWarehouseid;
+    }
+
+    public Long getfPlanqty() {
+        return fPlanqty;
+    }
+
+    public void setfPlanqty(Long fPlanqty) {
+        this.fPlanqty = fPlanqty;
+    }
+
+    public Integer getfQty() {
+        return fQty;
+    }
+
+    public void setfQty(Integer fQty) {
+        this.fQty = fQty;
+    }
+
+    public Float getfGrossweight() {
+        return fGrossweight;
+    }
+
+    public void setfGrossweight(Float fGrossweight) {
+        this.fGrossweight = fGrossweight;
+    }
+
+    public Float getfNetweight() {
+        return fNetweight;
+    }
+
+    public void setfNetweight(Float fNetweight) {
+        this.fNetweight = fNetweight;
+    }
+
+    public String getfInwarehouseid() {
+        return fInwarehouseid;
+    }
+
+    public void setfInwarehouseid(String fInwarehouseid) {
+        this.fInwarehouseid = fInwarehouseid;
+    }
+}

+ 118 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/StorageFee.java

@@ -0,0 +1,118 @@
+package com.ruoyi.warehouseBusiness.excel;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 入库导出
+ *
+ * @author ruoyi
+ * @date 2020-12-11
+ */
+public class StorageFee {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 唛头
+     */
+    @Excel(name = "单据编号")
+    private String fBillno;
+
+    /**
+     * 客户名称,t_corps 中的no或 name,模糊查找选择后,存储id,显示name
+     */
+    @Excel(name = "客户名称")
+    private String fCorpid;
+
+    /**
+     * 入库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "计费日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fBillingDeadline;
+
+
+    /**
+     * 状态(数据字典),N 入(出)库中,T入(出)库完成,状态为完成不能删除,状态变化,用邮件、微信通知客户。
+     */
+    @Excel(name = "单据状态")
+    private String fBillstatus;
+
+    /**
+     * 创建者
+     */
+    @Excel(name = "制单人")
+    private String createBy;
+
+    /**
+     * 入库日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "制单日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createTime;
+
+
+    /**
+     * 创建者
+     */
+    @Excel(name = "备注")
+    private String remark;
+
+    public String getfBillno() {
+        return fBillno;
+    }
+
+    public void setfBillno(String fBillno) {
+        this.fBillno = fBillno;
+    }
+
+    public String getfCorpid() {
+        return fCorpid;
+    }
+
+    public void setfCorpid(String fCorpid) {
+        this.fCorpid = fCorpid;
+    }
+
+    public Date getfBillingDeadline() {
+        return fBillingDeadline;
+    }
+
+    public void setfBillingDeadline(Date fBillingDeadline) {
+        this.fBillingDeadline = fBillingDeadline;
+    }
+
+    public String getfBillstatus() {
+        return fBillstatus;
+    }
+
+    public void setfBillstatus(String fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+}

+ 11 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java

@@ -6,6 +6,7 @@ import com.ruoyi.reportManagement.domain.TWareHouseItemsExcel;
 import com.ruoyi.warehouseBusiness.domain.TWareHouseExcelItems;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitems;
+import com.ruoyi.warehouseBusiness.excel.*;
 
 import java.util.List;
 import java.util.Map;
@@ -199,4 +200,14 @@ public interface ITWarehouseBillsService {
 
     AjaxResult addCreditItems(String tEnclosure , String  tWarehousebillsitems, String billsType, LoginUser loginUser);
 
+    public List<InStock> inStockExport(TWarehouseBills tWarehousebills) throws Exception;
+
+    public List<OutStock> outStockExport(TWarehouseBills tWarehousebills) throws Exception;
+
+    public List<StockTransfer> stockTransferExport(TWarehouseBills tWarehousebills) throws Exception;
+
+    public List<GoodsTransfer> goodsTransferExport(TWarehouseBills tWarehousebills) throws Exception;
+
+    public List<StorageFee> storageFeeExport(TWarehouseBills tWarehousebills) throws Exception;
+
 }

+ 26 - 3
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/BillnoSerialServiceImpl.java

@@ -91,7 +91,7 @@ public class BillnoSerialServiceImpl implements IBillnoSerialService {
             billNo = "SFDZ" + billNo;
         } else if ("JSSF".equals(billType)) {
             billNo = "JSSF" + billNo;
-        }  else if ("JSFF".equals(billType)) {
+        } else if ("JSFF".equals(billType)) {
             billNo = "JSFF" + billNo;
         } else if ("HWTG".equals(billType)) {
             billNo = "HWTG" + billNo;
@@ -152,7 +152,7 @@ public class BillnoSerialServiceImpl implements IBillnoSerialService {
         } else {
             yyMMdd = DateFormatUtils.format(time, "yyMMdd");
         }
-        if ("RK".equals(billType) || "CK".equals(billType) || "DB".equals(billType) ){
+        if ("RK".equals(billType) || "CK".equals(billType) || "DB".equals(billType)) {
             // 流水号 是否有回收
             BillnoDel billnoDel = new BillnoDel();
             billnoDel.setBillType(billType);
@@ -164,11 +164,29 @@ public class BillnoSerialServiceImpl implements IBillnoSerialService {
                 return billNo;
             }
         }
+        boolean tms = false;
+        if ("SJLSH".equals(billType)) {
+            tms = true;
+        }
         BillnoSerial billnoSerial = new BillnoSerial();
         billnoSerial.setBillType(billType);
         billnoSerial.setBillPrefix(yyMMdd);
         BillnoSerial billnoSerials = billnoSerialMapper.selectBillnoSerial(billnoSerial);
         if (StringUtils.isNotNull(billnoSerials)) {
+            if (tms) {
+                if (billnoSerials.getSerial() <= 9) {
+                    billNo = yyMMdd + "000" + billnoSerials.getSerial();
+                } else if (billnoSerials.getSerial() <= 99) {
+                    billNo = yyMMdd + "00" + billnoSerials.getSerial();
+                } else if (billnoSerials.getSerial() <= 999) {
+                    billNo = yyMMdd + "0" + billnoSerials.getSerial();
+                } else if (billnoSerials.getSerial() <= 9999) {
+                    billNo = yyMMdd + "" + billnoSerials.getSerial();
+                }
+                billnoSerials.setSerial(billnoSerials.getSerial() + 1);
+                billnoSerialMapper.updateBillnoSerial(billnoSerials);
+                return billNo;
+            }
             if (billnoSerials.getSerial() <= 9) {
                 billNo = yyMMdd + "00" + billnoSerials.getSerial();
             } else if (billnoSerials.getSerial() <= 99) {
@@ -179,8 +197,13 @@ public class BillnoSerialServiceImpl implements IBillnoSerialService {
             billnoSerials.setSerial(billnoSerials.getSerial() + 1);
             billnoSerialMapper.updateBillnoSerial(billnoSerials);
         } else {
-            billNo = yyMMdd + "001";
             billnoSerial.setSerial(2);
+            if (tms) {
+                billNo = yyMMdd + "0001";
+                billnoSerialMapper.insertBillnoSerial(billnoSerial);
+                return billNo;
+            }
+            billNo = yyMMdd + "001";
             billnoSerialMapper.insertBillnoSerial(billnoSerial);
         }
         billNo = billType + billNo;

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

@@ -28,6 +28,7 @@ import com.ruoyi.system.mapper.SysDeptMapper;
 import com.ruoyi.system.mapper.SysDictDataMapper;
 import com.ruoyi.system.mapper.SysUserMapper;
 import com.ruoyi.warehouseBusiness.domain.*;
+import com.ruoyi.warehouseBusiness.excel.*;
 import com.ruoyi.warehouseBusiness.mapper.*;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseBillsService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -279,7 +280,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
      */
     @Override
     public List<Map<String, Object>> selectWarehouseBusinessList(TWarehouseBills tWarehousebills) {
-        if(tWarehousebills.getfBilltype().equals("JSCCF") |  tWarehousebills.getfBilltype().equals("HQZY") | tWarehousebills.getfBilltype().equals("HWTG")){
+        if(tWarehousebills.getfBilltype().equals("JSCCF") |  tWarehousebills.getfBilltype().equals("HQZY")){
             return tWarehouseBillsMapper.selectWarehouseBusinessList1(tWarehousebills);
         }else {
             return tWarehouseBillsMapper.selectWarehouseBusinessList(tWarehousebills);
@@ -1017,6 +1018,41 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         return AjaxResult.success();
     }
 
+    @Override
+    public List<InStock> inStockExport(TWarehouseBills tWarehousebills) throws Exception {
+        List<Map<String, Object>> list = tWarehouseBillsMapper.selectWarehouseBusinessList(tWarehousebills);
+        List<InStock> list1 = ListMapToBeanUtils.castMapToBean(list,InStock.class);
+        return list1;
+    }
+
+    @Override
+    public List<OutStock> outStockExport(TWarehouseBills tWarehousebills) throws Exception {
+        List<Map<String, Object>> list = tWarehouseBillsMapper.selectWarehouseBusinessList(tWarehousebills);
+        List<OutStock> list1 = ListMapToBeanUtils.castMapToBean(list,OutStock.class);
+        return list1;
+    }
+
+    @Override
+    public List<StockTransfer> stockTransferExport(TWarehouseBills tWarehousebills) throws Exception {
+        List<Map<String, Object>> list = tWarehouseBillsMapper.selectWarehouseBusinessList(tWarehousebills);
+        List<StockTransfer> list1 = ListMapToBeanUtils.castMapToBean(list,StockTransfer.class);
+        return list1;
+    }
+
+    @Override
+    public List<GoodsTransfer> goodsTransferExport(TWarehouseBills tWarehousebills) throws Exception {
+        List<Map<String, Object>> list = tWarehouseBillsMapper.selectWarehouseBusinessList1(tWarehousebills);
+        List<GoodsTransfer> list1 = ListMapToBeanUtils.castMapToBean(list,GoodsTransfer.class);
+        return list1;
+    }
+
+    @Override
+    public List<StorageFee> storageFeeExport(TWarehouseBills tWarehousebills) throws Exception {
+        List<Map<String, Object>> list = tWarehouseBillsMapper.selectWarehouseBusinessList1(tWarehousebills);
+        List<StorageFee> list1 = ListMapToBeanUtils.castMapToBean(list,StorageFee.class);
+        return list1;
+    }
+
 
     /**
      * 根据仓库主表id 更新对应明细表状态

+ 85 - 17
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -180,12 +180,56 @@
                 WHEN  bill.f_billstatus = '6' THEN '全部入账'
             END
                  AS fBillstatus,
-            CASE WHEN  bill.f_items_status = '1' THEN '计划'
-                 WHEN  bill.f_items_status = '2' THEN '待入库'
-                 WHEN  bill.f_items_status = '3' THEN '入库中'
-                 WHEN  bill.f_items_status = '4' THEN '已入库'
-            END
-                AS fItemsStatus,
+        CASE
+        WHEN bill.f_billtype = 'SJRK'
+        AND bill.f_items_status = '1' THEN
+        '计划'
+        WHEN bill.f_billtype = 'SJRK'
+        AND bill.f_items_status = '2' THEN
+        '待入库'
+        WHEN bill.f_billtype = 'SJRK'
+        AND bill.f_items_status = '3' THEN
+        '入库中'
+        WHEN bill.f_billtype = 'SJRK'
+        AND bill.f_items_status = '4' THEN
+        '已入库'
+        WHEN bill.f_billtype = 'SJCK'
+        AND bill.f_items_status = '1' THEN
+        '计划'
+        WHEN bill.f_billtype = 'SJCK'
+        AND bill.f_items_status = '2' THEN
+        '待出库'
+        WHEN bill.f_billtype = 'SJCK'
+        AND bill.f_items_status = '3' THEN
+        '出库中'
+        WHEN bill.f_billtype = 'SJCK'
+        AND bill.f_items_status = '4' THEN
+        '已出库'
+        WHEN bill.f_billtype = 'CKDB'
+        AND bill.f_items_status = '1' THEN
+        '计划'
+        WHEN bill.f_billtype = 'CKDB'
+        AND bill.f_items_status = '2' THEN
+        '待调拨'
+        WHEN bill.f_billtype = 'CKDB'
+        AND bill.f_items_status = '3' THEN
+        '调拨中'
+        WHEN bill.f_billtype = 'CKDB'
+        AND bill.f_items_status = '4' THEN
+        '已调拨'
+        WHEN bill.f_billtype = 'HWTG'
+        AND bill.f_items_status = '1' THEN
+        '计划'
+        WHEN bill.f_billtype = 'HWTG'
+        AND bill.f_items_status = '2' THEN
+        '待调拨'
+        WHEN bill.f_billtype = 'HWTG'
+        AND bill.f_items_status = '3' THEN
+        '调拨中'
+        WHEN bill.f_billtype = 'HWTG'
+        AND bill.f_items_status = '4' THEN
+        '已调拨'
+        END AS fItemsStatus,
             bill.f_billno AS fBillno,
             g.f_name AS fGoodsid,
             bill.f_storekeeper AS fStorekeeper
@@ -268,6 +312,11 @@
                 AND dictIn.dict_type = 'st_trans_type'
                 AND dictIn.status = '0'
             </if>
+            <if test="fBilltype != null  and fBilltype == 'HWTG'">
+                and bill.f_billtype = #{fBilltype}
+                AND dictIn.dict_type = 'st_trans_type'
+                AND dictIn.status = '0'
+            </if>
             <if test="fBillstatus != null  and fBillstatus != ''">and bill.f_billstatus = #{fBillstatus}</if>
             <if test="fItemsStatus != null  and fItemsStatus != ''">and bill.f_items_status = #{fItemsStatus}</if>
             <if test="createBy != null and createBy != ''">and bill.create_by = #{createBy}</if>
@@ -292,7 +341,7 @@
         bill.f_plannetweight AS fPlannetweight,
         bill.f_planvolumn AS fPlanvolumn,
         bill.f_bsdate AS fBsdate,
-        bill.f_trademodeid AS fTrademodeid,
+        dict.dict_label AS fTrademodeid,
         bill.f_truckno AS fTruckno,
         bill.f_driver_name AS fDriverName,
         bill.f_driver_tel AS fDriverTel,
@@ -306,18 +355,34 @@
         bill.f_grossweight AS fGrossweight,
         bill.f_product_name AS fProductName,
         bill.f_billing_deadline AS fBillingDeadline,
-        CASE WHEN  bill.f_billstatus = '1' THEN '录入'
-        WHEN  bill.f_billstatus = '2' THEN '暂存'
-        WHEN  bill.f_billstatus = '3' THEN '驳回'
-        WHEN  bill.f_billstatus = '4' THEN '请核'
-        WHEN  bill.f_billstatus = '5' THEN '审核中'
-        WHEN  bill.f_billstatus = '6' THEN '全部入账'
+        CASE
+        WHEN bill.f_billtype = 'HQZY' AND  bill.f_billstatus = '1' THEN '录入'
+        WHEN bill.f_billtype = 'HQZY' AND   bill.f_billstatus = '2' THEN '暂存'
+        WHEN bill.f_billtype = 'HQZY' AND   bill.f_billstatus = '3' THEN '驳回'
+        WHEN bill.f_billtype = 'HQZY' AND   bill.f_billstatus = '4' THEN '请核'
+        WHEN bill.f_billtype = 'HQZY' AND   bill.f_billstatus = '5' THEN '审核中'
+        WHEN bill.f_billtype = 'HQZY' AND   bill.f_billstatus = '6' THEN '全部入账'
+        WHEN bill.f_billtype = 'JSCCF' AND  bill.f_billstatus = '1' THEN '新建'
+        WHEN bill.f_billtype = 'JSCCF' AND   bill.f_billstatus = '2' THEN '暂存'
+        WHEN bill.f_billtype = 'JSCCF' AND   bill.f_billstatus = '3' THEN '审核驳回'
+        WHEN bill.f_billtype = 'JSCCF' AND   bill.f_billstatus = '4' THEN '提交审核'
+        WHEN bill.f_billtype = 'JSCCF' AND   bill.f_billstatus = '5' THEN '审核中'
+        WHEN bill.f_billtype = 'JSCCF' AND   bill.f_billstatus = '6' THEN '审核通过'
         END
         AS fBillstatus,
-        CASE WHEN  bill.f_items_status = '1' THEN '计划'
-        WHEN  bill.f_items_status = '2' THEN '待入库'
-        WHEN  bill.f_items_status = '3' THEN '入库中'
-        WHEN  bill.f_items_status = '4' THEN '已入库'
+        CASE
+        WHEN bill.f_billtype = 'HQZY'
+        AND bill.f_items_status = '1' THEN
+        '计划'
+        WHEN bill.f_billtype = 'HQZY'
+        AND bill.f_items_status = '2' THEN
+        '待货转'
+        WHEN bill.f_billtype = 'HQZY'
+        AND bill.f_items_status = '3' THEN
+        '货转中'
+        WHEN bill.f_billtype = 'HQZY'
+        AND bill.f_items_status = '4' THEN
+        '已货转'
         END
         AS fItemsStatus,
         bill.f_billno AS fBillno,
@@ -335,7 +400,10 @@
         LEFT JOIN t_warehouse ware1 ON ware1.f_id = bill.f_inwarehouseid
         LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
         LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
+        LEFT JOIN sys_dict_data dict ON dict.dict_value = bill.f_trademodeid
         <where>
+            dict.status = '0'
+            AND dict.dict_type = 'data_trademodes'
             <if test="fBillno != null  and fBillno != ''">and bill.f_billno like concat('%', #{fBillno}, '%')</if>
             <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and bill.f_customsdeclartion =
                 #{fCustomsdeclartion}