1.现场监督计划调整

This commit is contained in:
2024-11-29 16:35:10 +08:00
parent 401195fc7b
commit 8f57310625
7 changed files with 53 additions and 14 deletions

View File

@@ -47,7 +47,7 @@ public class GwSendUtil {
cb = new ContentBody("");
} else {
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
log.info(Thread.currentThread().getName() + "1.信息:" + s);
log.info(Thread.currentThread().getName() + "1.上送网公司信息:" + s);
cb = new ContentBody(s);
}
//ContentBody传递要求使用post方式进行调用

View File

@@ -153,6 +153,9 @@ public class SupvProblemParam extends BaseParam {
@DateTimeStrValid(format="yyyy-MM-dd HH:mm:ss",message = "问题发现时间格式有误")
private String discoveryTime;
@ApiModelProperty("告预警单id,当ifReleaseWarning为是时必填")
private String workAlarmId;
@EqualsAndHashCode(callSuper = true)
@Data
public static class UpdateSupvProblemParam extends SupvProblemParam{

View File

@@ -156,4 +156,9 @@ public class SupvProblem extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime discoveryTime;
@ApiModelProperty("告预警单id,当ifReleaseWarning为是时必填")
private String workAlarmId;
}

View File

@@ -110,4 +110,7 @@ public class SupvProblemVO {
@Excel(name = "备注",width = 40)
private String remark;
@ApiModelProperty("告预警单id,当ifReleaseWarning为是时必填")
private String workAlarmId;
}

View File

@@ -76,9 +76,7 @@ public class AlarmVO {
private String receiveUserName;
@ApiModelProperty("编制时间 yyyy-MM-dd HH:mm:ss")
@TableField("creater_Time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private LocalDateTime createrTime;
private Long createrTime;
@ApiModelProperty("主管部门id,取ISC平台上的组织id")
@TableField("manager_Dept_Id")
@@ -120,6 +118,17 @@ public class AlarmVO {
@TableField("is_upload_head")
private Integer isUploadHead;
@ApiModelProperty("告预警单id,当ifReleaseWarning为是时必填")
private String workAlarmId;
public String getWorkAlarmId() {
return workAlarmId;
}
public void setWorkAlarmId(String workAlarmId) {
this.workAlarmId = workAlarmId;
}
public void setAlarmId(String alarmId) {
if (StrUtil.isNotBlank(alarmId)) {
this.alarmId = alarmId;
@@ -224,7 +233,7 @@ public class AlarmVO {
}
}
public void setCreaterTime(LocalDateTime createrTime) {
public void setCreaterTime(Long createrTime) {
this.createrTime = createrTime;
}

View File

@@ -1,6 +1,7 @@
package com.njcn.process.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.OperateType;
@@ -16,11 +17,8 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import com.njcn.web.controller.BaseController;
import java.util.List;
@@ -70,7 +68,7 @@ public class SupvAlarmController extends BaseController {
}
@PostMapping("/downAlarm")
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("导出预告警单信息")
public void downAlarm(){
supvAlarmService.downAlarm();
@@ -86,5 +84,16 @@ public class SupvAlarmController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, supvPlanHisPage, methodDescribe);
}
@GetMapping("/selectAlarmList")
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("预告警单下拉")
public HttpResult<List<SupvAlarm>> selectAlarmList(){
String methodDescribe = getMethodDescribe("selectAlarmList");
LambdaQueryWrapper<SupvAlarm> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.select(SupvAlarm::getAlarmId,SupvAlarm::getBillNo,SupvAlarm::getBillName).orderByDesc(SupvAlarm::getCreaterTime);
List<SupvAlarm> result = supvAlarmService.list(lambdaQueryWrapper);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
}

View File

@@ -45,6 +45,7 @@ import org.springframework.stereotype.Service;
import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.function.Function;
@@ -532,7 +533,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
List<DictData> specialityList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SPECIALITY_TYPE.getCode()).getData();
Map<String, DictData> mapSpeciality = specialityList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
DictData dictData;
List<AlarmVO> alarmVOList = new ArrayList<>();
for (SupvAlarm supvAlarm : supvAlarms) {
AlarmVO alarmVO = new AlarmVO();
//单据类型
if (mapBill.containsKey(supvAlarm.getBillType())) {
@@ -545,15 +549,21 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
dictData = mapSpeciality.get(supvAlarm.getSpecialityType());
supvAlarm.setSpecialityType(String.format("%02d", dictData.getAlgoDescribe()));
}
BeanUtil.copyProperties(supvAlarm,alarmVO);
alarmVO.setCreaterTime(supvAlarm.getCreaterTime().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());
alarmVOList.add(alarmVO);
}
List<AlarmVO> list = BeanUtil.copyToList(supvAlarms, AlarmVO.class);
SendParam param = new SendParam();
param.setStats(list);
param.setStats(alarmVOList);
param.setProvinceId(code);
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + s + "结束----");
//log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + s + "结束----");
Map<String, String> send = send(param, getUrl(8), "pqAlarmCreate");
log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + send + "结束----");
//log.info(Thread.currentThread().getName() + "获取返回体 工作计划变更历史数据接口:" + send + "结束----");
if (send.containsKey("succeed")) {
String succeed = send.get("succeed");
if (succeed.indexOf("\\\"") != -1) {