| | |
| | | import cn.gistack.sm.exam.vo.ExamPlanVO; |
| | | import cn.gistack.sm.sjztmd.entity.AttAdBase; |
| | | import cn.gistack.sm.sjztmd.entity.AttResBase; |
| | | import cn.gistack.sm.sjztmd.entity.AttResStagChar; |
| | | import cn.gistack.sm.sjztmd.service.IAttAdBaseService; |
| | | import cn.gistack.sm.sjztmd.service.IAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.vo.AttAdBaseVO; |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.node.ForestNodeMerger; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.List; |
| | |
| | | @ApiOperation(value = "中台水库-查询该行政区下的水库", notes = "中台水库-查询该行政区下的水库") |
| | | @GetMapping(value = "/getListByRegion") |
| | | public R getListByRegion(@ApiIgnore @RequestParam Map<String, Object> obj,Query query) { |
| | | String code = obj.get("code").toString(); |
| | | if (code.substring(0,4).indexOf("00") > -1) { |
| | | obj.put("code",code.substring(0,2)); |
| | | } else if (code.substring(0,6).indexOf("00") > -1) { |
| | | obj.put("code",code.substring(0,4)); |
| | | } |
| | | // List<AttResBase> list = attResBaseService.getListByRegion(obj); |
| | | IPage<AttResBase> pageList = attResBaseService.getListByRegion(Condition.getPage(query),obj); |
| | | return R.data(pageList); |
| | | } |
| | |
| | | AttResBase attResBase = attResBaseService.getDetailByCode(code); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 获取水库对应责任人分页数据 |
| | | * @param params 条件查询参数对象 |
| | | * @param query 分页查询参数对象 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-获取水库对应责任人分页数据", notes = "中台水库-获取水库对应责任人分页数据") |
| | | @GetMapping(value = "/getAttResBaseUserPage") |
| | | public R getAttResBaseUserPage(@RequestParam Map<String, Object> params,Query query) { |
| | | return R.data(attResBaseService.getAttResBaseUserPage(Condition.getPage(query),params)); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param attResBase |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody AttResBase attResBase) { |
| | | if (StringUtil.isBlank(attResBase.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.data(attResBaseService.updateResBaseByGuid(attResBase)); |
| | | } |
| | | |
| | | /** |
| | | * 根据水库编码获取行政区数据 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @GetMapping(value = "/getWaterRegionInfoByResGuid") |
| | | public R getWaterRegionInfoByResGuid(String guid) { |
| | | return R.data(attResBaseService.getWaterRegionInfoByResGuid(guid)); |
| | | } |
| | | |
| | | } |