瀏覽代碼

[CODE]: 列表查询修改为中文显示

maxianghua 4 年之前
父節點
當前提交
2a30f24aef

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/finance/TPaymentsController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.fleet.finance;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.annotation.RepeatSubmit;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ServletUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.orderManagement.finance.domain.FTmsaccbills;
+import com.ruoyi.orderManagement.finance.domain.FTmsaccbillsFees;
+import com.ruoyi.orderManagement.finance.service.IFTmsaccbillsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 财务付费数据主Controller
+ *
+ * @author ruoyi
+ * @date 2021-01-18
+ */
+@RestController
+@RequestMapping("/finances/payment")
+public class TPaymentsController extends BaseController {
+
+    @Autowired
+    private IFTmsaccbillsService fTmsaccbillsService;
+
+
+    /**
+     * 查询财务主列表
+     */
+    @PreAuthorize("@ss.hasPermi('finances:contrast:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FTmsaccbills fTmsaccbills)
+    {
+        fTmsaccbills.setfBilltype("JSFF");
+        startPage();
+        List<Map<String, Object>> list = fTmsaccbillsService.selectFTmsaccbillsMapList(fTmsaccbills);
+        return getDataTable(list);
+    }
+
+    /**
+     *  收费查询
+     */
+    @GetMapping("/paymentList")
+    public TableDataInfo paymentList(FTmsaccbillsFees fTmsaccbillsFees) {
+        fTmsaccbillsFees.setfDc("C");
+        startPage();
+        String billsType = "FF";
+        List<Map<String, Object>> list = fTmsaccbillsService.fTmsaccbillsList(fTmsaccbillsFees,billsType);
+        return getDataTable(list);
+    }
+
+    /**
+     * 新增财务数据主
+     */
+    @PreAuthorize("@ss.hasPermi('finances:payment:add')")
+    @Log(title = "财务数据主", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/add")
+    @RepeatSubmit
+    public AjaxResult add(@RequestParam("tFee") String tFee,
+                          @RequestParam("tFeeDo") String tFeeDo ) {
+        String billsType = "JSFF";
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return fTmsaccbillsService.insertTFeeTFeeDo(tFee,tFeeDo,loginUser,billsType);
+    }
+
+    /**
+     *  查询详情
+     */
+    @PreAuthorize("@ss.hasPermi('finances:payment:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(fTmsaccbillsService.selectFTmsaccbillsAndItemsById(fId));
+    }
+
+    /**
+     * 删除财务数据主
+     */
+    @PreAuthorize("@ss.hasPermi('finances:payment:remove')")
+    @Log(title = "财务数据主", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(fTmsaccbillsService.deleteFTmsaccbillsByIds(fIds));
+    }
+
+    @PreAuthorize("@ss.hasPermi('finances:payment:remove')")
+    @Log(title = "财务数据主", businessType = BusinessType.DELETE)
+    @DeleteMapping("/queryRemove/{fId}")
+    public AjaxResult queryRemove(@PathVariable("fId") Long fId) {
+        return fTmsaccbillsService.queryRemove(fId);
+    }
+
+
+}

+ 14 - 5
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/dto/TWarehouseAgreementitem.java

@@ -1,12 +1,7 @@
 package com.ruoyi.warehouseBusiness.dto;
 
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import java.math.BigDecimal;
 
 /**
  * 仓储费明细表对象 t_warehouse_agreementitems
@@ -52,6 +47,12 @@ public class TWarehouseAgreementitem extends BaseEntity {
     @Excel(name = "作业费类型")
     private Long fTaskType;
 
+    /**
+     * 作业费类型
+     */
+    @Excel(name = "作业费类型")
+    private String  fBilltype;
+
 
     public Long getfId() {
         return fId;
@@ -101,6 +102,14 @@ public class TWarehouseAgreementitem extends BaseEntity {
         this.fTaskType = fTaskType;
     }
 
+    public String getfBilltype() {
+        return fBilltype;
+    }
+
+    public void setfBilltype(String fBilltype) {
+        this.fBilltype = fBilltype;
+    }
+
     @Override
     public String toString() {
         return "TWarehouseAgreementitem{" +

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

@@ -35,6 +35,8 @@ public interface TWarehouseBillsMapper extends BaseMapper<TWarehouseBills> {
      */
     public List<Map<String, Object>> selectWarehouseBusinessList(TWarehouseBills tWarehousebills);
 
+    public List<Map<String, Object>> selectWarehouseBusinessList1(TWarehouseBills tWarehousebills);
+
     /**
      * 查询详情主表列表
      *

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

@@ -278,7 +278,11 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
      */
     @Override
     public List<Map<String, Object>> selectWarehouseBusinessList(TWarehouseBills tWarehousebills) {
-        return tWarehouseBillsMapper.selectWarehouseBusinessList(tWarehousebills);
+        if(tWarehousebills.getfBilltype().equals("JSCCF") |  tWarehousebills.getfBilltype().equals("HQZY") ){
+            return tWarehouseBillsMapper.selectWarehouseBusinessList1(tWarehousebills);
+        }else {
+            return tWarehouseBillsMapper.selectWarehouseBusinessList(tWarehousebills);
+        }
     }
 
     /**

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

@@ -160,7 +160,7 @@
             bill.f_driver_name AS fDriverName,
             bill.f_driver_tel AS fDriverTel,
             bill.f_driver_id_car AS fDriverIdCar,
-            bill.f_business_type AS fBusinessType,
+            dictIn.dict_label AS fBusinessType,
             ware.f_name AS fWarehouseid,
             bill.f_qty AS fQty,
             bill.f_netweight AS fNetweight,
@@ -170,8 +170,20 @@
             bill.f_grossweight AS fGrossweight,
             bill.f_product_name AS fProductName,
             bill.f_billing_deadline AS fBillingDeadline,
-            bill.f_billstatus AS fBillstatus,
-            bill.f_items_status AS fItemsStatus,
+            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 '全部入账'
+            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,
             bill.f_billno AS fBillno,
             g.f_name AS fGoodsid,
             bill.f_storekeeper AS fStorekeeper
@@ -187,6 +199,7 @@
             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 dictIn ON dictIn.dict_value = bill.f_business_type
         <where>
             <if test="fBillno != null  and fBillno != ''">and bill.f_billno like concat('%', #{fBillno}, '%')</if>
             <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and bill.f_customsdeclartion =
@@ -238,7 +251,21 @@
             <if test="fIfpledge != null  and fIfpledge != ''">and bill.f_ifpledge = #{fIfpledge}</if>
             <if test="fIfdamage != null  and fIfdamage != ''">and bill.f_ifdamage = #{fIfdamage}</if>
             <if test="fBankcorpid != null ">and bill.f_bankcorpid = #{fBankcorpid}</if>
-            <if test="fBilltype != null  and fBilltype != ''">and bill.f_billtype = #{fBilltype}</if>
+            <if test="fBilltype != null  and fBilltype == 'SJRK'">
+                and bill.f_billtype = #{fBilltype}
+                AND dictIn.dict_type = 'st_in_type'
+                AND dictIn.status = '0'
+            </if>
+            <if test="fBilltype != null  and fBilltype == 'SJCK'">
+                and bill.f_billtype = #{fBilltype}
+                AND dictIn.dict_type = 'st_out_type'
+                AND dictIn.status = '0'
+            </if>
+            <if test="fBilltype != null  and fBilltype == 'CKDB'">
+                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>
@@ -247,6 +274,126 @@
         ${params.dataScope}
     </select>
 
+    <select id="selectWarehouseBusinessList1" parameterType="TWarehousebills" resultType="Map">
+        SELECT
+        DISTINCT
+        bill.f_id AS fId,
+        corp.f_name AS fCorpid,
+        corpTo.f_name AS fTocorpid,
+        bill.f_mblno AS fMblno,
+        corpSub.f_name AS fSbu,
+        bill.f_marks AS fMarks,
+        bill.remark AS remark,
+        bill.f_planqty AS fPlanqty,
+        bill.f_plangrossweight AS fPlangrossweight,
+        bill.f_plannetweight AS fPlannetweight,
+        bill.f_planvolumn AS fPlanvolumn,
+        bill.f_bsdate AS fBsdate,
+        bill.f_trademodeid AS fTrademodeid,
+        bill.f_truckno AS fTruckno,
+        bill.f_driver_name AS fDriverName,
+        bill.f_driver_tel AS fDriverTel,
+        bill.f_driver_id_car AS fDriverIdCar,
+        ware.f_name AS fWarehouseid,
+        bill.f_qty AS fQty,
+        bill.f_netweight AS fNetweight,
+        bill.create_time AS createTime,
+        ware1.f_name AS fInwarehouseid,
+        bill.create_by AS createBy,
+        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 '全部入账'
+        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,
+        bill.f_billno AS fBillno,
+        g.f_name AS fGoodsid,
+        bill.f_storekeeper AS fStorekeeper
+        FROM
+        t_warehousebills bill
+        LEFT JOIN t_goods g ON g.f_id = bill.f_goodsid
+        left join sys_user u on bill.create_by = u.user_name
+        left join sys_dept d on bill.f_bsdeptid = d.dept_id
+        LEFT JOIN t_corps corp ON corp.f_id = bill.f_corpid
+        LEFT JOIN t_corps corpTo ON corpTo.f_id = bill.f_tocorpid
+        LEFT JOIN t_corps corpSub ON corpSub.f_id = bill.f_sbu
+        LEFT JOIN t_warehouse ware ON ware.f_id = bill.f_warehouseid
+        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
+        <where>
+            <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}
+            </if>
+            <if test="fOriginalbillno != null  and fOriginalbillno != ''">and bill.f_originalbillno =
+                #{fOriginalbillno}
+            </if>
+            <if test="fDeptid != null ">and bill.f_deptid = #{fDeptid}</if>
+            <if test="fInwarehouseid != null ">and bill.f_inwarehouseid = #{fInwarehouseid}</if>
+            <if test="fBsdeptid != null ">and bill.f_bsdeptid = #{fBsdeptid}</if>
+            <if test="fChargedate != null ">and bill.f_chargedate = #{fChargedate}</if>
+            <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
+                and bill.f_bsdate &gt;= #{timeInterval[0]}
+            </if>
+            <if test='timeInterval != null and timeInterval[1] != null and timeInterval[1]!= ""'>
+                and bill.f_bsdate &lt;= #{timeInterval[1]}
+            </if>
+            <if test="fGoodsid != null  and fGoodsid != ''">and item.f_goodsid = #{fGoodsid}</if>
+            <if test="fContacts != null  and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
+            <if test="fTel != null  and fTel != ''">and bill.f_tel = #{fTel}</if>
+            <if test="fCorpid != null ">and bill.f_corpid = #{fCorpid}</if>
+            <if test="fBillingDeadline != null ">and bill.f_billing_deadline = #{fBillingDeadline}</if>
+            <if test="fTocorpid != null ">and bill.f_tocorpid = #{fTocorpid}</if>
+            <if test="fMarks != null  and fMarks != ''">and bill.f_marks like concat('%', #{fMarks}, '%')</if>
+            <if test="fStltypeid != null ">and bill.f_stltypeid = #{fStltypeid}</if>
+            <if test="fReviewDate != null "> and f_review_date = #{fReviewDate}</if>
+            <if test="fBscorpno != null  and fBscorpno != ''">and bill.f_bscorpno = #{fBscorpno}</if>
+            <if test="fWarehouseid != null ">and bill.f_warehouseid = #{fWarehouseid}</if>
+            <if test="fStorekeeper != null  and fStorekeeper != ''">and bill.f_storekeeper = #{fStorekeeper}</if>
+            <if test="fBsdate != null ">and bill.f_bsdate = #{fBsdate}</if>
+            <if test="fPlanqty != null ">and bill.f_planqty = #{fPlanqty}</if>
+            <if test="fPlangrossweight != null ">and bill.f_plangrossweight = #{fPlangrossweight}</if>
+            <if test="fPlannetweight != null ">and bill.f_plannetweight = #{fPlannetweight}</if>
+            <if test="fPlanvolumn != null ">and bill.f_planvolumn = #{fPlanvolumn}</if>
+            <if test="fQty != null ">and bill.f_qty = #{fQty}</if>
+            <if test="fGrossweight != null ">and bill.f_grossweight = #{fGrossweight}</if>
+            <if test="fNetweight != null ">and bill.f_netweight = #{fNetweight}</if>
+            <if test="fVolumn != null ">and bill.f_volumn = #{fVolumn}</if>
+            <if test="fTrademodeid != null ">and bill.f_trademodeid = #{fTrademodeid}</if>
+            <if test="fBillingway != null ">and bill.f_billingway = #{fBillingway}</if>
+            <if test="fSbu != null ">and bill.f_sbu = #{fSbu}</if>
+            <if test="fFeetunit != null  and fFeetunit != ''">and bill.f_feetunit = #{fFeetunit}</if>
+            <if test="fMblno != null  and fMblno != ''">and bill.f_mblno like concat('%', #{fMblno}, '%')</if>
+            <if test="fVslvoy != null  and fVslvoy != ''">and bill.f_vslvoy = #{fVslvoy}</if>
+            <if test="fEta != null ">and bill.f_eta = #{fEta}</if>
+            <if test="fCustomno != null  and fCustomno != ''">and bill.f_customno = #{fCustomno}</if>
+            <if test="fIfweigh != null  and fIfweigh != ''">and bill.f_ifweigh = #{fIfweigh}</if>
+            <if test="fIfpledge != null  and fIfpledge != ''">and bill.f_ifpledge = #{fIfpledge}</if>
+            <if test="fIfdamage != null  and fIfdamage != ''">and bill.f_ifdamage = #{fIfdamage}</if>
+            <if test="fBankcorpid != null ">and bill.f_bankcorpid = #{fBankcorpid}</if>
+            <if test="fBilltype != null  and fBilltype != ''">
+                and bill.f_billtype = #{fBilltype}
+            </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>
+        </where>
+        ORDER BY  bill.f_billstatus , bill.f_bsdate  DESC
+        ${params.dataScope}
+    </select>
+
     <select id="selectTWarehousebillsById" parameterType="Long" resultMap="TWarehousebillsResult">
         <include refid="selectTWarehousebillsVo"/>
         where f_id = #{fId}