From c55205c535f15d1426fe32a2ebb32af6a6d5c2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Fri, 8 Nov 2024 13:28:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=98=E5=B7=A5=E6=8F=90=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 58 ++++++++++-- .../inspection/entity/InspectionWorkNode.java | 8 +- .../mapper/InspectionWorkNodeMapper.java | 6 ++ .../service/IInspectionWorkNodeService.java | 12 +++ .../impl/InspectionWorkNodeServiceImpl.java | 19 ++++ .../mapper/InspectionWorkNodeMapper.xml | 91 +++++++++++++++++++ 6 files changed, 185 insertions(+), 9 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java index 2da08cc9..24a66f91 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java @@ -107,7 +107,7 @@ public class InspectionInfoController extends BaseController { @RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum, @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) { Page page = new Page<>(pageNum, pageSize); - return success(inspectionInfoService.geStelectInspection(page,inspectionInfo)); + return success(inspectionInfoService.geStelectInspection(page, inspectionInfo)); } /** @@ -130,39 +130,83 @@ public class InspectionInfoController extends BaseController { * @return */ @PostMapping("orderTaking") - public CommonResult orderTaking(Integer inspectionId,String workNodeId) { + public CommonResult orderTaking(Integer inspectionId, String workNodeId) { inspectionWorkNodeService.updateInspectionWorkNode(inspectionId, workNodeId); return success("接单成功"); } /** * 项目操作(退办理、重审、项目完成) + * * @param inspectionWorkNode */ @PostMapping("controls") - public CommonResult controls(@RequestBody InspectionWorkNode inspectionWorkNode){ + public CommonResult controls(@RequestBody InspectionWorkNode inspectionWorkNode) { inspectionWorkNodeService.updateImageAndStep(inspectionWorkNode); return success("操作成功"); } /** * 通过工单id获取工单流程 + * * @param inspectionId * @return */ @GetMapping("getWeorkNodesById") public CommonResult getWeorkNodesById(Integer inspectionId) { return success(inspectionInfoService.getWeorkNodesById(inspectionId)); - } + } /** * 判断是否需要上传图片 + * * @param inspectionId * @param workNodeId * @return */ @GetMapping("orImages") - public CommonResult orImages(Integer inspectionId, String workNodeId){ - return success(inspectionWorkNodeService.orImages(inspectionId,workNodeId)); - } + public CommonResult orImages(Integer inspectionId, String workNodeId) { + return success(inspectionWorkNodeService.orImages(inspectionId, workNodeId)); + } + + /** + * 分页查询节点提成 + * @param inspectionWorkNode + * @param pageNum + * @param pageSize + * @return + */ + @GetMapping("getRoyaltyList") + public CommonResult getRoyaltyList(InspectionWorkNode inspectionWorkNode, + @RequestParam(value = "pageNo", required = false, defaultValue = "1") Integer pageNum, + @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) { + IPage page = new Page(pageNum, pageSize); + return success(inspectionWorkNodeService.getRoyaltyList(page, inspectionWorkNode)); + } + + /** + * 获取提成总金额 + * @param inspectionWorkNode + * @return + */ + @GetMapping("getRoyaltySum") + public CommonResult getRoyaltySum(InspectionWorkNode inspectionWorkNode) { + return success(inspectionWorkNodeService.getRoyaltySum(inspectionWorkNode)); + } + + + /** + * app分页查询节点提成 + * @param pageNum + * @param pageSize + * @return + */ + @GetMapping("getRoyaltyList") + public CommonResult getRoyaltyListApp(@RequestParam(value = "pageNo", required = false, defaultValue = "1") Integer pageNum, + @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) { + InspectionWorkNode inspectionWorkNode = new InspectionWorkNode(); + inspectionWorkNode.setDealUserId(getUserId()); + IPage page = new Page(pageNum, pageSize); + return success(inspectionWorkNodeService.getRoyaltyList(page, inspectionWorkNode)); + } } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java index 6015811f..4c1536fe 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionWorkNode.java @@ -92,6 +92,10 @@ public class InspectionWorkNode extends TenantBaseDO { @TableField(exist = false) private String projectName; - - + @TableField(exist = false) + private String rescueStartMonth; + @TableField(exist = false) + private String rescueStart; + @TableField(exist = false) + private String rescueEnd; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java index 5be98f40..3340c22a 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionWorkNodeMapper.java @@ -2,9 +2,12 @@ package cn.iocoder.yudao.module.inspection.mapper; import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** *

@@ -23,4 +26,7 @@ public interface InspectionWorkNodeMapper extends BaseMapper * @return */ List getWeorkNodesById(Integer inspectionId); + + IPage getRoyaltyList(@Param("page")IPage page,@Param("inspectionWorkNode") InspectionWorkNode inspectionWorkNode); + Map getRoyaltySum(@Param("inspectionWorkNode") InspectionWorkNode inspectionWorkNode); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java index 225e7148..d1d16fb2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionWorkNodeService.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.inspection.service; import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; +import java.util.Map; /** *

@@ -35,4 +37,14 @@ public interface IInspectionWorkNodeService extends IService List getWeorkNodesById(Integer inspectionId); boolean orImages(Integer inspectionId, String workNodeId); + + /** + * 分页查询提成 + * @param page + * @param inspectionWorkNode + * @return + */ + IPage getRoyaltyList(IPage page, InspectionWorkNode inspectionWorkNode); + + Map getRoyaltySum(InspectionWorkNode inspectionWorkNode); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java index 34177f59..d74d7944 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionWorkNodeServiceImpl.java @@ -17,12 +17,14 @@ import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.service.user.AdminUserService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; +import java.util.Map; /** *

@@ -217,6 +219,23 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl getRoyaltyList(IPage page, InspectionWorkNode inspectionWorkNode) { + return baseMapper.getRoyaltyList(page, inspectionWorkNode); + } + + @Override + public Map getRoyaltySum(InspectionWorkNode inspectionWorkNode) { + return baseMapper.getRoyaltySum(inspectionWorkNode); + } + /** * 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目 * diff --git a/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml index 7799e5ca..8de93f84 100644 --- a/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml @@ -10,4 +10,95 @@ WHERE wn.inspection_info_id = #{inspectionId} ORDER BY wn.order_num ASC + +