Commit 18393dae authored by tianbo's avatar tianbo

隐患修改

parent 6ae99059
package com.yeejoin.amos.boot.module.common.api.feign;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -30,4 +31,21 @@ public interface SupervisionFeignClient {
@RequestMapping(value = "/patrol/danger/info", method = RequestMethod.GET)
ResponseModel<Object> getPatrolDangerInfo(@RequestBody Object param);
/**
* 修改巡检检查项
*
* @param param
* @return
*/
@RequestMapping(value = "/patrol/danger/check", method = RequestMethod.GET)
ResponseModel<Object> setPatrolDangerCheck(@RequestBody JSONObject param);
/**
* 查询隐患巡检信息
*
* @param latentDangerId
* @return
*/
@RequestMapping(value = "/{latentDangerId}", method = RequestMethod.GET)
ResponseModel<Object> getLatentDangerPatrolInfo(@PathVariable Long latentDangerId);
}
package com.yeejoin.amos.latentdanger.business.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
......@@ -17,6 +18,7 @@ import com.yeejoin.amos.latentdanger.business.util.CommonResponseUtil;
import com.yeejoin.amos.latentdanger.business.util.FileHelper;
import com.yeejoin.amos.latentdanger.business.vo.DangerTimeAxisVo;
import com.yeejoin.amos.latentdanger.core.common.response.DangerListResponse;
import com.yeejoin.amos.latentdanger.dao.entity.LatentDanger;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
......@@ -126,7 +128,7 @@ public class LatentDangerController extends BaseController {
@GetMapping(value = "/detail")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public CommonResponse detail(@ApiParam(value = "任务Id", required = true) @RequestParam String id,
@ApiParam(value = "是否完成", required = true) @RequestParam boolean isFinish) {
@ApiParam(value = "是否完成") @RequestParam(required = false) boolean isFinish) {
try {
AgencyUserModel user = getUserInfo();
if (ObjectUtils.isEmpty(user)) {
......@@ -142,7 +144,7 @@ public class LatentDangerController extends BaseController {
@ApiOperation(value = "隐患执行记录", notes = "隐患执行记录")
@GetMapping(value = "/listFlowRecord")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public CommonResponse listFlowRecord(@ApiParam(value = "隐患编号", required = true) @RequestParam Long id) {
public CommonResponse listFlowRecord(@ApiParam(value = "隐患id", required = true) @RequestParam Long id) {
try {
AgencyUserModel user = getUserInfo();
if (ObjectUtils.isEmpty(user)) {
......@@ -267,7 +269,7 @@ public class LatentDangerController extends BaseController {
if (ObjectUtils.isEmpty(user)) {
return CommonResponseUtil.failure("登录过期,请重新登录");
}
Page<DangerListResponse> result = iLatentDangerService.listDanger(pageParam);
IPage<LatentDanger> result = iLatentDangerService.listDanger(pageParam);
return CommonResponseUtil.success(result);
}
......
......@@ -68,5 +68,5 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
void updateCheckInputDangerState(@Param("id") Long id, @Param("code") int code);
LatentDangerBo getbyBusinessKey(@Param("businessKey") String businessKey);
LatentDangerBo getByBusinessKey(@Param("businessKey") String businessKey);
}
......@@ -3,11 +3,13 @@ package com.yeejoin.amos.latentdanger.business.service.intfc;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerDto;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerExecuteParam;
import com.yeejoin.amos.latentdanger.business.param.PageParam;
import com.yeejoin.amos.latentdanger.common.enums.LatentDangerLevelEnum;
import com.yeejoin.amos.latentdanger.dao.entity.LatentDanger;
import org.springframework.data.domain.Page;
import com.alibaba.fastjson.JSONObject;
......@@ -98,7 +100,7 @@ public interface ILatentDangerService {
*/
JSONObject getReviewInfo(Long dangerId);
Page<DangerListResponse> listDanger(PageParam pageParam);
IPage<LatentDanger> listDanger(PageParam pageParam);
List<DangerListResponse> export(PageParam pageParam);
......
......@@ -6,22 +6,27 @@ import lombok.Data;
import java.util.List;
/**
* @author DELL
*/
@Data
public class LatentDangerDetailVo {
private Long dangerId;
private Long id;
private String dangerName;
private String name;
private String level;
private Long bizId;
private String levelDesc;
private String dangerLevel;
private String dangerLevelName;
private String remark;
private String position;
private String dangerPosition;
private String reformTypeDesc;
private String reformTypeName;
private String reformLimitDate;
......@@ -31,9 +36,11 @@ public class LatentDangerDetailVo {
private String dangerState;
private String dangerStateName;
private String dangerType;
private String dangerStateDesc;
private String dangerTypeName;
private Boolean currentUserCanExcute;
......
......@@ -26,6 +26,10 @@ import java.util.List;
@Aspect
@Component
public class EnumFillAop {
@Autowired
RedisUtils redisUtils;
@Pointcut("execution(public * com.yeejoin.amos.latentdanger.business.controller..*(..))")
public void fillEnum() {
......@@ -40,6 +44,10 @@ public class EnumFillAop {
bizType = request.getParameter("bizType");
}
if (!redisUtils.hasKey(Constants.DANGER_BIZ_TYPE_KEY)) {
redisUtils.set(Constants.DANGER_BIZ_TYPE_KEY, bizType);
}
// 获取隐患等级枚举
if (ValidationUtil.isEmpty(LatentDangerLevelEnum.enumMap)) {
List<DictionarieValueModel> dicResult =
......
......@@ -311,7 +311,7 @@ public class LatentDangerController extends AbstractBaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询隐患信息", notes = "查询隐患信息")
@ApiOperation(value = "查询隐患巡检信息", notes = "查询隐患信息")
@GetMapping(value = "/{latentDangerId}")
public CommonResponse getLatentDanger(@PathVariable(required = true) Long latentDangerId) {
return CommonResponseUtil.success(iLatentDangerService.getLatentDanger(latentDangerId));
......
......@@ -935,7 +935,7 @@
where id = #{id};
</update>
<select id="getbyBusinessKey" resultType="com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo">
<select id="getByBusinessKey" resultType="com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo">
SELECT
*
FROM
......
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