Procházet zdrojové kódy

新增摄像头信息修改、新增打印抬头字段、完善仓储费计算导出

Sun před 3 roky
rodič
revize
8277f49d5a

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TWarehouseWebcamController.java

@@ -64,6 +64,16 @@ public class TWarehouseWebcamController extends BaseController {
     }
 
     /**
+     * 批量修改仓库摄像头
+     */
+    @Log(title = "仓库摄像头", businessType = BusinessType.UPDATE)
+    @PostMapping("/appEdit")
+    @RepeatSubmit
+    public AjaxResult edit(@RequestBody List<TWarehouseWebcam> webcamList) {
+        return tWarehouseWebcamService.updateTWarehouseWebcamList(webcamList);
+    }
+
+    /**
      * 导出仓库摄像头列表
      */
     @PreAuthorize("@ss.hasPermi('warehouse:webcam:export')")

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

@@ -253,9 +253,8 @@ public class TWhgenlegController extends BaseController {
      */
     @DataScope(deptAlias = "d", userAlias = "u")
     @GetMapping("/whgenlegList")
-    public TableDataInfo websiteWhGenLegList(TWhgenleg tWhgenleg) {
-        startPage();
-        List<Map<String, Object>> list = tWhgenlegService.selectInventoryMapList(tWhgenleg);
+    public TableDataInfo websiteWhGenLegList(TWhgenleg tWhgenleg, Integer pageNum, Integer pageSize) {
+        List<Map<String, Object>> list = tWhgenlegService.selectInventoryMapList(tWhgenleg, pageNum, pageSize);
         return getDataTable(list);
     }
 

+ 9 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITWarehouseWebcamService.java

@@ -3,6 +3,7 @@ package com.ruoyi.basicData.service;
 import java.util.List;
 
 import com.ruoyi.basicData.domain.TWarehouseWebcam;
+import com.ruoyi.common.core.domain.AjaxResult;
 
 /**
  * 仓库摄像头Service接口
@@ -60,6 +61,14 @@ public interface ITWarehouseWebcamService {
     public int updateTWarehouseWebcam(TWarehouseWebcam tWarehouseWebcam);
 
     /**
+     * 批量修改仓库摄像头
+     *
+     * @param webcamList 仓库摄像头列表
+     * @return 结果
+     */
+    public AjaxResult updateTWarehouseWebcamList(List<TWarehouseWebcam> webcamList);
+
+    /**
      * 批量删除仓库摄像头
      *
      * @param fIds 需要删除的仓库摄像头ID

+ 20 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TWarehouseWebcamServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.List;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.ruoyi.basicData.domain.TCustomerContact;
 import com.ruoyi.basicData.mapper.TCustomerContactMapper;
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
@@ -14,6 +15,7 @@ import org.springframework.stereotype.Service;
 import com.ruoyi.basicData.mapper.TWarehouseWebcamMapper;
 import com.ruoyi.basicData.domain.TWarehouseWebcam;
 import com.ruoyi.basicData.service.ITWarehouseWebcamService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 仓库摄像头Service业务层处理
@@ -96,6 +98,7 @@ public class TWarehouseWebcamServiceImpl implements ITWarehouseWebcamService {
      */
     @Override
     public int insertTWarehouseWebcam(TWarehouseWebcam tWarehouseWebcam) {
+        tWarehouseWebcam.setCreateBy(SecurityUtils.getUsername());
         tWarehouseWebcam.setCreateTime(DateUtils.getNowDate());
         return tWarehouseWebcamMapper.insertTWarehouseWebcam(tWarehouseWebcam);
     }
@@ -113,6 +116,23 @@ public class TWarehouseWebcamServiceImpl implements ITWarehouseWebcamService {
     }
 
     /**
+     * 修改仓库摄像头
+     *
+     * @param webcamList 仓库摄像头列表
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public AjaxResult updateTWarehouseWebcamList(List<TWarehouseWebcam> webcamList) {
+        for (TWarehouseWebcam tWarehouseWebcam : webcamList) {
+            tWarehouseWebcam.setUpdateBy(SecurityUtils.getUsername());
+            tWarehouseWebcam.setUpdateTime(DateUtils.getNowDate());
+            tWarehouseWebcamMapper.updateTWarehouseWebcam(tWarehouseWebcam);
+        }
+        return AjaxResult.success();
+    }
+
+    /**
      * 批量删除仓库摄像头
      *
      * @param fIds 需要删除的仓库摄像头ID

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/ITWhgenlegService.java

@@ -49,7 +49,7 @@ public interface ITWhgenlegService {
      * @param tWhgenleg 库存总账
      * @return 库存总账集合
      */
-    List<Map<String, Object>> selectInventoryMapList(TWhgenleg tWhgenleg);
+    List<Map<String, Object>> selectInventoryMapList(TWhgenleg tWhgenleg, Integer pageNum, Integer pageSize);
 
     /**
      * 新增库存总账

+ 7 - 3
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/impl/TWhgenlegServiceImpl.java

@@ -168,7 +168,7 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
      * @return 库存总账集合
      */
     @Override
-    public List<Map<String, Object>> selectInventoryMapList(TWhgenleg tWhgenleg) {
+    public List<Map<String, Object>> selectInventoryMapList(TWhgenleg tWhgenleg, Integer pageNum, Integer pageSize) {
         if (StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())) {
             // 获取仓库信息
             TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
@@ -178,6 +178,10 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
                 tWhgenleg.setfLocation(0L);
             }
         }
+
+        if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
+            PageHelper.startPage(pageNum, pageSize);
+        }
         return tWhgenlegMapper.selectInventoryMapList(tWhgenleg);
     }
 
