Browse Source

# 两票接口优化

zhongwei
haungxing 1 year ago
parent
commit
6b63ad594b
  1. 4
      hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/aop/SysLogAspect.java
  2. 35
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/dto/TicketStatisticDTO.java
  3. 7
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/ITicketInfoAllClient.java
  4. 7
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClientFallback.java
  5. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java
  6. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/service/ITicketInfoAlService.java
  7. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java
  8. 5
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketInfoMapper.xml
  9. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java
  10. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml
  11. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java
  12. 13
      hzims-service/ticket/src/main/resources/application.yml
  13. 2
      hzims-service/ticket/src/main/resources/db/2.0.0.sql

4
hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/aop/SysLogAspect.java

@ -37,8 +37,8 @@ import java.util.Map;
* @date 2023/3/29
* @description: 操作日志切面处理类
*/
@Aspect
@Component
//@Aspect
//@Component
@Slf4j
public class SysLogAspect {

35
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/dto/TicketStatisticDTO.java

@ -0,0 +1,35 @@
package com.hnac.hzims.ticket.allTicket.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @ClassName TicketStatisticDTO
* @description: 两票统计请求
* @author: hx
* @create: 2023-08-17 11:26
* @Version 4.0
**/
@Data
@Builder
@EqualsAndHashCode
public class TicketStatisticDTO implements Serializable {
private String deptIds;
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
private LocalDateTime startTime;
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
private LocalDateTime endTime;
}

7
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/ITicketInfoAllClient.java

@ -1,11 +1,14 @@
package com.hnac.hzims.ticket.allTicket.fegin;
import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassVO;
import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO;
import com.hnac.hzims.ticket.constants.TicketConstants;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.time.LocalDateTime;
@ -25,6 +28,7 @@ public interface ITicketInfoAllClient {
String DOUBLE_PASS_RATE = "/getDoublePassRate";
String DOUBLE_PASS_QUANTITY = "/getDoublePassQuantity";
String GET_TICKET_REPORT_STATISTIC = API_PREFIX+"/getTicketReportStatistic";
String GET_TICKET_PASS_RATE = API_PREFIX + "/getTicketPassRate";
/**
* 统计站点统计月报-两票
@ -61,4 +65,7 @@ public interface ITicketInfoAllClient {
List<DoublePassVO> getDoublePassQuantity(@RequestParam(value = "stationMap") Map<String,String> stationMap,
@RequestParam(value = "firstDateTime") LocalDateTime firstDateTime,
@RequestParam(value = "now") LocalDateTime now);
@GetMapping(GET_TICKET_PASS_RATE)
R<DoublePassRateVO> getTicketPassRate(TicketStatisticDTO ticketStatisticDTO);
}

7
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClientFallback.java

@ -1,8 +1,10 @@
package com.hnac.hzims.ticket.allTicket.fegin;
import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassVO;
import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
@ -34,4 +36,9 @@ public class TicketInfoAllClientFallback implements ITicketInfoAllClient {
public List<DoublePassVO> getDoublePassQuantity(Map<String, String> stationMap, LocalDateTime firstDateTime, LocalDateTime now) {
return null;
}
@Override
public R<DoublePassRateVO> getTicketPassRate(TicketStatisticDTO ticketStatisticDTO) {
return null;
}
}

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java

@ -1,6 +1,7 @@
package com.hnac.hzims.ticket.allTicket.fegin;
import com.google.common.collect.Lists;
import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO;
import com.hnac.hzims.ticket.allTicket.service.TicketInfoStatisticService;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassVO;
@ -10,6 +11,7 @@ import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
@ -70,4 +72,9 @@ public class TicketInfoAllClient implements ITicketInfoAllClient {
public List<DoublePassVO> getDoublePassQuantity(Map<String, String> stationMap, LocalDateTime firstDateTime, LocalDateTime now) {
return standardTicketInfoService.getDoublePassQuantity(stationMap,firstDateTime,now);
}
@Override
public R<DoublePassRateVO> getTicketPassRate(TicketStatisticDTO ticketStatisticDTO) {
return null;
}
}

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/service/ITicketInfoAlService.java

@ -0,0 +1,4 @@
package com.hnac.hzims.ticket.allTicket.service;
public interface ITicketInfoAlService {
}

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

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.vo.SafeCheckStatisticVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -55,4 +56,6 @@ public interface StandardTicketInfoMapper extends UserDataScopeBaseMapper<Standa
*/
Page<StandardTicketInfoEntity> selectPages(Page<StandardTicketInfoEntity> searchPage,
@Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper);
List<Map> selectTicketList(@Param(Constants.WRAPPER) QueryWrapper<StandardTicketInfoEntity> queryWrapper);
}

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

@ -82,4 +82,9 @@
hzims_ticket_info_evaluate tie on sti.id = tie.ticket_id
${ew.customSqlSegment}
</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>
</mapper>

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.java

@ -67,4 +67,7 @@ public interface WorkTicketInfoMapper extends UserDataScopeBaseMapper<WorkTicket
@Param(Constants.WRAPPER) QueryWrapper<WorkTicketInfoEntity> queryWrapper);
List<WorkTicketBillVO> getWorkTicketBill(@Param("path") String path, @Param("startTime") String startTime, @Param("endTime") String endTime);
@UserDataAuth
List<Map> selectTicketList(@Param(Constants.WRAPPER) QueryWrapper<WorkTicketInfoEntity> queryWrapper);
}

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

@ -106,4 +106,11 @@
</where>
GROUP BY info.EM_CODE,info.`type`
</select>
<select id="selectTicketList" resultType="java.util.Map">
select ti.*,tie.`status` isPass from hzims_work_ticket_info ti
left join hzims_ticket_info_evaluate tie on ti.id = tie.ticket_id and tie.is_deleted = 0
${ew.customSqlSegment}
</select>
</mapper>

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java

@ -178,4 +178,6 @@ public interface IWorkTicketInfoService extends BaseService<WorkTicketInfoEntity
* @return
*/
IPage<WorkTicketInfoVO> listByTicketWithKeyword(Page<WorkTicketInfoEntity> entityPage, TicketCountQueryVo ticketCountQueryVo);
}

13
hzims-service/ticket/src/main/resources/application.yml

@ -56,16 +56,3 @@ swagger:
# flowId: sid-6358A80D-F592-4875-B281-A5B14A0EA39E
# segment: 工作票延期
xxl:
job:
accessToken: ''
admin:
addresses: http://192.168.1.20:7009/xxl-job-admin
executor:
appname: hzims-ticket
ip: 192.168.1.3
logpath: /data/applogs/xxl-job/jobhandler
logretentiondays: -1
port: 28601

2
hzims-service/ticket/src/main/resources/db/2.0.0.sql

@ -157,3 +157,5 @@ update hzims_standard_ticket_info set flow_task_name = '终止' where status =
alter table hzims_ticket_count add wrong_ticket_num int null comment '错票数量';
alter table hzims_ticket_count add percent_pass_ticket varchar(50) null comment '合格率';
--

Loading…
Cancel
Save