Commit ba307b78 authored by chenhao's avatar chenhao

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents 4cb4dd30 35ee00c5
package com.yeejoin.amos.supervision.core.common.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -22,9 +23,11 @@ public class CheckReportParamDto implements Serializable {
String checkLevel;
@ApiModelProperty(value = "检查开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
Date startCheckTime;
@ApiModelProperty(value = "检查结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
Date endCheckTime;
@ApiModelProperty(value = "检查执行人")
......
......@@ -748,6 +748,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
LatentDangerDetailVo detailVo = new LatentDangerDetailVo();
if (latentDangerBo != null) {
detailVo.setDangerId(latentDangerBo.getId());
detailVo.setDangerIdWeb(String.valueOf(latentDangerBo.getId()));
detailVo.setDangerType(latentDangerBo.getDangerType());
// if(position.size()>0){
// detailVo.setPosition(position.get(latentDangerBo.getStructureId()).toString());
......@@ -799,6 +800,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
// }
// }
detailVo.setCurrentFlowRecordId(latentDangerBo.getCurrentFlowRecordId());
detailVo.setCurrentFlowRecordIdWeb(String.valueOf(latentDangerBo.getCurrentFlowRecordId()));
if (!StringUtils.isEmpty(latentDangerBo.getReformJson())) {
detailVo.setReformJson(JSONObject.parseObject(latentDangerBo.getReformJson()));
}
......
......@@ -11,6 +11,8 @@ public class LatentDangerDetailVo {
private Long dangerId;
private String dangerIdWeb;
private String dangerName;
private String level;
......@@ -29,6 +31,8 @@ public class LatentDangerDetailVo {
private Long currentFlowRecordId;
private String currentFlowRecordIdWeb;
private String dangerState;
private String dangerType;
......
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.supervision.business.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.supervision.business.feign.DangerFeignClient;
import com.yeejoin.amos.supervision.business.service.intfc.ICheckReportService;
import com.yeejoin.amos.supervision.core.common.dto.CheckReportParamDto;
......@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -24,6 +26,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.util.Date;
@RestController
@RequestMapping(value = "/check/report")
......@@ -46,14 +49,32 @@ public class CheckReportController extends BaseController {
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "分页查询检查报告", notes = "分页查询检查报告")
@PostMapping(value = "/page")
@GetMapping(value = "/page")
public ResponseModel queryPage(@RequestParam int current, @RequestParam int size,
@RequestBody(required = false) CheckReportParamDto queryParam) {
@RequestParam(required = false) String name,
@RequestParam(required = false) String planName,
@RequestParam(required = false) String planCheckType,
@RequestParam(required = false) String checkLevel,
@RequestParam(required = false) String startCheckTime,
@RequestParam(required = false) String endCheckTime,
@RequestParam(required = false) String checkUser) throws ParseException {
ReginParams reginParams = getSelectedOrgInfo();
String loginOrgCode = getOrgCode(reginParams);
if (loginOrgCode.contains("-")) {
loginOrgCode = loginOrgCode.substring(0, loginOrgCode.indexOf("-"));
}
CheckReportParamDto queryParam = new CheckReportParamDto();
queryParam.setName(name);
queryParam.setPlanName(planName);
queryParam.setPlanCheckType(planCheckType);
queryParam.setCheckLevel(checkLevel);
if (!ValidationUtil.isEmpty(startCheckTime)) {
queryParam.setStartCheckTime(DateUtils.dateParse(startCheckTime, DateUtils.DATE_TIME_PATTERN));
}
if (!ValidationUtil.isEmpty(endCheckTime)) {
queryParam.setEndCheckTime(DateUtils.dateParse(endCheckTime, DateUtils.DATE_TIME_PATTERN));
}
queryParam.setCheckUser(checkUser);
queryParam.setOrgCode(loginOrgCode);
Page page = new Page<>(current, size);
return ResponseHelper.buildResponse(iCheckReportService.pageList(page, queryParam));
......
......@@ -46,10 +46,10 @@
<if test="queryParam != null and queryParam.checkLevel != null and queryParam.checkLevel != ''">
and p.check_level = #{queryParam.checkLevel}
</if>
<if test="queryParam != null and queryParam.startCheckTime != null and queryParam.startCheckTime != ''">
<if test="queryParam != null and queryParam.startCheckTime != null">
and cr.start_check_date <![CDATA[>=]]> #{queryParam.startCheckTime}
</if>
<if test="queryParam != null and queryParam.endCheckTime != null and queryParam.endCheckTime != ''">
<if test="queryParam != null and queryParam.endCheckTime != null">
and cr.end_check_date <![CDATA[<=]]> #{queryParam.endCheckTime}
</if>
<if test="queryParam != null and queryParam.checkUser != null and queryParam.checkUser != ''">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment