Browse Source

Merge remote-tracking branch 'origin/prod-5.1.3' into prod-5.1.3

zhongwei
yang_shj 3 months ago
parent
commit
ef5b95d046
  1. 4
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/vo/TicketInfoStatisticVO.java
  2. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleServiceImpl.java
  3. 64
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/VectorParamController.java
  4. 35
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/VectorParamEntity.java
  5. 11
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/mapper/VectorParamMapper.java
  6. 13
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/VectorParamService.java
  7. 13
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/impl/VectorParamServiceImpl.java
  8. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml
  9. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java
  10. 14
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/MonthReportServiceImpl.java
  11. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java
  12. BIN
      hzims-service/operational/src/main/resources/template/word/stationMonthReport.docx
  13. 12
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java
  14. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

4
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/vo/TicketInfoStatisticVO.java

@ -26,6 +26,10 @@ public class TicketInfoStatisticVO implements Serializable {
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double ticketInfoProportion; private Double ticketInfoProportion;
@ApiModelProperty("本月票据合格率")
@JsonSerialize(nullsUsing = NullSerializer.class)
private String ticketInfoProportionName;
@ApiModelProperty("票据种类") @ApiModelProperty("票据种类")
private String ticketInfoType; private String ticketInfoType;

2
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleServiceImpl.java

@ -137,7 +137,7 @@ public class AlarmHandleServiceImpl extends ServiceImpl<AlarmHandleMapper, Alarm
// throw new ServiceException("修改告警状态异常,请稍后重试!"); // throw new ServiceException("修改告警状态异常,请稍后重试!");
} }
} }
return JSONObject.toJSONString(alarmHandleEntity); return JSONObject.toJSONString(param);
}); });
return res; return res;
} }

64
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/VectorParamController.java

@ -0,0 +1,64 @@
package com.hnac.hzims.bigmodel.maintenance.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.bigmodel.maintenance.entity.VectorParamEntity;
import com.hnac.hzims.bigmodel.maintenance.service.VectorParamService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
/**
* @Author: ypj
* @Date: 2024/9/2 16:10
*/
@RestController
@RequestMapping("/vector/")
@Api(value = "向量参数配置", tags = "向量参数配置")
@AllArgsConstructor
public class VectorParamController {
private final VectorParamService vectorParamService;
@GetMapping("/listPage")
@ApiOperation(value = "分页查询")
@ApiOperationSupport(order = 1)
public R<IPage<VectorParamEntity>> listPage(Query query, VectorParamEntity req) {
return R.data(vectorParamService.page(Condition.getPage(query), Condition.getQueryWrapper(req).lambda()));
}
@GetMapping("/detail")
@ApiOperation(value = "查看详情")
@ApiOperationSupport(order = 2)
public R<VectorParamEntity> detail(@RequestParam @ApiParam("主键ID") Long id) {
return R.data(vectorParamService.getById(id));
}
@PostMapping("/save")
@ApiOperation(value = "保存向量参数配置")
@ApiOperationSupport(order = 3)
public R save(@RequestBody VectorParamEntity req) {
return R.status(vectorParamService.save(req));
}
@DeleteMapping("/remove")
@ApiOperation(value = "删除向量参数配置")
@ApiOperationSupport(order = 4)
public R remove(@RequestParam @ApiParam("主键ID,按逗号分隔") String ids) {
return R.status(vectorParamService.removeByIds(Func.toLongList(",",ids)));
}
@PutMapping("/update")
@ApiOperation(value = "编辑向量参数配置")
@ApiOperationSupport(order = 5)
public R update(@RequestBody VectorParamEntity req) {
return R.status(vectorParamService.updateById(req));
}
}

35
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/VectorParamEntity.java

@ -0,0 +1,35 @@
package com.hnac.hzims.bigmodel.maintenance.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serializable;
/**
* @Author: ypj
* @Date: 2024/9/2 14:54
*/
@ApiModel("向量参数配置")
@TableName("HZIMS_VECTOR_PARAM")
@Data
public class VectorParamEntity extends TenantEntity implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("参数名称")
private String name;
@ApiModelProperty("url")
private String url;
@ApiModelProperty("项目前缀")
private String projectPrefix;
@ApiModelProperty("数据库表名")
private String tableName;
@ApiModelProperty("向量键值对,json格式")
private String attributeMap;
}

11
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/mapper/VectorParamMapper.java

@ -0,0 +1,11 @@
package com.hnac.hzims.bigmodel.maintenance.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.bigmodel.maintenance.entity.VectorParamEntity;
/**
* @Author: ypj
* @Date: 2024/09/02 15:12
*/
public interface VectorParamMapper extends BaseMapper<VectorParamEntity> {
}

13
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/VectorParamService.java

@ -0,0 +1,13 @@
package com.hnac.hzims.bigmodel.maintenance.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.bigmodel.maintenance.entity.VectorParamEntity;
/**
* @Author: ypj
* @Date: 2024/09/02 15:11
*/
public interface VectorParamService extends IService<VectorParamEntity> {
}

