Browse Source

Merge remote-tracking branch 'origin/develop' into develop

‘linchangsheng’ 8 months ago
parent
commit
4c73142cbb

+ 2 - 1
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/CommonMapper.java

@@ -30,6 +30,7 @@ import com.gree.mall.manager.bean.settle.SettleMonthWagesWorkerVO;
 import com.gree.mall.manager.bean.settle.repair.*;
 import com.gree.mall.manager.bean.workorder.*;
 import com.gree.mall.manager.enums.UserTypeEnum;
+import com.gree.mall.manager.zfire.bean.WorkerParamBean;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -74,7 +75,7 @@ public interface CommonMapper {
      * @param zfireParamBean
      * @return
      */
-    public IPage<UserVO> userList(IPage page, @Param("ex") ZfireParamBean zfireParamBean, @Param("type")UserTypeEnum type);
+    public IPage<UserVO> userList(IPage page, @Param("ex") WorkerParamBean zfireParamBean, @Param("type")UserTypeEnum type);
 
 
     /**

+ 3 - 2
mall-server-api/src/main/java/com/gree/mall/manager/controller/member/MemberController.java

@@ -19,6 +19,7 @@ import com.gree.mall.manager.logic.user.UserLogic;
 import com.gree.mall.manager.plus.entity.*;
 import com.gree.mall.manager.utils.CommonUtils;
 import com.gree.mall.manager.utils.excel.ExcelUtils;
+import com.gree.mall.manager.zfire.bean.WorkerParamBean;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
 import io.swagger.annotations.Api;
@@ -75,7 +76,7 @@ public class MemberController {
     @PostMapping("/list/page2")
     @ApiOperation(value = "师傅列表-v2")
     public ResponseHelper<Page<UserVO>> page1(
-            @RequestBody ZfireParamBean zfireParamBean
+            @RequestBody WorkerParamBean zfireParamBean
     ) throws RemoteServiceException {
         IPage<UserVO> page = userLogic.page2(zfireParamBean);
         return ResponseHelper.success(page, new TypeReference<UserVO>() {
@@ -85,7 +86,7 @@ public class MemberController {
     @PostMapping("/list/page2/export")
     @ApiOperation(value = "师傅列表-导出-v2")
     public void page1Export(
-            @RequestBody ZfireParamBean zfireParamBean,
+            @RequestBody WorkerParamBean zfireParamBean,
             HttpServletRequest request,
             HttpServletResponse response
     ) throws Exception {

+ 3 - 2
mall-server-api/src/main/java/com/gree/mall/manager/logic/settle/repair/DailyImportSummaryLogic.java

@@ -250,6 +250,7 @@ public class DailyImportSummaryLogic {
 
         if (errorData.length() > 0) {
             errorData.append("已存在,导入失败");
+            throw new RemoteServiceException(errorData.toString());
         }
         return errorData.toString();
     }
@@ -289,8 +290,8 @@ public class DailyImportSummaryLogic {
         List<SettleWebsitWorkerDirector> list = settleWebsitWorkerDirectorService.lambdaQuery().list();
         List<String> notSettleIdcards = list.stream().map(SettleWebsitWorkerDirector::getIdcard).collect(Collectors.toList());
         //结算数据导入明细
-        List<SettleDailyImportSummaryItem> updateList = settleDailyImportSummaryItemService.lambdaQuery().
-                eq(SettleDailyImportSummaryItem::getImportBatchNo, importBatchNo)
+        List<SettleDailyImportSummaryItem> updateList = settleDailyImportSummaryItemService.lambdaQuery()
+                .eq(SettleDailyImportSummaryItem::getImportBatchNo, importBatchNo)
                 .in(SettleDailyImportSummaryItem::getSummaryStatus, DailyConstant.SUMMARY_STATUS_CAN_DO)
                 .in(SettleDailyImportSummaryItem::getOrderStatus, DailyConstant.SUMMARY_STATUS_ARRAY)
                 .list();

+ 4 - 2
mall-server-api/src/main/java/com/gree/mall/manager/logic/user/UserLogic.java

@@ -34,6 +34,7 @@ import com.gree.mall.manager.utils.CommonUtils;
 import com.gree.mall.manager.utils.RedisUtil;
 import com.gree.mall.manager.utils.StringUtil;
 import com.gree.mall.manager.utils.excel.ExcelUtils;
+import com.gree.mall.manager.zfire.bean.WorkerParamBean;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
 import lombok.RequiredArgsConstructor;
@@ -111,11 +112,12 @@ public class UserLogic {
      * @param userZfireParamBean
      * @return
      */
-    public IPage<UserVO> page2(ZfireParamBean userZfireParamBean) {
+    public IPage<UserVO> page2(WorkerParamBean userZfireParamBean) {
         AdminUserCom adminUser = commonLogic.getAdminUser();
+
         ZfireParamBean zfireParamBean = FieldUtils.supplyParam(userZfireParamBean, UserVO.class, adminUser);
 
-        IPage<UserVO> userVOIPage = commonMapper.userList(new Page(userZfireParamBean.getPageNum(), userZfireParamBean.getPageSize()), zfireParamBean, null);
+        IPage<UserVO> userVOIPage = commonMapper.userList(new Page(userZfireParamBean.getPageNum(), userZfireParamBean.getPageSize()), userZfireParamBean, null);
         return userVOIPage;
     }
 

+ 14 - 0
mall-server-api/src/main/java/com/gree/mall/manager/zfire/bean/WorkerParamBean.java

@@ -0,0 +1,14 @@
+package com.gree.mall.manager.zfire.bean;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class WorkerParamBean extends ZfireParamBean {
+
+    @ApiModelProperty(value = "是否按师傅编号分组")
+    private Boolean isGroupByWorkerId = Boolean.FALSE;
+
+}

+ 3 - 0
mall-server-api/src/main/resources/mapper/CommonMapper.xml

@@ -104,6 +104,9 @@
         </if>
         and a.apply_type='WORKER'
         AND a.worker_number IS NOT NULL
+        <if test="isGroupByWorkerId != null and isGroupByWorkerId == true">
+            GROUP BY a.worker_number
+        </if>
         ORDER BY FIELD(b.examine_status,'WAIT','OK','FAIL'),a.create_time DESC
     </select>