Browse Source

20230210 22:52

wangzhuo 2 năm trước cách đây
mục cha
commit
fd6f839998

+ 5 - 2
blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/extra/entity/ClaimItem.java

@@ -16,6 +16,8 @@
  */
 package com.trade.purchase.extra.entity;
 
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -61,8 +63,9 @@ public class ClaimItem implements Serializable {
 	 * 日期
 	 */
 	@ApiModelProperty(value = "日期")
-	@DateTimeFormat(pattern = "yyyy-MM-dd")
-	@JsonFormat(pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@TableField(updateStrategy = FieldStrategy.IGNORED)//时间为空
 	private Date payDate;
 	/**
 	 * 费用类别ID

+ 9 - 0
blade-service/blade-check/src/main/java/org/springblade/check/controller/AuditProecessController.java

@@ -135,6 +135,15 @@ public class AuditProecessController extends BladeController {
 							auditOrderVO.setCorpsName(corpsDesc.getData().getCname());
 						}
 					}
+				} else if ("BGJK".equals(e.getCheckType()) || "BGCK".equals(e.getCheckType())){
+					if (ObjectUtils.isNotNull(e.getCorpId())) {
+						R<CorpsDesc> corpsDesc = corpsDescClient.getCorpMessage(e.getCorpId());
+						if (corpsDesc.isSuccess()) {
+							auditOrderVO.setCorpsName(corpsDesc.getData().getCname());
+						}
+					}
+					auditOrderVO.setAmount(e.getReceivableAmount());
+					auditOrderVO.setAmountReceivable(e.getPayAmount());
 				} else if ("RK".equals(e.getCheckType()) || "CK".equals(e.getCheckType()) || "PD".equals(e.getCheckType())) {
 					if (e.getBillId() != null) {
 						Order order = orderDescClient.getById(e.getBillId());

+ 45 - 37
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderMapper.xml

@@ -691,14 +691,14 @@ ORDER BY
 
     <select id="salesCommission" resultType="org.springblade.purchase.sales.vo.SalesDetailsVo">
         SELECT
-        BGD.brand AS brand,
-        BO.charge_member AS salesName,
-        BO.receipt_time AS careteTime,
-        BOI.size AS specs,
-        sum( BOI.actual_quantity ) AS quantity,
-        BOI.price_type AS priceType
+            BGD.brand AS brand,
+            BO.charge_member AS salesName,
+            BO.receipt_time AS careteTime,
+            BOI.size AS specs,
+            sum( BOI.actual_quantity ) AS quantity,
+            BOI.price_type AS priceType
         FROM
-        business_order BO
+            business_order BO
         LEFT JOIN business_order_items BOI ON BOI.pid = BO.id
         LEFT JOIN basic_goods_desc BGD ON BGD.id = BOI.item_id
         <where>
@@ -706,7 +706,9 @@ ORDER BY
             AND BOI.is_deleted = 0
             and BO.bill_type = 'XS'
             AND BO.receipt_time IS NOT NULL
-            AND BO.tenant_id = '681169'
+            <if test="detailsVo.tenantId !=null and detailsVo.tenantId != ''">
+                AND BO.tenant_id = #{detailsVo.tenantId}
+            </if>
             <if test="detailsVo.brand != null and detailsVo.brand != ''">
                 AND BGD.brand like concat('%', #{detailsVo.brand}, '%')
             </if>
@@ -721,50 +723,56 @@ ORDER BY
             </if>
         </where>
         GROUP BY
-        BGD.brand,
-        BO.charge_member,
-        BOI.size,
-        BOI.price_type,
-        DATE_FORMAT( BO.receipt_time, '%Y-%m' )
-        order BY BO.charge_member desc
+            BGD.brand,
+            BO.charge_member,
+            BOI.size,
+            BOI.price_type,
+            DATE_FORMAT( BO.receipt_time, '%Y-%m' )
+        order BY
+            BO.charge_member desc
     </select>
 
     <select id="salesCommissionList" resultType="org.springblade.purchase.sales.excel.SalesCommissionExcel">
         SELECT
-            bgd.brand AS brand,
-            bo.saleman AS salesName,
-            DATE_FORMAT( bo.create_time, '%Y-%m' ) AS careteTime,
-            bgd.size AS specs,
-            SUM( boi.Actual_quantity ) AS quantity,
-            zboi.price_type AS priceType
-        FROM business_delivery bo
-        LEFT JOIN business_delivery_items boi on boi.pid = bo.id
-        LEFT JOIN basic_goods_desc bgd on bgd.id = boi.item_id
-        LEFT JOIN business_order_items zboi ON zboi.id = boi.src_id
+            BGD.brand AS brand,
+            BO.charge_member AS salesName,
+            DATE_FORMAT( BO.receipt_time, '%Y-%m' ) AS careteTime,
+            BOI.size AS specs,
+            sum( BOI.actual_quantity ) AS quantity,
+            BOI.price_type AS priceType
+        FROM
+            business_order BO
+        LEFT JOIN business_order_items BOI ON BOI.pid = BO.id
+        LEFT JOIN basic_goods_desc BGD ON BGD.id = BOI.item_id
         <where>
-            bo.bill_type = 'FH'
-            AND bo.is_deleted = 0
-            AND bo.tenant_id = #{detailsVo.tenantId}
+            BO.is_deleted = 0
+            AND BOI.is_deleted = 0
+            and BO.bill_type = 'XS'
+            AND BO.receipt_time IS NOT NULL
+            <if test="detailsVo.tenantId !=null and detailsVo.tenantId != ''">
+                AND BO.tenant_id = #{detailsVo.tenantId}
+            </if>
             <if test="detailsVo.brand != null and detailsVo.brand != ''">
-                AND bgd.Brand like concat('%', #{detailsVo.brand}, '%')
+                AND BGD.brand like concat('%', #{detailsVo.brand}, '%')
             </if>
             <if test="detailsVo.salesName != null and detailsVo.salesName != ''">
-                AND bo.saleman like concat('%', #{detailsVo.salesName}, '%')
+                AND BO.charge_member like concat('%', #{detailsVo.salesName}, '%')
             </if>
             <if test="detailsVo.beginCreateTime !=null and detailsVo.beginCreateTime != ''">
-                and bo.create_time >= #{detailsVo.beginCreateTime}
+                and BO.receipt_time >= #{detailsVo.beginCreateTime}
             </if>
             <if test="detailsVo.endCreateTime !=null and detailsVo.endCreateTime != ''">
-                and bo.create_time &lt;= #{detailsVo.endCreateTime}
+                and BO.receipt_time &lt;= #{detailsVo.endCreateTime}
             </if>
         </where>
         GROUP BY
-            bgd.brand,
-            bo.saleman,
-            bgd.size,
-            zboi.price_type,
-            DATE_FORMAT( bo.create_time, '%Y-%m' )
-        order BY bo.saleman desc
+            BGD.brand,
+            BO.charge_member,
+            BOI.size,
+            BOI.price_type,
+            DATE_FORMAT( BO.receipt_time, '%Y-%m' )
+        order BY
+            BO.charge_member desc
     </select>
 
     <select id="monthSales"  resultType="BigDecimal">