소스 검색

Merge remote-tracking branch 'origin/master'

‘linchangsheng’ 7 달 전
부모
커밋
968a3216c6

+ 3 - 0
src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoOrderBean.java

@@ -200,6 +200,9 @@ public class EnginInfoOrderBean {
     @ApiModelProperty(value = "审批结果")
     private boolean examineResult = false;
 
+    @ApiModelProperty(value = "工程类型")
+    private String enginOrderType;
+
     public EnginInfoOrder handleTargetInfo(AdminUserCom adminUser) {
 //        ProductCategory productCategory = productCategoryService.lambdaQuery()
 //                .eq(ProductCategory::getProductCategoryId, this.mainId)

+ 1 - 1
src/main/java/com/zfire/mall/manager/commonmapper/engin/info/EnginInfoOrderReserveMapper.java

@@ -22,7 +22,7 @@ public interface EnginInfoOrderReserveMapper {
                                            List<String> examineStatus, String specification, String startOrderDate, String endOrderDate,
                                            Boolean isClose,
                                            List<String> adminCompanyIds,
-                                           List<String> serviceIds, String customerId);
+                                           List<String> serviceIds, String customerId, String enginOrderType);
 
     EnginInfoOrderBean detail(String id, List<String> adminCompanyIds, List<String> serviceIds, String customerId);
 

+ 1 - 1
src/main/java/com/zfire/mall/manager/commonmapper/engin/info/EnginInfoReserveMapper.java

@@ -15,7 +15,7 @@ public interface EnginInfoReserveMapper {
                                       String enginSignType, String startContractExpireDate,
                                       String endContractExpireDate,
                                       String createName, String confirmName, String examineStatus, String serviceId, String specification, List<String> adminCompanyIds,
-                                      List<String> serviceIds, String customerId,Boolean isClose);
+                                      List<String> serviceIds, String customerId, Boolean isClose, String enginOrderType);
 
     EnginInfoBean detail(String id, List<String> adminCompanyIds, List<String> serviceIds, String customerId);
 

+ 2 - 1
src/main/java/com/zfire/mall/manager/controller/engin/info/EnginInfoController.java

@@ -46,12 +46,13 @@ public class EnginInfoController {
             @ApiParam(value = "业务员") @RequestParam(required = false) String serviceId,
             @ApiParam(value = "规格型号") @RequestParam(required = false) String specification,
             @ApiParam(value = "是否关闭 true=关闭 false=正常") @RequestParam(required = false) Boolean isClose,
+            @ApiParam(value = "工程类型 TRADE=商用 HOME=家用") @RequestParam(required = false) String enginOrderType,
             @ApiParam(value = "页号",required = true)@RequestParam Integer pageNum,
             @ApiParam(value = "页大小",required = true)@RequestParam Integer pageSize
     ) throws Exception {
         IPage<EnginInfoListBean> listPage = enginInfoLogic.listPage(enginInfoNo, productCategoryId, customerKeyWord, projectName, orderType,
                 useUnit, installAddress, projectNo, enginFactoryNo, enginSignType, startContractExpireDate,
-                endContractExpireDate, createName, confirmName, examineStatus, serviceId, specification,isClose, pageNum, pageSize);
+                endContractExpireDate, createName, confirmName, examineStatus, serviceId, specification,isClose, enginOrderType, pageNum, pageSize);
         return ResponseHelper.success(listPage);
     }
 

+ 51 - 49
src/main/java/com/zfire/mall/manager/controller/engin/info/EnginInfoOrderController.java

@@ -35,7 +35,7 @@ import java.util.concurrent.locks.Lock;
 
 @Slf4j
 @RestController
-@Api(value = "工程信息单", tags ={"工程信息单"} )
+@Api(value = "工程信息单", tags = {"工程信息单"})
 @RequestMapping(value = "/engin-info-order", produces = "application/json; charset=utf-8")
 public class EnginInfoOrderController {
 
@@ -69,12 +69,13 @@ public class EnginInfoOrderController {
             @ApiParam(value = "单据状态 SAVE=保存 WAIT=待审核 OK=通过 FAIL=不通过 CLOSE=关闭") @RequestParam(required = false) List<String> examineStatus,
             @ApiParam(value = "规格型号") @RequestParam(required = false) String specification,
             @ApiParam(value = "true=关闭,false=未关闭") @RequestParam(required = false) Boolean isClose,
-            @ApiParam(value = "页号",required = true)@RequestParam Integer pageNum,
-            @ApiParam(value = "页大小",required = true)@RequestParam Integer pageSize
+            @ApiParam(value = "工程类型 TRADE=商用 HOME=家用") @RequestParam(required = false) String enginOrderType,
+            @ApiParam(value = "页号", required = true) @RequestParam Integer pageNum,
+            @ApiParam(value = "页大小", required = true) @RequestParam Integer pageSize
     ) throws Exception {
         IPage<EnginInfoOrderListBean> listPage = enginInfoOrderLogic.listPage(enginInfoNo, productCategoryId, customerKeyword, projectName, machineType,
                 useUnit, installAddress, projectNo, enginFactoryNo, enginSignType, serviceId, startContractExpireDate, endContractExpireDate, createName,
-                confirmName, examineStatus, specification, startOrderDate, endOrderDate,isClose, pageNum, pageSize);
+                confirmName, examineStatus, specification, startOrderDate, endOrderDate, isClose, enginOrderType, pageNum, pageSize);
         return ResponseHelper.success(listPage);
     }
 
