Sfoglia il codice sorgente

客户要求调整

zxf 12 ore fa
parent
commit
480102b298

+ 5 - 1
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/controller/BizWaybillOrderController.java

@@ -11,6 +11,7 @@ import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
 import com.ruoyi.common.security.utils.SecurityUtils;
+import com.ruoyi.logistics.annotation.SimpleDictExportUtil;
 import com.ruoyi.logistics.constant.ImportTemplateConstants;
 import com.ruoyi.logistics.constant.JDDictConstants;
 import com.ruoyi.logistics.domain.BizWaybillOrder;
@@ -29,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -57,7 +59,8 @@ public class BizWaybillOrderController extends BaseController
 
     @Autowired
     private ISysDictTypeService dictTypeService;
-
+    @Resource
+    SimpleDictExportUtil simpleDictExportUtil;
     /**
      * 查询运单管理列表
      */
@@ -80,6 +83,7 @@ public class BizWaybillOrderController extends BaseController
     public void export(HttpServletResponse response, BizWaybillOrder bizWaybillOrder)
     {
         List<BizWaybillOrder> list = bizWaybillOrderService.selectBizWaybillOrderList(bizWaybillOrder);
+        simpleDictExportUtil.handleDictList(list);
         ExcelUtil<BizWaybillOrder> util = new ExcelUtil<BizWaybillOrder>(BizWaybillOrder.class);
         util.exportExcel(response, list, "运单管理数据");
     }

+ 20 - 3
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/controller/RptFinancialMonthSummaryController.java

@@ -7,6 +7,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.security.auth.AuthUtil;
 import com.ruoyi.logistics.annotation.SimpleDictExportUtil;
 import com.ruoyi.logistics.util.TimeUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -51,6 +52,13 @@ public class RptFinancialMonthSummaryController extends BaseController
     {
         startPage();
         List<RptFinancialMonthSummary> list = rptFinancialMonthSummaryService.selectRptFinancialMonthSummaryList(rptFinancialMonthSummary);
+        // 如果没有采购金额权限 → 全部隐藏
+        if (!AuthUtil.hasPermi("finance:bill:amount")) {
+            for (RptFinancialMonthSummary item : list) {
+                item.setPurchaseAmount("****"); // 或者设为 ****
+            }
+        }
+
         return getDataTable(list);
     }
 
@@ -63,9 +71,18 @@ public class RptFinancialMonthSummaryController extends BaseController
     public void export(HttpServletResponse response, RptFinancialMonthSummary rptFinancialMonthSummary)
     {
         List<RptFinancialMonthSummary> list = rptFinancialMonthSummaryService.selectRptFinancialMonthSummaryList(rptFinancialMonthSummary);
-        simpleDictExportUtil.handleDictList(list);
-        ExcelUtil<RptFinancialMonthSummary> util = new ExcelUtil<RptFinancialMonthSummary>(RptFinancialMonthSummary.class);
-        util.exportExcel(response, list, "财务月度汇总数据");
+        
+        // 如果没有采购金额权限 → 设置purchaseAmount字段不参与导出
+        if (!AuthUtil.hasPermi("finance:bill:amount")) {
+            ExcelUtil<RptFinancialMonthSummary> util = new ExcelUtil<RptFinancialMonthSummary>(RptFinancialMonthSummary.class);
+            // 排除purchaseAmount字段,不导出该列
+            util.hideColumn("purchaseAmount");            simpleDictExportUtil.handleDictList(list);
+            util.exportExcel(response, list, "财务月度汇总数据");
+        } else {
+            simpleDictExportUtil.handleDictList(list);
+            ExcelUtil<RptFinancialMonthSummary> util = new ExcelUtil<RptFinancialMonthSummary>(RptFinancialMonthSummary.class);
+            util.exportExcel(response, list, "财务月度汇总数据");
+        }
     }
 
     /**

+ 14 - 0
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/domain/BizWaybillOrder.java

@@ -183,6 +183,11 @@ public class BizWaybillOrder extends BaseEntity
     @Excel(name = "运单费用")
     private BigDecimal totalAmount;
 
+    /** 付款方式 */
+    @Excel(name = "付款方式")
+    @Dict("payment_type")
+    private String paymentType;
+
     public void setWaybillId(Long waybillId) 
     {
         this.waybillId = waybillId;
@@ -569,6 +574,14 @@ public class BizWaybillOrder extends BaseEntity
         this.totalAmount = totalAmount;
     }
 
