From 95a6069d9b6ca92e1c071e4dde8b37f091a95060 Mon Sep 17 00:00:00 2001 From: tyty Date: Wed, 15 Nov 2023 17:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E6=8E=92=E7=8F=AD=E8=A1=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../duty/controller/ImsDutyMainController.java | 14 +++++++++++ .../operational/duty/mapper/ImsDutyMainMapper.java | 4 +++ .../operational/duty/mapper/ImsDutyMainMapper.xml | 24 ++++++++++++++++++ .../duty/service/IImsDutyMainService.java | 2 ++ .../duty/service/impl/ImsDutyMainServiceImpl.java | 29 +++++++++++++++++++++- 5 files changed, 72 insertions(+), 1 deletion(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java index df43d2c..5766290 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java @@ -6,6 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.common.logs.utils.StringUtils; import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyMainReportExcel; import com.hnac.hzims.operational.duty.service.IImsDutyMainService; @@ -32,6 +33,7 @@ import javax.validation.Valid; import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; @@ -254,4 +256,16 @@ public class ImsDutyMainController extends BladeController { .registerWriteHandler(new ExcelMergeHandler(mergeRowIndex, mergeColumeIndex)).sheet().doWrite(list); } + /** + * 个人排班表 + */ + @GetMapping("/personScheduling") + @ApiOperationSupport(order = 8) + @ApiOperation(value = "个人排班表", notes = "个人排班表") + public R personScheduling(@RequestParam String date) { + if(StringUtils.isBlank(date)){ + date = new SimpleDateFormat("yyyy-MM").format(new Date()); + } + return imsDutyMainService.personScheduling(date); + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.java index bd42089..4797168 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.java @@ -1,5 +1,6 @@ package com.hnac.hzims.operational.duty.mapper; +import com.baomidou.mybatisplus.annotation.SqlParser; import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; import com.hnac.hzims.operational.duty.vo.*; import org.apache.ibatis.annotations.Param; @@ -72,4 +73,7 @@ public interface ImsDutyMainMapper extends UserDataScopeBaseMapper getDutyDataV2(@Param("list") List deptIdList); List selectByDateListV2(@Param(value = "date")String date,@Param(value = "deptId") Long deptId); + + @SqlParser(filter = true) + List selectDutyMainByPerson(@Param(value = "date")String date,@Param(value = "userId") Long userId); } 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 0e8f2f6..cc0bce1 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 @@ -56,6 +56,30 @@ +