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);