+    public String getPaymentType() {
+        return paymentType;
+    }
+
+    public void setPaymentType(String paymentType) {
+        this.paymentType = paymentType;
+    }
+
     public void setBatchNum(String batchNum) {
         this.batchNum = batchNum;
     }
@@ -624,6 +637,7 @@ public class BizWaybillOrder extends BaseEntity
             .append("nickName", getNickName())
             .append("pdfUrl", getPdfUrl())
             .append("totalAmount", getTotalAmount())
+            .append("paymentType", getPaymentType())
             .toString();
     }
 }

+ 3 - 2
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/service/impl/FeePushService.java

@@ -60,10 +60,11 @@ public class FeePushService {
             Long deptId=orderList.get(0).getDeptId();
             Long userId=orderList.get(0).getUserId();
             Long waybillId=orderList.get(0).getWaybillId();
-
             SysDept sysDept = sysDeptService.selectDeptById(orderList.get(0).getDeptId());
 
-            // TODO:先写死  这里差一个查询供应商费率的查询
+
+
+            // TODO:先写死  这里差一个查询供应商费率的查询  这里要改成去查询经销商费率配置表   还要有一个 瑞鲸和顺丰的采购折扣配置
             String  Rate=sysDept.getRateValue();
             /*处理费用明细*/
             if (feeList != null && !feeList.isEmpty()) {

+ 7 - 7
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/service/impl/InvoiceServiceImpl.java

@@ -229,14 +229,14 @@ public class InvoiceServiceImpl implements InvoiceService {
         request.setPayType(1);
         request.setProdName("快递服务");
         request.setProdCount("1");
-        request.setBuyMoney(free);   //销售金额  含税
-        request.setBuyPrice(free);  //采购单价  含税
-        request.setSaleMoney(free); // 销售金额  含税
-        request.setPurchaseRate(BigDecimal.valueOf(0.06));    //进项税率
-        request.setPrice(free);       //销售单价    含税
+        request.setBuyMoney(free);   // 销售金额   含税   (供应商应付的金额合计)
+        request.setBuyPrice(free);  //  采购单价   含税    (采购金额的合计)
+        request.setSaleMoney(free); //  销售金额   含税   (供应商应收的金额合计)
+        request.setPurchaseRate(BigDecimal.valueOf(0.06));    //进项税率
+        request.setPrice(free);       //销售单价    含税    这个也应该是供应商应付的金额合计 ?
         BigDecimal[] result =TaxAmountCalculator.calculateFromTaxIncluded(free, BigDecimal.valueOf(0.06));
-        request.setBuyMoneyNoTax(result[0]);   // 采购金额(不含税)
-        request.setJxse(result[1]);           //进项税额
+        request.setBuyMoneyNoTax(result[0]);   // 采购金额(不含税)   采购金额合计 计算不含税价格
+        request.setJxse(result[1]);           //  进项税额            计算税额
         BigDecimal[] result1 =TaxAmountCalculator.calculateFromTaxIncluded(free, BigDecimal.valueOf(0.06));
         request.setOutputRate(BigDecimal.valueOf(0.06));      // 销项税率
         request.setXxse(result1[1]);            //销项税额

+ 2 - 1
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/service/impl/MonthQRCodeTaskServiceImpl.java

@@ -153,7 +153,8 @@ public class MonthQRCodeTaskServiceImpl implements IMonthQRCodeTaskService {
                 bizWaybillOrder.setGoodsWeight(new BigDecimal(orderInfo.getCargoes().get(0).getWeight()));
                 bizWaybillOrder.setGoodsVolume(new BigDecimal(orderInfo.getCargoes().get(0).getVolume()));
                 bizWaybillOrder.setGoodsQty(orderInfo.getCargoes().get(0).getQuantity().longValue());
-                bizWaybillOrder.setOrderStatus(6);
+                bizWaybillOrder.setOrderStatus(5);
+                bizWaybillOrder.setPaymentType("2");
                 bizWaybillOrder.setPickupType(orderInfo.getShipmentInfo().getPickupType());
                 if (orderInfo.getShipmentInfo() != null) {
                     bizWaybillOrder.setSendStartTime(new Date(Long.parseLong(orderInfo.getShipmentInfo().getPickupStartTime())));

+ 8 - 1
jd-logistics-modules/jd-logistics-system/src/main/resources/mapper/logistics/BizWaybillOrderMapper.xml

@@ -51,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="pdfUrl" column="pdf_url" />
         <result property="totalAmount" column="total_amount" />
         <result property="batchNum" column="batch_num" />
+        <result property="paymentType" column="payment_type" />
 
     </resultMap>
 
@@ -58,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select bwo.waybill_id, bwo.waybill_no, bwo.external_waybill_no, bwo.order_type, bwo.sender_name, bwo.sender_phone, bwo.sender_province, bwo.sender_city, bwo.sender_county, bwo.sender_address, bwo.receiver_name,
                bwo.receiver_phone, bwo.receiver_province, bwo.receiver_city, bwo.receiver_county, bwo.receiver_address, bwo.goods_name, bwo.goods_weight, bwo.goods_volume, bwo.goods_qty, bwo.order_status, bwo.pickup_type,
                bwo.send_start_time, bwo.send_end_time, bwo.pickup_time, bwo.delivery_time, bwo.sign_time, bwo.cancel_reason, bwo.parent_waybill_id, bwo.invoice_flag, bwo.adjust_flag, bwo.remark, bwo.create_time, bwo.update_time,
-               bwo.del_flag, bwo.create_by, bwo.update_by, bwo.dept_id, bwo.user_id, bwo.product_code, bwo.added_service, u.nick_name, d.dept_name, bwo.pdf_url,
+               bwo.del_flag, bwo.create_by, bwo.update_by, bwo.dept_id, bwo.user_id, bwo.product_code, bwo.added_service, u.nick_name, d.dept_name, bwo.pdf_url, bwo.payment_type,
                 sum(bwcd.amount) as total_amount
         from biz_waybill_order bwo
                  left join sys_user u on bwo.user_id = u.user_id
@@ -112,6 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                 and date_format(bwo.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
             </if>
+            <if test="paymentType != null  and paymentType != ''">
+                AND payment_type = #{paymentType}
+            </if>
             <!-- 数据范围过滤 -->
             ${params.dataScope}
         </where>
@@ -168,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productCode != null">product_code,</if>
             <if test="addedService != null">added_service,</if>
             <if test="batchNum != null">batch_num,</if>
+            <if test="paymentType != null">payment_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="waybillNo != null">#{waybillNo},</if>
@@ -211,6 +216,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productCode != null">#{productCode},</if>
             <if test="addedService != null">#{addedService},</if>
             <if test="batchNum != null">#{batchNum},</if>
+            <if test="paymentType != null">#{paymentType},</if>
          </trim>
     </insert>
 
@@ -258,6 +264,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productCode != null">product_code = #{productCode},</if>
             <if test="addedService != null">added_service = #{addedService},</if>
             <if test="pdfUrl != null">pdf_url = #{pdfUrl},</if>
+            <if test="paymentType != null">payment_type = #{paymentType},</if>
         </trim>
         where waybill_id = #{waybillId}
     </update>