技术监督接口修改

This commit is contained in:
Lee
2023-03-31 16:28:36 +08:00
parent a71dd44eee
commit ff0591fcf8
9 changed files with 36 additions and 18 deletions

View File

@@ -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("保存技术监督监测点")

View File

@@ -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> {
/**

View File

@@ -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> {
/***

View File

@@ -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

View File

@@ -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);

View File

@@ -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);
}