13
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/impl/VectorParamServiceImpl.java

@ -0,0 +1,13 @@
package com.hnac.hzims.bigmodel.maintenance.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.bigmodel.maintenance.entity.VectorParamEntity;
import com.hnac.hzims.bigmodel.maintenance.mapper.VectorParamMapper;
import com.hnac.hzims.bigmodel.maintenance.service.VectorParamService;
/**
* @Author: ypj
* @Date: 2024/9/2 16:14
*/
public class VectorParamServiceImpl extends ServiceImpl<VectorParamMapper, VectorParamEntity> implements VectorParamService {
}

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.operational.config.mapper.FocusAttributeMapper"> <mapper namespace="com.hnac.hzims.operational.config.mapper.FocusAttributeMapper">
<select id="getMainList" resultType="com.hnac.hzims.operational.config.entity.FocusAttributeEntity"> <select id="getMainList" resultType="com.hnac.hzims.operational.config.entity.FocusAttributeEntity">
select distinct group_id, group_name, domain_id, domain_name,model_id, status,create_time,update_time select distinct group_id, group_name, domain_id, domain_name,model_id, status
FROM hzims_focus_attribute FROM hzims_focus_attribute
<where> <where>
is_deleted = 0 AND tenant_id = '200000' is_deleted = 0 AND tenant_id = '200000'

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java

@ -1150,9 +1150,11 @@ public class ImsDutyMainServiceImpl extends ServiceImpl<ImsDutyMainMapper, ImsDu
} }
List<ImsDutyMainEntity> handerCollect = imsDutyMainEntityList.stream().filter(s -> rec.getDutyId().equals(s.getPreDutyId())).collect(Collectors.toList()); List<ImsDutyMainEntity> handerCollect = imsDutyMainEntityList.stream().filter(s -> rec.getDutyId().equals(s.getPreDutyId())).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(handerCollect)){ if(CollectionUtil.isNotEmpty(handerCollect)){
List<DutyRunReportVO> handerRunReportList = dutyReportVOList.stream().filter(s -> s.getGroupId().equals(handerCollect.get(0).getDutyGroupId().toString())).collect(Collectors.toList()); if (ObjectUtil.isNotEmpty(handerCollect.get(0).getDutyGroupId())){
DutyRunReportVO handerRunRepor = handerRunReportList.get(0); List<DutyRunReportVO> handerRunReportList = dutyReportVOList.stream().filter(s -> s.getGroupId().equals(handerCollect.get(0).getDutyGroupId().toString())).collect(Collectors.toList());
handerRunRepor.setDelayChangeShifts(handerRunRepor.getDelayChangeShifts()+1); DutyRunReportVO handerRunRepor = handerRunReportList.get(0);
handerRunRepor.setDelayChangeShifts(handerRunRepor.getDelayChangeShifts()+1);
}
} }
} }
} }

14
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/MonthReportServiceImpl.java

@ -26,7 +26,9 @@ import org.springblade.system.vo.DeptVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.IOException; import java.io.IOException;
import java.time.LocalDate;
import java.time.YearMonth; import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.List; import java.util.List;
@Service @Service
@ -65,7 +67,7 @@ public class MonthReportServiceImpl extends ServiceImpl<MonthReportMapper, OperM
e.printStackTrace(); e.printStackTrace();
} }
//修改为每运行一次,保存一次 //修改为每运行一次,保存一次
this.save(operMonthReportEntity); this.save(saved);
} }
} }
//历史查询定时任务生成的数据 //历史查询定时任务生成的数据
@ -88,7 +90,15 @@ public class MonthReportServiceImpl extends ServiceImpl<MonthReportMapper, OperM
eq(OperMonthReportEntity::getIsDeleted, 0); eq(OperMonthReportEntity::getIsDeleted, 0);
last("limit 1;"); last("limit 1;");
}}); }});
if (ObjectUtil.isEmpty(operMonthReportEntityByMonth) || month.equals(YearMonth.now().toString())) { LocalDate currentDate = LocalDate.now();
int dayNow = currentDate.getDayOfMonth();
boolean flag=(dayNow>2&&month.equals(YearMonth.now().toString()));
LocalDate localDatePlus = currentDate.plusMonths(1);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
String formattedDate = localDatePlus.format(formatter);
boolean flag2=(dayNow<2&&month.equals(formattedDate));
// 每个月月报的数据重新生成时间截至至下个月的2号
if (flag || flag2) {
if (ObjectUtil.isNotEmpty(operMonthReportEntityByMonth)) { if (ObjectUtil.isNotEmpty(operMonthReportEntityByMonth)) {
this.removeById(operMonthReportEntityByMonth.getId()); this.removeById(operMonthReportEntityByMonth.getId());
} }

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java

@ -455,6 +455,10 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
ticketStatisticDTO.setDeptIds(deptIds); ticketStatisticDTO.setDeptIds(deptIds);
List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketReportStatistic(ticketStatisticDTO); List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketReportStatistic(ticketStatisticDTO);
if (CollectionUtil.isNotEmpty(ticketVOS)){ if (CollectionUtil.isNotEmpty(ticketVOS)){
ticketVOS = ticketVOS.stream().map(s -> {
s.setTicketInfoProportionName(s.getTicketInfoProportion() + "%");
return s;
}).collect(Collectors.toList());
stationReportAllVo.setTicketInfoStatisticVOList(ticketVOS); stationReportAllVo.setTicketInfoStatisticVOList(ticketVOS);
} }
} finally { } finally {
@ -723,7 +727,7 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
temp.put("ticketInfoCompleteNum",ticketInfoStatisticVO.getTicketInfoCompleteNum().toString()); temp.put("ticketInfoCompleteNum",ticketInfoStatisticVO.getTicketInfoCompleteNum().toString());
temp.put("ticketInfoInvalidatedNum",ticketInfoStatisticVO.getTicketInfoInvalidatedNum().toString()); temp.put("ticketInfoInvalidatedNum",ticketInfoStatisticVO.getTicketInfoInvalidatedNum().toString());
temp.put("ticketInfoQualifiedNum",ticketInfoStatisticVO.getTicketInfoQualifiedNum().toString()); temp.put("ticketInfoQualifiedNum",ticketInfoStatisticVO.getTicketInfoQualifiedNum().toString());
temp.put("ticketInfoProportion",ticketInfoStatisticVO.getTicketInfoProportion().toString()); temp.put("ticketInfoProportion",ticketInfoStatisticVO.getTicketInfoProportionName());
sumList.add(temp); sumList.add(temp);
map.put("ticketInfoSum", sumList); map.put("ticketInfoSum", sumList);
} }

