From 4c526559c33dfb332c61d257375cbb0d8bbad174 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Sun, 28 Apr 2024 17:17:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=80=BC=E7=8F=AD?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../duty/controller/ImsDutyLogController.java | 53 ++++++++++++++++++++++ .../operational/duty/mapper/ImsDutyMainMapper.xml | 3 +- .../duty/service/impl/ImsDutyRecServiceImpl.java | 2 + .../ticket/workTicket/feign/TicketInfoClient.java | 12 +++-- 4 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyLogController.java diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyLogController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyLogController.java new file mode 100644 index 0000000..c627cee --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyLogController.java @@ -0,0 +1,53 @@ +package com.hnac.hzims.operational.duty.controller; + + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.duty.entity.ImsDutyLogEntity; +import com.hnac.hzims.operational.duty.service.IImsDutyLogService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.api.R; +import org.springblade.system.feign.ISysClient; +import org.springframework.web.bind.annotation.*; + + +import javax.validation.Valid; + + + +/** + * 控制器 + * + * @author Chill + */ +@RestController +@AllArgsConstructor +@RequestMapping("/imsDutyLog") +@Api(value = "值班日志", tags = "值班日志") +public class ImsDutyLogController extends BladeController { + + private final IImsDutyLogService imsDutyLogService; + + private final ISysClient sysClient; + + + /** + * 新增或修改 代码自定义代号 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入imsDutyMain") + public R submit(@Valid @RequestBody ImsDutyLogEntity imsDutyLogEntity) { + boolean b = imsDutyLogService.saveOrUpdate(imsDutyLogEntity); + if(b){ + return R.success("保存成功"); + }else { + return R.fail("保存失败"); + } + } + + + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml index cc0bce1..267a575 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml @@ -64,7 +64,8 @@ DM.PRE_DUTY_ID AS preDutyId, DM.status , DM.DUTY_DATE AS dutyDate, - CONCAT(CASE WHEN DM.`CLASS_ID` = 0 THEN '休息' ELSE DC.CLASS_NAME END, '-', DG.GROUP_NAME) AS name, + CONCAT(CASE WHEN DM.`CLASS_ID` = 0 THEN '休息' ELSE DC.CLASS_NAME END, '-', + CASE WHEN DG.GROUP_NAME is null THEN '临时班组' ELSE DG.GROUP_NAME END) AS name, DC.START_TIME AS startTime, DC.END_TIME AS endTime, DM.CREATE_USER, diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java index cfd18ef..db48343 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java @@ -1585,6 +1585,8 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl unExecutedList = ticketInfoData.stream() + .filter(item -> !"结束".equals(item.getFlowTaskName())) + .filter(item -> !"废票".equals(item.getFlowTaskName())) .filter(item -> "0".equals(item.getImplementStatus())) .collect(Collectors.toList()); dutyLogEntity.setWorkUnFinish(String.valueOf(unExecutedList.size())); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClient.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClient.java index c0a81cc..b1efde8 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClient.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClient.java @@ -192,14 +192,15 @@ public class TicketInfoClient implements ITicketInfoClient { List deptList = (List) params.get("deptList"); log.info("查询工作票"); List infoList = infoService.list(new LambdaQueryWrapper() {{ - ge(WorkTicketInfoEntity::getPlanStartTime, startDate); - le(WorkTicketInfoEntity::getPlanStartTime, endDate); + ge(WorkTicketInfoEntity::getUpdateTime, startDate); + le(WorkTicketInfoEntity::getUpdateTime, endDate); in(WorkTicketInfoEntity::getCreateDept, deptList); + eq(WorkTicketInfoEntity::getIsDeleted,0); }}); return R.data(infoList); } /** - * 获取首页操作票统计结果 + * 根据时间,和机构获取对应操作票 * * @param params * @return @@ -211,8 +212,9 @@ public class TicketInfoClient implements ITicketInfoClient { String endDate = (String) params.get("endDate"); List deptList = (List) params.get("deptList"); List standardTicketList = standardService.list(new LambdaQueryWrapper() {{ - ge(StandardTicketInfoEntity::getStartTime, startDate); - le(StandardTicketInfoEntity::getStartTime, endDate); + ge(StandardTicketInfoEntity::getUpdateTime, startDate); + le(StandardTicketInfoEntity::getUpdateTime, endDate); + eq(StandardTicketInfoEntity::getIsDeleted,0); in(StandardTicketInfoEntity::getCreateDept, deptList); }}); return R.data(standardTicketList);