水库特征水位,挡水建筑物,泄洪洞,输水建筑物,电站,水库效益,管理体制,工程运用,安全鉴定,信息化建设,非常溢洪道填报,正常溢洪道填报接口新增
1 files modified
60 files added
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResEngBene; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResEngBeneService; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName AttResBaseController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/tbAttResEngBene") |
| | | @AllArgsConstructor |
| | | public class TbAttResEngBeneController { |
| | | |
| | | private final ITbAttResEngBeneService tbAttResEngBeneService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResEngBene attResBase = tbAttResEngBeneService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResEngBene |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResEngBene tbAttResEngBene) { |
| | | return R.status(tbAttResEngBeneService.updateByGuid(tbAttResEngBene)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResEngBene |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResEngBene tbAttResEngBene) { |
| | | if (StringUtil.isBlank(tbAttResEngBene.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResEngBeneService.auditByGuid(tbAttResEngBene)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResInformationProject; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResInformationProjectService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResInformationProjectController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/tbAttResInformationProject") |
| | | @AllArgsConstructor |
| | | public class TbAttResInformationProjectController { |
| | | |
| | | private final ITbAttResInformationProjectService tbAttResInformationProjectService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResInformationProject attResBase = tbAttResInformationProjectService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResInformationProject |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResInformationProject tbAttResInformationProject) { |
| | | return R.status(tbAttResInformationProjectService.updateByGuid(tbAttResInformationProject)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResInformationProject |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResInformationProject tbAttResInformationProject) { |
| | | if (StringUtil.isBlank(tbAttResInformationProject.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResInformationProjectService.auditByGuid(tbAttResInformationProject)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResMgrSysB; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResMgrSysBService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResMgrSysBController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/tbAttResMgrSysB") |
| | | @AllArgsConstructor |
| | | public class TbAttResMgrSysBController { |
| | | |
| | | private final ITbAttResMgrSysBService tbAttResMgrSysBService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResMgrSysB attResBase = tbAttResMgrSysBService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResMgrSysB |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResMgrSysB tbAttResMgrSysB) { |
| | | return R.status(tbAttResMgrSysBService.updateByGuid(tbAttResMgrSysB)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResMgrSysB |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResMgrSysB tbAttResMgrSysB) { |
| | | if (StringUtil.isBlank(tbAttResMgrSysB.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResMgrSysBService.auditByGuid(tbAttResMgrSysB)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResPowerStation; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResPowerStationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResPowerStationController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/tbAttResPowerStation") |
| | | @AllArgsConstructor |
| | | public class TbAttResPowerStationController { |
| | | |
| | | private final ITbAttResPowerStationService tbAttResPowerStationService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResPowerStation attResBase = tbAttResPowerStationService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResPowerStation |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResPowerStation tbAttResPowerStation) { |
| | | return R.status(tbAttResPowerStationService.updateByGuid(tbAttResPowerStation)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResPowerStation |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResPowerStation tbAttResPowerStation) { |
| | | if (StringUtil.isBlank(tbAttResPowerStation.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResPowerStationService.auditByGuid(tbAttResPowerStation)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResProjectUtilize; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResProjectUtilizeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResProjectUtilizeController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/tbAttResProjectUtilize") |
| | | @AllArgsConstructor |
| | | public class TbAttResProjectUtilizeController { |
| | | |
| | | private final ITbAttResProjectUtilizeService tbAttResProjectUtilizeService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResProjectUtilize attResBase = tbAttResProjectUtilizeService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResProjectUtilize |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResProjectUtilize tbAttResProjectUtilize) { |
| | | return R.status(tbAttResProjectUtilizeService.updateByGuid(tbAttResProjectUtilize)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResProjectUtilize |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResProjectUtilize tbAttResProjectUtilize) { |
| | | if (StringUtil.isBlank(tbAttResProjectUtilize.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResProjectUtilizeService.auditByGuid(tbAttResProjectUtilize)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbNorspi; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbNorspiService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResRsbNorspiController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/TbAttResRsbNorspi") |
| | | @AllArgsConstructor |
| | | public class TbAttResRsbNorspiController { |
| | | |
| | | private final ITbAttResRsbNorspiService tbAttResRsbNorspiService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResRsbNorspi attResBase = tbAttResRsbNorspiService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbNorspi |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResRsbNorspi tbAttResRsbNorspi) { |
| | | return R.status(tbAttResRsbNorspiService.updateByGuid(tbAttResRsbNorspi)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbNorspi |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResRsbNorspi tbAttResRsbNorspi) { |
| | | if (StringUtil.isBlank(tbAttResRsbNorspi.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResRsbNorspiService.auditByGuid(tbAttResRsbNorspi)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbSpillway; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbSpillwayService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResRsbSpillwayController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/tbAttResRsbSpillway") |
| | | @AllArgsConstructor |
| | | public class TbAttResRsbSpillwayController { |
| | | |
| | | private final ITbAttResRsbSpillwayService tbAttResRsbSpillwayService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResRsbSpillway attResBase = tbAttResRsbSpillwayService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbSpillway |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResRsbSpillway tbAttResRsbSpillway) { |
| | | return R.status(tbAttResRsbSpillwayService.updateByGuid(tbAttResRsbSpillway)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbSpillway |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResRsbSpillway tbAttResRsbSpillway) { |
| | | if (StringUtil.isBlank(tbAttResRsbSpillway.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResRsbSpillwayService.auditByGuid(tbAttResRsbSpillway)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbVerspiService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResRsbVerspiController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/TbAttResRsbVerspi") |
| | | @AllArgsConstructor |
| | | public class TbAttResRsbVerspiController { |
| | | |
| | | private final ITbAttResRsbVerspiService tbAttResRsbVerspiService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResRsbVerspi attResBase = tbAttResRsbVerspiService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbVerspi |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResRsbVerspi tbAttResRsbVerspi) { |
| | | return R.status(tbAttResRsbVerspiService.updateByGuid(tbAttResRsbVerspi)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbVerspi |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResRsbVerspi tbAttResRsbVerspi) { |
| | | if (StringUtil.isBlank(tbAttResRsbVerspi.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResRsbVerspiService.auditByGuid(tbAttResRsbVerspi)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResSafetyMonitor; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResSafetyMonitorService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResSafetyMonitorController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/tbAttResSafetyMonitor") |
| | | @AllArgsConstructor |
| | | public class TbAttResSafetyMonitorController { |
| | | |
| | | private final ITbAttResSafetyMonitorService tbAttResSafetyMonitorService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResSafetyMonitor attResBase = tbAttResSafetyMonitorService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResSafetyMonitor |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResSafetyMonitor tbAttResSafetyMonitor) { |
| | | return R.status(tbAttResSafetyMonitorService.updateByGuid(tbAttResSafetyMonitor)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResSafetyMonitor |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResSafetyMonitor tbAttResSafetyMonitor) { |
| | | if (StringUtil.isBlank(tbAttResSafetyMonitor.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResSafetyMonitorService.auditByGuid(tbAttResSafetyMonitor)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResStagChar; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResStagCharService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResStagCharController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/tbAttResStagChar") |
| | | @AllArgsConstructor |
| | | public class TbAttResStagCharController { |
| | | |
| | | private final ITbAttResStagCharService tbAttResStagCharService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResStagChar attResBase = tbAttResStagCharService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResStagChar |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResStagChar tbAttResStagChar) { |
| | | return R.status(tbAttResStagCharService.updateByGuid(tbAttResStagChar)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResStagChar |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResStagChar tbAttResStagChar) { |
| | | if (StringUtil.isBlank(tbAttResStagChar.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResStagCharService.auditByGuid(tbAttResStagChar)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterBlock; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResWaterBlockService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResWaterBlockController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/TbAttResWaterBlock") |
| | | @AllArgsConstructor |
| | | public class TbAttResWaterBlockController { |
| | | |
| | | private final ITbAttResWaterBlockService tbAttResWaterBlockService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResWaterBlock attResBase = tbAttResWaterBlockService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResWaterBlock |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResWaterBlock tbAttResWaterBlock) { |
| | | return R.status(tbAttResWaterBlockService.updateByGuid(tbAttResWaterBlock)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResWaterBlock |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResWaterBlock tbAttResWaterBlock) { |
| | | if (StringUtil.isBlank(tbAttResWaterBlock.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResWaterBlockService.auditByGuid(tbAttResWaterBlock)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.controller; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterDelivery; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResWaterDeliveryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * @ClassName TbAttResWaterDeliveryController |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @Date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "中台水库信息填报") |
| | | @RestController |
| | | @RequestMapping("/sjztmd/TbAttResWaterDelivery") |
| | | @AllArgsConstructor |
| | | public class TbAttResWaterDeliveryController { |
| | | |
| | | private final ITbAttResWaterDeliveryService tbAttResWaterDeliveryService; |
| | | |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "中台水库-查询水库填报详情信息", notes = "中台水库-查询水库填报详情信息") |
| | | @GetMapping(value = "/getDetailByGuid") |
| | | public R getDetailByCode(String resGuid) { |
| | | TbAttResWaterDelivery attResBase = tbAttResWaterDeliveryService.getDetailByGuid(resGuid); |
| | | return R.data(attResBase); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResWaterDelivery |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-编辑", notes = "水库信息-编辑") |
| | | @PostMapping(value = "/edit") |
| | | public R edit(@RequestBody TbAttResWaterDelivery tbAttResWaterDelivery) { |
| | | return R.status(tbAttResWaterDeliveryService.updateByGuid(tbAttResWaterDelivery)); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResWaterDelivery |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "水库信息-审核", notes = "水库信息-审核") |
| | | @PostMapping(value = "/audit") |
| | | public R audit(@RequestBody TbAttResWaterDelivery tbAttResWaterDelivery) { |
| | | if (StringUtil.isBlank(tbAttResWaterDelivery.getGuid())) { |
| | | return R.fail("参数不正确"); |
| | | } |
| | | return R.status(tbAttResWaterDeliveryService.auditByGuid(tbAttResWaterDelivery)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResEngBene; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResEngBeneMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResEngBeneMapper extends BaseMapper<TbAttResEngBene> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResEngBene getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResEngBeneMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResEngBene"> |
| | | SELECT * FROM "tb_att_res_eng_bene" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResInformationProject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResInformationProjectMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResInformationProjectMapper extends BaseMapper<TbAttResInformationProject> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResInformationProject getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResInformationProjectMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResInformationProject"> |
| | | SELECT * FROM "tb_att_res_infomation_project" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResMgrSysB; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResMgrSysBMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResMgrSysBMapper extends BaseMapper<TbAttResMgrSysB> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResMgrSysB getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResMgrSysBMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResMgrSysB"> |
| | | SELECT * FROM "tb_att_res_mgr_sys_b" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResPowerStation; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResPowerStationMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResPowerStationMapper extends BaseMapper<TbAttResPowerStation> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResPowerStation getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResPowerStationMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResPowerStation"> |
| | | SELECT * FROM "tb_att_res_power_station" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResProjectUtilize; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResProjectUtilizeMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResProjectUtilizeMapper extends BaseMapper<TbAttResProjectUtilize> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResProjectUtilize getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResProjectUtilizeMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResProjectUtilize"> |
| | | SELECT * FROM "tb_att_res_project_utilize" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbNorspi; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResRsbNorspiMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResRsbNorspiMapper extends BaseMapper<TbAttResRsbNorspi> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResRsbNorspi getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResRsbNorspiMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResRsbNorspi"> |
| | | SELECT * FROM "tb_att_res_rsb_norspi" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbSpillway; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResRsbSpillwayMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResRsbSpillwayMapper extends BaseMapper<TbAttResRsbSpillway> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResRsbSpillway getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResRsbSpillwayMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResRsbSpillway"> |
| | | SELECT * FROM "tb_att_res_rsb_spillway" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResRsbVerspiMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResRsbVerspiMapper extends BaseMapper<TbAttResRsbVerspi> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResRsbVerspi getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResRsbVerspiMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi"> |
| | | SELECT * FROM "tb_att_res_rsb_verspi" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResSafetyMonitor; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResSafetyMonitorMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResSafetyMonitorMapper extends BaseMapper<TbAttResSafetyMonitor> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResSafetyMonitor getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResSafetyMonitorMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResSafetyMonitor"> |
| | | SELECT * FROM "tb_att_res_safety_monitor" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResStagChar; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResStagCharMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResStagCharMapper extends BaseMapper<TbAttResStagChar> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResStagChar getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResStagCharMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResStagChar"> |
| | | SELECT * FROM "tb_att_res_stag_char" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterBlock; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResWaterBlockMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResWaterBlockMapper extends BaseMapper<TbAttResWaterBlock> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResWaterBlock getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResWaterBlockMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResWaterBlock"> |
| | | SELECT * FROM "tb_att_res_water_block" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.mapper; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterDelivery; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | |
| | | /** |
| | | * TbAttResWaterDeliveryMapper 接口 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-08-16 |
| | | */ |
| | | @DS("zt") |
| | | public interface TbAttResWaterDeliveryMapper extends BaseMapper<TbAttResWaterDelivery> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param resGuid |
| | | * @return |
| | | */ |
| | | TbAttResWaterDelivery getDetailByResGuid(@Param("resGuid") String resGuid); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztmd.mapper.TbAttResWaterDeliveryMapper"> |
| | | |
| | | <!--查询水库填报详情信息--> |
| | | <select id="getDetailByResGuid" resultType="cn.gistack.sm.sjztmd.entity.TbAttResWaterDelivery"> |
| | | SELECT * FROM "tb_att_res_water_delivery" WHERE "res_guid" = #{resGuid} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResEngBene; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName IAttResBaseService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResEngBeneService extends IService<TbAttResEngBene> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResEngBene getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResEngBene |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResEngBene tbAttResEngBene); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResEngBene |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResEngBene tbAttResEngBene); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResInformationProject; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName IAttResBaseService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResInformationProjectService extends IService<TbAttResInformationProject> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResInformationProject getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResInformationProject |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResInformationProject tbAttResInformationProject); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResInformationProject |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResInformationProject tbAttResInformationProject); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResMgrSysB; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResMgrSysBService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResMgrSysBService extends IService<TbAttResMgrSysB> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResMgrSysB getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResMgrSysB |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResMgrSysB tbAttResMgrSysB); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResMgrSysB |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResMgrSysB tbAttResMgrSysB); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResPowerStation; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResPowerStationService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResPowerStationService extends IService<TbAttResPowerStation> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResPowerStation getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResPowerStation |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResPowerStation tbAttResPowerStation); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResPowerStation |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResPowerStation tbAttResPowerStation); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResProjectUtilize; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResProjectUtilizeService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResProjectUtilizeService extends IService<TbAttResProjectUtilize> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResProjectUtilize getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResProjectUtilize |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResProjectUtilize tbAttResProjectUtilize); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResProjectUtilize |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResProjectUtilize tbAttResProjectUtilize); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbNorspi; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResRsbNorspiService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResRsbNorspiService extends IService<TbAttResRsbNorspi> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResRsbNorspi getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbNorspi |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResRsbNorspi tbAttResRsbNorspi); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbNorspi |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResRsbNorspi tbAttResRsbNorspi); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbSpillway; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResRsbSpillwayService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResRsbSpillwayService extends IService<TbAttResRsbSpillway> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResRsbSpillway getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbSpillway |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResRsbSpillway tbAttResRsbSpillway); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbSpillway |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResRsbSpillway tbAttResRsbSpillway); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResRsbVerspiService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResRsbVerspiService extends IService<TbAttResRsbVerspi> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResRsbVerspi getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbVerspi |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResRsbVerspi tbAttResRsbVerspi); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbVerspi |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResRsbVerspi tbAttResRsbVerspi); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResSafetyMonitor; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResSafetyMonitorService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResSafetyMonitorService extends IService<TbAttResSafetyMonitor> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResSafetyMonitor getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResSafetyMonitor |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResSafetyMonitor tbAttResSafetyMonitor); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResSafetyMonitor |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResSafetyMonitor tbAttResSafetyMonitor); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResStagChar; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResStagCharService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResStagCharService extends IService<TbAttResStagChar> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResStagChar getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResStagChar |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResStagChar tbAttResStagChar); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResStagChar |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResStagChar tbAttResStagChar); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterBlock; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResWaterBlockService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResWaterBlockService extends IService<TbAttResWaterBlock> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResWaterBlock getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResWaterBlock |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResWaterBlock tbAttResWaterBlock); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResWaterBlock |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResWaterBlock tbAttResWaterBlock); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterDelivery; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * @ClassName ITbAttResWaterDeliveryService |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | public interface ITbAttResWaterDeliveryService extends IService<TbAttResWaterDelivery> { |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | TbAttResWaterDelivery getDetailByGuid(String guid); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResWaterDelivery |
| | | * @return |
| | | */ |
| | | boolean updateByGuid(TbAttResWaterDelivery tbAttResWaterDelivery); |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResWaterDelivery |
| | | * @return |
| | | */ |
| | | boolean auditByGuid(TbAttResWaterDelivery tbAttResWaterDelivery); |
| | | } |
| | |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResBase); |
| | | }else { |
| | | tbAttResBase.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResBase); |
| | | } |
| | | // 返回 |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResEngBene; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResEngBeneMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResEngBeneService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName AttResBaseServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResEngBeneServiceImpl extends ServiceImpl<TbAttResEngBeneMapper, TbAttResEngBene> implements ITbAttResEngBeneService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResEngBene getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResEngBene |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResEngBene tbAttResEngBene) { |
| | | // 查询是否存在 |
| | | TbAttResEngBene detail = baseMapper.getDetailByResGuid(tbAttResEngBene.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResEngBene); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResEngBene); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResEngBene |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResEngBene tbAttResEngBene) { |
| | | // 查询是否存在 |
| | | TbAttResEngBene detail = baseMapper.getDetailByResGuid(tbAttResEngBene.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResEngBene); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResEngBene); |
| | | if (null!=detail){ |
| | | tbAttResEngBene.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResEngBene.getCheckState()==3){ |
| | | tbAttResEngBene.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResEngBene); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResEngBene |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResEngBene oldAbAttResBase,TbAttResEngBene tbAttResEngBene){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResEngBene); |
| | | }else { |
| | | tbAttResEngBene.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResEngBene); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResEngBene |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResEngBene oldAbAttResBase,TbAttResEngBene newTbAttResEngBene) { |
| | | String fillName = ""; |
| | | if (newTbAttResEngBene.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResEngBene.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResEngBene.getCheckLog()?"":":" + newTbAttResEngBene.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResEngBene.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResEngBene.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResEngBene |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResEngBene oldAbAttResBase,TbAttResEngBene newTbAttResEngBene) { |
| | | String fillName = ""; |
| | | if (newTbAttResEngBene.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResEngBene.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResEngBene.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResEngBene.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResEngBene.getCheckLog()?"":":" + newTbAttResEngBene.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResEngBene.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResEngBene.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResInformationProject; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResInformationProjectMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResInformationProjectService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName AttResBaseServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResInformationProjectServiceImpl extends ServiceImpl<TbAttResInformationProjectMapper, TbAttResInformationProject> implements ITbAttResInformationProjectService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResInformationProject getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResInformationProject |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResInformationProject tbAttResInformationProject) { |
| | | // 查询是否存在 |
| | | TbAttResInformationProject detail = baseMapper.getDetailByResGuid(tbAttResInformationProject.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResInformationProject); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResInformationProject); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResInformationProject |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResInformationProject tbAttResInformationProject) { |
| | | // 查询是否存在 |
| | | TbAttResInformationProject detail = baseMapper.getDetailByResGuid(tbAttResInformationProject.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResInformationProject); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResInformationProject); |
| | | if (null!=detail){ |
| | | tbAttResInformationProject.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResInformationProject.getCheckState()==3){ |
| | | tbAttResInformationProject.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResInformationProject); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResInformationProject |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResInformationProject oldAbAttResBase,TbAttResInformationProject tbAttResInformationProject){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResInformationProject); |
| | | }else { |
| | | tbAttResInformationProject.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResInformationProject); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResInformationProject |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResInformationProject oldAbAttResBase,TbAttResInformationProject newTbAttResInformationProject) { |
| | | String fillName = ""; |
| | | if (newTbAttResInformationProject.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResInformationProject.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResInformationProject.getCheckLog()?"":":" + newTbAttResInformationProject.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResInformationProject.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResInformationProject.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResInformationProject |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResInformationProject oldAbAttResBase,TbAttResInformationProject newTbAttResInformationProject) { |
| | | String fillName = ""; |
| | | if (newTbAttResInformationProject.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResInformationProject.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResInformationProject.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResInformationProject.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResInformationProject.getCheckLog()?"":":" + newTbAttResInformationProject.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResInformationProject.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResInformationProject.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResMgrSysB; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResMgrSysBMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResMgrSysBService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResMgrSysBServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResMgrSysBServiceImpl extends ServiceImpl<TbAttResMgrSysBMapper, TbAttResMgrSysB> implements ITbAttResMgrSysBService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResMgrSysB getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResMgrSysB |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResMgrSysB tbAttResMgrSysB) { |
| | | // 查询是否存在 |
| | | TbAttResMgrSysB detail = baseMapper.getDetailByResGuid(tbAttResMgrSysB.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResMgrSysB); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResMgrSysB); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResMgrSysB |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResMgrSysB tbAttResMgrSysB) { |
| | | // 查询是否存在 |
| | | TbAttResMgrSysB detail = baseMapper.getDetailByResGuid(tbAttResMgrSysB.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResMgrSysB); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResMgrSysB); |
| | | if (null!=detail){ |
| | | tbAttResMgrSysB.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResMgrSysB.getCheckState()==3){ |
| | | tbAttResMgrSysB.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResMgrSysB); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResMgrSysB |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResMgrSysB oldAbAttResBase,TbAttResMgrSysB tbAttResMgrSysB){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResMgrSysB); |
| | | }else { |
| | | tbAttResMgrSysB.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResMgrSysB); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResMgrSysB |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResMgrSysB oldAbAttResBase,TbAttResMgrSysB newTbAttResMgrSysB) { |
| | | String fillName = ""; |
| | | if (newTbAttResMgrSysB.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResMgrSysB.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResMgrSysB.getCheckLog()?"":":" + newTbAttResMgrSysB.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResMgrSysB.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResMgrSysB.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResMgrSysB |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResMgrSysB oldAbAttResBase,TbAttResMgrSysB newTbAttResMgrSysB) { |
| | | String fillName = ""; |
| | | if (newTbAttResMgrSysB.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResMgrSysB.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResMgrSysB.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResMgrSysB.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResMgrSysB.getCheckLog()?"":":" + newTbAttResMgrSysB.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResMgrSysB.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResMgrSysB.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResPowerStation; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResPowerStationMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResPowerStationService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResPowerStationServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResPowerStationServiceImpl extends ServiceImpl<TbAttResPowerStationMapper, TbAttResPowerStation> implements ITbAttResPowerStationService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResPowerStation getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResPowerStation |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResPowerStation tbAttResPowerStation) { |
| | | // 查询是否存在 |
| | | TbAttResPowerStation detail = baseMapper.getDetailByResGuid(tbAttResPowerStation.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResPowerStation); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResPowerStation); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResPowerStation |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResPowerStation tbAttResPowerStation) { |
| | | // 查询是否存在 |
| | | TbAttResPowerStation detail = baseMapper.getDetailByResGuid(tbAttResPowerStation.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResPowerStation); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResPowerStation); |
| | | if (null!=detail){ |
| | | tbAttResPowerStation.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResPowerStation.getCheckState()==3){ |
| | | tbAttResPowerStation.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResPowerStation); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResPowerStation |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResPowerStation oldAbAttResBase,TbAttResPowerStation tbAttResPowerStation){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResPowerStation); |
| | | }else { |
| | | tbAttResPowerStation.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResPowerStation); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResPowerStation |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResPowerStation oldAbAttResBase,TbAttResPowerStation newTbAttResPowerStation) { |
| | | String fillName = ""; |
| | | if (newTbAttResPowerStation.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResPowerStation.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResPowerStation.getCheckLog()?"":":" + newTbAttResPowerStation.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResPowerStation.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResPowerStation.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResPowerStation |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResPowerStation oldAbAttResBase,TbAttResPowerStation newTbAttResPowerStation) { |
| | | String fillName = ""; |
| | | if (newTbAttResPowerStation.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResPowerStation.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResPowerStation.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResPowerStation.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResPowerStation.getCheckLog()?"":":" + newTbAttResPowerStation.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResPowerStation.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResPowerStation.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResProjectUtilize; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResProjectUtilizeMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResProjectUtilizeService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResProjectUtilizeServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResProjectUtilizeServiceImpl extends ServiceImpl<TbAttResProjectUtilizeMapper, TbAttResProjectUtilize> implements ITbAttResProjectUtilizeService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResProjectUtilize getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResProjectUtilize |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResProjectUtilize tbAttResProjectUtilize) { |
| | | // 查询是否存在 |
| | | TbAttResProjectUtilize detail = baseMapper.getDetailByResGuid(tbAttResProjectUtilize.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResProjectUtilize); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResProjectUtilize); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResProjectUtilize |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResProjectUtilize tbAttResProjectUtilize) { |
| | | // 查询是否存在 |
| | | TbAttResProjectUtilize detail = baseMapper.getDetailByResGuid(tbAttResProjectUtilize.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResProjectUtilize); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResProjectUtilize); |
| | | if (null!=detail){ |
| | | tbAttResProjectUtilize.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResProjectUtilize.getCheckState()==3){ |
| | | tbAttResProjectUtilize.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResProjectUtilize); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResProjectUtilize |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResProjectUtilize oldAbAttResBase,TbAttResProjectUtilize tbAttResProjectUtilize){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResProjectUtilize); |
| | | }else { |
| | | tbAttResProjectUtilize.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResProjectUtilize); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResProjectUtilize |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResProjectUtilize oldAbAttResBase,TbAttResProjectUtilize newTbAttResProjectUtilize) { |
| | | String fillName = ""; |
| | | if (newTbAttResProjectUtilize.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResProjectUtilize.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResProjectUtilize.getCheckLog()?"":":" + newTbAttResProjectUtilize.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResProjectUtilize.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResProjectUtilize.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResProjectUtilize |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResProjectUtilize oldAbAttResBase,TbAttResProjectUtilize newTbAttResProjectUtilize) { |
| | | String fillName = ""; |
| | | if (newTbAttResProjectUtilize.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResProjectUtilize.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResProjectUtilize.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResProjectUtilize.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResProjectUtilize.getCheckLog()?"":":" + newTbAttResProjectUtilize.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResProjectUtilize.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResProjectUtilize.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbNorspi; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbNorspiMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbNorspiService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResRsbNorspiServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResRsbNorspiServiceImpl extends ServiceImpl<TbAttResRsbNorspiMapper, TbAttResRsbNorspi> implements ITbAttResRsbNorspiService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResRsbNorspi getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbNorspi |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResRsbNorspi tbAttResRsbNorspi) { |
| | | // 查询是否存在 |
| | | TbAttResRsbNorspi detail = baseMapper.getDetailByResGuid(tbAttResRsbNorspi.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResRsbNorspi); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResRsbNorspi); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbNorspi |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResRsbNorspi tbAttResRsbNorspi) { |
| | | // 查询是否存在 |
| | | TbAttResRsbNorspi detail = baseMapper.getDetailByResGuid(tbAttResRsbNorspi.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResRsbNorspi); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResRsbNorspi); |
| | | if (null!=detail){ |
| | | tbAttResRsbNorspi.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResRsbNorspi.getCheckState()==3){ |
| | | tbAttResRsbNorspi.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResRsbNorspi); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResRsbNorspi |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResRsbNorspi oldAbAttResBase,TbAttResRsbNorspi tbAttResRsbNorspi){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResRsbNorspi); |
| | | }else { |
| | | tbAttResRsbNorspi.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResRsbNorspi); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResRsbNorspi |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResRsbNorspi oldAbAttResBase,TbAttResRsbNorspi newTbAttResRsbNorspi) { |
| | | String fillName = ""; |
| | | if (newTbAttResRsbNorspi.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResRsbNorspi.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResRsbNorspi.getCheckLog()?"":":" + newTbAttResRsbNorspi.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResRsbNorspi.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResRsbNorspi.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResRsbNorspi |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResRsbNorspi oldAbAttResBase,TbAttResRsbNorspi newTbAttResRsbNorspi) { |
| | | String fillName = ""; |
| | | if (newTbAttResRsbNorspi.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResRsbNorspi.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResRsbNorspi.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResRsbNorspi.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResRsbNorspi.getCheckLog()?"":":" + newTbAttResRsbNorspi.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResRsbNorspi.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResRsbNorspi.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbSpillway; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbSpillwayMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbSpillwayService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResRsbSpillwayServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResRsbSpillwayServiceImpl extends ServiceImpl<TbAttResRsbSpillwayMapper, TbAttResRsbSpillway> implements ITbAttResRsbSpillwayService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResRsbSpillway getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbSpillway |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResRsbSpillway tbAttResRsbSpillway) { |
| | | // 查询是否存在 |
| | | TbAttResRsbSpillway detail = baseMapper.getDetailByResGuid(tbAttResRsbSpillway.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResRsbSpillway); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResRsbSpillway); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbSpillway |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResRsbSpillway tbAttResRsbSpillway) { |
| | | // 查询是否存在 |
| | | TbAttResRsbSpillway detail = baseMapper.getDetailByResGuid(tbAttResRsbSpillway.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResRsbSpillway); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResRsbSpillway); |
| | | if (null!=detail){ |
| | | tbAttResRsbSpillway.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResRsbSpillway.getCheckState()==3){ |
| | | tbAttResRsbSpillway.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResRsbSpillway); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResRsbSpillway |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResRsbSpillway oldAbAttResBase,TbAttResRsbSpillway tbAttResRsbSpillway){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResRsbSpillway); |
| | | }else { |
| | | tbAttResRsbSpillway.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResRsbSpillway); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResRsbSpillway |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResRsbSpillway oldAbAttResBase,TbAttResRsbSpillway newTbAttResRsbSpillway) { |
| | | String fillName = ""; |
| | | if (newTbAttResRsbSpillway.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResRsbSpillway.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResRsbSpillway.getCheckLog()?"":":" + newTbAttResRsbSpillway.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResRsbSpillway.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResRsbSpillway.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResRsbSpillway |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResRsbSpillway oldAbAttResBase,TbAttResRsbSpillway newTbAttResRsbSpillway) { |
| | | String fillName = ""; |
| | | if (newTbAttResRsbSpillway.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResRsbSpillway.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResRsbSpillway.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResRsbSpillway.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResRsbSpillway.getCheckLog()?"":":" + newTbAttResRsbSpillway.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResRsbSpillway.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResRsbSpillway.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbVerspiMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbVerspiService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResRsbVerspiServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResRsbVerspiServiceImpl extends ServiceImpl<TbAttResRsbVerspiMapper, TbAttResRsbVerspi> implements ITbAttResRsbVerspiService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResRsbVerspi getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResRsbVerspi |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResRsbVerspi tbAttResRsbVerspi) { |
| | | // 查询是否存在 |
| | | TbAttResRsbVerspi detail = baseMapper.getDetailByResGuid(tbAttResRsbVerspi.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResRsbVerspi); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResRsbVerspi); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResRsbVerspi |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResRsbVerspi tbAttResRsbVerspi) { |
| | | // 查询是否存在 |
| | | TbAttResRsbVerspi detail = baseMapper.getDetailByResGuid(tbAttResRsbVerspi.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResRsbVerspi); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResRsbVerspi); |
| | | if (null!=detail){ |
| | | tbAttResRsbVerspi.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResRsbVerspi.getCheckState()==3){ |
| | | tbAttResRsbVerspi.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResRsbVerspi); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResRsbVerspi |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResRsbVerspi oldAbAttResBase,TbAttResRsbVerspi tbAttResRsbVerspi){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResRsbVerspi); |
| | | }else { |
| | | tbAttResRsbVerspi.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResRsbVerspi); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResRsbVerspi |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResRsbVerspi oldAbAttResBase,TbAttResRsbVerspi newTbAttResRsbVerspi) { |
| | | String fillName = ""; |
| | | if (newTbAttResRsbVerspi.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResRsbVerspi.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResRsbVerspi.getCheckLog()?"":":" + newTbAttResRsbVerspi.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResRsbVerspi.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResRsbVerspi.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResRsbVerspi |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResRsbVerspi oldAbAttResBase,TbAttResRsbVerspi newTbAttResRsbVerspi) { |
| | | String fillName = ""; |
| | | if (newTbAttResRsbVerspi.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResRsbVerspi.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResRsbVerspi.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResRsbVerspi.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResRsbVerspi.getCheckLog()?"":":" + newTbAttResRsbVerspi.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResRsbVerspi.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResRsbVerspi.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResSafetyMonitor; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResSafetyMonitorMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResSafetyMonitorService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResSafetyMonitorServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResSafetyMonitorServiceImpl extends ServiceImpl<TbAttResSafetyMonitorMapper, TbAttResSafetyMonitor> implements ITbAttResSafetyMonitorService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResSafetyMonitor getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResSafetyMonitor |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResSafetyMonitor tbAttResSafetyMonitor) { |
| | | // 查询是否存在 |
| | | TbAttResSafetyMonitor detail = baseMapper.getDetailByResGuid(tbAttResSafetyMonitor.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResSafetyMonitor); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResSafetyMonitor); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResSafetyMonitor |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResSafetyMonitor tbAttResSafetyMonitor) { |
| | | // 查询是否存在 |
| | | TbAttResSafetyMonitor detail = baseMapper.getDetailByResGuid(tbAttResSafetyMonitor.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResSafetyMonitor); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResSafetyMonitor); |
| | | if (null!=detail){ |
| | | tbAttResSafetyMonitor.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResSafetyMonitor.getCheckState()==3){ |
| | | tbAttResSafetyMonitor.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResSafetyMonitor); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResSafetyMonitor |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResSafetyMonitor oldAbAttResBase,TbAttResSafetyMonitor tbAttResSafetyMonitor){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResSafetyMonitor); |
| | | }else { |
| | | tbAttResSafetyMonitor.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResSafetyMonitor); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResSafetyMonitor |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResSafetyMonitor oldAbAttResBase,TbAttResSafetyMonitor newTbAttResSafetyMonitor) { |
| | | String fillName = ""; |
| | | if (newTbAttResSafetyMonitor.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResSafetyMonitor.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResSafetyMonitor.getCheckLog()?"":":" + newTbAttResSafetyMonitor.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResSafetyMonitor.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResSafetyMonitor.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResSafetyMonitor |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResSafetyMonitor oldAbAttResBase,TbAttResSafetyMonitor newTbAttResSafetyMonitor) { |
| | | String fillName = ""; |
| | | if (newTbAttResSafetyMonitor.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResSafetyMonitor.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResSafetyMonitor.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResSafetyMonitor.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResSafetyMonitor.getCheckLog()?"":":" + newTbAttResSafetyMonitor.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResSafetyMonitor.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResSafetyMonitor.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResStagChar; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResStagCharMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResStagCharService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResStagCharServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResStagCharServiceImpl extends ServiceImpl<TbAttResStagCharMapper, TbAttResStagChar> implements ITbAttResStagCharService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResStagChar getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResStagChar |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResStagChar tbAttResStagChar) { |
| | | // 查询是否存在 |
| | | TbAttResStagChar detail = baseMapper.getDetailByResGuid(tbAttResStagChar.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResStagChar); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResStagChar); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResStagChar |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResStagChar tbAttResStagChar) { |
| | | // 查询是否存在 |
| | | TbAttResStagChar detail = baseMapper.getDetailByResGuid(tbAttResStagChar.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResStagChar); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResStagChar); |
| | | if (null!=detail){ |
| | | tbAttResStagChar.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResStagChar.getCheckState()==3){ |
| | | tbAttResStagChar.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResStagChar); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResStagChar |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResStagChar oldAbAttResBase,TbAttResStagChar tbAttResStagChar){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResStagChar); |
| | | }else { |
| | | tbAttResStagChar.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResStagChar); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResStagChar |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResStagChar oldAbAttResBase,TbAttResStagChar newTbAttResStagChar) { |
| | | String fillName = ""; |
| | | if (newTbAttResStagChar.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResStagChar.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResStagChar.getCheckLog()?"":":" + newTbAttResStagChar.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResStagChar.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResStagChar.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResStagChar |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResStagChar oldAbAttResBase,TbAttResStagChar newTbAttResStagChar) { |
| | | String fillName = ""; |
| | | if (newTbAttResStagChar.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResStagChar.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResStagChar.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResStagChar.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResStagChar.getCheckLog()?"":":" + newTbAttResStagChar.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResStagChar.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResStagChar.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterBlock; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResWaterBlockMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResWaterBlockService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResWaterBlockServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResWaterBlockServiceImpl extends ServiceImpl<TbAttResWaterBlockMapper, TbAttResWaterBlock> implements ITbAttResWaterBlockService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResWaterBlock getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResWaterBlock |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResWaterBlock tbAttResWaterBlock) { |
| | | // 查询是否存在 |
| | | TbAttResWaterBlock detail = baseMapper.getDetailByResGuid(tbAttResWaterBlock.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResWaterBlock); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResWaterBlock); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResWaterBlock |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResWaterBlock tbAttResWaterBlock) { |
| | | // 查询是否存在 |
| | | TbAttResWaterBlock detail = baseMapper.getDetailByResGuid(tbAttResWaterBlock.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResWaterBlock); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResWaterBlock); |
| | | if (null!=detail){ |
| | | tbAttResWaterBlock.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResWaterBlock.getCheckState()==3){ |
| | | tbAttResWaterBlock.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResWaterBlock); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResWaterBlock |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResWaterBlock oldAbAttResBase,TbAttResWaterBlock tbAttResWaterBlock){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResWaterBlock); |
| | | }else { |
| | | tbAttResWaterBlock.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResWaterBlock); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResWaterBlock |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResWaterBlock oldAbAttResBase,TbAttResWaterBlock newTbAttResWaterBlock) { |
| | | String fillName = ""; |
| | | if (newTbAttResWaterBlock.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResWaterBlock.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResWaterBlock.getCheckLog()?"":":" + newTbAttResWaterBlock.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResWaterBlock.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResWaterBlock.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResWaterBlock |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResWaterBlock oldAbAttResBase,TbAttResWaterBlock newTbAttResWaterBlock) { |
| | | String fillName = ""; |
| | | if (newTbAttResWaterBlock.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResWaterBlock.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResWaterBlock.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResWaterBlock.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResWaterBlock.getCheckLog()?"":":" + newTbAttResWaterBlock.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResWaterBlock.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResWaterBlock.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterDelivery; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResWaterDeliveryMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResWaterDeliveryService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName TbAttResWaterDeliveryServiceImpl |
| | | * @Description TODO |
| | | * @author zhongrj |
| | | * @date 2023/8/14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | @DS("zt") |
| | | public class TbAttResWaterDeliveryServiceImpl extends ServiceImpl<TbAttResWaterDeliveryMapper, TbAttResWaterDelivery> implements ITbAttResWaterDeliveryService { |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public TbAttResWaterDelivery getDetailByGuid(String guid) { |
| | | return baseMapper.getDetailByResGuid(guid); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param tbAttResWaterDelivery |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResWaterDelivery tbAttResWaterDelivery) { |
| | | // 查询是否存在 |
| | | TbAttResWaterDelivery detail = baseMapper.getDetailByResGuid(tbAttResWaterDelivery.getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(detail,tbAttResWaterDelivery); |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResWaterDelivery); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | * @param tbAttResWaterDelivery |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResWaterDelivery tbAttResWaterDelivery) { |
| | | // 查询是否存在 |
| | | TbAttResWaterDelivery detail = baseMapper.getDetailByResGuid(tbAttResWaterDelivery.getResGuid()); |
| | | // 更新操作日志 |
| | | setUpdateLog(detail,tbAttResWaterDelivery); |
| | | // 更新审核日志 |
| | | setUpdateCheckLog(detail,tbAttResWaterDelivery); |
| | | if (null!=detail){ |
| | | tbAttResWaterDelivery.setGuid(detail.getGuid()); |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResWaterDelivery.getCheckState()==3){ |
| | | tbAttResWaterDelivery.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResWaterDelivery); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param tbAttResWaterDelivery |
| | | * @return |
| | | */ |
| | | private int addOrUpdateByGuid(TbAttResWaterDelivery oldAbAttResBase,TbAttResWaterDelivery tbAttResWaterDelivery){ |
| | | int i = 0; |
| | | if (null!=oldAbAttResBase){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResWaterDelivery); |
| | | }else { |
| | | tbAttResWaterDelivery.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResWaterDelivery); |
| | | } |
| | | // 返回 |
| | | return i; |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResWaterDelivery |
| | | * 更新审核记录 |
| | | */ |
| | | private void setUpdateCheckLog(TbAttResWaterDelivery oldAbAttResBase,TbAttResWaterDelivery newTbAttResWaterDelivery) { |
| | | String fillName = ""; |
| | | if (newTbAttResWaterDelivery.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResWaterDelivery.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResWaterDelivery.getCheckLog()?"":":" + newTbAttResWaterDelivery.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResWaterDelivery.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResWaterDelivery.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @param oldAbAttResBase |
| | | * @param newTbAttResWaterDelivery |
| | | * 更新操作记录 |
| | | */ |
| | | private void setUpdateLog(TbAttResWaterDelivery oldAbAttResBase,TbAttResWaterDelivery newTbAttResWaterDelivery) { |
| | | String fillName = ""; |
| | | if (newTbAttResWaterDelivery.getCheckState()==0){ |
| | | fillName = "编辑"; |
| | | } |
| | | if (newTbAttResWaterDelivery.getCheckState()==1){ |
| | | fillName = "提交"; |
| | | } |
| | | if (newTbAttResWaterDelivery.getCheckState()==2){ |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResWaterDelivery.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResWaterDelivery.getCheckLog()?"":":" + newTbAttResWaterDelivery.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()); |
| | | String userName = AuthUtil.getUser().getUserName(); |
| | | String phone = userClient.userInfoById(AuthUtil.getUserId()).getData().getPhone(); |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append(time) |
| | | .append(",") |
| | | .append(fillName) |
| | | .append(",") |
| | | .append(userName) |
| | | .append(",") |
| | | .append(phone) |
| | | .append(";"); |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResWaterDelivery.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResWaterDelivery.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |