From ab99ebf6ccca795c1f002b49dcde790d6c075729 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 17 Jan 2024 16:16:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=A4=E6=8E=A5=E7=8F=ADbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/operational/OperationalConstants.java | 23 ++- .../operational/duty/entity/ImsDutyLogEntity.java | 110 ++++++++++++ .../operational/duty/entity/ImsDutyRecEntity.java | 4 + .../hzims/operational/duty/vo/ImsDutyRecVO.java | 4 + .../workTicket/entity/WorkTicketInfoEntity.java | 2 + .../ticket/workTicket/feign/ITicketInfoClient.java | 20 +++ .../workTicket/feign/TicketInfoClientFallback.java | 10 ++ hzims-service/operational/pom.xml | 4 +- .../duty/controller/ImsDutyRecController.java | 91 +++++++++- .../operational/duty/mapper/ImsDutyLogMapper.java | 15 ++ .../operational/duty/mapper/ImsDutyLogMapper.xml | 4 + .../duty/service/IImsDutyLogService.java | 16 ++ .../duty/service/IImsDutyRecService.java | 3 + .../duty/service/impl/ImsDutyLogServiceImpl.java | 179 ++++++++++++++++++ .../duty/service/impl/ImsDutyRecServiceImpl.java | 199 +++++++++++++++++++-- .../main/resources/template/dutyLogTemplate.docx | Bin 0 -> 14351 bytes .../ticket/workTicket/feign/TicketInfoClient.java | 34 ++++ 17 files changed, 693 insertions(+), 25 deletions(-) create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyLogEntity.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyLogMapper.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyLogMapper.xml create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyLogService.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyLogServiceImpl.java create mode 100644 hzims-service/operational/src/main/resources/template/dutyLogTemplate.docx diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java index 93810fc..145e762 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java @@ -373,6 +373,27 @@ public class OperationalConstants { this.name = name; } } + public enum DutyLogLevel { + /** + * 水电站 + */ + importLevel("1", "重要"), + /** + * 风电 + */ + generalLevel("2", "一般"), + ordinaryLevel("3", "普通"); + /** + * 泵站 + */ + @Getter + private String val; + @Getter + private String name; - + private DutyLogLevel(String val, String name) { + this.val = val; + this.name = name; + } + } } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyLogEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyLogEntity.java new file mode 100644 index 0000000..d8a3792 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyLogEntity.java @@ -0,0 +1,110 @@ +package com.hnac.hzims.operational.duty.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serializable; + + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("hz_ims_duty_log") +@ApiModel(value = "ImsDutyLog对象", description = "值班日志") +@EqualsAndHashCode(callSuper = true) +public class ImsDutyLogEntity extends TenantEntity implements Serializable{ + + private static final long serialVersionUID = -2877981299088576156L; + /** + * 值班ID + */ + @ApiModelProperty(value = "值班ID") + private Long dutyId; + /** + * 日期 + */ + @ApiModelProperty(value = "日期") + private String time; + /** + * 值班时间 + */ + private String dutyTime; + /** + * 班类 + */ + @ApiModelProperty(value = "班类") + private String classType; + /** + * 已执行操作票 + */ + private String operationFinish="0"; + /** + * 未执行操作票 + */ + private String operationUnFinish="0"; + /** + * 作废操作票 + */ + private String operationCancel="0"; + /** + * 执行中工作票 + */ + private String workDoing="0"; + /** + * 未执行工作票 + */ + private String workUnFinish="0"; + /** + * 终结工作票 + */ + private String workFinish="0"; + /** + * 作废工作票 + */ + private String workCancel="0"; + /** + * 交班值班长 + */ + private String handMaster; + /** + * 交班值班员 + */ + private String handNumber; + /** + * 交班时间 + */ + private String handTime; + /** + * 接班值班长 + */ + private String carryMaster; + /** + * 接班值班员 + */ + private String carryNumber; + /** + * 接班时间 + */ + private String carryTime; + /** + * 交接班会照片 + */ + private String dutyPic; + /** + * 值班情况 + */ + private String dutyStatus; + /** + * 上级通知及注意事项 + */ + private String notice; + + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyRecEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyRecEntity.java index 7fd2b1c..0735f33 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyRecEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/ImsDutyRecEntity.java @@ -1,6 +1,7 @@ package com.hnac.hzims.operational.duty.entity; import com.baomidou.mybatisplus.annotation.SqlCondition; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -102,5 +103,8 @@ public class ImsDutyRecEntity extends TenantEntity { @QueryField(condition = SqlCondition.LIKE) private String dealChain; + @ApiModelProperty(value = "值班日志") + @TableField(exist=false) + private ImsDutyLogEntity imsDutyLogEntity; } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsDutyRecVO.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsDutyRecVO.java index 38f9302..6fb1a04 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsDutyRecVO.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/vo/ImsDutyRecVO.java @@ -2,6 +2,7 @@ package com.hnac.hzims.operational.duty.vo; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.hnac.hzims.operational.duty.entity.ImsDutyLogEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyRecEntity; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; @@ -42,4 +43,7 @@ public class ImsDutyRecVO extends ImsDutyRecEntity { @ApiModelProperty(value = "站点名称") private String stationName; + + @ApiModelProperty(value = "值班日志") + private ImsDutyLogEntity imsDutyLogEntity; } diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java index 5fda1e0..785d20c 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java @@ -499,5 +499,7 @@ public class WorkTicketInfoEntity extends TenantEntity implements Serializable { @ApiModelProperty("是否线下 : 1-线下,0-线上") private Boolean isOffline; + @ApiModelProperty + private Integer implementStatus; } diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/feign/ITicketInfoClient.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/feign/ITicketInfoClient.java index 96f07b1..ae992f7 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/feign/ITicketInfoClient.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/feign/ITicketInfoClient.java @@ -33,6 +33,8 @@ public interface ITicketInfoClient { String GET_TICKET_PASS_BY_IDS = API_PREFIX + "/getTicketPassByIds"; String GET_WORK_TICKET_TRANSFER = API_PREFIX + "/getWorkTicketTransfer"; String GET_WORK_TICKET_STATISTIC = API_PREFIX + "/getWorkTicketStatistic"; + String GET_WORK_TICKET_INFO = API_PREFIX + "/getWorkTicketInfo"; + String GET_OPERATE_TICKET_INFO = API_PREFIX + "/getOperateTicketInfo"; String GET_OPERATE_TICKET_STATISTIC = API_PREFIX + "/getOperateTicketStatistic"; String GET_OPERATE_WORK_STATISTIC = API_PREFIX + "/getOperateWorkStatistic"; String GET_WORK_TICKET_CHECK = API_PREFIX + "/getWorkTicketCheck"; @@ -90,6 +92,24 @@ public interface ITicketInfoClient { @PostMapping(GET_WORK_TICKET_STATISTIC) R getWorkTicketStatistic(@RequestBody Map params); + + /** + * 根据时间,和机构获取对应工作票 + * @param params startDate endDate deptList + * @return + */ + @PostMapping(GET_WORK_TICKET_INFO) + R> getWorkTicketInfo(@RequestBody Map params); + + + /** + * 根据时间,和机构获取对应操作票 + * @param params startDate endDate deptList + * @return + */ + @PostMapping(GET_OPERATE_TICKET_INFO) + R> getOperateTicketInfo(@RequestBody Map params); + /** * 获取首页操作票统计结果 * @return diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClientFallback.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClientFallback.java index aa58b72..bc833cf 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClientFallback.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/feign/TicketInfoClientFallback.java @@ -51,6 +51,16 @@ public class TicketInfoClientFallback implements ITicketInfoClient { } @Override + public R> getWorkTicketInfo(Map params) { + return R.fail("查询失败!"); + } + + @Override + public R> getOperateTicketInfo(Map params) { + return R.fail("查询失败!"); + } + + @Override public R getOperateTicketStatistic(Map paramMap) { return null; } diff --git a/hzims-service/operational/pom.xml b/hzims-service/operational/pom.xml index fbb805c..7f60701 100644 --- a/hzims-service/operational/pom.xml +++ b/hzims-service/operational/pom.xml @@ -106,12 +106,12 @@ cn.afterturn easypoi-base - 3.2.0 + 4.4.0 cn.afterturn easypoi-annotation - 3.2.0 + 4.4.0 diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java index 07d391a..166bad4 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyRecController.java @@ -1,17 +1,17 @@ package com.hnac.hzims.operational.duty.controller; +import cn.afterturn.easypoi.word.WordExportUtil; import com.baomidou.mybatisplus.core.metadata.IPage; 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.dto.ImsDutyRecDTO; -import com.hnac.hzims.operational.duty.entity.AnalyseExample; -import com.hnac.hzims.operational.duty.entity.ImsDutyEmergencyEntity; -import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; -import com.hnac.hzims.operational.duty.entity.ImsDutyRecEntity; +import com.hnac.hzims.operational.duty.entity.*; import com.hnac.hzims.operational.duty.service.IImsAnalyseExampleService; import com.hnac.hzims.operational.duty.service.IImsDutyEmergencyService; +import com.hnac.hzims.operational.duty.service.IImsDutyLogService; import com.hnac.hzims.operational.duty.service.IImsDutyRecService; import com.hnac.hzims.operational.duty.vo.ImsDutyEmergencyVo; import com.hnac.hzims.operational.duty.vo.ImsDutyRecVO; @@ -21,7 +21,10 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.utils.AuthUtil; @@ -32,8 +35,11 @@ import org.springblade.flow.core.entity.BladeFlow; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; +import java.net.URLEncoder; +import java.util.HashMap; /** @@ -45,13 +51,16 @@ import javax.validation.Valid; @AllArgsConstructor @RequestMapping("/imsDutyRec") @Api(value = "值班交接controller", tags = "值班交接相关操作(交接班管理)") +@Slf4j public class ImsDutyRecController extends BladeController { - - private final IImsDutyRecService imsDutyRecService; + @Resource + private IImsDutyRecService imsDutyRecService; @Resource private IImsDutyEmergencyService iImsDutyEmergencyService; @Resource private IImsAnalyseExampleService iImsAnalyseExampleService; + @Resource + private IImsDutyLogService imsDutyLogService; /** * 详情 @@ -147,7 +156,6 @@ public class ImsDutyRecController extends BladeController { if(null == deptId){ deptId = Long.valueOf(AuthUtil.getDeptId()); } - return imsDutyRecService.getTheManinGroupRec(deptId); } @@ -335,7 +343,76 @@ public class ImsDutyRecController extends BladeController { public R changeShift(@Valid @RequestBody ImsDutyRecDTO imsDutyRecDTO) { return R.status(imsDutyRecService.changeShift(imsDutyRecDTO)); } +// /** +// * 查询交接班值班日志 +// */ +// @GetMapping("/getDutyLog") +// @ApiOperationSupport(order = 1) +// @ApiOperation(value = "查询交接班值班日志", notes = "传入imsDutyRec") +// public R getDutyLog(ImsDutyLogEntity imsDutyLogEntity) { +// R res=imsDutyLogService.getDutyLog(imsDutyLogEntity); +// return res; +// } + /** + * 新增交接班值班日志 + */ + @GetMapping("/saveDutyLog") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "新增交接班值班日志", notes = "传入imsDutyRec") + public R saveDutyLog(@RequestBody ImsDutyLogEntity imsDutyLogEntity) { + boolean b = imsDutyLogService.saveOrUpdate(imsDutyLogEntity); + if (b){ + return R.success("保存成功"); + }else { + return R.fail("保存失败"); + } + } + /** + * 查询值班日志列表-分页 + */ + @GetMapping("/queryDutyLogList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "查询值班日志列表-分页", notes = "传入imsDutyRec") + public R> queryDutyLogList(ImsDutyLogEntity imsDutyLogEntity, Query query) { + IPage page = imsDutyLogService.page(Condition.getPage(query), Condition.getQueryWrapper(imsDutyLogEntity)); + return R.data(page); + } + /** + * 导出交接班值班日志 + */ + @GetMapping("/exportDutyLog") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "导出交接班值班日志", notes = "传入imsDutyRec") + public void exportDutyLog(HttpServletResponse response, @ApiParam(value = "當前排班Id", required = true) String dutyId){ + HashMap map = new HashMap<>(); + imsDutyLogService.exportDutyLog(dutyId,map); + String dutyTime =""; + if (StringUtils.isNotBlank(map.get("dutyTime").toString())) { + dutyTime = map.get("dutyTime").toString(); + } + // 下载导出 + String filename = dutyTime+"值班日志"; + // 设置头信息 + response.setCharacterEncoding("UTF-8"); + response.setContentType("application/vnd.ms-excel"); + ServletOutputStream outputStream = null; + try { + //设置xlsx格式 + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename + ".docx", "UTF-8")); + //创建一个输出流 + outputStream = response.getOutputStream(); + XWPFDocument xwpfDocument = WordExportUtil.exportWord07("template/dutyLogTemplate.docx", map); + //写入数据 + xwpfDocument.write(outputStream); + // 关闭 + outputStream.close(); + xwpfDocument.close(); + } catch (Exception e) { + e.printStackTrace(); + log.error("转换对象失败!"); + } + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyLogMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyLogMapper.java new file mode 100644 index 0000000..2fb9f65 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyLogMapper.java @@ -0,0 +1,15 @@ +package com.hnac.hzims.operational.duty.mapper; + + +import com.hnac.hzims.operational.duty.entity.ImsDutyLogEntity; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +/** + * Mapper 接口 + * + * @author Chill + */ +public interface ImsDutyLogMapper extends UserDataScopeBaseMapper { + + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyLogMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyLogMapper.xml new file mode 100644 index 0000000..013468b --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyLogMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyLogService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyLogService.java new file mode 100644 index 0000000..6213480 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyLogService.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.operational.duty.service; + +import com.hnac.hzims.operational.duty.entity.ImsDutyLogEntity; +import org.springblade.core.mp.base.BaseService; +import java.util.HashMap; + +/** + * 服务类 + * + * @author Chill + */ +public interface IImsDutyLogService extends BaseService { + + void exportDutyLog(String dutyId, HashMap map); + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyRecService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyRecService.java index 35c4d6e..67e1e50 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyRecService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyRecService.java @@ -5,6 +5,7 @@ import com.hnac.hzims.operational.duty.dto.ChangeShiftsReqDTO; import com.hnac.hzims.operational.duty.dto.ChangeShiftsRspDTO; import com.hnac.hzims.operational.duty.dto.ImsDutyRecDTO; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; +import com.hnac.hzims.operational.duty.entity.ImsDutyLogEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyRecEntity; import com.hnac.hzims.operational.duty.vo.ImsDutyRecVO; @@ -135,4 +136,6 @@ public interface IImsDutyRecService extends BaseService { * @return */ Boolean dealDutyRecFlow(ImsDutyRecDTO recDTO); + + R getDutyLog(ImsDutyLogEntity imsDutyLogEntity); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyLogServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyLogServiceImpl.java new file mode 100644 index 0000000..f6ace80 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyLogServiceImpl.java @@ -0,0 +1,179 @@ +package com.hnac.hzims.operational.duty.service.impl; + +import cn.afterturn.easypoi.entity.ImageEntity; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.hnac.hzims.operational.OperationalConstants; +import com.hnac.hzims.operational.duty.entity.*; +import com.hnac.hzims.operational.duty.mapper.ImsDutyLogMapper; +import com.hnac.hzims.operational.duty.service.*; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.tool.utils.Func; +import org.springframework.stereotype.Service; +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.*; + + +/** + * 服务实现类 + * + * @author Chill + */ +@Slf4j +@Service +public class ImsDutyLogServiceImpl extends BaseServiceImpl implements IImsDutyLogService { + + @Override + public void exportDutyLog(String dutyId, HashMap map) { + ImsDutyLogEntity res = this.baseMapper.selectOne(new LambdaQueryWrapper() {{ + eq(ImsDutyLogEntity::getDutyId, dutyId) + .last(" limit 1");}}); +// ImsDutyLogEntity res=new ImsDutyLogEntity(); + if (Func.isNotEmpty(res)){ + map.put("time",res.getTime()); + map.put("dutyTime",res.getDutyTime()); + map.put("classType",res.getClassType()); + + String dutyStatus = res.getDutyStatus(); + if (StringUtils.isNotBlank(dutyStatus)){ + List> dutyStatusList = JSONObject.parseObject(dutyStatus, + new TypeReference< List>>() { + }); + + for (HashMap stringStringHashMap : dutyStatusList) { + for (OperationalConstants.DutyLogLevel value : OperationalConstants.DutyLogLevel.values()) { + if (value.getVal().equals(stringStringHashMap.get("level"))){ + stringStringHashMap.replace("level",value.getName()); + } + } + } + + map.put("dutyStatus",dutyStatusList); + }else { + ArrayList> dutyStatusList = new ArrayList<>(); + HashMap temp = new HashMap<>(); + temp.put("name", ""); + temp.put("status",""); + temp.put("level", ""); + dutyStatusList.add(temp); + map.put("dutyStatus",dutyStatusList); + } + + + map.put("operationFinish",res.getOperationFinish()); + map.put("operationUnFinish",res.getOperationUnFinish()); + map.put("operationCancel",res.getOperationCancel()); + map.put("workDoing",res.getWorkDoing()); + map.put("workUnFinish",res.getWorkUnFinish()); + map.put("workFinish",res.getWorkFinish()); + map.put("workCancel",res.getWorkCancel()); + + String notice = res.getNotice(); + if (StringUtils.isNotBlank(notice)){ + List> noticeItemList = JSONObject.parseObject(notice, + new TypeReference< List>>() { + }); + for (HashMap stringStringHashMap : noticeItemList) { + for (OperationalConstants.DutyLogLevel value : OperationalConstants.DutyLogLevel.values()) { + if (value.getVal().equals(stringStringHashMap.get("level"))){ + stringStringHashMap.replace("level",value.getName()); + } + } + } + map.put("notice",noticeItemList); + }else { + ArrayList> noticeItemList = new ArrayList<>(2); + HashMap temp = new HashMap<>(); + temp.put("item", ""); + temp.put("level",""); + noticeItemList.add(temp); + map.put("notice",noticeItemList); + } + map.put("handMaster",res.getHandMaster()); + map.put("handNumber",res.getHandNumber()); + map.put("handTime",res.getHandTime()); + map.put("carryMaster",res.getCarryMaster()); + map.put("carryNumber",res.getCarryNumber()); + map.put("carryTime",res.getCarryTime()); + map.put("carryMaster",res.getCarryMaster()); + List imageEntityList = new ArrayList<>(); + if (StringUtils.isNotBlank(res.getDutyPic())) { + String[] dutyPicSplit = res.getDutyPic().split(","); + for (String string : dutyPicSplit) { + ImageEntity imageEntity = new ImageEntity(imgToByte("/template/img" + downloadFileByUrl(string, "/template/img")), 225, 163); + imageEntity.setUrl(string); + imageEntityList.add(imageEntity); + } + map.put("dutyPic",imageEntityList); + } + } + + } + + + private byte[] imgToByte(String tempImgPath) { + File file = new File(tempImgPath); + byte[] buffer = null; + try { + FileInputStream fis = new FileInputStream(file); + ByteArrayOutputStream bos = new ByteArrayOutputStream(1000); + byte[] b = new byte[1000]; + int n; + while ((n = fis.read(b)) != -1) { + bos.write(b, 0, n); + } + fis.close(); + bos.close(); + buffer = bos.toByteArray(); + } catch (IOException e) { + log.error(e.getMessage()); + } + //删除临时文件 + file.delete(); + return buffer; + } + + private String downloadFileByUrl(String fileUrl, String downloadFileDir){ + URL url = null; + String fileName = null; + try { + url = new URL(fileUrl); + HttpURLConnection connection = (HttpURLConnection)url.openConnection(); + connection.setConnectTimeout(5000); + connection.setReadTimeout(5000); + connection.connect(); + + int responseCode = connection.getResponseCode(); + if (responseCode == 200) { + + InputStream inputStream = connection.getInputStream(); + + int lastSlashIndex = fileUrl.lastIndexOf("/"); + if (lastSlashIndex > 0){ + fileName = fileUrl.substring(lastSlashIndex+1); + String filePath = downloadFileDir + fileName; + File file = new File(filePath); + if (file.exists()){ + file.delete(); + } + OutputStream outputStream = new FileOutputStream(file); + // 将文件流拷贝到本地处理 + IOUtils.copy(inputStream, outputStream); + }else { + throw new ServiceException("下载文件路径异常:" + downloadFileDir); + } + } + } catch (Exception e) { + throw new ServiceException("文件图片下载失败!"); + } + return fileName; + } + +} 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 38179d0..83fbfed 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 @@ -34,6 +34,10 @@ import com.hnac.hzims.operational.duty.vo.ImsRecVo; import com.hnac.hzims.operational.duty.vo.ImsSchedulingVo; import com.hnac.hzims.operational.duty.wrapper.ImsDutyRecWrapper; import com.hnac.hzims.operational.station.service.IStationService; +import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO; +import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity; +import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity; +import com.hnac.hzims.ticket.workTicket.feign.ITicketInfoClient; import com.hnac.hzinfo.inspect.plan.PlanContants; import com.hnac.hzinfo.inspect.plan.feign.IInspectPlanClient; import com.hnac.hzinfo.inspect.plan.vo.PlanVO; @@ -49,6 +53,7 @@ import org.springblade.flow.core.entity.BladeFlow; import org.springblade.flow.core.feign.IFlowClient; import org.springblade.flow.core.utils.TaskUtil; import org.springblade.system.feign.ISysClient; +import org.springblade.system.user.cache.UserCache; import org.springblade.system.user.entity.User; import org.springblade.system.user.feign.IUserClient; import org.springframework.beans.factory.annotation.Autowired; @@ -57,6 +62,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; +import javax.annotation.Resource; import java.math.BigDecimal; import java.sql.Time; import java.text.SimpleDateFormat; @@ -65,6 +71,8 @@ import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; +import static org.springblade.core.tool.utils.DateUtil.PATTERN_DATETIME; + /** * 服务实现类 @@ -74,12 +82,15 @@ import java.util.stream.Collectors; @Slf4j @Service public class ImsDutyRecServiceImpl extends BaseServiceImpl implements IImsDutyRecService { - + @Resource + private ITicketInfoClient ticketInfoClient; @Autowired private ImsDutyMainMapper imsDutyMainMapper; @Autowired private IImsDutyMainService imsDutyMainService; @Autowired + private IImsDutyLogService imsDutyLogService; + @Autowired private IImsDutyClassService imsDutyClassService; @Autowired private IImsDutyGroupService imsDutyGroupService; @@ -228,7 +239,11 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl() {{ + eq(ImsDutyLogEntity::getDutyId, dutyId); + }}); + imsDutyRecVO.setImsDutyLogEntity(dutyLogEntity); } imsDutyRecVOIPage.setRecords(records); return imsDutyRecVOIPage; @@ -505,7 +524,13 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl dutyLog = this.getDutyLog(imsDutyLogEntity); + if(dutyLog.isSuccess()&&ObjectUtil.isNotEmpty(dutyLog.getData())){ + ImsDutyLogEntity data = dutyLog.getData(); + vo.setImsDutyLogEntity(data); + } ImsDutyRecEntity dutyRecEntity = this.baseMapper.selectOne(new LambdaQueryWrapper() {{ eq(ImsDutyRecEntity::getDutyId, entity.getPreDutyId()); }}); @@ -824,12 +849,17 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl() {{ + eq(ImsDutyClassEntity::getId, mainEntityById.getClassId()); + last("limit 1"); + }}); + String dutyTime = DateUtil.format(mainEntityById.getDutyDate(), DateUtil.PATTERN_DATE) + " " +DateUtil.format(classEntity.getStartTime(), DateUtil.PATTERN_TIME); + Date dutyDate = DateUtil.parse(dutyTime, PATTERN_DATETIME); if (dutyDate.getTime() > parse.getTime()) { - return R.fail("值班时间不能大于当前时间"); + return R.fail("指定的值班开始时间不能晚于当前时间"); } - ImsDutyMainEntity mainEntityById = imsDutyMainService.getById(id); //获取当前值班 ImsDutyMainEntity mainEntity = imsDutyMainService.getOne(new LambdaQueryWrapper() {{ @@ -998,7 +1028,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl() {{ @@ -1019,7 +1049,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl parse.getTime()) { bool = true; strDate = calculateDutyDate(parse); @@ -1051,7 +1081,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl parse.getTime()) { strDate = calculateDutyDate(parse); } @@ -1085,7 +1115,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpllambdaUpdate() + .set(ImsDutyLogEntity::getCarryTime, DateUtil.format(new Date(), PATTERN_DATETIME)) + .eq(ImsDutyLogEntity::getDutyId,imsDutyLogEntity.getDutyId()) + ); + log.info("更新值班日志"); } ImsDutyRecEntity dutyRec = BeanUtil.copy(recDTO, ImsDutyRecEntity.class); // 更新交班值班 @@ -1464,4 +1499,138 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl getDutyLog(ImsDutyLogEntity imsDutyLogEntity) { + String deptId = AuthUtil.getUser().getDeptId(); + if (com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isNotEmpty(imsDutyLogEntity)&& com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isNotEmpty(imsDutyLogEntity.getDutyId())) { + ImsDutyLogEntity res = imsDutyLogService.getOne(new LambdaQueryWrapper() {{ + eq(ImsDutyLogEntity::getDutyId, imsDutyLogEntity.getDutyId()) + .last(" limit 1");}}); + if (Func.isNotEmpty(res)){ + return R.data(res); + } + } + ImsDutyMainEntity mainEntity = imsDutyMainMapper.selectOne(new LambdaQueryWrapper() {{ + eq(ImsDutyMainEntity::getId, imsDutyLogEntity.getDutyId()) + .last(" limit 1"); + }}); + if (cn.hutool.core.util.ObjectUtil.isEmpty(mainEntity)) { + return R.success("您当前未值班"); + } + Long mainId = mainEntity.getId(); + ImsDutyMainEntity carryEntity = imsDutyMainMapper.selectOne(new LambdaQueryWrapper() {{ + eq(ImsDutyMainEntity::getPreDutyId, mainId) + .last(" limit 1"); + }}); + if (cn.hutool.core.util.ObjectUtil.isEmpty(carryEntity)) { + return R.success("没有接班计划,请到排班计划进行排班"); + } + + ImsDutyLogEntity dutyLogEntity=new ImsDutyLogEntity(); + dutyLogEntity.setDutyId(mainId); + //值班-交接班基本信息 + dutyLogEntity.setTime(DateUtil.format(new Date(), "yyyy-MM-dd")); + ImsDutyClassEntity classEntity = imsDutyClassService.getById(mainEntity.getClassId()); + dutyLogEntity.setClassType(classEntity.getClassName()); + String startTime = DateUtil.format(mainEntity.getDutyDate(), "yyyy-MM-dd") + " " +DateUtil.format(classEntity.getStartTime(), "HH:mm:ss"); + String endTime = DateUtil.format(carryEntity.getDutyDate(), "yyyy-MM-dd")+ " " + DateUtil.format(classEntity.getEndTime(), "HH:mm:ss"); + String dutyTime = startTime + "至" +endTime; + dutyLogEntity.setDutyTime(dutyTime); + ImsDutyRecEntity rec = this.getOne(Wrappers.lambdaQuery() + .eq(ImsDutyRecEntity::getDutyId, mainId) + .last("limit 1;")); + dutyLogEntity.setHandMaster(getManagerName(mainEntity)); + dutyLogEntity.setHandNumber(getManagerNumber(mainEntity)); + dutyLogEntity.setCarryMaster(getManagerName(carryEntity)); + dutyLogEntity.setCarryNumber(getManagerNumber(carryEntity)); + if (ObjectUtil.isNotEmpty(rec)) { + dutyLogEntity.setHandTime(DateUtil.format(rec.getExecTime(), "yyyy-MM-dd HH:mm:ss")); + dutyLogEntity.setCarryTime(DateUtil.format(rec.getAcceptTime(), "yyyy-MM-dd HH:mm:ss")); + } + //工作票 + Map paramMap = new HashMap<>(); + paramMap.put("startDate", startTime); + paramMap.put("endDate", endTime); + paramMap.put("deptList", deptId); + R> workTicketInfo = ticketInfoClient.getWorkTicketInfo(paramMap); + if(workTicketInfo.isSuccess()&& cn.hutool.core.util.ObjectUtil.isNotEmpty(workTicketInfo.getData())){ + List ticketInfoData = workTicketInfo.getData(); + // 工作票终结数量 + Integer ticketInfoCompleteNum = ticketInfoData.stream().filter(item -> "结束".equals(item.getFlowTaskName())) + .collect(Collectors.toList()).size(); + dutyLogEntity.setWorkFinish(ticketInfoCompleteNum.toString()); + //工作票作废 + List invalidList = ticketInfoData.stream().filter(item -> "废票".equals(item.getFlowTaskName())) + .collect(Collectors.toList()); + dutyLogEntity.setWorkCancel(String.valueOf(invalidList.size())); + Integer i=0; + //工作票未执行数量 + List unExecutedList = ticketInfoData.stream() + .filter(item -> i.equals(item.getImplementStatus())) + .collect(Collectors.toList()); + dutyLogEntity.setWorkUnFinish(String.valueOf(unExecutedList.size())); + // 工作票执行数量 + Integer ticketInfoStartNum = ticketInfoData.size() - ticketInfoCompleteNum-ticketInfoCompleteNum-invalidList.size()-unExecutedList.size(); + dutyLogEntity.setWorkDoing(ticketInfoStartNum.toString()); + } + R> operateTicketInfo = ticketInfoClient.getOperateTicketInfo(paramMap); + if(operateTicketInfo.isSuccess()&& cn.hutool.core.util.ObjectUtil.isNotEmpty(operateTicketInfo.getData())){ + List operateTicketInfoData = operateTicketInfo.getData(); + Integer finishSize = operateTicketInfoData.stream().filter(item -> "结束".equals(item.getFlowTaskName())) + .collect(Collectors.toList()).size(); + dutyLogEntity.setOperationFinish(finishSize.toString()); + Integer invalidSize= operateTicketInfoData.stream().filter(item -> "废票".equals(item.getFlowTaskName())) + .collect(Collectors.toList()).size(); + dutyLogEntity.setOperationCancel(invalidSize.toString()); + Integer doingNum = operateTicketInfoData.size() - finishSize - invalidSize; + dutyLogEntity.setOperationUnFinish(doingNum.toString()); + } + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setStartDate(DateUtil.format(classEntity.getStartTime(),"yyyy-MM-dd HH:mm:ss")); + ticketStatisticDTO.setEndDate(DateUtil.format(classEntity.getEndTime(),"yyyy-MM-dd HH:mm:ss")); + ticketStatisticDTO.setDeptIds(deptId); + return R.data(dutyLogEntity); + } + + + private String getManagerName(ImsDutyMainEntity mainEntity) { + String managerName=""; + if (cn.hutool.core.util.ObjectUtil.isNotEmpty(mainEntity.getDutyGroupId())){ + Long dutyGroupId = mainEntity.getDutyGroupId(); + ImsDutyGroupEntity groupEntity = imsDutyGroupService.getById(dutyGroupId); + User manager = UserCache.getUser(groupEntity.getManagerId()); + if (cn.hutool.core.util.ObjectUtil.isNotEmpty(manager)){ + managerName=manager.getName(); + } + }else { + ImsDutyMainPersonEntity dutyMainPerson = imsDutyMainPersonService.getOne(new LambdaQueryWrapper() {{ + eq(ImsDutyMainPersonEntity::getDutyMainId, mainEntity.getId()) + .last(" limit 1"); + }}); + User manager = UserCache.getUser(dutyMainPerson.getDutyChargePerson()); + if (cn.hutool.core.util.ObjectUtil.isNotEmpty(manager)){ + managerName=manager.getName(); + } + } + return managerName; + } + + private String getManagerNumber(ImsDutyMainEntity mainEntity) { + String handNumber=""; + String[] split = mainEntity.getDutyPersonIds().split("\\^"); + if (null != split && split.length > 0) { + for (int j = 0; j < split.length; j++) { + User user = UserCache.getUser(Long.valueOf(split[j])); + if (org.springblade.core.tool.utils.ObjectUtil.isNotEmpty(user)) { + if (j == split.length - 1) { + handNumber= handNumber + user.getName(); + } else { + handNumber= handNumber + user.getName()+ "、"; + } + } + } + } + return handNumber; + } } diff --git a/hzims-service/operational/src/main/resources/template/dutyLogTemplate.docx b/hzims-service/operational/src/main/resources/template/dutyLogTemplate.docx new file mode 100644 index 0000000000000000000000000000000000000000..24dea455ef6e421e3082931abe82a8b72ab3da0b GIT binary patch literal 14351 zcma)j19WH0vUi+`ZEIrNwvCBx+Y`;iwr$%^Cbn&RVttu&?!D)ndH22b^;-GwUcKwr zRb91rrFV6eoFp&^B*3rsO=g?#*Y)2G;-h0|V<2a5W9vXG_d$mIG4SaRGVw3^KQ#dX z0PKJO0O0>lre|wQ<7#D@9zAC5PX`}x5&s1HopUiNvmly4LfoNbSuAQFUELV4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57o{&-LRFJ`|AoBnLSnEh&hD|7niB7ZM*`bGRFKhnR$ z{#Ew$yR^R-=lq4P{&<@I!}Q;!I={nzFDLm6&hxR?`3wG^;*$Ss(Z8xD{%pS%o%E5L z^{*O=Ukm>4M)~Em{%pS>QuP1uOuq~JyA%5b{8Lj-{{;RIm-hQizn^0LHB$%HzeM=^ z9KXYV-wXZ)Z>0Jc{2x2R-|@evuKk4<`%uIGNM!pR{(Bk9U+~s{>-?{xlt01$KiXIO uNCx?X_rH@y{`s8#o;LCq*RTHs{*^=`Ckgt;TL=G9!8iHwJdrc~0{uT2(G+k1 literal 0 HcmV?d00001 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 bf60416..3c9d3f5 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 @@ -183,6 +183,40 @@ public class TicketInfoClient implements ITicketInfoClient { return R.data(workTicketStatisticVO); } + @Override + @PostMapping("/getWorkTicketInfo") + public R> getWorkTicketInfo(@RequestBody Map params) { + String startDate = (String) params.get("startDate"); + String endDate = (String) params.get("endDate"); + List deptList = (List) params.get("deptList"); + log.info("查询工作票"); + List infoList = infoService.list(new LambdaQueryWrapper() {{ + ge(WorkTicketInfoEntity::getPlanStartTime, startDate); + le(WorkTicketInfoEntity::getPlanStartTime, endDate); + in(WorkTicketInfoEntity::getCreateDept, deptList); + }}); + return R.data(infoList); + } + /** + * 获取首页操作票统计结果 + * + * @param params + * @return + */ + @Override + @PostMapping("/getOperateTicketInfo") + public R> getOperateTicketInfo(@RequestBody Map params) { + String startDate = (String) params.get("startDate"); + 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); + in(StandardTicketInfoEntity::getCreateDept, deptList); + }}); + return R.data(standardTicketList); + } + /** * 获取首页操作票统计结果 *