From a83b5985ff23f71e83d16b5fb7032da2a8cd2097 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, 1 Nov 2024 09:17:31 +0800 Subject: [PATCH 01/28] =?UTF-8?q?=E8=A7=A3=E5=86=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/inspection/mapper/InspectionWorkNodeMapper.java | 2 ++ 1 file changed, 2 insertions(+) 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 5209740e..088f2325 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,6 +2,7 @@ package cn.iocoder.yudao.module.inspection.mapper; import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; /** *

@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @author dianliang * @since 2024-10-31 */ +@Mapper public interface InspectionWorkNodeMapper extends BaseMapper { } From 4a90687814372a45f55626625c2fe10857e6d08c Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Fri, 1 Nov 2024 20:21:58 +0800 Subject: [PATCH 02/28] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=92=8C=E5=88=A0=E9=99=A4=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/DlRepairTicketsController.java | 14 ++++++++++++++ .../service/DlRepairTicketsService.java | 9 +++++++++ .../impl/DlRepairTicketsServiceImpl.java | 18 ++++++++++++++++++ .../src/main/resources/application-local.yaml | 2 ++ 4 files changed, 43 insertions(+) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java index 93cc3124..41fe1162 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java @@ -348,5 +348,19 @@ public class DlRepairTicketsController { dlRepairTicketsService.updateTicket(respVO); return CommonResult.ok(); } + + /** + * 删除工单 + * + * @author 小李 + * @date 20:05 2024/11/1 + * @param id 工单ID + **/ + @DeleteMapping("/remove") + @Operation(summary = "删除工单") + public CommonResult removeTicketById(@RequestParam("id") String id) { + dlRepairTicketsService.removeTicketById(id); + return CommonResult.ok(); + } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java index a29750f8..97151564 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java @@ -226,4 +226,13 @@ public interface DlRepairTicketsService extends IService { * @param respVO 请求对象 **/ void updateTicket(DlRepairTicketsRespVO respVO); + + /** + * 删除工单 + * + * @author 小李 + * @date 20:05 2024/11/1 + * @param id 工单ID + **/ + void removeTicketById(String id); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index 247cae51..f8798a7a 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -1528,6 +1528,24 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl().eq(RepairOrderInfo::getGoodsId, id)); + // 删除工单 + baseMapper.deleteById(id); + // 删除工单子表 + titemService.remove(new LambdaQueryWrapper().eq(DlRepairTitem::getTicketId, id)); + } } diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 314f6e42..1b9cd8ce 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -56,6 +56,8 @@ spring: # url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例 username: lanan_dev password: lighting@2024 +# username: lanan +# password: 123456 # username: sa # SQL Server 连接的示例 # password: Yudao@2024 # SQL Server 连接的示例 # username: SYSDBA # DM 连接的示例 From 6b4ec9c046a8f703306f5d87569c44d5b8e27563 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Sat, 2 Nov 2024 16:41:02 +0800 Subject: [PATCH 03/28] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DlRepairTicketsServiceImpl.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index f8798a7a..50c32faa 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -1178,10 +1178,13 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl ids = list.stream().map(DlTicketWares::getId).collect(Collectors.toList()); - List twItems = twItemService.list(new LambdaQueryWrapper().and(item -> { - item.in(DlTwItem::getTwId, ids) - .apply("wares_already_count < wares_count"); - })); + List twItems = new ArrayList<>(); + if (CollectionUtil.isNotEmpty(ids)){ + twItems = twItemService.list(new LambdaQueryWrapper().and(item -> { + item.in(DlTwItem::getTwId, ids) + .apply("wares_already_count < wares_count"); + })); + } if (CollectionUtil.isNotEmpty(twItems)) { // 更新工单子表(主要是把已领料的字段同步给工单配件的数量字段) // 查询工单子表(三个查询条件,属于那个工单,属于配件类型,属于需要改变的(即申请表的已领取数量小于申请数量的)) @@ -1192,10 +1195,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl finalTwItems = twItems; List AllItems = items.stream().map(item -> { DlRepairTitem titem = new DlRepairTitem(); titem.setId(item.getId()); - List wares = twItems.stream().filter(i -> i.getWaresId().equals(item.getPartId())).collect(Collectors.toList()); + List wares = finalTwItems.stream().filter(i -> i.getWaresId().equals(item.getPartId())).collect(Collectors.toList()); int sum = wares.stream().mapToInt(DlTwItem::getWaresAlreadyCount).sum(); titem.setItemCount(sum); BigDecimal discount = item.getItemDiscount() == null ? BigDecimal.ONE : item.getItemDiscount(); From 05696bff5e4a7599c39bad23429fc029ee1feec5 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Sat, 2 Nov 2024 16:52:31 +0800 Subject: [PATCH 04/28] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DlRepairTicketsServiceImpl.java | 127 +++++++++--------- 1 file changed, 62 insertions(+), 65 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index 50c32faa..e7720842 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -217,7 +217,6 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl list = customerService.list(new LambdaQueryWrapper().eq(CustomerMain::getPhoneNumber, customerAndCarVO.getUserInfo().getPhoneNumber())); - if (CollectionUtil.isNotEmpty(list)){ + if (CollectionUtil.isNotEmpty(list)) { throw exception0(500, "电话号码重复"); } customerService.save(customerAndCarVO.getUserInfo()); // 如果新增了数据,id没有回填 - if (ObjectUtil.isEmpty(customerAndCarVO.getUserInfo().getId())){ + if (ObjectUtil.isEmpty(customerAndCarVO.getUserInfo().getId())) { CustomerMain byPhoneNumber = customerService.getOne(new LambdaQueryWrapper().eq(CustomerMain::getPhoneNumber, customerAndCarVO.getUserInfo().getPhoneNumber())); customerAndCarVO.getUserInfo().setId(byPhoneNumber.getId()); } @@ -469,12 +468,12 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl list = carMainService.list(new LambdaQueryWrapper().eq(CarMain::getLicenseNumber, customerAndCarVO.getCarInfo().getLicenseNumber())); - if (CollectionUtil.isNotEmpty(list)){ + if (CollectionUtil.isNotEmpty(list)) { throw exception0(500, "车牌重复"); } carMainService.createCarMain(customerAndCarVO.getCarInfo()); // 如果新增了数据,id没有回填 - if (ObjectUtil.isEmpty(customerAndCarVO.getCarInfo().getId())){ + if (ObjectUtil.isEmpty(customerAndCarVO.getCarInfo().getId())) { CarMain byLicenseNumber = carMainService.getOne(new LambdaQueryWrapper().eq(CarMain::getLicenseNumber, customerAndCarVO.getCarInfo().getLicenseNumber())); customerAndCarVO.getCarInfo().setId(byLicenseNumber.getId()); } @@ -514,7 +513,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl userIds = new ArrayList<>(); - for (RepairWorker worker:list){ + for (RepairWorker worker : list) { userIds.add(worker.getUserId()); - if("".equals(userIdsStr)){ + if ("".equals(userIdsStr)) { userIdsStr = String.valueOf(worker.getUserId()); - }else{ - userIdsStr = ","+worker.getUserId(); + } else { + userIdsStr = "," + worker.getUserId(); } } repairTicketsReqVO.setUserIds(userIds); @@ -1176,56 +1175,54 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl ids = list.stream().map(DlTicketWares::getId).collect(Collectors.toList()); - List twItems = new ArrayList<>(); - if (CollectionUtil.isNotEmpty(ids)){ - twItems = twItemService.list(new LambdaQueryWrapper().and(item -> { + if (CollectionUtil.isNotEmpty(list)) { + // 查配件申请表的所有已领取数量小于申请数量的子表信息 + List ids = list.stream().map(DlTicketWares::getId).collect(Collectors.toList()); + List twItems = twItemService.list(new LambdaQueryWrapper().and(item -> { item.in(DlTwItem::getTwId, ids) .apply("wares_already_count < wares_count"); })); - } - if (CollectionUtil.isNotEmpty(twItems)) { - // 更新工单子表(主要是把已领料的字段同步给工单配件的数量字段) - // 查询工单子表(三个查询条件,属于那个工单,属于配件类型,属于需要改变的(即申请表的已领取数量小于申请数量的)) - Set waresId = twItems.stream().map(DlTwItem::getWaresId).collect(Collectors.toSet()); - List items = titemService.list(new LambdaQueryWrapper().and(item -> { - item.eq(DlRepairTitem::getTicketId, id) - .eq(DlRepairTitem::getItemType, "02") - .in(DlRepairTitem::getPartId, waresId); - })); - // 同一个配件可能申请过多次,属于是一个工单配件可能是对应多个申请表配件 - List finalTwItems = twItems; - List AllItems = items.stream().map(item -> { - DlRepairTitem titem = new DlRepairTitem(); - titem.setId(item.getId()); - List wares = finalTwItems.stream().filter(i -> i.getWaresId().equals(item.getPartId())).collect(Collectors.toList()); - int sum = wares.stream().mapToInt(DlTwItem::getWaresAlreadyCount).sum(); - titem.setItemCount(sum); - BigDecimal discount = item.getItemDiscount() == null ? BigDecimal.ONE : item.getItemDiscount(); - titem.setItemMoney(item.getItemPrice().multiply(BigDecimal.valueOf(sum)).multiply(discount)); - return titem; - }).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(twItems)) { + // 更新工单子表(主要是把已领料的字段同步给工单配件的数量字段) + // 查询工单子表(三个查询条件,属于那个工单,属于配件类型,属于需要改变的(即申请表的已领取数量小于申请数量的)) + Set waresId = twItems.stream().map(DlTwItem::getWaresId).collect(Collectors.toSet()); + List items = titemService.list(new LambdaQueryWrapper().and(item -> { + item.eq(DlRepairTitem::getTicketId, id) + .eq(DlRepairTitem::getItemType, "02") + .in(DlRepairTitem::getPartId, waresId); + })); + // 同一个配件可能申请过多次,属于是一个工单配件可能是对应多个申请表配件 + List AllItems = items.stream().map(item -> { + DlRepairTitem titem = new DlRepairTitem(); + titem.setId(item.getId()); + List wares = twItems.stream().filter(i -> i.getWaresId().equals(item.getPartId())).collect(Collectors.toList()); + int sum = wares.stream().mapToInt(DlTwItem::getWaresAlreadyCount).sum(); + titem.setItemCount(sum); + BigDecimal discount = item.getItemDiscount() == null ? BigDecimal.ONE : item.getItemDiscount(); + titem.setItemMoney(item.getItemPrice().multiply(BigDecimal.valueOf(sum)).multiply(discount)); + return titem; + }).collect(Collectors.toList()); - // 可能出现配件申请单审核通过了没有任何领取或全部退了的情况,所以如果itemCount等于0,直接把这个数据删掉 - // 过滤出需要删除的数据 - List delItems = AllItems.stream().filter(item -> item.getItemCount() == 0).collect(Collectors.toList()); - if (CollectionUtil.isNotEmpty(delItems)) { - // 删除需要删的 - titemService.removeBatchByIds(delItems); - Set delIds = delItems.stream().map(DlRepairTitem::getId).collect(Collectors.toSet()); - // 得到需要改的 - List updateItems = AllItems.stream().filter(item -> delIds.contains(item.getId())).collect(Collectors.toList()); - if (CollectionUtil.isNotEmpty(updateItems)) { - titemService.updateBatchById(updateItems); + // 可能出现配件申请单审核通过了没有任何领取或全部退了的情况,所以如果itemCount等于0,直接把这个数据删掉 + // 过滤出需要删除的数据 + List delItems = AllItems.stream().filter(item -> item.getItemCount() == 0).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(delItems)) { + // 删除需要删的 + titemService.removeBatchByIds(delItems); + Set delIds = delItems.stream().map(DlRepairTitem::getId).collect(Collectors.toSet()); + // 得到需要改的 + List updateItems = AllItems.stream().filter(item -> delIds.contains(item.getId())).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(updateItems)) { + titemService.updateBatchById(updateItems); + } + } else { + // 没有需要删的就是全部都需要改 + titemService.updateBatchById(AllItems); } - } else { - // 没有需要删的就是全部都需要改 - titemService.updateBatchById(AllItems); - } - // 重新计算维修工单 - return computeTicket(id); + // 重新计算维修工单 + return computeTicket(id); + } } return true; } @@ -1335,7 +1332,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl list = titemService.list(new LambdaQueryWrapper().eq(DlRepairTitem::getTicketId, ticketId)); // 计算子表 - if (CollectionUtil.isEmpty(list)){ + if (CollectionUtil.isEmpty(list)) { throw exception0(500, "没有项目、配件或其他"); } List updateItems = list.stream().map(item -> { @@ -1516,19 +1513,19 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl().eq(RepairOrderInfo::getGoodsId, id)); // 删除工单 From 2e3c202b73ee8cea4e87cd704a13b45d71cb362a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Sat, 2 Nov 2024 17:09:36 +0800 Subject: [PATCH 05/28] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 33 ++++- .../inspection/entity/InspectionInfo.java | 3 + .../inspection/entity/InspectionWorkNode.java | 13 +- .../mapper/InspectionInfoMapper.java | 6 + .../service/IInspectionInfoService.java | 10 +- .../service/IInspectionWorkNodeService.java | 12 ++ .../impl/InspectionInfoServiceImpl.java | 66 ++++----- .../impl/InspectionWorkNodeServiceImpl.java | 135 +++++++++++++++++- .../inspection/vo/DlInspectionWorkNodeVo.java | 24 ++++ .../inspection/InspectionInfoMapper.xml | 18 +++ 10 files changed, 282 insertions(+), 38 deletions(-) create mode 100644 dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/DlInspectionWorkNodeVo.java 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 735d8c3c..da9583d2 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 @@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.inspection.entity.InspectionInfo; import cn.iocoder.yudao.module.inspection.service.IInspectionInfoService; +import cn.iocoder.yudao.module.inspection.service.IInspectionWorkNodeService; import cn.iocoder.yudao.util.ExcelUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -27,6 +28,9 @@ public class InspectionInfoController extends BaseController @Autowired private IInspectionInfoService inspectionInfoService; + @Autowired + private IInspectionWorkNodeService inspectionWorkNodeService; + /** * 查询【请填写功能名称】列表 */ @@ -102,7 +106,32 @@ public class InspectionInfoController extends BaseController * @return */ @GetMapping("geStelectInspection") - public CommonResult geStelectInspection(){ - return success(inspectionInfoService.geStelectInspection()); + public CommonResult geStelectInspection(@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)); + } + + /** + * 获取工单详情 + * @param inspectionId 工单id + * @param workNodeId 节点id (geStelectInspection这个方法中返回了) + * @return + */ + @GetMapping("getInspectionInfo") + public CommonResult getInspectionInfo(Integer inspectionId, Integer workNodeId){ + return success(inspectionInfoService.getWorkNode(inspectionId,workNodeId)); + } + + /** + * 员工接单 + * @param inspectionId 工单id + * @param workNodeId 节点id (geStelectInspection这个方法中返回了) + * @return + */ + @PostMapping("orderTaking") + public CommonResult orderTaking(Integer inspectionId, Integer workNodeId){ + inspectionWorkNodeService.updateInspectionWorkNode(inspectionId,workNodeId); + return success("接单成功"); } } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java index 2805635b..0d0a4dea 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java @@ -148,6 +148,9 @@ public class InspectionInfo extends TenantBaseDO private Integer nowOrderNum; /** 开始检测时需要 传入 选择项目的id、角色id、排序 */ + @TableField(exist = false) private List inspectionWorkNodes; + /** 流程节点id*/ + @TableField(exist = false) private String workNodeId; } 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 3245b5d0..7b81c558 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 @@ -75,7 +75,18 @@ public class InspectionWorkNode extends TenantBaseDO { /** * 处理人员工表id */ - private Integer dealUserId; + private Long dealUserId; + + /** + * 状态(0-待开始 1-进行中 2-已完成) + */ + private String status; + + + /** + * 1-退办理 2-选择重审 3-项目完成 + */ + private Integer selectType; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionInfoMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionInfoMapper.java index 4bf9c11b..401eaef0 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionInfoMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionInfoMapper.java @@ -87,4 +87,10 @@ public interface InspectionInfoMapper extends BaseMapper , @Param("roleId") Long roleId, @Param("endTime")String endTime); + /** + * 查询当前用户符合条件的工单 + * @param page + * @return + */ + IPage selectByUser(@Param("page") IPage page, @Param("roleIds") List roleIds); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java index 5fc966d1..e760d14f 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.inspection.service; +import cn.iocoder.yudao.module.inspection.vo.DlInspectionWorkNodeVo; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; @@ -79,5 +80,12 @@ public interface IInspectionInfoService extends IService * 根据当前登陆人获取可以选择的工单 * @return */ - List geStelectInspection(); + IPage geStelectInspection(IPage page); + + /** + * 获取工单详情 + * @param id + * @return + */ + DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, Integer workNodeId); } 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 b9697e6e..009b09af 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 @@ -12,5 +12,17 @@ import com.baomidou.mybatisplus.extension.service.IService; * @since 2024-10-31 */ public interface IInspectionWorkNodeService extends IService { + /** + * 员工接单 + * @param inspectionId + * @param workNodeId + */ + void updateInspectionWorkNode(Integer inspectionId, Integer workNodeId); + + /** + * 更新流程图片 步骤信息 + * @param inspectionWorkNode + */ + void updateImageAndStep(InspectionWorkNode inspectionWorkNode); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index 604c05f0..ae8e7656 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -15,6 +15,7 @@ import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.custom.entity.CustomerMain; import cn.iocoder.yudao.module.custom.service.CustomerMainService; +import cn.iocoder.yudao.module.inspection.vo.DlInspectionWorkNodeVo; import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo; import cn.iocoder.yudao.module.partner.service.IPartnerCustomerInfoService; import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService; @@ -234,7 +235,13 @@ public class InspectionInfoServiceImpl extends ServiceImpl inspectionWorkNodes = inspectionInfo.getInspectionWorkNodes(); //将检测工单流程补充检测工单id - inspectionWorkNodes.stream().forEach(inspectionWorkNode -> inspectionWorkNode.setInspectionInfoId(inspectionInfo.getId())); + inspectionWorkNodes.stream().forEach(inspectionWorkNode -> { + //检测工单id + inspectionWorkNode.setInspectionInfoId(inspectionInfo.getId()); + //将节点状态设置为未开始 + inspectionWorkNode.setStatus("0"); + }); + workNodeService.saveBatch(inspectionWorkNodes); //检测步骤表插入检测开始 @@ -368,47 +375,40 @@ public class InspectionInfoServiceImpl extends ServiceImpl geStelectInspection() { + public IPage geStelectInspection(IPage page) { //获取当前登录人 LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); //获取当前登陆人的角色 List byUserId = roleService.getByUserId(loginUser.getId()); List roleIds = byUserId.stream().map(UserRoleDO::getRoleId).collect(Collectors.toList()); - //查询所有工单为进行中的 - List inspectionInfos = baseMapper.selectList(new LambdaQueryWrapper() - .eq(InspectionInfo::getStatus, 0)); - //根据工单id查询工单流程节点 - List infoIds = inspectionInfos.stream().map(inspectionInfo -> inspectionInfo.getId()).collect(Collectors.toList()); - if (ObjectUtils.isNotEmpty(infoIds)) { - List inspectionWorkNodes = workNodeService.list(new LambdaQueryWrapper() - .in(InspectionWorkNode::getInspectionInfoId, infoIds) - .eq(InspectionWorkNode::getDealUserId, null)); + return baseMapper.selectByUser(page,roleIds); + } - //工单集合 - List inspectionInfoList = new ArrayList<>(); + /** + * 获取工单详情 + * + * @param id + * @return + */ + @Override + public DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, Integer workNodeId) { + //查询工单 + InspectionInfo inspectionInfo = this.getById(inspectionId); + //根据工单id查询流程节点 + InspectionWorkNode inspectionWorkNode = workNodeService.getById(new LambdaQueryWrapper() + .eq(InspectionWorkNode::getInspectionInfoId, workNodeId)); + //根据工单id查询步骤 + List inspectionStepInfos = inspectionStepInfoService.list(new LambdaQueryWrapper() + .eq(InspectionStepInfo::getInspectionInfoId, inspectionId)); - //根据工单id查询工单流程节点 - Map> inspectionWorkNodeMap = inspectionWorkNodes.stream().collect(Collectors.groupingBy(InspectionWorkNode::getInspectionInfoId)); - for (InspectionInfo inspectionInfo : inspectionInfos) { - List inspectionWorkNodeList = inspectionWorkNodeMap.get(inspectionInfo.getId()); - //遍历工单流程节点 流程为key - if (CollectionUtil.isNotEmpty(inspectionWorkNodeList)) { - Map inspectionWorkMap = inspectionWorkNodeList.stream().collect(Collectors.toMap(InspectionWorkNode::getOrderNum, item -> item)); - InspectionWorkNode inspectionWorkNode = inspectionWorkMap.get(inspectionInfo.getNowOrderNum()); - if (inspectionWorkNode != null){ - //判断当前项目 当前登录人员 是否可以处理 - if (roleIds.contains(inspectionWorkNode.getRoleId())){ - inspectionInfo.setWorkNodeId(inspectionWorkNode.getId()); - inspectionInfoList.add(inspectionInfo); - } - } - } - } - return inspectionInfoList; - } - return null; + DlInspectionWorkNodeVo dlInspectionWorkNodeVo = new DlInspectionWorkNodeVo(); + dlInspectionWorkNodeVo.setInspectionInfo(inspectionInfo); + dlInspectionWorkNodeVo.setNode(inspectionWorkNode); + dlInspectionWorkNodeVo.setSteps(inspectionStepInfos); + return dlInspectionWorkNodeVo; } } 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 69c91b68..22b6d7cb 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 @@ -1,11 +1,27 @@ package cn.iocoder.yudao.module.inspection.service.impl; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.inspection.entity.DlInspectionProject; +import cn.iocoder.yudao.module.inspection.entity.InspectionInfo; +import cn.iocoder.yudao.module.inspection.entity.InspectionStepInfo; import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; import cn.iocoder.yudao.module.inspection.mapper.InspectionWorkNodeMapper; +import cn.iocoder.yudao.module.inspection.service.DlInspectionProjectService; +import cn.iocoder.yudao.module.inspection.service.IInspectionInfoService; import cn.iocoder.yudao.module.inspection.service.IInspectionWorkNodeService; +import cn.iocoder.yudao.module.inspection.service.InspectionStepInfoService; +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.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** *

