技术监督接口修改
This commit is contained in:
@@ -3,16 +3,19 @@ package com.njcn.prepare.harmonic.pojo.vo;
|
||||
import com.njcn.prepare.harmonic.pojo.po.ThsOverRunLog;
|
||||
import com.njcn.prepare.harmonic.pojo.po.ThsSupervise;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SuperviceRunLogVo {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(name = "thsSupervise", value = "技术监督参数", required = true)
|
||||
private ThsSupervise thsSupervise;
|
||||
@ApiModelProperty(name = "overRunLog", value = "监测点集合", required = true)
|
||||
|
||||
@@ -11,10 +11,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -34,8 +31,10 @@ public class ThsSuperviseController extends BaseController {
|
||||
@ApiOperation("预警/告警事务生成")
|
||||
@ApiImplicitParam(name = "superviseParam", value = "创建技术监督参数", required = true)
|
||||
@PostMapping("/initSupervise")
|
||||
@ResponseBody
|
||||
public HttpResult<SuperviceRunLogVo> initSupervise(@RequestBody @Validated SuperviseParam superviseParam) {
|
||||
return thsSuperviseService.initSupervise(superviseParam);
|
||||
HttpResult<SuperviceRunLogVo> superviceRunLogVoHttpResult = thsSuperviseService.initSupervise(superviseParam);
|
||||
return superviceRunLogVoHttpResult;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,10 @@ public class ThsOverRunLogServiceImpl extends ServiceImpl<ThsOverRunLogMapper, T
|
||||
public SuperviceRunLogVo superviseDetail(String supIndex) {
|
||||
ThsSupervise thsSupervise = thsSuperviseMapper.selectOne(new LambdaQueryWrapper<ThsSupervise>().eq(ThsSupervise::getSupIndex, supIndex));
|
||||
List<ThsOverRunLog> thsOverRunLogs = thsOverRunLogMapper.selectList(new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, supIndex));
|
||||
return SuperviceRunLogVo.builder().overRunLog(thsOverRunLogs).thsSupervise(thsSupervise).build();
|
||||
SuperviceRunLogVo superviceRunLogVo = new SuperviceRunLogVo();
|
||||
superviceRunLogVo.setThsSupervise(thsSupervise);
|
||||
superviceRunLogVo.setOverRunLog(thsOverRunLogs);
|
||||
return superviceRunLogVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.prepare.harmonic.api.line.ThsSuperviseClient;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.SuperviseDto;
|
||||
import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.SuperviceRunLogVo;
|
||||
@@ -42,12 +43,15 @@ public class ThsSuperviseController extends BaseController {
|
||||
private ThsSuperviseService thsSuperviseService;
|
||||
@Autowired
|
||||
private ThsOverRunLogService thsOverRunLogService;
|
||||
@Autowired
|
||||
private ThsSuperviseClient thsSuperviseClient;
|
||||
|
||||
@ApiOperation("预警/告警事务生成")
|
||||
@ApiImplicitParam(name = "superviseParam", value = "创建技术监督参数", required = true)
|
||||
@PostMapping("/initSupervise")
|
||||
public HttpResult<SuperviceRunLogVo> initSupervise(@RequestBody @Validated SuperviseParam superviseParam) {
|
||||
return thsSuperviseService.initSupervise(superviseParam);
|
||||
HttpResult<SuperviceRunLogVo> superviceRunLogVoHttpResult = thsSuperviseService.initSupervise(superviseParam);
|
||||
return superviceRunLogVoHttpResult;
|
||||
}
|
||||
|
||||
@ApiOperation("保存技术监督监测点")
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.SuperviseDto;
|
||||
@@ -17,7 +16,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
* @author lxp
|
||||
* @since 2023-03-16
|
||||
*/
|
||||
@DS("process")
|
||||
@Mapper
|
||||
public interface ThsSuperviseMapper extends BaseMapper<ThsSupervise> {
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.vo.ThsStrategyVo;
|
||||
import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
@@ -18,7 +17,6 @@ import java.util.List;
|
||||
* @author wr
|
||||
* @since 2023-03-10
|
||||
*/
|
||||
@DS("process")
|
||||
public interface ThsWarnStrategyMapper extends BaseMapper<ThsWarnStrategy> {
|
||||
|
||||
/***
|
||||
|
||||
@@ -76,7 +76,10 @@ public class ThsOverRunLogServiceImpl extends ServiceImpl<ThsOverRunLogMapper, T
|
||||
|
||||
});
|
||||
}
|
||||
return SuperviceRunLogVo.builder().overRunLog(thsOverRunLogs).thsSupervise(thsSupervise).build();
|
||||
SuperviceRunLogVo superviceRunLogVo = new SuperviceRunLogVo();
|
||||
superviceRunLogVo.setThsSupervise(thsSupervise);
|
||||
superviceRunLogVo.setOverRunLog(thsOverRunLogs);
|
||||
return superviceRunLogVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -451,6 +451,9 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
|
||||
public String dowloadAlarmFormwork(Integer type, Integer formworkType, String supIndex, HttpServletResponse response) {
|
||||
ThsAlarmFormwork thsAlarmFormwork = thsAlarmFormworkMapper.selectOne(new LambdaQueryWrapper<ThsAlarmFormwork>().eq(ThsAlarmFormwork::getFormworkType, formworkType)
|
||||
.eq(ThsAlarmFormwork::getType, type).last("limit 1"));
|
||||
if (thsAlarmFormwork == null) {
|
||||
throw new BusinessException("请先上传下发单模板单据!");
|
||||
}
|
||||
String fileUrl = fileStorageUtil.getFileUrl(thsAlarmFormwork.getPath());
|
||||
ThsSupervise thsSupervise = new ThsSupervise();
|
||||
thsSupervise.setModifyTime(new Date());
|
||||
@@ -502,6 +505,8 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
|
||||
superviseVo.setAlertType(AlertTypeEnum.ORANGE.getCode());
|
||||
} else if (progressTime >= 5) {
|
||||
superviseVo.setAlertType(AlertTypeEnum.YELLOW.getCode());
|
||||
} else {
|
||||
superviseVo.setAlertType(AlertTypeEnum.BLACK.getCode());
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -560,7 +565,6 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
|
||||
* @param superviseParam
|
||||
* @return
|
||||
*/
|
||||
@DS("process")
|
||||
@Override
|
||||
public List<ThsStrategyVo> selectStrategyList(SuperviseParam superviseParam) {
|
||||
return thsWarnStrategyMapper.selectStrategyList(superviseParam);
|
||||
|
||||
@@ -121,8 +121,14 @@ public class ReadPatientExcelUtil {
|
||||
cell.setCellType(CellType.STRING);
|
||||
}
|
||||
String stringCellValue = cell.getStringCellValue();
|
||||
ThsOverRunLog.setDescription(stringCellValue);
|
||||
ThsOverRunLog.setOverTime(Integer.valueOf(stringCellValue));
|
||||
} else if (c == 4) {
|
||||
if (cell.getCellTypeEnum() == CellType.NUMERIC) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
}
|
||||
String stringCellValue = cell.getStringCellValue();
|
||||
ThsOverRunLog.setDescription(stringCellValue);
|
||||
} else if (c == 5) {
|
||||
if (cell.getCellTypeEnum() == CellType.NUMERIC) {
|
||||
cell.setCellType(CellType.STRING);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user