BIN
hzims-service/operational/src/main/resources/template/word/stationMonthReport.docx

Binary file not shown.

12
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java

@ -265,8 +265,14 @@ public class OperationTicketServiceImpl implements OperationTicketService , Star
} }
//1.查询操作票信息 //1.查询操作票信息
Long id = NumberUtils.toLong(response.getBusinessKey()); // Long id = NumberUtils.toLong(response.getBusinessKey());
StandardTicketInfoEntity standardTicketInfoEntity = standardTicketInfoService.getById(id); String businessKey = response.getBusinessKey();
String[] split =businessKey.split(":");
if (StringUtils.isBlank(split[1])){
log.error("异常消息转换失败,未找到BusinessKey:"+ businessKey);
return;
}
StandardTicketInfoEntity standardTicketInfoEntity = standardTicketInfoService.getById(split[1]);
if (ObjectUtils.isEmpty(standardTicketInfoEntity)) { if (ObjectUtils.isEmpty(standardTicketInfoEntity)) {
log.error("获取操作票不存在"); log.error("获取操作票不存在");
return; return;
@ -276,7 +282,7 @@ public class OperationTicketServiceImpl implements OperationTicketService , Star
StandardTicketInfoEntity newStandardTicketInfoEntity = new StandardTicketInfoEntity(); StandardTicketInfoEntity newStandardTicketInfoEntity = new StandardTicketInfoEntity();
// BeanUtils.copyProperties(standardTicketInfoVo, newStandardTicketInfoEntity); // BeanUtils.copyProperties(standardTicketInfoVo, newStandardTicketInfoEntity);
BeanUtil.copy(standardTicketInfoVo, newStandardTicketInfoEntity); BeanUtil.copy(standardTicketInfoVo, newStandardTicketInfoEntity);
newStandardTicketInfoEntity.setId(id); newStandardTicketInfoEntity.setId(Long.valueOf(split[1]));
newStandardTicketInfoEntity.setCreateUser(standardTicketInfoEntity.getCreateUser()); newStandardTicketInfoEntity.setCreateUser(standardTicketInfoEntity.getCreateUser());
//填充操作票信息 //填充操作票信息
saveStandardTicketInfoEntity(newStandardTicketInfoEntity, response); saveStandardTicketInfoEntity(newStandardTicketInfoEntity, response);

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -367,7 +367,12 @@ public class TicketProcessServiceImpl implements TicketProcessService, StartProc
workTicket.setIsNormal(true); workTicket.setIsNormal(true);
//2.流程处理 //2.流程处理
String businessKey = response.getBusinessKey(); String businessKey = response.getBusinessKey();
WorkTicketInfoEntity workTicketInfo = ticketInfoService.getById(businessKey); String[] split =businessKey.split(":");
if (StringUtils.isBlank(split[1])){
log.error("异常消息转换失败,未找到BusinessKey:"+ businessKey);
return;
}
WorkTicketInfoEntity workTicketInfo = ticketInfoService.getById(split[1]);
if (ObjectUtils.isEmpty(workTicketInfo)) { if (ObjectUtils.isEmpty(workTicketInfo)) {
log.error("获取工作票的数据为不存在"); log.error("获取工作票的数据为不存在");
return; return;

Loading…
Cancel
Save