* 检测流程表 服务实现类 @@ -16,5 +32,122 @@ import org.springframework.stereotype.Service; */ @Service public class InspectionWorkNodeServiceImpl extends ServiceImpl implements IInspectionWorkNodeService { + @Autowired + private IInspectionInfoService inspectionInfoService; + @Autowired + private AdminUserService userService; + @Autowired + private DlInspectionProjectService inspectionProjectService; + @Autowired + private InspectionStepInfoService inspectionStepService; -} + /** + * 员工接单 + * @param inspectionId + * @param workNodeId + */ + @Override + public void updateInspectionWorkNode(Integer inspectionId, Integer workNodeId) { + //获取当前登录人 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + //当前登陆人 就是检测人 + AdminUserDO workerUser = userService.getUser(loginUser.getId()); + //根据工单id获取工单 + InspectionInfo inspectionInfo = inspectionInfoService.getById(inspectionId); + if (ObjectUtil.isNull(inspectionInfo)) { + throw new RuntimeException("工单不存在"); + } + //根据流程id获取流程 + InspectionWorkNode workNode = this.getById(workNodeId); + if (ObjectUtil.isNull(workNode)) { + throw new RuntimeException("流程不存在"); + } + //判断当前流程是否已被接单 + if (ObjectUtil.isNotNull(workNode.getDealUserId())) { + throw new RuntimeException("当前流程已被接单"); + } + //修改流程相关信息 + workNode.setDealUserId(workerUser.getId()); + workNode.setDealUserName(workerUser.getNickname()); + workNode.setStatus("1"); + //更新 + this.updateById(workNode); + } + + /** + * 更新流程图片 步骤信息 + * + * @param inspectionWorkNode + */ + @Override + public void updateImageAndStep(InspectionWorkNode inspectionWorkNode) { + //根据流程id获取流程 + InspectionWorkNode workNode = this.getById(inspectionWorkNode.getId()); + + //根据工单id查询工单 + InspectionInfo inspectionInfo = inspectionInfoService.selectInspectionInfoById(inspectionWorkNode.getInspectionInfoId()); + + //判断是否是最后一个项目 根据工单id查询 + //根据工单id查询流程列表 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(InspectionWorkNode::getInspectionInfoId, inspectionWorkNode.getInspectionInfoId()); + List inspectionWorkNodes = this.list(queryWrapper); + //判断当前是否是最后一个项目 根据顺序号判断 + boolean flag = hasNextNode(inspectionWorkNodes, workNode); + + // 插入步骤信息 + InspectionStepInfo inspectionStepInfo = new InspectionStepInfo(); + inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionWorkNode.getInspectionInfoId()))); + + //根据projectId查询项目名称 + DlInspectionProject project = inspectionProjectService.getOne(new LambdaQueryWrapper() + .eq(DlInspectionProject::getId, inspectionWorkNode.getProjectId())); + String stepTitle = project.getProjectName() + "项目检测完成"; + inspectionStepInfo.setTitle(stepTitle); + inspectionStepInfo.setContent(inspectionWorkNode.getDealImages()); + inspectionStepService.save(inspectionStepInfo); + if (!flag) { + stepTitle = "检测结束"; + //设置工单状态为已完成 + inspectionInfo.setStatus("1"); + //设置工单通过 + inspectionInfo.setIsPass("1"); + //设置工单结束时间 + inspectionInfo.setEndTime(DateUtil.date()); + + //步骤结束 + inspectionStepInfo = new InspectionStepInfo(); + inspectionStepInfo.setTitle(stepTitle); + inspectionStepService.save(inspectionStepInfo); + } else { + //修改工单表当前流程 + inspectionInfo.setNowOrderNum(workNode.getOrderNum() + 1); + } + + //将节点状态改为已完成 + inspectionWorkNode.setStatus("2"); + //更新流程节点表 + baseMapper.updateById(inspectionWorkNode); + //更细工单状态 + inspectionInfoService.updateById(inspectionInfo); + } + + /** + * 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目 + * + * @param nodes InspectionWorkNode 对象的集合 + * @param currentNode 当前需要判断的 InspectionWorkNode 对象 + * @return 如果存在后续项目返回 true,否则返回 false + */ + public boolean hasNextNode(List nodes, InspectionWorkNode currentNode) { + int currentOrderNum = currentNode.getOrderNum(); + + // 遍历集合中的所有节点,检查是否有 orderNum 大于当前节点的 + for (InspectionWorkNode node : nodes) { + if (node.getOrderNum() > currentOrderNum) { + return true; + } + } + return false; + } +} \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/DlInspectionWorkNodeVo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/DlInspectionWorkNodeVo.java new file mode 100644 index 00000000..b79bd971 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/DlInspectionWorkNodeVo.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.inspection.vo; + +import cn.iocoder.yudao.module.inspection.entity.InspectionInfo; +import cn.iocoder.yudao.module.inspection.entity.InspectionStepInfo; +import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; +import lombok.Data; + +import java.util.List; + +@Data +public class DlInspectionWorkNodeVo { + /** + * 检测单 + */ + private InspectionInfo inspectionInfo; + /** + * 流程节点 + */ + private InspectionWorkNode node; + /** + * 步骤 + */ + private List steps; +} diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml index 85d4c0a5..1c91523f 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml @@ -266,4 +266,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by ins.start_time desc + From 327bc236c5515dd3fd0812cb845203712276bec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Sat, 2 Nov 2024 18:04:35 +0800 Subject: [PATCH 06/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 47 +++++++++---------- .../inspection/entity/InspectionInfo.java | 2 + .../mapper/InspectionInfoMapper.java | 2 +- .../service/IInspectionInfoService.java | 2 +- .../impl/InspectionInfoServiceImpl.java | 8 +++- .../impl/InspectionWorkNodeServiceImpl.java | 38 +++++++++++++++ .../inspection/InspectionInfoMapper.xml | 44 ++++++++++++----- 7 files changed, 102 insertions(+), 41 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 da9583d2..bd5b456b 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 @@ -23,8 +23,7 @@ import cn.iocoder.yudao.module.core.controller.BaseController; */ @RestController @RequestMapping("/admin-api/system/info") -public class InspectionInfoController extends BaseController -{ +public class InspectionInfoController extends BaseController { @Autowired private IInspectionInfoService inspectionInfoService; @@ -37,11 +36,10 @@ public class InspectionInfoController extends BaseController @PreAuthorize("@ss.hasPermi('system:info:list')") @GetMapping("/list") public CommonResult list(InspectionInfo inspectionInfo, - @RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum, - @RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize) - { + @RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum, + @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) { Page page = new Page<>(pageNum, pageSize); - IPage list = inspectionInfoService.selectInspectionInfoList(page,inspectionInfo); + IPage list = inspectionInfoService.selectInspectionInfoList(page, inspectionInfo); return success(list); } @@ -51,11 +49,10 @@ public class InspectionInfoController extends BaseController @PreAuthorize("@ss.hasPermi('system:info:export')") @PostMapping("/export") public void export(HttpServletResponse response, InspectionInfo inspectionInfo, - @RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum, - @RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize) - { + @RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum, + @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) { Page page = new Page<>(pageNum, pageSize); - IPage list = inspectionInfoService.selectInspectionInfoList(page,inspectionInfo); + IPage list = inspectionInfoService.selectInspectionInfoList(page, inspectionInfo); ExcelUtil util = new ExcelUtil(InspectionInfo.class); util.exportExcel(response, list.getRecords(), "【请填写功能名称】数据"); } @@ -65,8 +62,7 @@ public class InspectionInfoController extends BaseController */ @PreAuthorize("@ss.hasPermi('system:info:query')") @GetMapping(value = "/{id}") - public CommonResult getInfo(@PathVariable("id") Long id) - { + public CommonResult getInfo(@PathVariable("id") Long id) { return success(inspectionInfoService.selectInspectionInfoById(id)); } @@ -83,7 +79,7 @@ public class InspectionInfoController extends BaseController * 清账 */ @PostMapping("/settleAccounts") - public CommonResult settleAccounts(Long InspectionId){ + public CommonResult settleAccounts(Long InspectionId) { inspectionInfoService.settleAccounts(InspectionId); return success(); } @@ -96,42 +92,45 @@ public class InspectionInfoController extends BaseController @PostMapping("/del") - public CommonResult remove(@RequestParam("id") Long id) - { + public CommonResult remove(@RequestParam("id") Long id) { return toAjax(inspectionInfoService.deleteInspectionInfoByIds(id)); } /** * 根据当前登陆人获取可以选择的工单 + * * @return */ @GetMapping("geStelectInspection") - public CommonResult geStelectInspection(@RequestParam(value = "pageNum" ,required = false ,defaultValue = "1") Integer pageNum, - @RequestParam(value ="pageSize" ,required = false ,defaultValue = "10") Integer pageSize){ + public CommonResult geStelectInspection(InspectionInfo inspectionInfo, + @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)); + return success(inspectionInfoService.geStelectInspection(page,inspectionInfo)); } /** * 获取工单详情 + * * @param inspectionId 工单id - * @param workNodeId 节点id (geStelectInspection这个方法中返回了) + * @param workNodeId 节点id (geStelectInspection这个方法中返回了) * @return */ @GetMapping("getInspectionInfo") - public CommonResult getInspectionInfo(Integer inspectionId, Integer workNodeId){ - return success(inspectionInfoService.getWorkNode(inspectionId,workNodeId)); + public CommonResult getInspectionInfo(Integer inspectionId, Integer workNodeId) { + return success(inspectionInfoService.getWorkNode(inspectionId, workNodeId)); } /** * 员工接单 + * * @param inspectionId 工单id - * @param workNodeId 节点id (geStelectInspection这个方法中返回了) + * @param workNodeId 节点id (geStelectInspection这个方法中返回了) * @return */ @PostMapping("orderTaking") - public CommonResult orderTaking(Integer inspectionId, Integer workNodeId){ - inspectionWorkNodeService.updateInspectionWorkNode(inspectionId,workNodeId); + public CommonResult orderTaking(Integer inspectionId, Integer workNodeId) { + inspectionWorkNodeService.updateInspectionWorkNode(inspectionId, workNodeId); return success("接单成功"); } } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java index 0d0a4dea..1bc3ad12 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java @@ -153,4 +153,6 @@ public class InspectionInfo extends TenantBaseDO /** 流程节点id*/ @TableField(exist = false) private String workNodeId; + @TableField(exist = false) + private Long dealUserId; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionInfoMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionInfoMapper.java index 401eaef0..a2307a85 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionInfoMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionInfoMapper.java @@ -92,5 +92,5 @@ public interface InspectionInfoMapper extends BaseMapper * @param page * @return */ - IPage selectByUser(@Param("page") IPage page, @Param("roleIds") List roleIds); + IPage selectByUser(@Param("page") IPage page, @Param("roleIds") List roleIds,@Param("inspectionInfo") InspectionInfo inspectionInfo); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java index e760d14f..d2b323aa 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java @@ -80,7 +80,7 @@ public interface IInspectionInfoService extends IService * 根据当前登陆人获取可以选择的工单 * @return */ - IPage geStelectInspection(IPage page); + IPage geStelectInspection(IPage page,InspectionInfo inspectionInfo); /** * 获取工单详情 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index ae8e7656..08eee07a 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -379,13 +379,17 @@ public class InspectionInfoServiceImpl extends ServiceImpl geStelectInspection(IPage page) { + public IPage geStelectInspection(IPage page,InspectionInfo inspectionInfo) { //获取当前登录人 LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); //获取当前登陆人的角色 List byUserId = roleService.getByUserId(loginUser.getId()); List roleIds = byUserId.stream().map(UserRoleDO::getRoleId).collect(Collectors.toList()); - return baseMapper.selectByUser(page,roleIds); + if("2".equals(inspectionInfo.getStatus())){ + //进行中 + inspectionInfo.setDealUserId(loginUser.getId()); + } + return baseMapper.selectByUser(page,roleIds,inspectionInfo); } /** 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 22b6d7cb..d6534527 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 @@ -81,6 +81,18 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl From 91dfdba9e6da72a5289d6ae17067ce9999f40ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 4 Nov 2024 09:50:41 +0800 Subject: [PATCH 07/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DlInspectionProjectController.java | 2 +- .../controller/InspectionInfoController.java | 10 ++++++++ .../impl/InspectionWorkNodeServiceImpl.java | 24 ++++++++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java index 076a74f4..d4bff581 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java @@ -72,7 +72,7 @@ public class DlInspectionProjectController { @GetMapping("/page") @Operation(summary = "获得检测项目分页") - @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:query')") +// @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:query')") public CommonResult> getDlInspectionProjectPage(@Valid DlInspectionProjectPageReqVO pageReqVO, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { 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 bd5b456b..06349c58 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 @@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.inspection.entity.InspectionInfo; +import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; import cn.iocoder.yudao.module.inspection.service.IInspectionInfoService; import cn.iocoder.yudao.module.inspection.service.IInspectionWorkNodeService; import cn.iocoder.yudao.util.ExcelUtil; @@ -133,4 +134,13 @@ public class InspectionInfoController extends BaseController { inspectionWorkNodeService.updateInspectionWorkNode(inspectionId, workNodeId); return success("接单成功"); } + + /** + * 项目操作(退办理、重审、项目完成) + * @param inspectionWorkNode + */ + @PostMapping("controls") + public void controls(InspectionWorkNode inspectionWorkNode){ + inspectionWorkNodeService.updateImageAndStep(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 d6534527..93fc7e17 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 @@ -16,6 +16,7 @@ import cn.iocoder.yudao.module.inspection.service.InspectionStepInfoService; 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.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -88,7 +89,8 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl() + .set("status", "0") + .eq("inspection_info_id", inspectionWorkNode.getInspectionInfoId()) + .ge("order_num", workNode.getOrderNum())); + + // 添加步骤信息表 + InspectionStepInfo stepInfo = new InspectionStepInfo(); + stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString())); + stepInfo.setTitle("重审"); + stepInfo.setContent("重审"); + inspectionStepService.save(stepInfo); } } \ No newline at end of file From 1dd68ef79c31772a0bc3019ea8c1734652c93212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 4 Nov 2024 10:33:14 +0800 Subject: [PATCH 08/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InspectionInfoServiceImpl.java | 7 ++----- .../service/impl/InspectionWorkNodeServiceImpl.java | 9 ++++++--- .../resources/mapper/inspection/InspectionInfoMapper.xml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index 08eee07a..0f26a7b7 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -216,9 +216,6 @@ public class InspectionInfoServiceImpl extends ServiceImpl byUserId = roleService.getByUserId(loginUser.getId()); List roleIds = byUserId.stream().map(UserRoleDO::getRoleId).collect(Collectors.toList()); - if("2".equals(inspectionInfo.getStatus())){ - //进行中 + if(!"1".equals(inspectionInfo.getStatus())){ + //进行中 已完成 inspectionInfo.setDealUserId(loginUser.getId()); } return baseMapper.selectByUser(page,roleIds,inspectionInfo); 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 93fc7e17..c8309bb9 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 @@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; 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; @@ -81,6 +82,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(InspectionWorkNode::getInspectionInfoId, inspectionWorkNode.getInspectionInfoId()); + queryWrapper.eq(InspectionWorkNode::getInspectionInfoId, workNode.getInspectionInfoId()); List inspectionWorkNodes = this.list(queryWrapper); //判断当前是否是最后一个项目 根据顺序号判断 boolean flag = hasNextNode(inspectionWorkNodes, workNode); // 插入步骤信息 InspectionStepInfo inspectionStepInfo = new InspectionStepInfo(); - inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionWorkNode.getInspectionInfoId()))); + inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(workNode.getInspectionInfoId()))); //根据projectId查询项目名称 DlInspectionProject project = inspectionProjectService.getOne(new LambdaQueryWrapper() @@ -170,6 +172,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl #{roleId} From bf216df437cc213fc1233d1598cd902ad29aa3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 4 Nov 2024 13:11:51 +0800 Subject: [PATCH 09/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DlInspectionProjectController.java | 8 ++++---- .../service/impl/InspectionInfoServiceImpl.java | 1 + .../service/impl/InspectionWorkNodeServiceImpl.java | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java index d4bff581..dc64cb61 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java @@ -39,14 +39,14 @@ public class DlInspectionProjectController { @PostMapping("/create") @Operation(summary = "创建检测项目") - @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:create')") +// @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:create')") public CommonResult createDlInspectionProject(@Valid @RequestBody DlInspectionProjectSaveReqVO createReqVO) { return success(dlInspectionProjectService.createDlInspectionProject(createReqVO)); } @PutMapping("/update") @Operation(summary = "更新检测项目") - @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:update')") +// @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:update')") public CommonResult updateDlInspectionProject(@Valid @RequestBody DlInspectionProjectSaveReqVO updateReqVO) { dlInspectionProjectService.updateDlInspectionProject(updateReqVO); return success(true); @@ -55,7 +55,7 @@ public class DlInspectionProjectController { @DeleteMapping("/delete") @Operation(summary = "删除检测项目") @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:delete')") +// @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:delete')") public CommonResult deleteDlInspectionProject(@RequestParam("id") String id) { dlInspectionProjectService.deleteDlInspectionProject(id); return success(true); @@ -64,7 +64,7 @@ public class DlInspectionProjectController { @GetMapping("/get") @Operation(summary = "获得检测项目") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:query')") +// @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:query')") public CommonResult getDlInspectionProject(@RequestParam("id") String id) { DlInspectionProject dlInspectionProject = dlInspectionProjectService.getDlInspectionProject(id); return success(BeanUtils.toBean(dlInspectionProject, DlInspectionProjectRespVO.class)); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index 0f26a7b7..7459f02b 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -184,6 +184,7 @@ public class InspectionInfoServiceImpl extends ServiceImpl Date: Mon, 4 Nov 2024 13:26:54 +0800 Subject: [PATCH 10/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InspectionWorkNodeServiceImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 b8da601b..2ad79882 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 @@ -74,6 +74,14 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl Date: Mon, 4 Nov 2024 13:29:27 +0800 Subject: [PATCH 11/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InspectionWorkNodeServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 2ad79882..84709080 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 @@ -76,11 +76,10 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl Date: Mon, 4 Nov 2024 13:35:07 +0800 Subject: [PATCH 12/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/service/impl/InspectionWorkNodeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 84709080..7c5ab8c8 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 @@ -78,7 +78,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl Date: Mon, 4 Nov 2024 15:07:18 +0800 Subject: [PATCH 13/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 12 +++++++++++- .../inspection/entity/InspectionWorkNode.java | 5 +++++ .../mapper/InspectionWorkNodeMapper.java | 8 ++++++++ .../service/IInspectionInfoService.java | 10 +++++++++- .../service/IInspectionWorkNodeService.java | 8 ++++++++ .../service/impl/InspectionInfoServiceImpl.java | 16 +++++++++++++--- .../impl/InspectionWorkNodeServiceImpl.java | 11 +++++++++++ .../mapper/InspectionWorkNodeMapper.xml | 12 ++++++++++++ 8 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml 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 06349c58..9e5dc24f 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 @@ -118,7 +118,7 @@ public class InspectionInfoController extends BaseController { * @return */ @GetMapping("getInspectionInfo") - public CommonResult getInspectionInfo(Integer inspectionId, Integer workNodeId) { + public CommonResult getInspectionInfo(Integer inspectionId, String workNodeId) { return success(inspectionInfoService.getWorkNode(inspectionId, workNodeId)); } @@ -143,4 +143,14 @@ public class InspectionInfoController extends BaseController { public void controls(InspectionWorkNode inspectionWorkNode){ inspectionWorkNodeService.updateImageAndStep(inspectionWorkNode); } + + /** + * 通过工单id获取工单流程 + * @param inspectionId + * @return + */ + @GetMapping("getWeorkNodesById") + public CommonResult getWeorkNodesById(Integer inspectionId) { + return success(inspectionInfoService.getWeorkNodesById(inspectionId)); + } } 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 7b81c558..6015811f 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 @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.inspection.entity; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import java.time.LocalDateTime; @@ -86,7 +87,11 @@ public class InspectionWorkNode extends TenantBaseDO { /** * 1-退办理 2-选择重审 3-项目完成 */ + @TableField(exist = false) private Integer selectType; + @TableField(exist = false) + private String projectName; + } 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 088f2325..5be98f40 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 @@ -4,6 +4,8 @@ import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** *

* 检测流程表 Mapper 接口 @@ -15,4 +17,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface InspectionWorkNodeMapper extends BaseMapper { + /** + * 根据检测id获取检测流程 + * @param inspectionId + * @return + */ + List getWeorkNodesById(Integer inspectionId); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java index d2b323aa..ef2fb65e 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionInfoService.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.inspection.service; +import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; import cn.iocoder.yudao.module.inspection.vo.DlInspectionWorkNodeVo; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -87,5 +88,12 @@ public interface IInspectionInfoService extends IService * @param id * @return */ - DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, Integer workNodeId); + DlInspectionWorkNodeVo getWorkNode(Integer inspectionId, String workNodeId); + + /** + * 根据工单id获取工单流程 + * @param inspectionId + * @return + */ + List getWeorkNodesById(Integer inspectionId); } 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 009b09af..b98c2071 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 @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.inspection.service; import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** *