@@ -690,10 +694,10 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
         if ("3".equals(mode)) {
             Collections.addAll(names, "入库尺码", "出库尺码");
         } else if ("2".equals(mode)) {
-            Collections.addAll(names, "入库重量", "库重量");
+            Collections.addAll(names, "入库重量", "库重量");
         } else {
             mode = "1";
-            Collections.addAll(names, "入库件数", "库件数");
+            Collections.addAll(names, "入库件数", "库件数");
         }
 
         Map<String, Object> data = new HashMap<>();

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

@@ -221,6 +221,12 @@ public class TWarehouseBills extends BaseEntity {
     private String fEmblno;
 
     /**
+     * 所属公司-打印抬头
+     */
+    @Excel(name = "所属公司")
+    private Long fCompany;
+
+    /**
      * 船名航次,CMA/A0001
      */
     @Excel(name = "船名航次,CMA/A0001")
@@ -1533,6 +1539,14 @@ public class TWarehouseBills extends BaseEntity {
         this.fEmblno = fEmblno;
     }
 
+    public Long getfCompany() {
+        return fCompany;
+    }
+
+    public void setfCompany(Long fCompany) {
+        this.fCompany = fCompany;
+    }
+
     public void setfVslvoy(String fVslvoy) {
         this.fVslvoy = fVslvoy;
     }

+ 14 - 8
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/excel/StorageDetail.java

@@ -54,7 +54,7 @@ public class StorageDetail {
      * 入库重量
      */
     @Excel(name = "重量", isStatistics = true)
-    private Float fGrossweightD;
+    private BigDecimal fGrossweightD;
 
     /**
      * 出库日期
@@ -78,7 +78,19 @@ public class StorageDetail {
      * 出库重量
      */
     @Excel(name = "重量", isStatistics = true)
-    private Float fGrossweightC;
+    private BigDecimal fGrossweightC;
+
+    /**
+     * 计费单位
+     */
+    @Excel(name = "计费单位")
+    private String fBillingway;
+
+    /**
+     * 计费数量
+     */
+    @Excel(name = "计费数量", isStatistics = true)
+    private BigDecimal fBillingQty;
 
     /**
      * 堆存天数
@@ -92,10 +104,4 @@ public class StorageDetail {
     @Excel(name = "出库堆存费", isStatistics = true)
     private BigDecimal fAmount;
 
-    /**
-     * 结余
-     */
-    @Excel(name = "结余", isStatistics = true)
-    private BigDecimal surplus;
-
 }

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseBillsMapper.java

@@ -129,7 +129,7 @@ public interface TWarehouseBillsMapper extends BaseMapper<TWarehouseBills> {
     /**
      * 查询入库信息
      */
-    public List<StorageDetail> selectInStockDetail(@Param("fId") Long fId);
+    public List<StorageDetail> selectInStockDetail(@Param("fId") Long fId, @Param("billType") String billType);
 
     /**
      * 查询非入库信息

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

@@ -1556,7 +1556,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     @Override
     public List<StorageDetail> selectStorageDetail(Long fId) {
         List<StorageDetail> storageDetails = new ArrayList<>();
-        storageDetails.addAll(tWarehouseBillsMapper.selectInStockDetail(fId));
+        storageDetails.addAll(tWarehouseBillsMapper.selectInStockDetail(fId, "SJRK"));
+        storageDetails.addAll(tWarehouseBillsMapper.selectInStockDetail(fId, "CKDB"));
         storageDetails.addAll(tWarehouseBillsMapper.selectNotInStockDetail(fId, "HQZY"));
         storageDetails.addAll(tWarehouseBillsMapper.selectNotInStockDetail(fId, "SJCK"));
         storageDetails.addAll(tWarehouseBillsMapper.selectInventoryDetail(fId));

+ 66 - 26
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -36,6 +36,7 @@
         <result property="fFeetunit"    column="f_feetunit"    />
         <result property="fMblno"    column="f_mblno"    />
         <result property="fEmblno"    column="f_emblno"    />
+        <result property="fCompany"    column="f_company"    />
         <result property="fVslvoy"    column="f_vslvoy"    />
         <result property="fEta"    column="f_eta"    />
         <result property="fMarks"    column="f_marks"    />
@@ -137,7 +138,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_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_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,
@@ -224,6 +225,7 @@
             bill.f_shipper AS fShipper,
             bill.f_mblno AS fMblno,
             bill.f_emblno AS fEmblno,
+            bill.f_company AS fCompany,
             corpSub.f_name AS fSbu,
             bill.f_marks AS fMarks,
             bill.remark AS remark,
@@ -433,6 +435,7 @@
             bill.f_shipper AS fShipper,
             bill.f_mblno AS fMblno,
             bill.f_emblno AS fEmblno,
+            bill.f_company AS fCompany,
             corpSub.f_name AS fSbu,
             bill.f_marks AS fMarks,
             bill.remark AS remark,
@@ -652,11 +655,35 @@
         LEFT JOIN t_goods tg ON wi.f_goodsid = tg.f_id
         LEFT JOIN sys_dict_data dict ON wi.f_business_type = dict.dict_value
         WHERE
-        wi.f_billtype = 'SJRK'
-        AND dict.dict_type = 'st_in_type'
-        AND dict.status = 0
-        AND wi.f_billstatus = 40
-        <if test="fId != null and fId!= ''">AND wi.f_mblno = (select f_mblno from t_warehousebills where f_id = #{fId})</if>
+            wi.f_billstatus = 40
+            AND dict.status = 0
+            <if test="billType != null and billType!= '' and billType== 'SJRK'">
+                AND wi.f_billtype = 'SJRK'
+                AND dict.dict_type = 'st_in_type'
+                <if test="fId != null and fId!= ''">
+                    AND wi.f_mblno = (select distinct f_mblno from t_warehousebills where f_id = #{fId})
+                    AND wi.f_warehouselocid in (
+                        select distinct wi.f_warehouselocid
+                        from t_warehousebillsitems wi left join t_warehousebillsfees wf on wf.src_id = wi.f_id
+                        where wf.f_pid = #{fId}
+                    )
+                </if>
+            </if>
+            <if test="billType != null and billType!= '' and billType== 'CKDB'">
+                AND wi.f_billtype = 'CKDB'
+                AND dict.dict_type = 'st_trans_type'
+                <if test="fId != null and fId!= ''">
+                    AND wi.f_mblno = (select distinct f_mblno from t_warehousebills where f_id = #{fId})
+                    AND wi.f_transfer_warehouselocid in (
+                        select distinct wi.f_warehouselocid
+                        from t_warehousebillsitems wi left join t_warehousebillsfees wf on wf.src_id = wi.f_id
+                        where wf.f_pid = #{fId}
+                    )
+                </if>
+            </if>
+            <if test="fId != null and fId!= ''">
+                AND wi.f_bsdate &gt;= (select min(f_chargedate) from t_warehousebillsfees where f_pid = #{fId})
+            </if>
     </select>
 
     <select id="selectNotInStockDetail" resultType="com.ruoyi.warehouseBusiness.excel.StorageDetail">
@@ -668,27 +695,30 @@
         wf.f_chargedate       AS inStockDate,
         wf.f_billing_deadline AS outStockDate,
         wi.f_truckno          AS fTruckno,
-        wf.f_billing_qty      AS fQtyC,
+        wi.f_qty              AS fQtyC,
         wi.f_grossweight      AS fGrossweightC,
+        dictF.dict_label      AS fBillingway,
+        wf.f_billing_qty      AS fBillingQty,
         wf.f_billing_days     AS fBillingDays,
         wf.f_amount           AS fAmount
         FROM t_warehousebillsfees wf
         LEFT JOIN t_warehousebillsitems wi ON wi.f_id = wf.src_id
         LEFT JOIN t_warehousebills w ON w.f_id = wi.f_pid
         LEFT JOIN sys_dict_data dict ON w.f_business_type = dict.dict_value
+        LEFT JOIN sys_dict_data dictF ON wf.f_billingway = dictF.dict_value
         WHERE w.f_typeid IS NULL
-        <if test="fId != null and fId!= ''">
-          AND w.f_mblno = (select f_mblno from t_warehousebills where f_id = #{fId})
-        </if>
-        AND dict.status = '0'
-        <if test="billType != null and billType!= '' and billType== 'SJCK'">
-          AND wf.f_billtype = 'SJCK'
-          AND dict.dict_type = 'st_out_type'
-        </if>
-        <if test="billType != null and billType!= '' and billType== 'HQZY'">
-            AND wf.f_billtype = 'HQZY'
-            AND dict.dict_type = 'st_goodstf_type'
-        </if>
+            AND dict.status = '0'
+            AND dictF.status = '0'
+            AND dictF.dict_type = 'data_unitfees'
+            <if test="fId != null and fId!= ''">AND wf.f_pid = #{fId}</if>
+            <if test="billType != null and billType!= '' and billType== 'SJCK'">
+                AND wf.f_billtype = 'SJCK'
+                AND dict.dict_type = 'st_out_type'
+            </if>
+            <if test="billType != null and billType!= '' and billType== 'HQZY'">
+                AND wf.f_billtype = 'HQZY'
+                AND dict.dict_type = 'st_goodstf_type'
+            </if>
     </select>
 
     <select id="selectInventoryDetail" resultType="com.ruoyi.warehouseBusiness.excel.StorageDetail">
@@ -698,14 +728,19 @@
         wi.f_packagespecs     AS fPackagespecs,
         '在库'                 AS fBusinessType,
         wf.f_bsdate           AS inStockDate,
-        wf.f_amount           AS fAmount,
-        wf.f_billing_qty      AS surplus
-        FROM t_warehousebills w
-        LEFT JOIN t_warehousebillsfees wf ON w.f_id = wf.f_pid
+        dictF.dict_label      AS fBillingway,
+        wf.f_billing_qty      AS fBillingQty,
+        wf.f_billing_days     AS fBillingDays,
+        wf.f_amount           AS fAmount
+        FROM t_warehousebillsfees wf
         LEFT JOIN t_warehousebillsitems wi ON wi.f_id = wf.src_id
-        WHERE w.f_id = #{fId}
-        AND w.f_typeid IS NULL
-        AND wf.f_billtype = 'KCZZ'
+        LEFT JOIN t_warehousebills w ON w.f_id = wi.f_pid
+        LEFT JOIN sys_dict_data dictF ON wf.f_billingway = dictF.dict_value
+        WHERE w.f_typeid IS NULL
+            AND dictF.status = '0'
+            AND dictF.dict_type = 'data_unitfees'
+            AND wf.f_billtype = 'KCZZ'
+            <if test="fId != null and fId!= ''">AND wf.f_pid = #{fId}</if>
     </select>
 
     <select id="selectInventorySJRKList" parameterType="TWarehousebills" resultType="java.util.Map">
@@ -949,6 +984,7 @@
             <if test="fFeetunit != null">f_feetunit,</if>
             <if test="fMblno != null">f_mblno,</if>
             <if test="fEmblno != null">f_emblno,</if>
+            <if test="fCompany != null">f_company,</if>
             <if test="fVslvoy != null">f_vslvoy,</if>
             <if test="fEta != null">f_eta,</if>
             <if test="fMarks != null">f_marks,</if>
@@ -1066,6 +1102,7 @@
             <if test="fFeetunit != null">#{fFeetunit},</if>
             <if test="fMblno != null">#{fMblno},</if>
             <if test="fEmblno != null">#{fEmblno},</if>
+            <if test="fCompany != null">#{fCompany},</if>
             <if test="fVslvoy != null">#{fVslvoy},</if>
             <if test="fEta != null">#{fEta},</if>
             <if test="fMarks != null">#{fMarks},</if>
@@ -1187,6 +1224,7 @@
             <if test="fFeetunit != null">f_feetunit = #{fFeetunit},</if>
             <if test="fMblno != null">f_mblno = #{fMblno},</if>
             <if test="fEmblno != null">f_emblno = #{fEmblno},</if>
+            <if test="fCompany != null">f_company = #{fCompany},</if>
             <if test="fVslvoy != null">f_vslvoy = #{fVslvoy},</if>
             <if test="fEta != null">f_eta = #{fEta},</if>
             <if test="fMarks != null">f_marks = #{fMarks},</if>
@@ -1309,6 +1347,7 @@
             <if test="fFeetunit != null">f_feetunit = #{fFeetunit},</if>
             <if test="fMblno != null">f_mblno = #{fMblno},</if>
             <if test="fEmblno != null">f_emblno = #{fEmblno},</if>
+            <if test="fCompany != null">f_company = #{fCompany},</if>
             <if test="fVslvoy != null">f_vslvoy = #{fVslvoy},</if>
             <if test="fMarks != null and fMarks != ''">f_marks = #{fMarks},</if>
             <if test="fEta != null">f_eta = #{fEta},</if>
@@ -2583,6 +2622,7 @@
             g.f_name goodsName,
             t.f_mblno fMblno,
             t.f_warehouse_information fWarehouseInformation,
+            t.f_forkliftman fForkliftman,
             t.f_truckno fTruckno,
             t.f_cntrno fCntrno,
             cntr.f_name cntrtypes,

+ 1 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -737,6 +737,7 @@
             fleet.f_name fleetName,
             t.f_warehouse_information warehouseInformation,
             t.f_warehouselocid fWarehouselocid,
+            t.f_forkliftman fForkliftman,
             t.f_truckno truckno,
             cntr.f_name cntrtypes,
             t.f_cntrtype cntrtype,