jinpengyong
2022-02-17 d4d5205a7d954117a9e70426534b7b1d95f0edd5
screen-api/src/main/java/com/moral/api/controller/SupervisionController.java
@@ -5,6 +5,7 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -42,6 +43,7 @@
    @ApiOperation(value = "分页督办单列表", notes = "分页督办单列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "organizationId", value = "组织id", required = false, paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "cityCode", value = "地区码", required = false, paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "start", value = "开始时间", required = false, paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "end", value = "结束时间", required = false, paramType = "query", dataType = "String"),
@@ -51,7 +53,7 @@
    @GetMapping("select")
    public ResultMessage select(HttpServletRequest request) {
        Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
        if (!params.containsKey("cityCode")) {
        if (!params.containsKey("cityCode") && !params.containsKey("organizationId")) {
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        }
@@ -69,4 +71,14 @@
        return ResultMessage.ok();
    }
    @ApiOperation(value = "删除督办单", notes = "删除督办单")
    @GetMapping("delete")
    public ResultMessage delete(Integer supervisionId) {
        if (ObjectUtils.isEmpty(supervisionId)) {
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        }
        supervisionService.deleteSupervision(supervisionId);
        return ResultMessage.ok();
    }
}