he2802 2 jaren geleden
bovenliggende
commit
50ba540995

+ 3 - 2
zhongzheng-admin-saas/src/main/java/com/zhongzheng/controller/financial/TopDivideLogController.java

@@ -110,9 +110,10 @@ public class TopDivideLogController extends BaseController {
     @ApiOperation("查询月份订单列表")
     @PreAuthorize("@ss.hasPermi('system:log:list')")
     @GetMapping("/monthOrderList")
-    public AjaxResult<List<TopDivideOrderVo>> getMonthOrderList(TopDivideOrderQueryBo bo) {
+    public TableDataInfo<TopDivideOrderVo> getMonthOrderList(TopDivideOrderQueryBo bo) {
+        startPage();
         List<TopDivideOrderVo> list = iTopDivideOrderService.getMonthOrderList(bo);
-        return AjaxResult.success(list);
+        return getDataTable(list);
     }
 
     @ApiOperation("查询打印月份订单列表")

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/financial/service/ITopDivideOrderService.java

@@ -14,6 +14,7 @@ import com.zhongzheng.modules.top.order.domain.TopOrderBankPay;
 import java.math.BigDecimal;
 import java.util.Collection;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 分成记录订单关联Service接口
@@ -57,6 +58,8 @@ public interface ITopDivideOrderService extends IService<TopDivideOrder> {
 
 	List<TopDivideOrderVo> getMonthOrderList(TopDivideOrderQueryBo bo);
 
+	Map<String,Object> getMonthOrderCount(TopDivideOrderQueryBo bo);
+
 	List<TopDivideOrderVo> getMonthOrderListWithPrint(TopDivideOrderQueryBo bo);
 
 	List<TopDivideOrderVo> getMonthFinishList(TopDivideOrderQueryBo bo);

+ 19 - 5
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/financial/service/impl/TopDivideOrderServiceImpl.java

@@ -23,10 +23,7 @@ import com.github.pagehelper.Page;
 
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -110,7 +107,10 @@ public class TopDivideOrderServiceImpl extends ServiceImpl<TopDivideOrderMapper,
 
     @Override
     public List<TopDivideOrderVo> getMonthOrderList(TopDivideOrderQueryBo bo) {
+        List<TopDivideOrderVo> allList = new ArrayList<>();
         List<TopDivideOrderVo> fList = baseMapper.getFinishList(bo);
+
+
         List<TopDivideOrderVo> rList;
         if(Validator.isEmpty(bo.getRoleId())){
             rList = baseMapper.getRefundList(bo);
@@ -126,10 +126,24 @@ public class TopDivideOrderServiceImpl extends ServiceImpl<TopDivideOrderMapper,
                 vo.setCheckStatus(2);
             }
         }
-        fList.addAll(rList);
+        if(Validator.isNotEmpty(bo.getOrderType())&&bo.getOrderType()==1){
+            allList.addAll(fList);
+        }
+        else if(Validator.isNotEmpty(bo.getOrderType())&&bo.getOrderType()==2){
+            allList.addAll(rList);
+        }
+        if(Validator.isEmpty(bo.getOrderType())){
+            allList.addAll(fList);
+            allList.addAll(rList);
+        }
         return fList;
     }
 
+    @Override
+    public Map<String, Object> getMonthOrderCount(TopDivideOrderQueryBo bo) {
+        return null;
+    }
+
     @Override
     public List<TopDivideOrderVo> getMonthOrderListWithPrint(TopDivideOrderQueryBo bo) {
         List<TopDivideOrderVo> fList = baseMapper.getFinishList(bo);

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/financial/vo/TopDivideOrderVo.java

@@ -110,4 +110,6 @@ public class TopDivideOrderVo {
 	private Long orderCreateTime;
 	@ApiModelProperty("业务层次列表")
 	private List<String> businessList;
+
+
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/goods/service/impl/TopOldOrderCheckLogServiceImpl.java

@@ -171,6 +171,7 @@ public class TopOldOrderCheckLogServiceImpl extends ServiceImpl<TopOldOrderCheck
                         .eq(TopOldOrderCheckLog::getType, 5)//分成审核
                         .eq(TopOldOrderCheckLog::getStatus, 1)
                         .eq(TopOldOrderCheckLog::getCheckFrom, checkLog.getCheckFrom()));
+        Integer haveMin = count();
         checkLog.setCheckTime(DateUtils.getNowTime());
         checkLog.setCheckUsername(bo.getLoginName());
         checkLog.setCheckReason(bo.getCheckReason());

+ 6 - 6
zhongzheng-system/src/main/resources/mapper/modules/top/TopDivideLogMapper.xml

@@ -46,13 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item}
             </foreach>
         </if>
-        <if test="monthTime != null and monthTime != ''">
+        <if test="monthTime != null and monthTime.size()!=0">
             AND dl.month_time in
             <foreach collection="monthTime" item="item" index="index" open="(" close=")" separator=",">
                 #{item}
             </foreach>
         </if>
-        <if test="tenantIds != null and tenantIds != ''">
+        <if test="tenantIds != null and tenantIds.size()!=0">
             AND dl.tenant_id in
             <foreach collection="tenantIds" item="item" index="index" open="(" close=")" separator=",">
                 #{item}
@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             bcl.check_from = 2
             AND bcl.check_status = 0
             AND bcl.check_sign = 1
-            <if test="roleIds != null and roleIds != ''">
+            <if test="roleIds != null and roleIds.size()!=0">
                 AND bcl.role_id in
                 <foreach collection="roleIds" item="item" index="index" open="(" close=")" separator=",">
                     #{item}
@@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             bcl.check_from = 2
             AND bcl.check_status = 0
             AND bcl.check_sign = 1
-            <if test="roleIds != null and roleIds != ''">
+            <if test="roleIds != null and roleIds.size()!=0">
                 AND bcl.role_id not in
                 <foreach collection="roleIds" item="item" index="index" open="(" close=")" separator=",">
                     #{item}
@@ -133,13 +133,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="checkFrom != null and checkFrom != ''">
             AND cl.check_from = #{checkFrom}
         </if>
-        <if test="checkStatus != null and checkStatus != ''">
+        <if test="checkStatus != null and checkStatus.size()!=0">
             AND cl.check_status in
             <foreach collection="checkStatus" item="item" index="index" open="(" close=")" separator=",">
                 #{item}
             </foreach>
         </if>
-        <if test="monthTime != null and monthTime != ''">
+        <if test="monthTime != null and monthTime.size()!=0">
             AND dl.month_time in
             <foreach collection="monthTime" item="item" index="index" open="(" close=")" separator=",">
                 #{item}

+ 27 - 0
zhongzheng-system/src/main/resources/mapper/modules/top/TopDivideOrderMapper.xml

@@ -49,6 +49,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="endPrice != null and endPrice != ''">
             AND (oo.order_price - oo.pretax_brokerage) <![CDATA[ <= ]]> #{endPrice}
         </if>
+        <if test="orderSn != null and orderSn != ''">
+            AND oo.order_sn = #{orderSn}
+        </if>
+        <if test="accomplishStartTime != null ">
+            AND oo.accomplish_time <![CDATA[ >= ]]> #{accomplishStartTime}
+        </if>
+        <if test="accomplishEndTime != null ">
+            AND oo.accomplish_time <![CDATA[ <= ]]> #{accomplishEndTime}
+        </if>
+        <if test="checkStatus != null and checkStatus == 0">
+            AND ocl.check_status <![CDATA[ <= ]]> 0
+        </if>
+        <if test="checkStatus != null and checkStatus == 1">
+            AND ocl.check_status <![CDATA[ >= ]]> 1
+        </if>
     </select>
 
     <select id="getRefundList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideOrderQueryBo"  resultType="com.zhongzheng.modules.top.financial.vo.TopDivideOrderVo">
@@ -79,6 +94,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="endPrice != null and endPrice != ''">
             AND (oo.order_price - oo.pretax_brokerage) <![CDATA[ <= ]]> #{endPrice}
         </if>
+        <if test="orderSn != null and orderSn != ''">
+            AND oo.order_sn = #{orderSn}
+        </if>
+        <if test="accomplishStartTime != null ">
+            AND tor.refund_time <![CDATA[ >= ]]> #{accomplishStartTime}
+        </if>
+        <if test="accomplishEndTime != null ">
+            AND tor.refund_time <![CDATA[ <= ]]> #{accomplishEndTime}
+        </if>
+        <if test="checkStatus != null and checkStatus == 0">
+            AND 1=0
+        </if>
     </select>
 
     <select id="getBusinessList" parameterType="String"  resultType="String">