@@ -100,7 +101,7 @@ public class EnginInfoOrderController {
     public ResponseHelper edit(
             @ApiParam(required = true, value = "工程信息单")
             @RequestBody
-            @Validated(value = { EditGroup.class, Default.class }) EnginInfoOrderBean enginInfoOrderBean
+            @Validated(value = {EditGroup.class, Default.class}) EnginInfoOrderBean enginInfoOrderBean
     ) throws Exception {
         return getResponseHelper(enginInfoOrderBean, "edit");
     }
@@ -110,7 +111,7 @@ public class EnginInfoOrderController {
     public ResponseHelper submit(
             @ApiParam(required = true, value = "工程信息单")
             @RequestBody
-            @Validated(value = { SubmitGroup.class, Default.class }) EnginInfoOrderBean enginInfoOrderBean
+            @Validated(value = {SubmitGroup.class, Default.class}) EnginInfoOrderBean enginInfoOrderBean
     ) throws Exception {
         return getResponseHelper(enginInfoOrderBean, "submit");
     }
@@ -130,7 +131,7 @@ public class EnginInfoOrderController {
     public ResponseHelper examine(
             @ApiParam(required = true, value = "工程信息单")
             @RequestBody
-            @Validated(value = { EditGroup.class, Default.class }) EnginInfoOrderBean enginInfoOrderBean
+            @Validated(value = {EditGroup.class, Default.class}) EnginInfoOrderBean enginInfoOrderBean
     ) throws Exception {
         if (commonLogic.getAdminUser(true).getIsCustomer()) {
             throw new RemoteServiceException("暂无权限操作");
@@ -149,8 +150,8 @@ public class EnginInfoOrderController {
             if (obtain.tryLock(5, TimeUnit.SECONDS)) {
                 enginInfoOrderLogic.revoke(id);
             }
-        } catch(Exception e) {
-            log.error("【工程信息单处理】失败",e);
+        } catch (Exception e) {
+            log.error("【工程信息单处理】失败", e);
             throw e;
         } finally {
             obtain.unlock();
@@ -174,8 +175,8 @@ public class EnginInfoOrderController {
             if (obtain.tryLock(5, TimeUnit.SECONDS)) {
                 enginInfoOrderLogic.updInfoOrder(detail);
             }
-        } catch(Exception e) {
-            log.error("【工程信息单处理】失败",e);
+        } catch (Exception e) {
+            log.error("【工程信息单处理】失败", e);
             throw e;
         } finally {
             obtain.unlock();
@@ -204,7 +205,7 @@ public class EnginInfoOrderController {
                 enginInfoOrderLogic.delItem(enginInfoNo, itemId);
                 return ResponseHelper.success();
             }
-        } catch(Exception e) {
+        } catch (Exception e) {
             log.error("【工程信息单明细处理】失败", e);
             throw e;
         } finally {
@@ -217,7 +218,7 @@ public class EnginInfoOrderController {
     @PostMapping("/abandon")
     @ApiOperation("弃审")
     public ResponseHelper homeAbandon(
-            @ApiParam(value = "id",required = true) @RequestParam String id
+            @ApiParam(value = "id", required = true) @RequestParam String id
     ) throws Exception {
         if (commonLogic.getAdminUser(true).getIsCustomer()) {
             throw new RemoteServiceException("暂无权限操作");
@@ -227,8 +228,8 @@ public class EnginInfoOrderController {
             if (obtain.tryLock(5, TimeUnit.SECONDS)) {
                 enginInfoOrderLogic.abandon(id);
             }
-        } catch(Exception e) {
-            log.error("【工程订单处理】失败",e);
+        } catch (Exception e) {
+            log.error("【工程订单处理】失败", e);
             throw e;
         } finally {
             obtain.unlock();
@@ -243,8 +244,8 @@ public class EnginInfoOrderController {
             if (obtain.tryLock(5, TimeUnit.SECONDS)) {
                 enginInfoOrderLogic.execHandler(enginInfoOrderBean, operType);
             }
-        } catch(Exception e) {
-            log.error("【工程信息单处理】失败",e);
+        } catch (Exception e) {
+            log.error("【工程信息单处理】失败", e);
             throw e;
         } finally {
             obtain.unlock();
@@ -275,13 +276,14 @@ public class EnginInfoOrderController {
             @ApiParam(value = "单据状态 SAVE=保存 WAIT=待审核 OK=通过 FAIL=不通过 CLOSE=关闭") @RequestParam(required = false) List<String> examineStatus,
             @ApiParam(value = "规格型号") @RequestParam(required = false) String specification,
             @ApiParam(value = "true=关闭,false=未关闭") @RequestParam(required = false) Boolean isClose,
+            @ApiParam(value = "工程类型 TRADE=商用 HOME=家用") @RequestParam(required = false) String enginOrderType,
             HttpServletRequest request, HttpServletResponse response
     ) throws Exception {
         IPage<EnginInfoOrderListBean> listPage = enginInfoOrderLogic.listPage(enginInfoNo, productCategoryId, customerKeyword, projectName, orderType,
                 useUnit, installAddress, projectNo, enginFactoryNo, enginSignType, serviceId, startContractExpireDate, endContractExpireDate, createName,
-                confirmName, examineStatus, specification, startOrderDate, endOrderDate, isClose,1, -1);
+                confirmName, examineStatus, specification, startOrderDate, endOrderDate, isClose, enginOrderType, 1, -1);
         ExcelData excelData = enginInfoOrderLogic.export(listPage.getRecords());
-        ExcelUtils.exportExcel(request,response,"工程信息单.xlsx",excelData);
+        ExcelUtils.exportExcel(request, response, "工程信息单.xlsx", excelData);
     }
 
     @ApiOperation(value = "单据日期修改")
@@ -296,8 +298,8 @@ public class EnginInfoOrderController {
                 enginInfoOrderLogic.updInfoOrder(enginInfoOrderBean);
                 return ResponseHelper.success();
             }
-        } catch(Exception e) {
-            log.error("【工程订单处理】失败",e);
+        } catch (Exception e) {
+            log.error("【工程订单处理】失败", e);
             throw e;
         } finally {
             obtain.unlock();
@@ -310,28 +312,28 @@ public class EnginInfoOrderController {
     public void download(
             HttpServletResponse response
     ) throws IOException {
-        CommonUtils.downloadFile("商用信息单明细模板.xlsx",response);
+        CommonUtils.downloadFile("商用信息单明细模板.xlsx", response);
     }
 
 
     @GetMapping("/exec/list")
     @ApiOperation("商用信息单-执行明细")
     public ResponseHelper<IPage<EnginInfoSaleExecBean>> execList(
-            @ApiParam(value = "信息单日期开始时间",required = false) @RequestParam(required = false) String startOrderDate,
-            @ApiParam(value = "信息单日期结束时间",required = false) @RequestParam(required = false) String endOrderDate,
-            @ApiParam(value = "客户id",required = false) @RequestParam(required = false) String customerId,
-            @ApiParam(value = "项目名称",required = false) @RequestParam(required = false) String refProjectName,
-            @ApiParam(value = "机型型号",required = false) @RequestParam(required = false) String specification,
-            @ApiParam(value = "工程编号",required = false) @RequestParam(required = false) String refEnginRecordNo,
-            @ApiParam(value = "业务员",required = false) @RequestParam(required = false) String serviceId,
-            @ApiParam(value = "是否关闭 true=是 false=否",required = false) @RequestParam(required = false) Boolean isClose,
-            @ApiParam(value = "审核人",required = false) @RequestParam(required = false) String confirmName,
-            @ApiParam(value = "pageNum",required = true) @RequestParam(required = true) Integer pageNum,
-            @ApiParam(value = "pageSize",required = true) @RequestParam(required = true) Integer pageSize
-    ){
+            @ApiParam(value = "信息单日期开始时间", required = false) @RequestParam(required = false) String startOrderDate,
+            @ApiParam(value = "信息单日期结束时间", required = false) @RequestParam(required = false) String endOrderDate,
+            @ApiParam(value = "客户id", required = false) @RequestParam(required = false) String customerId,
+            @ApiParam(value = "项目名称", required = false) @RequestParam(required = false) String refProjectName,
+            @ApiParam(value = "机型型号", required = false) @RequestParam(required = false) String specification,
+            @ApiParam(value = "工程编号", required = false) @RequestParam(required = false) String refEnginRecordNo,
+            @ApiParam(value = "业务员", required = false) @RequestParam(required = false) String serviceId,
+            @ApiParam(value = "是否关闭 true=是 false=否", required = false) @RequestParam(required = false) Boolean isClose,
+            @ApiParam(value = "审核人", required = false) @RequestParam(required = false) String confirmName,
+            @ApiParam(value = "pageNum", required = true) @RequestParam(required = true) Integer pageNum,
+            @ApiParam(value = "pageSize", required = true) @RequestParam(required = true) Integer pageSize
+    ) {
         IPage<EnginInfoSaleExecBean> page = enginInfoOrderLogic
                 .queryEnginInfoSaleExec(startOrderDate, endOrderDate, customerId, refProjectName, specification,
-                        refEnginRecordNo, serviceId,isClose,confirmName, pageNum, pageSize);
+                        refEnginRecordNo, serviceId, isClose, confirmName, pageNum, pageSize);
         return ResponseHelper.success(page);
     }
 
@@ -339,23 +341,23 @@ public class EnginInfoOrderController {
     @GetMapping("/exec/export")
     @ApiOperation("商用信息单-执行明细-导出")
     public void exportExecList(
-            @ApiParam(value = "信息单日期开始时间",required = false) @RequestParam(required = false) String startOrderDate,
-            @ApiParam(value = "信息单日期结束时间",required = false) @RequestParam(required = false) String endOrderDate,
-            @ApiParam(value = "客户id",required = false) @RequestParam(required = false) String customerId,
-            @ApiParam(value = "项目名称",required = false) @RequestParam(required = false) String refProjectName,
-            @ApiParam(value = "机型型号",required = false) @RequestParam(required = false) String specification,
-            @ApiParam(value = "工程编号",required = false) @RequestParam(required = false) String refEnginRecordNo,
-            @ApiParam(value = "业务员",required = false) @RequestParam(required = false) String serviceId,
-            @ApiParam(value = "是否关闭 true=是 false=否",required = false) @RequestParam(required = false) Boolean isClose,
-            @ApiParam(value = "审核人",required = false) @RequestParam(required = false) String confirmName,
+            @ApiParam(value = "信息单日期开始时间", required = false) @RequestParam(required = false) String startOrderDate,
+            @ApiParam(value = "信息单日期结束时间", required = false) @RequestParam(required = false) String endOrderDate,
+            @ApiParam(value = "客户id", required = false) @RequestParam(required = false) String customerId,
+            @ApiParam(value = "项目名称", required = false) @RequestParam(required = false) String refProjectName,
+            @ApiParam(value = "机型型号", required = false) @RequestParam(required = false) String specification,
+            @ApiParam(value = "工程编号", required = false) @RequestParam(required = false) String refEnginRecordNo,
+            @ApiParam(value = "业务员", required = false) @RequestParam(required = false) String serviceId,
+            @ApiParam(value = "是否关闭 true=是 false=否", required = false) @RequestParam(required = false) Boolean isClose,
+            @ApiParam(value = "审核人", required = false) @RequestParam(required = false) String confirmName,
             HttpServletRequest request,
             HttpServletResponse response
     ) throws Exception {
         IPage<EnginInfoSaleExecBean> page = enginInfoOrderLogic
                 .queryEnginInfoSaleExec(startOrderDate, endOrderDate, customerId, refProjectName, specification,
-                        refEnginRecordNo, serviceId,isClose,confirmName, 1, -1);
+                        refEnginRecordNo, serviceId, isClose, confirmName, 1, -1);
         ExcelData excelData = enginInfoOrderLogic.exportExec(page.getRecords());
-        ExcelUtils.exportExcel(request,response,"信息单执行明细.xlsx",excelData);
+        ExcelUtils.exportExcel(request, response, "信息单执行明细.xlsx", excelData);
     }
 
 
@@ -371,10 +373,10 @@ public class EnginInfoOrderController {
     @PostMapping("/close/update")
     @ApiOperation("打开/关闭信息单")
     public ResponseHelper updateClose(
-            @ApiParam(value = "信息单id",required = true) @RequestParam(required = true) String enginInfoId,
-            @ApiParam(value = "true=关闭 false=不关闭",required = true) @RequestParam(required = true) Boolean isClose
+            @ApiParam(value = "信息单id", required = true) @RequestParam(required = true) String enginInfoId,
+            @ApiParam(value = "true=关闭 false=不关闭", required = true) @RequestParam(required = true) Boolean isClose
     ) throws Exception {
-        enginInfoOrderLogic.updateClose(enginInfoId,isClose);
+        enginInfoOrderLogic.updateClose(enginInfoId, isClose);
         return ResponseHelper.success();
     }
 }

+ 6 - 4
src/main/java/com/zfire/mall/manager/logic/engin/info/EnginInfoLogic.java

@@ -42,12 +42,14 @@ public class EnginInfoLogic {
                                              String projectNo, String enginFactoryNo, String enginSignType,
                                              String startContractExpireDate, String endContractExpireDate, String createName,
                                              String confirmName, String examineStatus,
-                                             String serviceId, String specification,Boolean isClose, Integer pageNum, Integer pageSize) {
+                                             String serviceId, String specification, Boolean isClose, String enginOrderType,
+                                             Integer pageNum, Integer pageSize) {
         AdminUserCom adminUser = commonLogic.getAdminUser(true);
         String customerId = adminUser.getIsCustomer() ? adminUser.getCustomerId() : "";
-        return enginInfoReserveMapper.listPage(new Page<>(pageNum, pageSize), enginInfoNo, productCategoryId, customerKeyWord, projectName, machineType,
-                useUnit, installAddress, projectNo, enginFactoryNo, enginSignType, startContractExpireDate, endContractExpireDate, createName,
-                confirmName, examineStatus, serviceId, specification, adminUser.getAdminCompanyIds(), adminUser.getServiceIds(), customerId,isClose);
+        return enginInfoReserveMapper.listPage(new Page<>(pageNum, pageSize), enginInfoNo, productCategoryId, customerKeyWord,
+                projectName, machineType, useUnit, installAddress, projectNo, enginFactoryNo, enginSignType,
+                startContractExpireDate, endContractExpireDate, createName, confirmName, examineStatus, serviceId,
+                specification, adminUser.getAdminCompanyIds(), adminUser.getServiceIds(), customerId, isClose, enginOrderType);
     }
 
     public EnginInfoBean detail(String id) {

+ 3 - 2
src/main/java/com/zfire/mall/manager/logic/engin/info/EnginInfoOrderLogic.java

@@ -67,7 +67,8 @@ public class EnginInfoOrderLogic {
                                                   String projectNo, String enginFactoryNo, String enginSignType, String serviceId,
                                                   String startContractExpireDate, String endContractExpireDate, String createName,
                                                   String confirmName, List<String> examineStatus, String specification,
-                                                  String startOrderDate, String endOrderDate,Boolean isClose, Integer pageNum, Integer pageSize) {
+                                                  String startOrderDate, String endOrderDate, Boolean isClose, String enginOrderType,
+                                                  Integer pageNum, Integer pageSize) {
         AdminUserCom adminUser = commonLogic.getAdminUser(true);
         String customerId = adminUser.getIsCustomer() ? adminUser.getCustomerId() : "";
 
@@ -78,7 +79,7 @@ public class EnginInfoOrderLogic {
 
         return enginInfoOrderReserveMapper.listPage(new Page<>(pageNum, pageSize), enginInfoNo, productCategoryId, customerKeyword, projectName, machineType,
                 useUnit, installAddress, projectNo, enginFactoryNo, enginSignType, serviceId, startContractExpireDate, endContractExpireDate, createName, confirmName, examineStatus,
-                specification,  startOrderDate, endOrderDate,isClose, adminUser.getAdminCompanyIds(), adminUser.getServiceIds(), customerId);
+                specification,  startOrderDate, endOrderDate,isClose, adminUser.getAdminCompanyIds(), adminUser.getServiceIds(), customerId, enginOrderType);
 
     }
 

+ 3 - 0
src/main/resources/mapper/EnginInfoOrderReserveMapper.xml

@@ -166,6 +166,9 @@
             <if test="isClose != null">
                 and a.is_close = #{isClose}
             </if>
+            <if test="enginOrderType != null and enginOrderType != ''">
+                and a.engin_order_type = #{enginOrderType}
+            </if>
             <if test="examineStatus != null and examineStatus.size > 0">
                 AND a.examine_status in
                 <foreach item="item" index="index" collection="examineStatus" open="(" separator=","

+ 3 - 0
src/main/resources/mapper/EnginInfoReserveMapper.xml

@@ -138,6 +138,9 @@
             <if test="isClose != null">
                 and a.is_close = #{isClose}
             </if>
+            <if test="enginOrderType != null and enginOrderType != ''">
+                AND a.engin_order_type = #{enginOrderType}
+            </if>
             <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
                 AND a.admin_company_id in
                 <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator=","