* 检测流程表 服务类 @@ -25,4 +27,10 @@ public interface IInspectionWorkNodeService extends IService */ void updateImageAndStep(InspectionWorkNode inspectionWorkNode); + /** + * 根据检测id获取流程信息 + * @param inspectionId + * @return + */ + List getWeorkNodesById(Integer inspectionId); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index 7459f02b..c60bfa32 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -397,12 +397,11 @@ public class InspectionInfoServiceImpl extends ServiceImpl() - .eq(InspectionWorkNode::getInspectionInfoId, workNodeId)); + InspectionWorkNode inspectionWorkNode = workNodeService.getById(workNodeId); //根据工单id查询步骤 List inspectionStepInfos = inspectionStepInfoService.list(new LambdaQueryWrapper() .eq(InspectionStepInfo::getInspectionInfoId, inspectionId)); @@ -413,4 +412,15 @@ public class InspectionInfoServiceImpl extends ServiceImpl getWeorkNodesById(Integer inspectionId) { + return workNodeService.getWeorkNodesById(inspectionId); + } } 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 7c5ab8c8..4aede4b5 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 @@ -155,6 +155,17 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl getWeorkNodesById(Integer inspectionId) { + return baseMapper.getWeorkNodesById(inspectionId); + } + /** * 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目 * diff --git a/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml new file mode 100644 index 00000000..4bbd95d4 --- /dev/null +++ b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml @@ -0,0 +1,12 @@ + + + + + + From 768c09b0e498ac847f7b01086a6f04e4d7fa738d Mon Sep 17 00:00:00 2001 From: 13405411873 <1994398261@qq.com> Date: Mon, 4 Nov 2024 16:48:31 +0800 Subject: [PATCH 14/28] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/AppInspectionPartnerServiceImpl.java | 9 +-- .../impl/InspectionInfoServiceImpl.java | 9 +-- .../controller/admin/SysLoginController.java | 64 ++++++------------- .../dal/mysql/user/AdminUserMapper.java | 14 +++- .../service/user/AdminUserServiceImpl.java | 23 ++++++- .../main/resources/mapper/SysUserMapper.xml | 4 ++ 6 files changed, 59 insertions(+), 64 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 0e4d20d1..8c3e4195 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -195,11 +195,9 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(ShopMallPartners::getUserId, user.getId()); - partner = this.getOne(queryWrapper); + queryWrapper.orderByDesc(ShopMallPartners::getPartnerId).last("limit 1"); + ShopMallPartners partner = this.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ throw new Exception("未查询到信息"); } @@ -1452,8 +1450,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl workerQueryWrapper =new LambdaQueryWrapper<>(); -// workerQueryWrapper.eq(PartnerWorker::getUserId,loginUser.getId()).eq(PartnerWorker::getPartnerId,partners.getPartnerId()); -// PartnerWorker worker = workerService.getOne(workerQueryWrapper); -// if (ObjectUtils.isNotEmpty(worker)){ -// inspectionInfo.setWorkId(worker.getId()); -// }else { -// throw new Exception("请先将接待员加入员工"); -// } + if (ObjectUtils.isEmpty(inspectionInfo.getInspectionWorkNodes())) { throw new RuntimeException("请选择检测项目"); } diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java index f9f33cbc..bc5b58e4 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/app/controller/admin/SysLoginController.java @@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.security.config.SecurityProperties; import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; +import cn.iocoder.yudao.module.partner.entity.PartnerWorker; import cn.iocoder.yudao.util.RedisCache; import cn.iocoder.yudao.module.rescue.domain.DriverInfo; import cn.iocoder.yudao.module.rescue.domain.LoginBody; @@ -81,8 +82,6 @@ public class SysLoginController { @Resource private PermissionApi permissionApi; - @Resource - private PasswordEncoder passwordEncoder; @Resource private RoleApi roleApi; @@ -577,50 +576,23 @@ public class SysLoginController { map.put("driverInfo", driverInfo); return success(map); } -// -// -// /** -// * 获取检测工用户信息 -// * -// * @return 用户信息 -// */ -// @GetMapping("/getJcWorkerInfo") -// public AjaxResult getJcWorkerInfo() -// { -// AjaxResult ajax = success(); -// LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); -// SysUser user = SecurityUtils.getLoginUser().getUser(); -// queryWrapper.eq(PartnerWorker::getUserId,user.getUserId()); -// PartnerWorker worker = jcWorkerService.getOne(queryWrapper); -// if (ObjectUtil.isNotEmpty(worker)){ -// LambdaQueryWrapper queryWrapper1 =new LambdaQueryWrapper<>(); -// queryWrapper1.eq(ShopMallPartners::getPartnerId,worker.getPartnerId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); -// ShopMallPartners partner = partnersService.getOne(queryWrapper1); -// if (ObjectUtil.isEmpty(partner)){ -// return error("信息有误"); -// } -// ajax.put("partnerInfo", partner); -// }else { -// return error("信息有误"); -// } -// SysUser sysUser = userService.selectUserById(user.getUserId()); -// -// ajax.put("user", sysUser); -// -// return ajax; -// } -// /** -// * 获取路由信息 -// * -// * @return 路由信息 -// */ -// @GetMapping("getRouters") -// public CommonResult getRouters() -// { -// Long userId = SecurityFrameworkUtils.getLoginUserId(); -// List menus = menuService.selectMenuTreeByUserId(userId); -// return AjaxResult.success(menuService.buildMenus(menus)); -// } + + + /** + * 获取检测工用户信息 + * + * @return 用户信息 + */ + @GetMapping("/getJcWorkerInfo") + public CommonResult getJcWorkerInfo() + { + LoginUser user = SecurityFrameworkUtils.getLoginUser(); + Map map = new HashMap<>(); + map.put("partnerId", user.getTenantId()); + map.put("user", user); + return CommonResult.success(map); + } + @PostMapping("/wxLogin") public CommonResult wxLogin(@RequestBody WxLoginBody wxLoginBody) { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java index 15be2569..c371300e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.system.dal.mysql.user; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO; import cn.iocoder.yudao.module.system.controller.app.user.UserInfoVO; @@ -30,7 +32,15 @@ public interface AdminUserMapper extends BaseMapperX { } default AdminUserDO selectByMobile(String mobile) { - return getUserByMobileWithoutTenant(mobile); + Long tenantId=null; + try { + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + tenantId = loginUser.getTenantId(); + + }catch (Exception e){ + + } + return getUserByMobileWithoutTenant(mobile,tenantId); } default PageResult selectPage(UserPageReqVO reqVO, Collection deptIds) { @@ -65,7 +75,7 @@ public interface AdminUserMapper extends BaseMapperX { AdminUserDO selectUserByPhone(String phone); - AdminUserDO getUserByMobileWithoutTenant(String phoneNumber); + AdminUserDO getUserByMobileWithoutTenant(@Param("phoneNumber") String phoneNumber,@Param("tenantId") Long tenantId); int updateSetOpenId(@Param("userId")Long userId,@Param("openId")String openId); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java index e3c2878f..53b12a1a 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java @@ -10,6 +10,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import cn.iocoder.yudao.module.infra.api.config.ConfigApi; @@ -298,6 +300,7 @@ public class AdminUserServiceImpl extends ServiceImpl + and tenant_id = #{tenantId} + AND deleted = 0 + limit 1 From 538067d7e0c9e8b10e7de614d4a7eaefcffdc989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 4 Nov 2024 18:05:07 +0800 Subject: [PATCH 15/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 4 +-- .../inspection/entity/InspectionInfo.java | 2 ++ .../service/IInspectionWorkNodeService.java | 2 +- .../impl/InspectionWorkNodeServiceImpl.java | 34 ++++++++++++++++--- .../inspection/InspectionInfoMapper.xml | 3 +- 5 files changed, 37 insertions(+), 8 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 9e5dc24f..27e18686 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 @@ -130,7 +130,7 @@ public class InspectionInfoController extends BaseController { * @return */ @PostMapping("orderTaking") - public CommonResult orderTaking(Integer inspectionId, Integer workNodeId) { + public CommonResult orderTaking(Integer inspectionId,String workNodeId) { inspectionWorkNodeService.updateInspectionWorkNode(inspectionId, workNodeId); return success("接单成功"); } @@ -140,7 +140,7 @@ public class InspectionInfoController extends BaseController { * @param inspectionWorkNode */ @PostMapping("controls") - public void controls(InspectionWorkNode inspectionWorkNode){ + public void controls(@RequestBody InspectionWorkNode inspectionWorkNode){ inspectionWorkNodeService.updateImageAndStep(inspectionWorkNode); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java index 1bc3ad12..cce9aa5d 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionInfo.java @@ -155,4 +155,6 @@ public class InspectionInfo extends TenantBaseDO private String workNodeId; @TableField(exist = false) private Long dealUserId; + @TableField(exist = false) + private String workNodeStatus; } 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 b98c2071..6d7e2682 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 @@ -19,7 +19,7 @@ public interface IInspectionWorkNodeService extends IService * @param inspectionId * @param workNodeId */ - void updateInspectionWorkNode(Integer inspectionId, Integer workNodeId); + void updateInspectionWorkNode(Integer inspectionId, String workNodeId); /** * 更新流程图片 步骤信息 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 4aede4b5..145debf1 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 @@ -49,7 +49,8 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl() + .eq(DlInspectionProject::getId, workNode.getProjectId())); + + InspectionStepInfo inspectionStepInfo = new InspectionStepInfo(); + inspectionStepInfo.setInspectionInfoId(Integer.parseInt(String.valueOf(inspectionInfo.getId()))); + inspectionStepInfo.setTitle(project.getProjectName() + "项目开始检测"); + inspectionStepInfo.setContent(project.getProjectName() + "项目开始检测"); + inspectionStepInfo.setCreateTime(DateUtil.date()); + inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(workerUser.getId()))); + inspectionStepService.save(inspectionStepInfo); } /** @@ -91,6 +105,8 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl() - .eq(DlInspectionProject::getId, inspectionWorkNode.getProjectId())); + .eq(DlInspectionProject::getId, workNode.getProjectId())); String stepTitle = project.getProjectName() + "项目检测完成"; inspectionStepInfo.setTitle(stepTitle); - inspectionStepInfo.setContent(inspectionWorkNode.getDealImages()); + inspectionStepInfo.setContent(stepTitle); + inspectionStepInfo.setCreateTime(DateUtil.date()); + inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId()))); inspectionStepService.save(inspectionStepInfo); if (!flag) { stepTitle = "检测结束"; @@ -137,10 +155,15 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl SELECT ii.*, - iwn.id AS workNodeId + iwn.id AS workNodeId, + iwn.status AS workNodeStatus FROM inspection_info ii JOIN From ef1cd46a970256df7944683c5c6dc45f2b647cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Tue, 5 Nov 2024 18:04:02 +0800 Subject: [PATCH 16/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 3 ++- .../ShopInspectionGoodsController.java | 2 +- .../impl/AppInspectionPartnerServiceImpl.java | 10 ++++++---- .../impl/InspectionInfoServiceImpl.java | 4 +++- .../impl/InspectionWorkNodeServiceImpl.java | 20 ++++++++++++++++++- .../mapper/InspectionWorkNodeMapper.xml | 1 + .../inspection/InspectionInfoMapper.xml | 8 +++++--- 7 files changed, 37 insertions(+), 11 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 27e18686..c847a265 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 @@ -140,8 +140,9 @@ public class InspectionInfoController extends BaseController { * @param inspectionWorkNode */ @PostMapping("controls") - public void controls(@RequestBody InspectionWorkNode inspectionWorkNode){ + public CommonResult controls(@RequestBody InspectionWorkNode inspectionWorkNode){ inspectionWorkNodeService.updateImageAndStep(inspectionWorkNode); + return success("操作成功"); } /** diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java index 878063bd..ce67a2df 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java @@ -291,7 +291,7 @@ public class ShopInspectionGoodsController extends BaseController */ @GetMapping("/partnerGoodsListCol") public CommonResult partnerGoodsListCol() throws Exception { - ShopMallPartners partners = appInspectionPartnerService.shopInfo(); + ShopMallPartners partners = appInspectionPartnerService.shopInfoByUserId(); return success(shopInspectionGoodsService.partnerGoodsListCol(partners.getPartnerId())); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 8c3e4195..4d370b62 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -196,7 +196,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.orderByDesc(ShopMallPartners::getPartnerId).last("limit 1"); + queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).last("limit 1"); ShopMallPartners partner = this.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ throw new Exception("未查询到信息"); @@ -1454,9 +1454,11 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml index 13c32ffb..5d85b81f 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml @@ -270,11 +270,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT ii.*, iwn.id AS workNodeId, - iwn.status AS workNodeStatus + iwn.status AS workNodeStatus, + oi.order_no AS orderNo, + oi.phonenumber AS buyPhone FROM inspection_info ii JOIN inspection_work_node iwn ON ii.id = iwn.inspection_info_id + JOIN order_info oi ON ii.inspection_order_id = oi.id -- ii.status = '0' -- 工单正在进行中 -- ii.now_order_num = iwn.order_num -- 当前工单步骤与流程节点顺序一致 @@ -298,9 +301,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND iwn.status = '2' AND iwn.deal_user_id = #{inspectionInfo.dealUserId} - - + ORDER BY ii.create_time DESC From 95bb7a285ec474b0a3b2034d838741aad3e60692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Wed, 6 Nov 2024 10:24:14 +0800 Subject: [PATCH 17/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/inspection/entity/InspectionStepInfo.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java index da0dfb83..74afac58 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.inspection.entity; import java.util.Date; +import com.alibaba.excel.annotation.format.DateTimeFormat; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.extension.activerecord.Model; @@ -30,7 +31,7 @@ public class InspectionStepInfo extends Model { //步骤号 private Integer stepNum; //创建时间 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date createTime; //创建人id private Integer creator; From b2682976d5a99ddc2a3d594b315b55e0c901687a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Thu, 7 Nov 2024 14:53:07 +0800 Subject: [PATCH 18/28] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=AD=90=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/DlInspectionProject.java | 5 + .../inspection/entity/ProjectRoyalty.java | 50 +++++++++ .../mapper/ProjectRoyaltyMapper.java | 29 +++++ .../service/ProjectRoyaltyService.java | 82 ++++++++++++++ .../impl/DlInspectionProjectServiceImpl.java | 33 +++++- .../impl/ProjectRoyaltyServiceImpl.java | 102 ++++++++++++++++++ .../vo/DlInspectionProjectSaveReqVO.java | 9 +- .../vo/ProjectRoyaltyPageReqVO.java | 31 ++++++ .../inspection/vo/ProjectRoyaltyRespVO.java | 35 ++++++ .../vo/ProjectRoyaltySaveReqVO.java | 24 +++++ .../inspection/ProjectRoyaltyMapper.xml | 42 ++++++++ 11 files changed, 438 insertions(+), 4 deletions(-) create mode 100644 dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/ProjectRoyalty.java create mode 100644 dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ProjectRoyaltyMapper.java create mode 100644 dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ProjectRoyaltyService.java create mode 100644 dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ProjectRoyaltyServiceImpl.java create mode 100644 dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltyPageReqVO.java create mode 100644 dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltyRespVO.java create mode 100644 dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltySaveReqVO.java create mode 100644 dl-module-inspection/src/main/resources/mapper/inspection/ProjectRoyaltyMapper.xml diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/DlInspectionProject.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/DlInspectionProject.java index 7e68bd8c..e96e64fb 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/DlInspectionProject.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/DlInspectionProject.java @@ -2,10 +2,13 @@ package cn.iocoder.yudao.module.inspection.entity; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; +import java.util.List; + /** * 检测项目 * @@ -38,4 +41,6 @@ public class DlInspectionProject extends TenantBaseDO { */ private String remark; + @TableField(exist = false) + private List projectRoyaltyList; } \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/ProjectRoyalty.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/ProjectRoyalty.java new file mode 100644 index 00000000..d5f70693 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/ProjectRoyalty.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.inspection.entity; + +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 检测项目子表(项目提成) DO + * + * @author 若依 + */ +@TableName("inspection_project_royalty") +@KeySequence("inspection_project_royalty_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProjectRoyalty extends TenantBaseDO { + + /** + * 主键 + */ + @TableId + private Long id; + /** + * 检测项目主键 + */ + private String projectId; + /** + * 商品主键 + */ + private Long goodsId; + /** + * 提成金额 单位:分 + */ + private Long royaltyAmount; + + /** + * 商品名称 + */ + @TableField(exist = false) + private String title; + +} \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ProjectRoyaltyMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ProjectRoyaltyMapper.java new file mode 100644 index 00000000..cb9ac2a3 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ProjectRoyaltyMapper.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.inspection.mapper; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.inspection.entity.ProjectRoyalty; +import cn.iocoder.yudao.module.inspection.vo.ProjectRoyaltyPageReqVO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 检测项目子表(项目提成) Mapper + * + * @author 若依 + */ +@Mapper +public interface ProjectRoyaltyMapper extends BaseMapper { + + void insertBatch(@Param("createReq") List createReq); + + void deleteByProjectId(String projectId); + + List selectListByProjrctId(String projectId); + + void updtaBatch(@Param("list") List createReq); +} \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ProjectRoyaltyService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ProjectRoyaltyService.java new file mode 100644 index 00000000..e4126fa7 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ProjectRoyaltyService.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.inspection.service; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.module.inspection.entity.ProjectRoyalty; +import cn.iocoder.yudao.module.inspection.vo.ProjectRoyaltyPageReqVO; +import cn.iocoder.yudao.module.inspection.vo.ProjectRoyaltySaveReqVO; + +/** + * 检测项目子表(项目提成) Service 接口 + * + * @author 若依 + */ +public interface ProjectRoyaltyService { + + /** + * 创建检测项目子表(项目提成) + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProjectRoyalty(@Valid ProjectRoyaltySaveReqVO createReqVO); + + /** + * 批量创建检测项目子表(项目提成) + * + * @param createReq 创建信息 + */ + void batchInsertProjectRoyalty(@Valid List createReq); + + /** + * 根据项目id删除检测项目子表(项目提成) + * @param projectId + */ + void deleteInsertProjectRoyalty(String projectId); + + /** + * 根据项目id查询检测项目子表(项目提成) + * @param projectId + * @return + */ + List getProjectRoyaltyList(String projectId); + + /** + * 批量更新检测项目子表(项目提成) + * @param createReq + */ + void updtaBatch(List createReq); + +// /** +// * 更新检测项目子表(项目提成) +// * +// * @param updateReqVO 更新信息 +// */ +// void updateProjectRoyalty(@Valid ProjectRoyaltySaveReqVO updateReqVO); +// +// /** +// * 删除检测项目子表(项目提成) +// * +// * @param id 编号 +// */ +// void deleteProjectRoyalty(Long id); +// +// /** +// * 获得检测项目子表(项目提成) +// * +// * @param id 编号 +// * @return 检测项目子表(项目提成) +// */ +// ProjectRoyalty getProjectRoyalty(Long id); +// +// /** +// * 获得检测项目子表(项目提成)分页 +// * +// * @param pageReqVO 分页查询 +// * @return 检测项目子表(项目提成)分页 +// */ +// PageResult getProjectRoyaltyPage(ProjectRoyaltyPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java index 51919d1c..2dfcfdac 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java @@ -1,10 +1,14 @@ package cn.iocoder.yudao.module.inspection.service.impl; +import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.inspection.entity.DlInspectionProject; +import cn.iocoder.yudao.module.inspection.entity.ProjectRoyalty; import cn.iocoder.yudao.module.inspection.mapper.DlInspectionProjectMapper; +import cn.iocoder.yudao.module.inspection.mapper.ProjectRoyaltyMapper; import cn.iocoder.yudao.module.inspection.service.DlInspectionProjectService; +import cn.iocoder.yudao.module.inspection.service.ProjectRoyaltyService; import cn.iocoder.yudao.module.inspection.vo.DlInspectionProjectPageReqVO; import cn.iocoder.yudao.module.inspection.vo.DlInspectionProjectRespVO; import cn.iocoder.yudao.module.inspection.vo.DlInspectionProjectSaveReqVO; @@ -12,9 +16,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import java.util.List; +import java.util.stream.Collectors; + +import static com.github.yulichang.method.SqlMethod.collect; /** @@ -29,7 +38,11 @@ public class DlInspectionProjectServiceImpl extends ServiceImpl() @@ -41,29 +54,45 @@ public class DlInspectionProjectServiceImpl extends ServiceImpl projectRoyaltyList = createReqVO.getProjectRoyaltyList(); + //设置项目id + List collect = projectRoyaltyList.stream().map(item -> item.setProjectId(dlInspectionProject.getId())).collect(Collectors.toList()); + projectRoyaltyService.batchInsertProjectRoyalty(collect); // 返回 return dlInspectionProject.getId(); } @Override + @Transactional(rollbackFor = Exception.class) public void updateDlInspectionProject(DlInspectionProjectSaveReqVO updateReqVO) { // 更新 DlInspectionProject updateObj = BeanUtils.toBean(updateReqVO, DlInspectionProject.class); dlInspectionProjectMapper.updateById(updateObj); + + // 更新项目子表 + List projectRoyaltyList = updateReqVO.getProjectRoyaltyList(); + projectRoyaltyService.updtaBatch(projectRoyaltyList); } @Override + @Transactional(rollbackFor = Exception.class) public void deleteDlInspectionProject(String id) { // 删除 dlInspectionProjectMapper.deleteById(id); + //删除项目子表 + projectRoyaltyService.deleteInsertProjectRoyalty(id); } - @Override public DlInspectionProject getDlInspectionProject(String id) { - return dlInspectionProjectMapper.selectById(id); + DlInspectionProject dlInspectionProject = dlInspectionProjectMapper.selectById(id); + List projectRoyaltyList = projectRoyaltyService.getProjectRoyaltyList(id); + dlInspectionProject.setProjectRoyaltyList(projectRoyaltyList); + return dlInspectionProject; } @Override diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ProjectRoyaltyServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ProjectRoyaltyServiceImpl.java new file mode 100644 index 00000000..5b1a4c8b --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ProjectRoyaltyServiceImpl.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.inspection.service.impl; + +import cn.iocoder.yudao.module.inspection.entity.ProjectRoyalty; +import cn.iocoder.yudao.module.inspection.mapper.ProjectRoyaltyMapper; +import cn.iocoder.yudao.module.inspection.service.ProjectRoyaltyService; +import cn.iocoder.yudao.module.inspection.vo.ProjectRoyaltySaveReqVO; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + +import java.util.List; + +/** + * 检测项目子表(项目提成) Service 实现类 + * + * @author 若依 + */ +@Service +@Validated +public class ProjectRoyaltyServiceImpl extends ServiceImpl implements ProjectRoyaltyService { + + @Resource + private ProjectRoyaltyMapper projectRoyaltyMapper; + + @Override + public Long createProjectRoyalty(ProjectRoyaltySaveReqVO createReqVO) { + // 插入 + ProjectRoyalty projectRoyalty = BeanUtils.toBean(createReqVO, ProjectRoyalty.class); + projectRoyaltyMapper.insert(projectRoyalty); + // 返回 + return projectRoyalty.getId(); + } + + /** + * 批量创建检测项目子表(项目提成) + * + * @param createReq 创建信息 + */ + @Override + public void batchInsertProjectRoyalty(List createReq) { + projectRoyaltyMapper.insertBatch(createReq); + } + + /** + * 根据项目id删除检测项目子表(项目提成) + * + * @param projectId + */ + @Override + public void deleteInsertProjectRoyalty(String projectId) { + projectRoyaltyMapper.deleteByProjectId(projectId); + } + + /** + * 根据项目id查询检测项目子表(项目提成) + * + * @param projectId + * @return + */ + @Override + public List getProjectRoyaltyList(String projectId) { + return baseMapper.selectListByProjrctId(projectId); + } + + /** + * 批量更新检测项目子表(项目提成) + * + * @param createReq + */ + @Override + public void updtaBatch(List createReq) { + projectRoyaltyMapper.updtaBatch(createReq); + } + +// @Override +// public void updateProjectRoyalty(ProjectRoyaltySaveReqVO updateReqVO) { +// // 校验存在 +// validateProjectRoyaltyExists(updateReqVO.getId()); +// // 更新 +// ProjectRoyalty updateObj = BeanUtils.toBean(updateReqVO, ProjectRoyalty.class); +// projectRoyaltyMapper.updateById(updateObj); +// } +// +// @Override +// public void deleteProjectRoyalty(Long id) { +// // 校验存在 +// validateProjectRoyaltyExists(id); +// // 删除 +// projectRoyaltyMapper.deleteById(id); +// } +// +// +// @Override +// public ProjectRoyalty getProjectRoyalty(Long id) { +// return projectRoyaltyMapper.selectById(id); +// } + + +} \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/DlInspectionProjectSaveReqVO.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/DlInspectionProjectSaveReqVO.java index 935351f2..b3aa1f4b 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/DlInspectionProjectSaveReqVO.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/DlInspectionProjectSaveReqVO.java @@ -1,13 +1,18 @@ package cn.iocoder.yudao.module.inspection.vo; import cn.iocoder.yudao.module.inspection.entity.DlInspectionProject; +import cn.iocoder.yudao.module.inspection.entity.ProjectRoyalty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.util.List; + @Schema(description = "管理后台 - 检测项目新增/修改 Request VO") @Data public class DlInspectionProjectSaveReqVO extends DlInspectionProject { - - + /** + * 项目提成 + */ + private List projectRoyaltyList; } \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltyPageReqVO.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltyPageReqVO.java new file mode 100644 index 00000000..a1faf348 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltyPageReqVO.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.inspection.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 检测项目子表(项目提成)分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProjectRoyaltyPageReqVO extends PageParam { + + @Schema(description = "检测项目主键", example = "21579") + private String projectId; + + @Schema(description = "商品主键", example = "3154") + private Long goodsId; + + @Schema(description = "提成金额 单位:分") + private Long royaltyAmount; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltyRespVO.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltyRespVO.java new file mode 100644 index 00000000..a6a51584 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltyRespVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.inspection.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 检测项目子表(项目提成) Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProjectRoyaltyRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18948") + @ExcelProperty("主键") + private Long id; + + @Schema(description = "检测项目主键", example = "21579") + @ExcelProperty("检测项目主键") + private String projectId; + + @Schema(description = "商品主键", example = "3154") + @ExcelProperty("商品主键") + private Long goodsId; + + @Schema(description = "提成金额 单位:分") + @ExcelProperty("提成金额 单位:分") + private Long royaltyAmount; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltySaveReqVO.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltySaveReqVO.java new file mode 100644 index 00000000..bd8c0776 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/vo/ProjectRoyaltySaveReqVO.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.inspection.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; + +@Schema(description = "管理后台 - 检测项目子表(项目提成)新增/修改 Request VO") +@Data +public class ProjectRoyaltySaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18948") + private Long id; + + @Schema(description = "检测项目主键", example = "21579") + private String projectId; + + @Schema(description = "商品主键", example = "3154") + private Long goodsId; + + @Schema(description = "提成金额 单位:分") + private Long royaltyAmount; + +} \ No newline at end of file diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/ProjectRoyaltyMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/ProjectRoyaltyMapper.xml new file mode 100644 index 00000000..6ec80d45 --- /dev/null +++ b/dl-module-inspection/src/main/resources/mapper/inspection/ProjectRoyaltyMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + INSERT INTO inspection_project_royalty (project_id, goods_id, royalty_amount, deleted, create_time) VALUES + + (#{item.projectId},#{item.goodsId},#{item.royaltyAmount},0, NOW()) + + + + UPDATE inspection_project_royalty + SET royalty_amount = + CASE + + WHEN id = #{item.id} THEN #{item.royaltyAmount} + + ELSE royalty_amount + END + WHERE id IN + + #{item.id} + + + + UPDATE inspection_project_royalty SET deleted = 1 WHERE project_id = #{projectId} + + + \ No newline at end of file From b6c5d5515b5b4b8f3c079ed1a5513d04e4d6b9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Thu, 7 Nov 2024 18:03:42 +0800 Subject: [PATCH 19/28] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AD=A5=E4=B8=8E=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E6=AD=A5=E9=9C=80=E8=A6=81=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InspectionInfoController.java | 11 ++++ .../service/IInspectionWorkNodeService.java | 2 + .../impl/AppInspectionPartnerServiceImpl.java | 5 +- .../impl/InspectionInfoServiceImpl.java | 1 - .../impl/InspectionWorkNodeServiceImpl.java | 58 +++++++++++++++---- 5 files changed, 65 insertions(+), 12 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 c847a265..2da08cc9 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 @@ -154,4 +154,15 @@ public class InspectionInfoController extends BaseController { 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)); + } } 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 6d7e2682..225e7148 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 @@ -33,4 +33,6 @@ public interface IInspectionWorkNodeService extends IService * @return */ List getWeorkNodesById(Integer inspectionId); + + boolean orImages(Integer inspectionId, String workNodeId); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 4d370b62..314ac9b3 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -117,6 +117,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl partnerList(Page page, PartnerListQuery partnerListQuery) { @@ -1479,6 +1481,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(InspectionStepInfo::getInspectionInfoId,inspectionInfoId).orderByAsc(InspectionStepInfo::getStepNum); + queryWrapper.orderBy(true, false, InspectionStepInfo::getId); List list = stepInfoService.list(queryWrapper); if (CollectionUtil.isNotEmpty(list)){ res.setStepInfos(list); @@ -1731,7 +1734,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl() .eq(DlInspectionProject::getId, workNode.getProjectId())); - String stepTitle = project.getProjectName() + "项目检测完成"; - inspectionStepInfo.setTitle(stepTitle); - inspectionStepInfo.setContent(stepTitle); + String stepTitle = ""; + if(ObjectUtil.isNotNull(project)) { + inspectionStepInfo.setTitle(project.getProjectName() + "项目检测完成"); + }else { + inspectionStepInfo.setTitle("项目检测完成"); + } + if (ObjectUtil.isNotEmpty(inspectionWorkNode.getRemark())) { + inspectionStepInfo.setContent(inspectionWorkNode.getRemark()); + } + if (ObjectUtil.isNotEmpty(inspectionWorkNode.getDealImages())) { + inspectionStepInfo.setImages(inspectionWorkNode.getDealImages()); + } inspectionStepInfo.setCreateTime(DateUtil.date()); inspectionStepInfo.setCreator(Integer.parseInt(String.valueOf(loginUser.getId()))); inspectionStepService.save(inspectionStepInfo); @@ -162,7 +175,6 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl workNodes = getWeorkNodesById(inspectionId); + if (!hasNextNode(workNodes, workNode)) { + return true; + } + return false; + } + /** * 判断传入的 InspectionWorkNode 对象是否在集合中有后续项目 * @@ -211,9 +238,10 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl Date: Fri, 8 Nov 2024 13:28:58 +0800 Subject: [PATCH 20/28] =?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 + + From b623133c22715b41090e880923fc0b2c135e7f02 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 17:35:17 +0800 Subject: [PATCH 21/28] =?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 | 30 +++++++++++++++---- .../mapper/InspectionWorkNodeMapper.xml | 27 +++++++++-------- 2 files changed, 40 insertions(+), 17 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 24a66f91..adb7f370 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 @@ -4,6 +4,8 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.inspection.entity.InspectionInfo; import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode; import cn.iocoder.yudao.module.inspection.service.IInspectionInfoService; @@ -171,6 +173,7 @@ public class InspectionInfoController extends BaseController { /** * 分页查询节点提成 + * * @param inspectionWorkNode * @param pageNum * @param pageSize @@ -186,6 +189,7 @@ public class InspectionInfoController extends BaseController { /** * 获取提成总金额 + * * @param inspectionWorkNode * @return */ @@ -197,16 +201,32 @@ public class InspectionInfoController extends BaseController { /** * 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()); + @GetMapping("getRoyaltyListApp") + public CommonResult getRoyaltyListApp(InspectionWorkNode inspectionWorkNode, + @RequestParam(value = "pageNo", required = false, defaultValue = "1") Integer pageNum, + @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize) { + //获取当前登陆人 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + inspectionWorkNode.setDealUserId(loginUser.getId()); IPage page = new Page(pageNum, pageSize); return success(inspectionWorkNodeService.getRoyaltyList(page, inspectionWorkNode)); } + + /** + * 获取提成总金额app + * + * @return + */ + @GetMapping("getRoyaltySumApp") + public CommonResult getRoyaltySumApp(InspectionWorkNode inspectionWorkNode) { + //获取当前登陆人 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + inspectionWorkNode.setDealUserId(loginUser.getId()); + return success(inspectionWorkNodeService.getRoyaltySum(inspectionWorkNode)); + } } diff --git a/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml index 8de93f84..67fd11ec 100644 --- a/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/InspectionWorkNodeMapper.xml @@ -17,14 +17,11 @@ proj.project_name AS projectName, -- Assuming there's a project name in the inspection project table node.deal_user_name AS handlerName, IFNULL(royalty.royalty_amount, 0) / 100 AS royaltyAmount, - node.create_time AS node_create_time, - royalty.update_time AS royalty_create_time + node.update_time AS node_create_time, + node.update_time AS royalty_create_time FROM inspection_work_node AS node LEFT JOIN - inspection_project_royalty AS royalty - ON node.project_id = royalty.project_id - LEFT JOIN system_users AS users ON node.deal_user_id = users.id LEFT JOIN @@ -33,6 +30,12 @@ LEFT JOIN inspection_info AS info ON node.inspection_info_id = info.id + LEFT JOIN + order_info orders + ON info.inspection_order_id = orders.id + LEFT JOIN + inspection_project_royalty AS royalty + ON node.project_id = royalty.project_id and orders.goods_id = royalty.goods_id node.status = '2' AND info.status = '1' @@ -50,15 +53,12 @@ AND DATE_FORMAT(info.end_time, '%Y-%m') = #{inspectionWorkNode.rescueStartMonth} - - AND DATE_FORMAT(info.end_time, '%Y-%m') = #{inspectionWorkNode.rescueStartMonth} - AND info.end_time BETWEEN #{inspectionWorkNode.rescueStart} AND #{inspectionWorkNode.rescueEnd} ORDER BY - node.create_time DESC; + info.end_time DESC; + From 8a75e00e2626b1c6d4864cc9ebe98bc6f3dd00cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Sat, 9 Nov 2024 21:23:54 +0800 Subject: [PATCH 24/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/entity/InspectionStepInfo.java | 3 +++ .../mapper/InspectionStepInfoMapper.java | 3 +++ .../service/InspectionStepInfoService.java | 3 +++ .../impl/AppInspectionPartnerServiceImpl.java | 2 +- .../impl/InspectionStepInfoServiceImpl.java | 6 ++++++ .../impl/InspectionWorkNodeServiceImpl.java | 3 +++ .../mapper/inspection/InspectionStepInfoMapper.xml | 14 ++++++++++++++ 7 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 dl-module-inspection/src/main/resources/mapper/inspection/InspectionStepInfoMapper.xml diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java index 74afac58..9fdaa285 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/entity/InspectionStepInfo.java @@ -4,6 +4,7 @@ import java.util.Date; import com.alibaba.excel.annotation.format.DateTimeFormat; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.fasterxml.jackson.annotation.JsonFormat; @@ -39,5 +40,7 @@ public class InspectionStepInfo extends Model { private Date updateTime; //更新人id private Integer updater; + @TableField(exist = false) + private String nickname; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionStepInfoMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionStepInfoMapper.java index 4a0c1da7..7832b037 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionStepInfoMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionStepInfoMapper.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.iocoder.yudao.module.inspection.entity.InspectionStepInfo; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * (InspectionStepInfo)表数据库访问层 * @@ -13,5 +15,6 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface InspectionStepInfoMapper extends BaseMapper { + List listByInspectionInfoId(Long inspectionInfoId); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/InspectionStepInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/InspectionStepInfoService.java index 86698b11..f39b7ad3 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/InspectionStepInfoService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/InspectionStepInfoService.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.inspection.service; import com.baomidou.mybatisplus.extension.service.IService; import cn.iocoder.yudao.module.inspection.entity.InspectionStepInfo; +import java.util.List; + /** * (InspectionStepInfo)表服务接口 * @@ -11,5 +13,6 @@ import cn.iocoder.yudao.module.inspection.entity.InspectionStepInfo; */ public interface InspectionStepInfoService extends IService { + List listByInspectionInfoId(Long inspectionInfoId); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 314ac9b3..0270ca59 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -1482,7 +1482,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(InspectionStepInfo::getInspectionInfoId,inspectionInfoId).orderByAsc(InspectionStepInfo::getStepNum); queryWrapper.orderBy(true, false, InspectionStepInfo::getId); - List list = stepInfoService.list(queryWrapper); + List list = stepInfoService.listByInspectionInfoId(inspectionInfoId); if (CollectionUtil.isNotEmpty(list)){ res.setStepInfos(list); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionStepInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionStepInfoServiceImpl.java index 4634e3ec..6d981baf 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionStepInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionStepInfoServiceImpl.java @@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.inspection.mapper.InspectionStepInfoMapper; import cn.iocoder.yudao.module.inspection.service.InspectionStepInfoService; import org.springframework.stereotype.Service; +import java.util.List; + /** * (InspectionStepInfo)表服务实现类 * @@ -15,5 +17,9 @@ import org.springframework.stereotype.Service; @Service("inspectionStepInfoService") public class InspectionStepInfoServiceImpl extends ServiceImpl implements InspectionStepInfoService { + @Override + public List listByInspectionInfoId(Long inspectionInfoId) { + return baseMapper.listByInspectionInfoId(inspectionInfoId); + } } 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 0db10cbf..e4152001 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 @@ -325,6 +325,7 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl + + + + + From 0e6aa49c68a3127dda660a990de62816144d5f58 Mon Sep 17 00:00:00 2001 From: 13405411873 <1994398261@qq.com> Date: Mon, 11 Nov 2024 10:22:03 +0800 Subject: [PATCH 25/28] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E5=B7=A5=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PartnerCustomerInfoServiceImpl.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java index 09520af2..73dd5f6e 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java @@ -162,13 +162,13 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl ids = new HashSet<>(); - ids.add(sysRole.getId()); - permissionService.assignUserRole(user.getId(), ids); - } +// // 角色分配 +// if (!StringUtils.isEmpty(partnerCustomerInfo.getRoleCode())) { +// RoleDO sysRole = roleService.queryRole(partnerCustomerInfo.getRoleCode()); +// Set ids = new HashSet<>(); +// ids.add(sysRole.getId()); +// permissionService.assignUserRole(user.getId(), ids); +// } // 车辆信息处理 List userCarList = partnerCustomerInfo.getUserCarList(); @@ -271,6 +271,7 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl Date: Mon, 11 Nov 2024 10:35:46 +0800 Subject: [PATCH 26/28] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E5=B7=A5=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PartnerCustomerInfoServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java index 73dd5f6e..2a93ce45 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/partner/service/impl/PartnerCustomerInfoServiceImpl.java @@ -154,9 +154,9 @@ public class PartnerCustomerInfoServiceImpl extends ServiceImpl ids = new HashSet<>(); - ids.add(role.getId()); - permissionService.assignUserRole(uid, ids); +// Set ids = new HashSet<>(); +// ids.add(role.getId()); +// permissionService.assignUserRole(uid, ids); } else { throw new RuntimeException("无法找到角色 'jcyh'"); } From 1aa4436ce66ea4811a8c65cc76a6ec59cf5071bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 11 Nov 2024 16:31:26 +0800 Subject: [PATCH 27/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E9=A1=B9=E7=9B=AE=E6=8F=90=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ProjectRoyaltyMapper.java | 2 +- .../impl/DlInspectionProjectServiceImpl.java | 8 ++++++-- .../impl/InspectionInfoServiceImpl.java | 18 +++++++++--------- .../impl/ProjectRoyaltyServiceImpl.java | 14 +++++++++++++- .../inspection/DlInspectionProjectMapper.xml | 2 +- .../mapper/inspection/ProjectRoyaltyMapper.xml | 17 ++++++++++++----- 6 files changed, 42 insertions(+), 19 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ProjectRoyaltyMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ProjectRoyaltyMapper.java index cb9ac2a3..c58cf383 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ProjectRoyaltyMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ProjectRoyaltyMapper.java @@ -23,7 +23,7 @@ public interface ProjectRoyaltyMapper extends BaseMapper { void deleteByProjectId(String projectId); - List selectListByProjrctId(String projectId); + List selectListByProjrctId(@Param("projectId")String projectId,@Param("parentId") String parentId); void updtaBatch(@Param("list") List createReq); } \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java index 2dfcfdac..d1d00d39 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java @@ -72,9 +72,13 @@ public class DlInspectionProjectServiceImpl extends ServiceImpl projectRoyaltyList = updateReqVO.getProjectRoyaltyList(); - projectRoyaltyService.updtaBatch(projectRoyaltyList); + //设置项目id + List collect = projectRoyaltyList.stream().map(item -> item.setProjectId(updateReqVO.getId())).collect(Collectors.toList()); + projectRoyaltyService.batchInsertProjectRoyalty(collect); } @Override diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java index dc8c034a..461a7ba5 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionInfoServiceImpl.java @@ -289,12 +289,12 @@ public class InspectionInfoServiceImpl extends ServiceImpl workerQueryWrapper = new LambdaQueryWrapper<>(); workerQueryWrapper.eq(PartnerWorker::getUserId, loginUser.getId()).eq(PartnerWorker::getPartnerId, partners.getPartnerId()); PartnerWorker worker = workerService.getOne(workerQueryWrapper); - AdminUserDO workerUser = userService.getUser(worker.getUserId()); - if (ObjectUtils.isNotEmpty(worker)) { - inspectionInfo.setWorkId(worker.getId()); - } else { - throw new Exception("请先将接待员加入员工"); - } + AdminUserDO workerUser = userService.getUser(loginUser.getId()); +// if (ObjectUtils.isNotEmpty(worker)) { + inspectionInfo.setWorkId(workerUser.getId()); +// } else { +// throw new Exception("请先将接待员加入员工"); +// } String buyName = StringUtils.isNotEmpty(inspectionInfo.getBuyName()) ? inspectionInfo.getBuyName() : "未知客户"; String buyPhone = StringUtils.isNotEmpty(inspectionInfo.getBuyPhone()) ? inspectionInfo.getBuyPhone() : StringUtils.isNotEmpty(inspectionInfo.getBuyName()) ? inspectionInfo.getBuyName() : "无"; AdminUserDO user = userService.getUserByMobile(buyPhone); @@ -385,17 +385,17 @@ public class InspectionInfoServiceImpl extends ServiceImpl geStelectInspection(IPage page,InspectionInfo inspectionInfo) { + public IPage geStelectInspection(IPage page, InspectionInfo inspectionInfo) { //获取当前登录人 LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); //获取当前登陆人的角色 List byUserId = roleService.getByUserId(loginUser.getId()); List roleIds = byUserId.stream().map(UserRoleDO::getRoleId).collect(Collectors.toList()); - if(!"1".equals(inspectionInfo.getStatus())){ + if (!"1".equals(inspectionInfo.getStatus())) { //进行中 已完成 inspectionInfo.setDealUserId(loginUser.getId()); } - return baseMapper.selectByUser(page,roleIds,inspectionInfo); + return baseMapper.selectByUser(page, roleIds, inspectionInfo); } /** diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ProjectRoyaltyServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ProjectRoyaltyServiceImpl.java index 5b1a4c8b..47eb57d2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ProjectRoyaltyServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ProjectRoyaltyServiceImpl.java @@ -2,10 +2,14 @@ package cn.iocoder.yudao.module.inspection.service.impl; import cn.iocoder.yudao.module.inspection.entity.ProjectRoyalty; import cn.iocoder.yudao.module.inspection.mapper.ProjectRoyaltyMapper; +import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService; import cn.iocoder.yudao.module.inspection.service.ProjectRoyaltyService; import cn.iocoder.yudao.module.inspection.vo.ProjectRoyaltySaveReqVO; +import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -24,6 +28,9 @@ public class ProjectRoyaltyServiceImpl extends ServiceImpl getProjectRoyaltyList(String projectId) { - return baseMapper.selectListByProjrctId(projectId); + try { + ShopMallPartners one = appInspectionPartnerService.shopInfoByUserId(); + return baseMapper.selectListByProjrctId(projectId, one.getPartnerId().toString()); + } catch (Exception e) { + throw new RuntimeException(e); + } } /** diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/DlInspectionProjectMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/DlInspectionProjectMapper.xml index 5e3a7fc3..43708546 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/DlInspectionProjectMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/DlInspectionProjectMapper.xml @@ -23,6 +23,6 @@ AND role_id = #{entity.roleId} - ORDER BY create_time DESC + ORDER BY update_time DESC \ No newline at end of file diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/ProjectRoyaltyMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/ProjectRoyaltyMapper.xml index 6ec80d45..2e55db6e 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/ProjectRoyaltyMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/ProjectRoyaltyMapper.xml @@ -30,13 +30,20 @@ - UPDATE inspection_project_royalty SET deleted = 1 WHERE project_id = #{projectId} + delete from inspection_project_royalty where project_id = #{projectId} + \ No newline at end of file From 3620064c2fb5584cea40560ad62094c8c53dccec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 11 Nov 2024 18:06:25 +0800 Subject: [PATCH 28/28] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E9=A1=B9=E7=9B=AE=E6=8F=90=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/inspection/DlInspectionProjectMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/DlInspectionProjectMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/DlInspectionProjectMapper.xml index 43708546..5e3a7fc3 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/DlInspectionProjectMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/DlInspectionProjectMapper.xml @@ -23,6 +23,6 @@ AND role_id = #{entity.roleId} - ORDER BY update_time DESC + ORDER BY create_time DESC \ No newline at end of file