1.现场监督计划调整
This commit is contained in:
@@ -47,7 +47,7 @@ public class GwSendUtil {
|
|||||||
cb = new ContentBody("");
|
cb = new ContentBody("");
|
||||||
} else {
|
} else {
|
||||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
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);
|
cb = new ContentBody(s);
|
||||||
}
|
}
|
||||||
//ContentBody传递,要求使用post方式进行调用
|
//ContentBody传递,要求使用post方式进行调用
|
||||||
|
|||||||
@@ -153,6 +153,9 @@ public class SupvProblemParam extends BaseParam {
|
|||||||
@DateTimeStrValid(format="yyyy-MM-dd HH:mm:ss",message = "问题发现时间格式有误")
|
@DateTimeStrValid(format="yyyy-MM-dd HH:mm:ss",message = "问题发现时间格式有误")
|
||||||
private String discoveryTime;
|
private String discoveryTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("告预警单id,当ifReleaseWarning为是时,必填")
|
||||||
|
private String workAlarmId;
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
public static class UpdateSupvProblemParam extends SupvProblemParam{
|
public static class UpdateSupvProblemParam extends SupvProblemParam{
|
||||||
|
|||||||
@@ -156,4 +156,9 @@ public class SupvProblem extends BaseEntity {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime discoveryTime;
|
private LocalDateTime discoveryTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("告预警单id,当ifReleaseWarning为是时,必填")
|
||||||
|
private String workAlarmId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,4 +110,7 @@ public class SupvProblemVO {
|
|||||||
@Excel(name = "备注",width = 40)
|
@Excel(name = "备注",width = 40)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("告预警单id,当ifReleaseWarning为是时,必填")
|
||||||
|
private String workAlarmId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,9 +76,7 @@ public class AlarmVO {
|
|||||||
private String receiveUserName;
|
private String receiveUserName;
|
||||||
|
|
||||||
@ApiModelProperty("编制时间 yyyy-MM-dd HH:mm:ss")
|
@ApiModelProperty("编制时间 yyyy-MM-dd HH:mm:ss")
|
||||||
@TableField("creater_Time")
|
private Long createrTime;
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private LocalDateTime createrTime;
|
|
||||||
|
|
||||||
@ApiModelProperty("主管部门id,取ISC平台上的组织id")
|
@ApiModelProperty("主管部门id,取ISC平台上的组织id")
|
||||||
@TableField("manager_Dept_Id")
|
@TableField("manager_Dept_Id")
|
||||||
@@ -120,6 +118,17 @@ public class AlarmVO {
|
|||||||
@TableField("is_upload_head")
|
@TableField("is_upload_head")
|
||||||
private Integer isUploadHead;
|
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) {
|
public void setAlarmId(String alarmId) {
|
||||||
if (StrUtil.isNotBlank(alarmId)) {
|
if (StrUtil.isNotBlank(alarmId)) {
|
||||||
this.alarmId = alarmId;
|
this.alarmId = alarmId;
|
||||||
@@ -224,7 +233,7 @@ public class AlarmVO {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreaterTime(LocalDateTime createrTime) {
|
public void setCreaterTime(Long createrTime) {
|
||||||
this.createrTime = createrTime;
|
this.createrTime = createrTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.process.controller;
|
package com.njcn.process.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.OperateType;
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
@@ -16,11 +17,8 @@ import io.swagger.annotations.ApiImplicitParam;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -70,7 +68,7 @@ public class SupvAlarmController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/downAlarm")
|
@PostMapping("/downAlarm")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("导出预告警单信息")
|
@ApiOperation("导出预告警单信息")
|
||||||
public void downAlarm(){
|
public void downAlarm(){
|
||||||
supvAlarmService.downAlarm();
|
supvAlarmService.downAlarm();
|
||||||
@@ -86,5 +84,16 @@ public class SupvAlarmController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, supvPlanHisPage, methodDescribe);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
@@ -532,7 +533,10 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
|||||||
List<DictData> specialityList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SPECIALITY_TYPE.getCode()).getData();
|
List<DictData> specialityList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.SPECIALITY_TYPE.getCode()).getData();
|
||||||
Map<String, DictData> mapSpeciality = specialityList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
Map<String, DictData> mapSpeciality = specialityList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
DictData dictData;
|
DictData dictData;
|
||||||
|
|
||||||
|
List<AlarmVO> alarmVOList = new ArrayList<>();
|
||||||
for (SupvAlarm supvAlarm : supvAlarms) {
|
for (SupvAlarm supvAlarm : supvAlarms) {
|
||||||
|
AlarmVO alarmVO = new AlarmVO();
|
||||||
|
|
||||||
//单据类型
|
//单据类型
|
||||||
if (mapBill.containsKey(supvAlarm.getBillType())) {
|
if (mapBill.containsKey(supvAlarm.getBillType())) {
|
||||||
@@ -545,15 +549,21 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
|||||||
dictData = mapSpeciality.get(supvAlarm.getSpecialityType());
|
dictData = mapSpeciality.get(supvAlarm.getSpecialityType());
|
||||||
supvAlarm.setSpecialityType(String.format("%02d", dictData.getAlgoDescribe()));
|
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();
|
SendParam param = new SendParam();
|
||||||
param.setStats(list);
|
param.setStats(alarmVOList);
|
||||||
param.setProvinceId(code);
|
param.setProvinceId(code);
|
||||||
String s = JSONObject.toJSONStringWithDateFormat(param, JSON.DEFFAULT_DATE_FORMAT);
|
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");
|
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")) {
|
if (send.containsKey("succeed")) {
|
||||||
String succeed = send.get("succeed");
|
String succeed = send.get("succeed");
|
||||||
if (succeed.indexOf("\\\"") != -1) {
|
if (succeed.indexOf("\\\"") != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user