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 @@ +