Browse Source

#新版电站首页

zhongwei
yang_shj 4 months ago
parent
commit
6a4ed31bb1
  1. 2
      hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/SafeCheckStatisticVO.java
  2. 2
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java
  3. 6
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java
  4. 18
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  5. 1
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java
  6. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java
  7. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/TicketApplication.java
  8. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/OperRepairMapper.xml
  9. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/WorkTaskMapper.xml
  10. 18
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java
  11. 40
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.xml
  12. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketMeasureMapper.xml
  13. 11
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java
  14. 13
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
  15. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/OperateTicketClient.java
  16. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/TwoTicketMatterLibraryMapper.xml
  17. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketDelayMapper.xml
  18. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketFlowMapper.xml
  19. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.xml
  20. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketMembersChangeMapper.xml
  21. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketOperateTimeMapper.xml
  22. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketPrincipalChangeMapper.xml
  23. 0
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketSafetyMeasureMapper.xml

2
hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/SafeCheckStatisticVO.java

@ -13,7 +13,7 @@ import java.io.Serializable;
*/ */
@ApiModel(value = "安全检查项目统计对象",description = "安全检查项目统计对象") @ApiModel(value = "安全检查项目统计对象",description = "安全检查项目统计对象")
@Data @Data
public class SafeCheckStatisticVO implements Serializable { public class SafeCheckStatisticVO {
@ApiModelProperty(value = "项目类型") @ApiModelProperty(value = "项目类型")
private String projectType; private String projectType;

2
hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java

@ -42,7 +42,7 @@ public interface IInspectTaskClient {
* @param inspectType 查询类型 1为运行人员 2管理及其他人员 * @param inspectType 查询类型 1为运行人员 2管理及其他人员
* @return * @return
*/ */
@GetMapping(EXPIRE_INSPECT) @GetMapping(GET_INSPECT_TASK_CHECK)
R<SafeCheckStatisticVO> getInspectTaskCheck(@RequestParam("startDate") String startDate, R<SafeCheckStatisticVO> getInspectTaskCheck(@RequestParam("startDate") String startDate,
@RequestParam("endDate") String endDate, @RequestParam("endDate") String endDate,
@RequestParam("dept") Long dept, @RequestParam("dept") Long dept,

6
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java

@ -15,12 +15,6 @@ import org.springframework.context.annotation.ComponentScan;
@MapperScan(basePackages = {"com.hnac.hzinfo.**.mapper","com.hnac.hzims.**.mapper"}) @MapperScan(basePackages = {"com.hnac.hzinfo.**.mapper","com.hnac.hzims.**.mapper"})
@EnableFeignClients(basePackages = {"org.springblade", "com.hnac"}) @EnableFeignClients(basePackages = {"org.springblade", "com.hnac"})
public class MiddleApplication { public class MiddleApplication {
// static {
// System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://175.6.40.67:10042");
// System.setProperty("spring.cloud.nacos.config.server-addr", "http://175.6.40.67:10042");
// System.setProperty("spring.cloud.nacos.username", "nacos");
// System.setProperty("spring.cloud.nacos.password", "nacos");
// }
public static void main(String[] args) { public static void main(String[] args) {
BladeApplication.run("hzims-middle", MiddleApplication.class, args); BladeApplication.run("hzims-middle", MiddleApplication.class, args);

18
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

@ -313,7 +313,7 @@ public class RealTargetServiceImpl implements RealTargetService {
target.setPowerDay(this.devicePowerDay(generations,device)); target.setPowerDay(this.devicePowerDay(generations,device));
// 昨日发电量 // 昨日发电量
target.setPowerYesterDay(this.devicePowerYesterDay(generations,device)); target.setPowerYesterDay(this.devicePowerYesterDay(generations,device));
// 当天有功功率 // 近24小时有功功率
target.setActivePowerVoList(this.getLoadsByDay(device)); target.setActivePowerVoList(this.getLoadsByDay(device));
// 30天发电量 // 30天发电量
target.setGenerationPowerVoList(this.getGenerationPowerList(generations,device)); target.setGenerationPowerVoList(this.getGenerationPowerList(generations,device));
@ -1483,10 +1483,12 @@ public class RealTargetServiceImpl implements RealTargetService {
* @return * @return
*/ */
private List<ActivePowerVo> getLoadsByDay(EminfoAndEmParamVo device) { private List<ActivePowerVo> getLoadsByDay(EminfoAndEmParamVo device) {
// 开始日期 Calendar calendar = Calendar.getInstance();
String start = DateUtil.format(new Date(),DateUtil.PATTERN_DATE) + " 00:00:00";
// 结束日期 // 结束日期
String end = DateUtil.format(new Date(),DateUtil.PATTERN_DATE) + " 23:59:59"; String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME);
calendar.add(Calendar.DAY_OF_MONTH,-1);
// 开始日期
String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE) + " 00:00:00";
List<AnalyseDataTaosVO> records = dataService.periodTargetData(start, end, 3, 2, device.getEmCode(), HomePageConstant.PV_LOAD); List<AnalyseDataTaosVO> records = dataService.periodTargetData(start, end, 3, 2, device.getEmCode(), HomePageConstant.PV_LOAD);
if (CollectionUtil.isEmpty(records)) { if (CollectionUtil.isEmpty(records)) {
return new ArrayList<>(); return new ArrayList<>();
@ -1988,8 +1990,8 @@ public class RealTargetServiceImpl implements RealTargetService {
*/ */
private List<ThirtyGenerationEntity> thirtyGenerations(List<String> stations) { private List<ThirtyGenerationEntity> thirtyGenerations(List<String> stations) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
String end = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATETIME); String end = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE);
calendar.add(Calendar.DAY_OF_MONTH,-29); calendar.add(Calendar.DAY_OF_MONTH,-30);
String start = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE); String start = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE);
return thirtyGenerateService.list(Wrappers.<ThirtyGenerationEntity>lambdaQuery() return thirtyGenerateService.list(Wrappers.<ThirtyGenerationEntity>lambdaQuery()
.in(ThirtyGenerationEntity::getStationId,stations) .in(ThirtyGenerationEntity::getStationId,stations)
@ -2034,10 +2036,10 @@ public class RealTargetServiceImpl implements RealTargetService {
private List<GenerationPowerVo> getGenerationPowerList(List<ThirtyGenerationEntity> generations,EminfoAndEmParamVo device) { private List<GenerationPowerVo> getGenerationPowerList(List<ThirtyGenerationEntity> generations,EminfoAndEmParamVo device) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
Date end = calendar.getTime(); Date end = calendar.getTime();
calendar.add(Calendar.DAY_OF_MONTH,-29); calendar.add(Calendar.DAY_OF_MONTH,-30);
Date start = calendar.getTime(); Date start = calendar.getTime();
List<GenerationPowerVo> powers = new ArrayList<>(); List<GenerationPowerVo> powers = new ArrayList<>();
while (end.compareTo(start) >= 0){ while (end.compareTo(start) > 0){
GenerationPowerVo power = new GenerationPowerVo(); GenerationPowerVo power = new GenerationPowerVo();
if (CollectionUtil.isEmpty(generations)) { if (CollectionUtil.isEmpty(generations)) {
power.setDate(DateUtil.format(start,DateUtil.PATTERN_DATE)); power.setDate(DateUtil.format(start,DateUtil.PATTERN_DATE));

1
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java

@ -84,6 +84,7 @@ public class InspectTaskClient implements IInspectTaskClient {
* @param deptId * @param deptId
* @return * @return
*/ */
@GetMapping(EXPIRE_INSPECT)
@Override @Override
public List<TaskEntity> expireInspect(String start, String end, Long deptId) { public List<TaskEntity> expireInspect(String start, String end, Long deptId) {
return taskService.list(Wrappers.<TaskEntity>lambdaQuery() return taskService.list(Wrappers.<TaskEntity>lambdaQuery()

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java

@ -405,12 +405,12 @@ public class HydropowerServiceImpl implements HydropowerService {
private List<Map<String, Object>> get30DayRain(String code) { private List<Map<String, Object>> get30DayRain(String code) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
String endTime = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); String endTime = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME);
calendar.add(Calendar.DAY_OF_MONTH,-1);
String rainEnd = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE); String rainEnd = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE);
calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY)); calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY));
calendar.add(Calendar.MINUTE,-calendar.get(Calendar.MINUTE)); calendar.add(Calendar.MINUTE,-calendar.get(Calendar.MINUTE));
calendar.add(Calendar.SECOND,-calendar.get(Calendar.SECOND)); calendar.add(Calendar.SECOND,-calendar.get(Calendar.SECOND));
calendar.add(Calendar.DAY_OF_MONTH,-29); calendar.add(Calendar.DAY_OF_MONTH,-29);
String startTime = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME);
String rainStart = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE); String rainStart = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE);
R<List<Map<String, Object>>> rains = rainfallClient.getDurationRainFall(code,rainStart,rainEnd); R<List<Map<String, Object>>> rains = rainfallClient.getDurationRainFall(code,rainStart,rainEnd);
if(!rains.isSuccess() || CollectionUtil.isEmpty(rains.getData())){ if(!rains.isSuccess() || CollectionUtil.isEmpty(rains.getData())){

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/TicketApplication.java

@ -24,10 +24,4 @@ public class TicketApplication {
public static void main(String[] args) { public static void main(String[] args) {
BladeApplication.run(TicketConstants.APP_NAME, TicketApplication.class, args); BladeApplication.run(TicketConstants.APP_NAME, TicketApplication.class, args);
} }
}
// @Override
// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
// return BladeApplication.createSpringApplicationBuilder(builder, TicketConstants.APP_NAME, TicketApplication.class);
// }
}

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/xml/OperRepairMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/OperRepairMapper.xml

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/xml/WorkTaskMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/WorkTaskMapper.xml

18
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java

@ -1,16 +1,11 @@
package com.hnac.hzims.ticket.standardTicket.mapper; package com.hnac.hzims.ticket.standardTicket.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity; import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO; import com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO;
import com.hnac.hzims.ticket.standardTicket.vo.OperateVo;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.vo.SafeCheckStatisticVO; import com.hnac.hzims.vo.SafeCheckStatisticVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -30,14 +25,9 @@ public interface StandardTicketInfoMapper extends UserDataScopeBaseMapper<Standa
int qualifiedCount(Integer valueOf, int year, int month); int qualifiedCount(Integer valueOf, int year, int month);
/** SafeCheckStatisticVO getOperateTicketStatistic(@Param("startDate") String startDate,
* 获取安全检查操作票项统计 @Param("endDate") String endDate,
* @param startDate 开始时间 @Param("dept") Long dept);
* @param endDate 结束时间
* @param dept 机构ID
* @return
*/
SafeCheckStatisticVO getOperateTicketStatistic(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("dept") Long dept);
/** /**
* 获取站点月报统计 - 操作票统计 * 获取站点月报统计 - 操作票统计
@ -51,7 +41,6 @@ public interface StandardTicketInfoMapper extends UserDataScopeBaseMapper<Standa
@Param("endDate") String endDate, @Param("endDate") String endDate,
@Param("deptIdList") List<Long> deptIdList); @Param("deptIdList") List<Long> deptIdList);
/** /**
* 分页查询 * 分页查询
* @param searchPage * @param searchPage
@ -61,7 +50,6 @@ public interface StandardTicketInfoMapper extends UserDataScopeBaseMapper<Standa
Page<StandardTicketInfoEntity> selectPages(Page<StandardTicketInfoEntity> searchPage, Page<StandardTicketInfoEntity> selectPages(Page<StandardTicketInfoEntity> searchPage,
@Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper); @Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper);
List<Map> selectTicketList(@Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper);
IPage<StandardTicketInfoEntity> pageCondition(IPage<StandardTicketInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper); IPage<StandardTicketInfoEntity> pageCondition(IPage<StandardTicketInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper);
} }

40
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketInfoMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.xml

@ -39,23 +39,6 @@
and MONTH(t.CREATE_TIME) = #{month} and MONTH(t.CREATE_TIME) = #{month}
and e.status = 1; and e.status = 1;
</select> </select>
<select id="getOperateTicketStatistic" resultType="com.hnac.hzims.vo.SafeCheckStatisticVO">
select count(1) total,count(case when ie.`status` = 1 then 1 else null end) qualified
from hzims_standard_ticket_info ti
left join hzims_ticket_info_evaluate ie on ti.id = ie.ticket_id and ie.is_deleted = 0
<where>
ti.is_deleted = 0
<if test="startDate != null and startDate != ''">
and ti.create_time &gt; #{startDate}
</if>
<if test="endDate != null and endDate != ''">
and ti.create_time &lt; #{endDate}
</if>
<if test="dept != null and dept != ''">
and ti.create_dept = #{dept}
</if>
</where>
</select>
<select id="getOperateTicketReportStatistic" <select id="getOperateTicketReportStatistic"
resultType="com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO"> resultType="com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO">
select ti.*,ie.`status` evaluation from hzims_standard_ticket_info ti select ti.*,ie.`status` evaluation from hzims_standard_ticket_info ti
@ -82,11 +65,6 @@
hzims_ticket_info_evaluate tie on sti.id = tie.ticket_id hzims_ticket_info_evaluate tie on sti.id = tie.ticket_id
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
<select id="selectTicketList" resultType="java.util.Map">
select ti.*,tie.`status` isPass from hzims_standard_ticket_info ti
left join hzims_ticket_info_evaluate tie on ti.id = tie.ticket_id and tie.is_deleted = 0
${ew.customSqlSegment}
</select>
<select id="pageCondition" resultType="com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity"> <select id="pageCondition" resultType="com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity">
SELECT oper.*,eva.`status` isQualified FROM hzims_standard_ticket_info oper SELECT oper.*,eva.`status` isQualified FROM hzims_standard_ticket_info oper
@ -94,4 +72,22 @@
ON oper.id = eva.ticket_id ON oper.id = eva.ticket_id
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
<select id="getOperateTicketStatistic" resultType="com.hnac.hzims.vo.SafeCheckStatisticVO">
select count(1) total,count(case when ie.`status` = 1 then 1 else null end) qualified
from hzims_standard_ticket_info ti
left join hzims_ticket_info_evaluate ie on ti.id = ie.ticket_id and ie.is_deleted = 0
<where>
ti.is_deleted = 0
<if test="startDate != null and startDate != ''">
and ti.create_time &gt; #{startDate}
</if>
<if test="endDate != null and endDate != ''">
and ti.create_time &lt; #{endDate}
</if>
<if test="dept != null">
and ti.create_dept = #{dept}
</if>
</where>
</select>
</mapper> </mapper>

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketMeasureMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketMeasureMapper.xml

11
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java

@ -16,6 +16,7 @@ import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.ticket.StandardTicketCountQueryVo; import com.hnac.hzims.ticket.twoTicket.vo.ticket.StandardTicketCountQueryVo;
import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO; import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO;
import com.hnac.hzims.vo.SafeCheckStatisticVO;
import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
@ -81,10 +82,10 @@ public interface IStandardTicketInfoService extends IService<StandardTicketInfoE
/** /**
* 获取双票合格率 * 获取双票合格率
* @param List<Long> depatList * @param depatList
* @param LocalDateTime firstDateTime * @param firstDateTime
* @param LocalDateTime now * @param now
* @return DoublePassRateVO * @return
*/ */
DoublePassRateVO getDoublePassRate(List<Long> depatList, LocalDateTime firstDateTime, LocalDateTime now); DoublePassRateVO getDoublePassRate(List<Long> depatList, LocalDateTime firstDateTime, LocalDateTime now);
@ -151,4 +152,6 @@ public interface IStandardTicketInfoService extends IService<StandardTicketInfoE
* @param ticketId * @param ticketId
*/ */
void exportOperateTicket(HttpServletResponse response, Long ticketId); void exportOperateTicket(HttpServletResponse response, Long ticketId);
SafeCheckStatisticVO getOperateTicketStatistic(String startDate, String endDate, Long dept);
} }

13
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java

@ -39,6 +39,7 @@ import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService; import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO; import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketReportStatisticVO; import com.hnac.hzims.ticket.workTicket.vo.WorkTicketReportStatisticVO;
import com.hnac.hzims.vo.SafeCheckStatisticVO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -938,6 +939,18 @@ public class StandardTicketInfoServiceImpl extends ServiceImpl<StandardTicketInf
PdfUtils.readPdf(response, pdfPath); PdfUtils.readPdf(response, pdfPath);
} }
/**
* 获取安全检查操作票项统计
* @param startDate
* @param endDate
* @param dept
* @return
*/
@Override
public SafeCheckStatisticVO getOperateTicketStatistic(String startDate, String endDate, Long dept) {
return this.baseMapper.getOperateTicketStatistic(startDate,endDate,dept);
}
private void exportTicketWord(List<XWPFDocument> documents, String savePath) throws IOException { private void exportTicketWord(List<XWPFDocument> documents, String savePath) throws IOException {
FileOutputStream out = new FileOutputStream(savePath); FileOutputStream out = new FileOutputStream(savePath);
try { try {

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/OperateTicketClient.java

@ -1,8 +1,10 @@
package com.hnac.hzims.ticket.workTicket.feign; package com.hnac.hzims.ticket.workTicket.feign;
import com.hnac.hzims.safeproduct.Constants; import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService;
import com.hnac.hzims.ticket.standardTicket.service.impl.StandardTicketInfoServiceImpl; import com.hnac.hzims.ticket.standardTicket.service.impl.StandardTicketInfoServiceImpl;
import com.hnac.hzims.vo.SafeCheckStatisticVO; import com.hnac.hzims.vo.SafeCheckStatisticVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
@ -18,9 +20,12 @@ import java.math.RoundingMode;
* @author hx * @author hx
*/ */
@RestController @RestController
@AllArgsConstructor
@Slf4j @Slf4j
public class OperateTicketClient implements IOperateTicketClient { public class OperateTicketClient implements IOperateTicketClient {
private final IStandardTicketInfoService standardTicketInfoService;
/** /**
* 安全检查操作票事项统计 * 安全检查操作票事项统计
* @param startDate 开始时间 * @param startDate 开始时间
@ -33,8 +38,7 @@ public class OperateTicketClient implements IOperateTicketClient {
public R<SafeCheckStatisticVO> getOperateTicketCheck(@RequestParam("startDate") String startDate, public R<SafeCheckStatisticVO> getOperateTicketCheck(@RequestParam("startDate") String startDate,
@RequestParam("endDate") String endDate, @RequestParam("endDate") String endDate,
@RequestParam("dept") Long dept) { @RequestParam("dept") Long dept) {
StandardTicketInfoServiceImpl service = SpringUtil.getBean(StandardTicketInfoServiceImpl.class); SafeCheckStatisticVO vo = standardTicketInfoService.getOperateTicketStatistic(startDate,endDate,dept);
SafeCheckStatisticVO vo = service.getBaseMapper().getOperateTicketStatistic(startDate,endDate,dept);
//查询合格率 保留两位小数 //查询合格率 保留两位小数
if(vo == null){ if(vo == null){
vo = new SafeCheckStatisticVO(); vo = new SafeCheckStatisticVO();

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/TwoTicketMatterLibraryMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/TwoTicketMatterLibraryMapper.xml

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketDelayMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketDelayMapper.xml

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketFlowMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketFlowMapper.xml

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.xml

@ -52,7 +52,7 @@
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
and ti.create_time &lt; #{endDate} and ti.create_time &lt; #{endDate}
</if> </if>
<if test="dept != null and dept != ''"> <if test="dept != null">
and ti.create_dept = #{dept} and ti.create_dept = #{dept}
</if> </if>
</where> </where>

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketMembersChangeMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketMembersChangeMapper.xml

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketOperateTimeMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketOperateTimeMapper.xml

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketPrincipalChangeMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketPrincipalChangeMapper.xml

0
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketSafetyMeasureMapper.xml → hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketSafetyMeasureMapper.xml

Loading…
Cancel
Save