From b1d8e153aec8fe3098cee33c4efa3f058afec86d Mon Sep 17 00:00:00 2001 From: pengjie <17373303529@163.com> Date: Sat, 29 Jul 2023 10:26:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AB=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/HardWareCallbackController.java | 7 + .../EntInvestmentApplyController.java | 190 ++++++++++++++++++ .../EntInvestmentContractController.java | 100 +++++++++ .../EntInvestmentPaymentController.java | 101 ++++++++++ .../EntInvestmentPaymentDetailController.java | 185 +++++++++++++++++ .../EntInvestmentPaymentItemController.java | 172 ++++++++++++++++ .../EntInvestmentPaymentStatController.java | 151 ++++++++++++++ .../basicdata/dto/EngineeringDeviceDto.java | 3 - .../basicdata/dto/EngineeringPageDto.java | 3 + .../basicdata/dto/ProjectDeviceDto.java | 3 - .../modules/basicdata/dto/ProjectPageDto.java | 3 + 11 files changed, 912 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentApplyController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentContractController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentDetailController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentItemController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentStatController.java diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/HardWareCallbackController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/HardWareCallbackController.java index 416b50e..a3408c5 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/HardWareCallbackController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/HardWareCallbackController.java @@ -208,6 +208,13 @@ public class HardWareCallbackController { aiMonitorAlarm.setState(-1); } aiMonitorAlarmService.save(aiMonitorAlarm); + // 修正设备状态 + LambdaUpdateWrapper updateWrapper = Wrappers.lambdaUpdate(); + if (aiMonitorDev.getState() == 0) { + updateWrapper.set(AiMonitorDev::getState, 1); + updateWrapper.eq(AiMonitorDev::getAiMonitorId, aiMonitorDev.getAiMonitorId()); + aiMonitorDevService.update(updateWrapper); + } String param = aiMonitorDev.getProjectSn(); if (StringUtils.isNotBlank(aiMonitorDev.getEngineeringSn())) { param = aiMonitorDev.getEngineeringSn(); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentApplyController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentApplyController.java new file mode 100644 index 0000000..9b0d9f4 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentApplyController.java @@ -0,0 +1,190 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.safety.entity.InvestmentApply; +import com.zhgd.xmgl.modules.safety.service.IInvestmentApplyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付申报 + * @author: pengj + * @date: 2023-07-05 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentApply") +@Slf4j +@Api(tags = "投资支付申报管理") +public class EntInvestmentApplyController { + @Autowired + private IInvestmentApplyService investmentApplyService; + + @Autowired + private IEngineeringService engineeringService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "分页查询", operDesc = "分页列表查询投资支付申报信息") + @ApiOperation(value = " 分页列表查询投资支付申报信息", notes = "分页列表查询投资支付申报信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "name", value = "申报时段名称", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + IPage pageList = investmentApplyService.pageList(map); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentApply + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "列表查询", operDesc = "列表查询已支付投资申报信息") + @ApiOperation(value = " 列表查询已支付投资申报信息", notes = "列表查询已支付投资申报信息", httpMethod = "POST") + @ApiImplicitParam(name = "investmentPaymentId", value = "投资支付记录ID", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/payList") + public Result> payList(@RequestBody InvestmentApply investmentApply) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentApply); + queryWrapper.lambda().isNotNull(InvestmentApply::getInvestmentPaymentId); + List list = investmentApplyService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param investmentApply + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "新增", operDesc = "添加投资支付申报信息") + @ApiOperation(value = " 添加投资支付申报信息", notes = "添加投资支付申报信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentApply investmentApply) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentApply.getEngineeringSn())).getProjectSn(); + investmentApply.setProjectSn(projectSn); + investmentApplyService.saveInfo(investmentApply); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentApply + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "修改", operDesc = "编辑投资支付申报信息") + @ApiOperation(value = "编辑投资支付申报信息", notes = "编辑投资支付申报信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentApply investmentApply) { + Result result = new Result(); + InvestmentApply investmentApplyEntity = investmentApplyService.getById(investmentApply.getId()); + if (investmentApplyEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentApplyService.updateById(investmentApply); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "删除", operDesc = "删除投资支付申报信息") + @ApiOperation(value = "删除投资支付申报信息", notes = "删除投资支付申报信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付申报ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody InvestmentApply investmentApply) { + Result result = new Result(); + InvestmentApply investmentApplyEntity = investmentApplyService.getById(investmentApply.getId()); + if (investmentApplyEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentApplyService.removeById(investmentApply.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + /** + * 批量删除 + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "批量删除", operDesc = "批量删除投资支付申报信息") + @ApiOperation(value = "批量删除投资支付申报信息", notes = "批量删除投资支付申报信息", httpMethod = "POST") + @ApiImplicitParam(name = "ids", value = "投资支付申报ID字符串", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/deleteBatch") + public Result deleteBatch(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.investmentApplyService.removeByIds(Arrays.asList(ids.split(","))); + result.success("删除成功!"); + } + return result; + } + + /** + * 通过id查询 + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "查询", operDesc = "通过id查询投资支付申报信息") + @ApiOperation(value = "通过id查询投资支付申报信息", notes = "通过id查询投资支付申报信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付申报ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentApply investmentApply = investmentApplyService.getById(MapUtils.getString(map, "id")); + if (investmentApply == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentApply); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentContractController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentContractController.java new file mode 100644 index 0000000..199c60c --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentContractController.java @@ -0,0 +1,100 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.safety.entity.InvestmentContract; +import com.zhgd.xmgl.modules.safety.service.IInvestmentContractService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付合同 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentContract") +@Slf4j +@Api(tags = "投资支付合同管理") +public class EntInvestmentContractController { + @Autowired + private IInvestmentContractService investmentContractService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "分页查询", operDesc = "分页列表查询投资支付合同信息") + @ApiOperation(value = " 分页列表查询投资支付合同信息", notes = "分页列表查询投资支付合同信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "contractTime_begin", value = "开始时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "contractTime_end", value = "截止时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentContract.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentContractService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentContract + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "列表查询", operDesc = "列表查询投资支付合同信息") + @ApiOperation(value = " 列表查询投资支付合同信息", notes = "列表查询投资支付合同信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentContract investmentContract) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentContract); + List list = investmentContractService.list(queryWrapper); + return Result.success(list); + } + + /** + * 通过id查询 + * + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "查询", operDesc = "通过id查询投资支付合同信息") + @ApiOperation(value = "通过id查询投资支付合同信息", notes = "通过id查询投资支付合同信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付合同ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentContract investmentContract = investmentContractService.getById(MapUtils.getString(map, "id")); + if (investmentContract == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentContract); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentController.java new file mode 100644 index 0000000..82b36a7 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentController.java @@ -0,0 +1,101 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付 + * @author: pengj + * @date: 2023-07-01 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentPayment") +@Slf4j +@Api(tags = "投资支付管理") +public class EntInvestmentPaymentController { + @Autowired + private IInvestmentPaymentService investmentPaymentService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付管理", operType = "分页查询", operDesc = "分页列表查询投资支付信息") + @ApiOperation(value = " 分页列表查询投资支付信息", notes = "分页列表查询投资支付信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "contractId", value = "合同ID", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "payTime_begin", value = "开始时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "payTime_end", value = "截止时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPayment.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentPaymentService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentPayment + * @return + */ + @OperLog(operModul = "投资支付管理", operType = "列表查询", operDesc = "列表查询投资支付信息") + @ApiOperation(value = " 列表查询投资支付信息", notes = "列表查询投资支付信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentPayment investmentPayment) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentPayment); + List list = investmentPaymentService.list(queryWrapper); + return Result.success(list); + } + + /** + * 通过id查询 + * + * @return + */ + @OperLog(operModul = "投资支付管理", operType = "查询", operDesc = "通过id查询投资支付信息") + @ApiOperation(value = "通过id查询投资支付信息", notes = "通过id查询投资支付信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentPayment investmentPayment = investmentPaymentService.getById(MapUtils.getString(map, "id")); + if (investmentPayment == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentPayment); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentDetailController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentDetailController.java new file mode 100644 index 0000000..24b7f4a --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentDetailController.java @@ -0,0 +1,185 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.safety.dto.InvestmentPaymentDetailDto; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentDetail; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentDetailService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付子项详细 + * @author: pengj + * @date: 2023-07-01 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentPaymentDetail") +@Slf4j +@Api(tags = "投资支付子项详细管理") +public class EntInvestmentPaymentDetailController { + @Autowired + private IInvestmentPaymentDetailService investmentPaymentDetailService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "分页查询", operDesc = "分页列表查询投资支付子项详细信息") + @ApiOperation(value = " 分页列表查询投资支付子项详细信息", notes = "分页列表查询投资支付子项详细信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "itemId", value = "投资支付子项id", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentDetail.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentPaymentDetailService.pageList(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentPaymentDetail + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "列表查询", operDesc = "列表查询投资支付子项详细信息") + @ApiOperation(value = " 列表查询投资支付子项详细信息", notes = "列表查询投资支付子项详细信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentDetail); + List list = investmentPaymentDetailService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param investmentPaymentDetail + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "新增", operDesc = "添加投资支付子项详细信息") + @ApiOperation(value = " 添加投资支付子项详细信息", notes = "添加投资支付子项详细信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) { + investmentPaymentDetailService.save(investmentPaymentDetail); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentPaymentDetail + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "修改", operDesc = "编辑投资支付子项详细信息") + @ApiOperation(value = "编辑投资支付子项详细信息", notes = "编辑投资支付子项详细信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) { + Result result = new Result(); + InvestmentPaymentDetail investmentPaymentDetailEntity = investmentPaymentDetailService.getById(investmentPaymentDetail.getId()); + if (investmentPaymentDetailEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentDetailService.updateById(investmentPaymentDetail); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "删除", operDesc = "删除投资支付子项详细信息") + @ApiOperation(value = "删除投资支付子项详细信息", notes = "删除投资支付子项详细信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付子项详细ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) { + Result result = new Result(); + InvestmentPaymentDetail investmentPaymentDetailEntity = investmentPaymentDetailService.getById(investmentPaymentDetail.getId()); + if (investmentPaymentDetailEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentDetailService.removeById(investmentPaymentDetail.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + /** + * 批量删除 + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "批量删除", operDesc = "批量删除投资支付子项详细信息") + @ApiOperation(value = "批量删除投资支付子项详细信息", notes = "批量删除投资支付子项详细信息", httpMethod = "POST") + @ApiImplicitParam(name = "ids", value = "投资支付子项详细ID字符串", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/deleteBatch") + public Result deleteBatch(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.investmentPaymentDetailService.removeByIds(Arrays.asList(ids.split(","))); + result.success("删除成功!"); + } + return result; + } + + /** + * 通过id查询 + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "查询", operDesc = "通过id查询投资支付子项详细信息") + @ApiOperation(value = "通过id查询投资支付子项详细信息", notes = "通过id查询投资支付子项详细信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付子项详细ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentPaymentDetail investmentPaymentDetail = investmentPaymentDetailService.getById(MapUtils.getString(map, "id")); + if (investmentPaymentDetail == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentPaymentDetail); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentItemController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentItemController.java new file mode 100644 index 0000000..dc7b2d6 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentItemController.java @@ -0,0 +1,172 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentItem; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentItemService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付子项 + * @author: pengj + * @date: 2023-07-01 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentPaymentItem") +@Slf4j +@Api(tags = "投资支付子项管理") +public class EntInvestmentPaymentItemController { + @Autowired + private IInvestmentPaymentItemService investmentPaymentItemService; + + @Autowired + private IEngineeringService engineeringService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "分页查询", operDesc = "分页列表查询投资支付子项信息") + @ApiOperation(value = " 分页列表查询投资支付子项信息", notes = "分页列表查询投资支付子项信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "reportContent", value = "汇报内容", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "investmentApplyId", value = "投资支付申报ID", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + IPage pageList = investmentPaymentItemService.pageList(map); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentPaymentItem + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "列表查询", operDesc = "列表查询投资支付子项信息") + @ApiOperation(value = " 列表查询投资支付子项信息", notes = "列表查询投资支付子项信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentPaymentItem investmentPaymentItem) { + if (null == investmentPaymentItem.getInvestmentApplyId()) { + return Result.success(null); + } + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentItem); + List list = investmentPaymentItemService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param investmentPaymentItem + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "新增", operDesc = "添加投资支付子项信息") + @ApiOperation(value = " 添加投资支付子项信息", notes = "添加投资支付子项信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentPaymentItem investmentPaymentItem) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentItem.getEngineeringSn())).getProjectSn(); + investmentPaymentItem.setProjectSn(projectSn); + investmentPaymentItemService.saveInfo(investmentPaymentItem); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentPaymentItem + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "修改", operDesc = "编辑投资支付子项信息") + @ApiOperation(value = "编辑投资支付子项信息", notes = "编辑投资支付子项信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentPaymentItem investmentPaymentItem) { + Result result = new Result(); + InvestmentPaymentItem investmentPaymentItemEntity = investmentPaymentItemService.getById(investmentPaymentItem.getId()); + if (investmentPaymentItemEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentItemService.updateById(investmentPaymentItem); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "删除", operDesc = "删除投资支付子项信息") + @ApiOperation(value = "删除投资支付子项信息", notes = "删除投资支付子项信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付子项ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody InvestmentPaymentItem investmentPaymentItem) { + Result result = new Result(); + InvestmentPaymentItem investmentPaymentItemEntity = investmentPaymentItemService.getById(investmentPaymentItem.getId()); + if (investmentPaymentItemEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentItemService.removeById(investmentPaymentItem.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + + /** + * 通过id查询 + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "查询", operDesc = "通过id查询投资支付子项信息") + @ApiOperation(value = "通过id查询投资支付子项信息", notes = "通过id查询投资支付子项信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付子项ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentPaymentItem investmentPaymentItem = investmentPaymentItemService.getById(MapUtils.getString(map, "id")); + if (investmentPaymentItem == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentPaymentItem); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentStatController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentStatController.java new file mode 100644 index 0000000..f978497 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentStatController.java @@ -0,0 +1,151 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentStat; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentStatService; +import com.zhgd.xmgl.security.SecurityUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付统计 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentPaymentStat") +@Slf4j +@Api(tags = "投资支付统计管理") +public class EntInvestmentPaymentStatController { + @Autowired + private IInvestmentPaymentStatService investmentPaymentStatService; + + @Autowired + private IEngineeringService engineeringService; + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "分页查询", operDesc = "查询对应申报时段的投资支付统计信息") + @ApiOperation(value = " 查询对应申报时段的投资支付统计信息", notes = "查询对应申报时段的投资支付统计信息", httpMethod = "POST") + @ApiImplicitParam(name = "investmentApplyId", value = "投资支付申报ID", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/queryByApplyId") + public Result queryPageList(@ApiIgnore @RequestBody Map map) { + String investmentApplyId = MapUtils.getString(map, "investmentApplyId"); + if (StringUtils.isBlank(investmentApplyId)) { + return Result.success(null); + } + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentStat.class, map); + return Result.success(investmentPaymentStatService.getOne(queryWrapper)); + } + + + /** + * 添加 + * + * @param investmentPaymentStat + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "新增", operDesc = "添加投资支付统计信息") + @ApiOperation(value = " 添加投资支付统计信息", notes = "添加投资支付统计信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentStat.getEngineeringSn())).getProjectSn(); + investmentPaymentStat.setProjectSn(projectSn); + investmentPaymentStatService.save(investmentPaymentStat); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentPaymentStat + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "修改", operDesc = "编辑投资支付统计信息") + @ApiOperation(value = "编辑投资支付统计信息", notes = "编辑投资支付统计信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + Result result = new Result(); + InvestmentPaymentStat investmentPaymentStatEntity = investmentPaymentStatService.getById(investmentPaymentStat.getId()); + if (investmentPaymentStatEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentStatService.updateById(investmentPaymentStat); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "删除", operDesc = "删除投资支付统计信息") + @ApiOperation(value = "删除投资支付统计信息", notes = "删除投资支付统计信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付统计ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + Result result = new Result(); + InvestmentPaymentStat investmentPaymentStatEntity = investmentPaymentStatService.getById(investmentPaymentStat.getId()); + if (investmentPaymentStatEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentStatService.removeById(investmentPaymentStat.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + /** + * 通过id查询 + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "查询", operDesc = "通过id查询投资支付统计信息") + @ApiOperation(value = "通过id查询投资支付统计信息", notes = "通过id查询投资支付统计信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付统计ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentPaymentStat investmentPaymentStat = investmentPaymentStatService.getById(MapUtils.getString(map, "id")); + if (investmentPaymentStat == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentPaymentStat); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/EngineeringDeviceDto.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/EngineeringDeviceDto.java index d687823..67d3087 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/EngineeringDeviceDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/EngineeringDeviceDto.java @@ -11,9 +11,6 @@ public class EngineeringDeviceDto extends EngineeringPageDto{ @ApiModelProperty(value = "工程设备数量") private Integer deviceNum; - @ApiModelProperty(value = "项目AI预警信息统计") - private String aiAlarmStat; - @ApiModelProperty(value = "AI预警状态(true预警;false正常)") private Boolean aiAlarmFlag; diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/EngineeringPageDto.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/EngineeringPageDto.java index 7f82d44..24f0df5 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/EngineeringPageDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/EngineeringPageDto.java @@ -34,4 +34,7 @@ public class EngineeringPageDto { @ApiModelProperty(value = "工程状态(1:未开工;2:在建)") private Integer state; + + @ApiModelProperty(value = "工程AI预警信息统计") + private String aiAlarmStat; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/ProjectDeviceDto.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/ProjectDeviceDto.java index e93853b..5a337ce 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/ProjectDeviceDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/ProjectDeviceDto.java @@ -11,9 +11,6 @@ public class ProjectDeviceDto extends ProjectPageDto{ @ApiModelProperty(value = "项目设备数量") private Integer deviceNum; - @ApiModelProperty(value = "项目AI预警信息统计") - private String aiAlarmStat; - @ApiModelProperty(value = "AI预警状态(true预警;false正常)") private Boolean aiAlarmFlag; diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/ProjectPageDto.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/ProjectPageDto.java index 383dab7..89e44f1 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/ProjectPageDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/ProjectPageDto.java @@ -25,4 +25,7 @@ public class ProjectPageDto { @ApiModelProperty(value = "纬度") private String latitude; + + @ApiModelProperty(value = "项目AI预警信息统计") + private String aiAlarmStat; }