From 097f49c70ccbeea6d0af326a72d23e27566b71ed Mon Sep 17 00:00:00 2001 From: pengjie <17373303529@163.com> Date: Thu, 6 Jul 2023 22:16:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=95=E8=B5=84=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/zhgd/mybatis/Aes.java | 2 +- .../com/zhgd/mybatis/DataScopeHandler.java | 5 + .../admin/SystemDictDataController.java | 5 +- .../admin/SystemUserAuthController.java | 10 +- .../EntProjectNodePlanController.java | 2 +- .../GovInvestmentApplyController.java | 138 +++++++++++ .../GovInvestmentContractController.java | 229 ++++++++++++++++++ .../GovInvestmentPaymentController.java | 70 +----- .../GovInvestmentPaymentItemController.java | 7 +- .../GovInvestmentPaymentStatController.java | 98 ++++++++ .../GovProjectNodePlanController.java | 11 +- .../GovProjectSubItemController.java | 9 +- .../project/InvestmentApplyController.java | 184 ++++++++++++++ .../project/InvestmentContractController.java | 100 ++++++++ .../project/InvestmentPaymentController.java | 1 + .../InvestmentPaymentItemController.java | 11 +- .../InvestmentPaymentStatController.java | 189 +++++++++++++++ .../project/ProjectNodePlanController.java | 6 +- .../safety/entity/InvestmentApply.java | 66 +++++ .../safety/entity/InvestmentContract.java | 95 ++++++++ .../safety/entity/InvestmentPayment.java | 57 +---- .../entity/InvestmentPaymentDetail.java | 11 +- .../safety/entity/InvestmentPaymentItem.java | 29 ++- .../safety/entity/InvestmentPaymentStat.java | 80 ++++++ .../safety/entity/ProjectNodePlan.java | 43 ++-- .../modules/safety/entity/ProjectSubItem.java | 20 ++ .../safety/mapper/InvestmentApplyMapper.java | 18 ++ .../mapper/InvestmentContractMapper.java | 16 ++ .../mapper/InvestmentPaymentStatMapper.java | 16 ++ .../mapper/xml/InvestmentApplyMapper.xml | 5 + .../mapper/xml/InvestmentContractMapper.xml | 5 + .../xml/InvestmentPaymentStatMapper.xml | 5 + .../service/IInvestmentApplyService.java | 25 ++ .../service/IInvestmentContractService.java | 25 ++ .../IInvestmentPaymentItemService.java | 8 +- .../service/IInvestmentPaymentService.java | 11 +- .../IInvestmentPaymentStatService.java | 14 ++ .../service/IProjectNodePlanService.java | 3 + .../impl/InvestmentApplyServiceImpl.java | 53 ++++ .../impl/InvestmentContractServiceImpl.java | 63 +++++ .../InvestmentPaymentItemServiceImpl.java | 53 +++- .../impl/InvestmentPaymentServiceImpl.java | 68 ++++-- .../InvestmentPaymentStatServiceImpl.java | 19 ++ .../impl/ProjectNodePlanServiceImpl.java | 19 ++ .../safety/vo/InvestmentPaymentVo.java | 16 ++ .../security/JwtAuthenticationEntryPoint.java | 2 +- .../java/com/zhgd/xmgl/util/ParamEnum.java | 4 +- .../magic/api/惠州项目管理政务版/投资管理.ms | 50 ++++ .../magic/api/惠州项目管理项目版/支付管理.ms | 41 ++++ 49 files changed, 1823 insertions(+), 194 deletions(-) create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentApplyController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentContractController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentStatController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentApplyController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentContractController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentStatController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentApply.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentContract.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentStat.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentApplyMapper.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentContractMapper.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentPaymentStatMapper.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentApplyMapper.xml create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentContractMapper.xml create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentPaymentStatMapper.xml create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentApplyService.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentContractService.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentStatService.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentApplyServiceImpl.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentContractServiceImpl.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentStatServiceImpl.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/safety/vo/InvestmentPaymentVo.java create mode 100644 src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms create mode 100644 src/main/resources/magic/api/惠州项目管理项目版/支付管理.ms diff --git a/src/main/java/com/zhgd/mybatis/Aes.java b/src/main/java/com/zhgd/mybatis/Aes.java index a46a0fa..222de9f 100644 --- a/src/main/java/com/zhgd/mybatis/Aes.java +++ b/src/main/java/com/zhgd/mybatis/Aes.java @@ -115,7 +115,7 @@ public class Aes { } public static void main(String[] args) { - String content = "FSV8Vxc8dDlXsNl-NQFH_PyxZECKxzin2j4aqrnzlAYnqUQ1UW3RK_4AT9MH5ric".replace("-", "+").replace("_", "/"); + String content = "RaxMRsBUfFDjz_U_7LB_TJHqPNDVlpiOtkdqhZMTDoW3bHbfHnQ8_wuKIcVJemVn".replace("-", "+").replace("_", "/"); // System.out.println("RaxMRsBUfFDjz/U/7LB/TBRIDE/1I6ZZ9kmQFWqgLCID42evqzeC8kpDSd3GM7YB".replace("+", "-").replace("/", "_")); // System.out.println(encrypt("{\"uid\":\"test\",\"exp\":1686559180478}", "ssologin66!@#$%^")); System.out.println(decrypt(content, "ssologin66!@#$%^")); diff --git a/src/main/java/com/zhgd/mybatis/DataScopeHandler.java b/src/main/java/com/zhgd/mybatis/DataScopeHandler.java index 036bb27..6a3ad2a 100644 --- a/src/main/java/com/zhgd/mybatis/DataScopeHandler.java +++ b/src/main/java/com/zhgd/mybatis/DataScopeHandler.java @@ -97,6 +97,11 @@ public class DataScopeHandler implements DataPermissionHandler { inExpression(getAliasColumn(plainSelect, getEngineeringSn()), engineeringSns, plainSelect); } if (user.getAccountType() == 2) { + Expression plainSelectWhere = plainSelect.getWhere(); + String whereString = plainSelectWhere.toString(); + if (!whereString.contains(getEngineeringSn() + " =")) { + equalsTo(getAliasColumn(plainSelect, getEngineeringSn()), "", plainSelect); + } List projectSns = projectService.getSnListForGov(user.getSn()); if (projectSns.size() == 0) { projectSns.add("0"); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemDictDataController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemDictDataController.java index 2d8d476..cff04d0 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemDictDataController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemDictDataController.java @@ -11,6 +11,7 @@ import com.zhgd.xmgl.modules.basicdata.constant.CacheConstants; import com.zhgd.xmgl.modules.basicdata.entity.SystemDictData; import com.zhgd.xmgl.modules.basicdata.service.ISystemDictDataService; import com.zhgd.xmgl.modules.basicdata.vo.SystemDictVo; +import com.zhgd.xmgl.security.SecurityUtil; import com.zhgd.xmgl.valid.AddGroup; import com.zhgd.xmgl.valid.EditGroup; import io.swagger.annotations.Api; @@ -88,8 +89,8 @@ public class SystemDictDataController { if (StringUtils.isNotBlank(systemDictData.getDictType())) { wrapper.eq(SystemDictData::getDictType, systemDictData.getDictType()); } - if (null != systemDictData.getStatus()) { - wrapper.eq(SystemDictData::getStatus, systemDictData.getStatus()); + if (SecurityUtil.getUser().getAccountType() != 1) { + wrapper.eq(SystemDictData::getStatus, 1); } wrapper.orderByAsc(SystemDictData::getDictSort); List list = systemDictDataService.list(wrapper); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemUserAuthController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemUserAuthController.java index 8a7ed62..8b2b261 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemUserAuthController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/SystemUserAuthController.java @@ -223,6 +223,11 @@ public class SystemUserAuthController { String ssoToken = MapUtils.getString(map, "ssoToken"); ssoToken = ssoToken.replace("-", "+").replace("_", "/"); JSONObject decrypt = JSONObject.parseObject(Aes.decrypt(ssoToken, "ssologin66!@#$%^")); +// if (decrypt.getLong("exp") < System.currentTimeMillis()) { +// log.error("单点登录token已过期"); +// result.error500("token已过期"); +// return result; +// } String userId = decrypt.getString("uid"); String account = ""; if (userId.equals("myy")) { @@ -240,8 +245,8 @@ public class SystemUserAuthController { SystemUserAuthDto userInfo = new SystemUserAuthDto(); checkLogin(user, userInfo, result); if (result.getCode() != CommonConstant.SC_INTERNAL_SERVER_ERROR_500) { - Long time = decrypt.getLong("exp") - System.currentTimeMillis(); - String token = jwtTokenProvider.createToken(userInfo.getAccount(), time/1000); +// Long time = decrypt.getLong("exp") - System.currentTimeMillis(); + String token = jwtTokenProvider.createToken(userInfo.getAccount(), 3600 * 24 * 1000L); userInfo.setToken(token); userInfo.setIsEngineering(systemUserDataScopeService.count(Wrappers.lambdaQuery() .eq(SystemUserDataScope::getUserId, userInfo.getUserId())) > 0); @@ -250,6 +255,7 @@ public class SystemUserAuthController { } return result; } catch (Exception e) { + result.error500("登陆信息错误,请刷新或重新登录!"); return result; } } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectNodePlanController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectNodePlanController.java index 5cc1df4..7fdba90 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectNodePlanController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectNodePlanController.java @@ -67,7 +67,7 @@ public class EntProjectNodePlanController { public Result> queryPageList(@ApiIgnore @RequestBody Map map) { QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(ProjectNodePlan.class, map); Page page = PageUtil.getPage(map); - IPage pageList = projectNodePlanService.page(page, queryWrapper); + IPage pageList = projectNodePlanService.pageList(page, queryWrapper); return Result.success(pageList); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentApplyController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentApplyController.java new file mode 100644 index 0000000..f2727a9 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentApplyController.java @@ -0,0 +1,138 @@ +package com.zhgd.xmgl.modules.basicdata.controller.government; + +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.basicdata.dto.EngineeringPageDto; +import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto; +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.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付申报 + * @author: pengj + * @date: 2023-07-05 + * @version: V1.0 + */ +@RestController +@RequestMapping("/gov/investmentApply") +@Slf4j +@Api(tags = "投资支付申报管理") +public class GovInvestmentApplyController { + @Autowired + private IInvestmentApplyService investmentApplyService; + + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询投资支付申报工程信息") + @ApiOperation(value = " 分页列表查询投资支付申报工程信息", notes = "分页列表查询投资支付申报工程信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "engineeringName", 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 = "/engineeringPage") + public Result> engineeringPageList(@ApiIgnore @RequestBody Map map) { + return Result.success(investmentApplyService.pageListForSuperior(map)); + } + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询投资支付申报项目信息") + @ApiOperation(value = " 分页列表查询投资支付申报项目信息", notes = "分页列表查询投资支付申报项目信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectName", 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 = "/projectPage") + public Result> projectPageList(@ApiIgnore @RequestBody Map map) { + return Result.success(investmentApplyService.pageListByGov(map)); + } + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "分页查询", operDesc = "分页列表查询投资支付申报信息") + @ApiOperation(value = " 分页列表查询投资支付申报信息", notes = "分页列表查询投资支付申报信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "name", value = "申报名称", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "engineeringSn", value = "工程SN", 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(InvestmentApply.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentApplyService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentApply + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "列表查询", operDesc = "列表查询投资支付申报信息") + @ApiOperation(value = " 列表查询投资支付申报信息", notes = "列表查询投资支付申报信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentApply investmentApply) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentApply); + List list = investmentApplyService.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(); + 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/government/GovInvestmentContractController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentContractController.java new file mode 100644 index 0000000..54fc107 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentContractController.java @@ -0,0 +1,229 @@ +package com.zhgd.xmgl.modules.basicdata.controller.government; + +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.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.safety.dto.InvestmentEntPageDto; +import com.zhgd.xmgl.modules.safety.dto.InvestmentProPageDto; +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.Arrays; +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付合同 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@RestController +@RequestMapping("/gov/investmentContract") +@Slf4j +@Api(tags = "投资支付合同管理") +public class GovInvestmentContractController { + @Autowired + private IInvestmentContractService investmentContractService; + + @Autowired + private IEngineeringService engineeringService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询投资支付合同工程信息") + @ApiOperation(value = " 分页列表查询投资支付合同工程信息", notes = "分页列表查询投资支付合同工程信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "engineeringName", 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 = "/engineeringPage") + public Result> engineeringPageList(@ApiIgnore @RequestBody Map map) { + return Result.success(investmentContractService.pageListForSuperior(map)); + } + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询投资支付合同项目信息") + @ApiOperation(value = " 分页列表查询投资支付合同项目信息", notes = "分页列表查询投资支付合同项目信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectName", 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 = "/projectPage") + public Result> projectPageList(@ApiIgnore @RequestBody Map map) { + return Result.success(investmentContractService.pageListByGov(map)); + } + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "分页查询", operDesc = "分页列表查询投资支付合同信息") + @ApiOperation(value = " 分页列表查询投资支付合同信息", notes = "分页列表查询投资支付合同信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"), + @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); + } + + + /** + * 添加 + * + * @param investmentContract + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "新增", operDesc = "添加投资支付合同信息") + @ApiOperation(value = " 添加投资支付合同信息", notes = "添加投资支付合同信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentContract investmentContract) { + investmentContractService.saveInfo(investmentContract); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentContract + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "修改", operDesc = "编辑投资支付合同信息") + @ApiOperation(value = "编辑投资支付合同信息", notes = "编辑投资支付合同信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentContract investmentContract) { + Result result = new Result(); + InvestmentContract investmentContractEntity = investmentContractService.getById(investmentContract.getId()); + if (investmentContractEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentContractService.updateById(investmentContract); + 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 InvestmentContract investmentContract) { + Result result = new Result(); + InvestmentContract investmentContractEntity = investmentContractService.getById(investmentContract.getId()); + if (investmentContractEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentContractService.removeById(investmentContract.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.investmentContractService.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(); + 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/government/GovInvestmentPaymentController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentController.java index ce95200..bc2f435 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentController.java @@ -2,19 +2,14 @@ package com.zhgd.xmgl.modules.basicdata.controller.government; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.StringUtils; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; 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.basicdata.entity.Engineering; -import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; -import com.zhgd.xmgl.modules.safety.dto.InvestmentEntPageDto; -import com.zhgd.xmgl.modules.safety.dto.InvestmentProPageDto; import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment; import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentService; +import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -48,44 +43,6 @@ public class GovInvestmentPaymentController { @Autowired private IInvestmentPaymentService investmentPaymentService; - @Autowired - private IEngineeringService engineeringService; - - /** - * 分页列表查询 - * - * @return - */ - @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘工程信息") - @ApiOperation(value = " 分页列表查询扬尘工程信息", notes = "分页列表查询扬尘工程信息", httpMethod = "POST") - @ApiImplicitParams({ - @ApiImplicitParam(name = "engineeringName", 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 = "/engineeringPage") - public Result> engineeringPageList(@ApiIgnore @RequestBody Map map) { - return Result.success(investmentPaymentService.pageListForSuperior(map)); - } - - /** - * 分页列表查询 - * - * @return - */ - @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘项目信息") - @ApiOperation(value = " 分页列表查询扬尘项目信息", notes = "分页列表查询扬尘项目信息", httpMethod = "POST") - @ApiImplicitParams({ - @ApiImplicitParam(name = "projectName", 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 = "/projectPage") - public Result> projectPageList(@ApiIgnore @RequestBody Map map) { - return Result.success(investmentPaymentService.pageListByGov(map)); - } - - /** * 分页列表查询 * @@ -94,10 +51,9 @@ public class GovInvestmentPaymentController { @OperLog(operModul = "投资支付管理", operType = "分页查询", operDesc = "分页列表查询投资支付信息") @ApiOperation(value = " 分页列表查询投资支付信息", notes = "分页列表查询投资支付信息", httpMethod = "POST") @ApiImplicitParams({ - @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"), + @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") }) @@ -128,37 +84,33 @@ public class GovInvestmentPaymentController { /** * 添加 * - * @param investmentPayment + * @param investmentPaymentVo * @return */ @OperLog(operModul = "投资支付管理", operType = "新增", operDesc = "添加投资支付信息") @ApiOperation(value = " 添加投资支付信息", notes = "添加投资支付信息", httpMethod = "POST") @PostMapping(value = "/add") - public Result add(@RequestBody InvestmentPayment investmentPayment) { - if (StringUtils.isNotBlank(investmentPayment.getEngineeringSn())) { - String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentPayment.getEngineeringSn())).getProjectSn(); - investmentPayment.setProjectSn(projectSn); - } - investmentPaymentService.save(investmentPayment); + public Result add(@RequestBody InvestmentPaymentVo investmentPaymentVo) { + investmentPaymentService.saveInfo(investmentPaymentVo); return Result.success("添加成功!"); } /** * 编辑 * - * @param investmentPayment + * @param investmentPaymentVo * @return */ @OperLog(operModul = "投资支付管理", operType = "修改", operDesc = "编辑投资支付信息") @ApiOperation(value = "编辑投资支付信息", notes = "编辑投资支付信息", httpMethod = "POST") @PostMapping(value = "/edit") - public Result edit(@RequestBody InvestmentPayment investmentPayment) { + public Result edit(@RequestBody InvestmentPaymentVo investmentPaymentVo) { Result result = new Result(); - InvestmentPayment investmentPaymentEntity = investmentPaymentService.getById(investmentPayment.getId()); + InvestmentPayment investmentPaymentEntity = investmentPaymentService.getById(investmentPaymentVo.getId()); if (investmentPaymentEntity == null) { result.error500("未找到对应实体"); } else { - boolean ok = investmentPaymentService.updateById(investmentPayment); + boolean ok = investmentPaymentService.updateInfo(investmentPaymentVo); if (ok) { result.success("修改成功!"); } else { diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentItemController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentItemController.java index c7dd541..987faec 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentItemController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentItemController.java @@ -2,11 +2,9 @@ package com.zhgd.xmgl.modules.basicdata.controller.government; 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.InvestmentPaymentItem; import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentItemService; import io.swagger.annotations.Api; @@ -51,14 +49,13 @@ public class GovInvestmentPaymentItemController { @ApiImplicitParams({ @ApiImplicitParam(name = "reportContent", value = "汇报内容", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "investmentPaymentId", value = "投资支付ID", paramType = "body", required = true, 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) { - QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentItem.class, map); - Page page = PageUtil.getPage(map); - IPage pageList = investmentPaymentItemService.page(page, queryWrapper); + IPage pageList = investmentPaymentItemService.pageList(map); return Result.success(pageList); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentStatController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentStatController.java new file mode 100644 index 0000000..e82ae82 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovInvestmentPaymentStatController.java @@ -0,0 +1,98 @@ +package com.zhgd.xmgl.modules.basicdata.controller.government; + +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.InvestmentPaymentStat; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentStatService; +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("/gov/investmentPaymentStat") +@Slf4j +@Api(tags = "投资支付统计管理") +public class GovInvestmentPaymentStatController { + @Autowired + private IInvestmentPaymentStatService investmentPaymentStatService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "分页查询", operDesc = "分页列表查询投资支付统计信息") + @ApiOperation(value = " 分页列表查询投资支付统计信息", notes = "分页列表查询投资支付统计信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "investmentPaymentId", 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(InvestmentPaymentStat.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentPaymentStatService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentPaymentStat + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "列表查询", operDesc = "列表查询投资支付统计信息") + @ApiOperation(value = " 列表查询投资支付统计信息", notes = "列表查询投资支付统计信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentStat); + List list = investmentPaymentStatService.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(); + 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/controller/government/GovProjectNodePlanController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectNodePlanController.java index 7cf6f11..b881b6e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectNodePlanController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectNodePlanController.java @@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.basicdata.controller.government; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; @@ -48,8 +49,8 @@ public class GovProjectNodePlanController { * * @return */ - @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘工程信息") - @ApiOperation(value = " 分页列表查询扬尘工程信息", notes = "分页列表查询扬尘工程信息", httpMethod = "POST") + @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询全景计划工程信息") + @ApiOperation(value = " 分页列表查询全景计划工程信息", notes = "分页列表查询全景计划工程信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "engineeringName", value = "工程名称", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), @@ -65,8 +66,8 @@ public class GovProjectNodePlanController { * * @return */ - @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘项目信息") - @ApiOperation(value = " 分页列表查询扬尘项目信息", notes = "分页列表查询扬尘项目信息", httpMethod = "POST") + @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询全景计划项目信息") + @ApiOperation(value = " 分页列表查询全景计划项目信息", notes = "分页列表查询全景计划项目信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), @@ -97,7 +98,7 @@ public class GovProjectNodePlanController { public Result> queryPageList(@ApiIgnore @RequestBody Map map) { QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(ProjectNodePlan.class, map); Page page = PageUtil.getPage(map); - IPage pageList = projectNodePlanService.page(page, queryWrapper); + IPage pageList = projectNodePlanService.pageList(page, queryWrapper); return Result.success(pageList); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectSubItemController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectSubItemController.java index 99b3844..074e42c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectSubItemController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectSubItemController.java @@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.basicdata.controller.government; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; @@ -49,8 +50,8 @@ public class GovProjectSubItemController { * * @return */ - @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘工程信息") - @ApiOperation(value = " 分页列表查询扬尘工程信息", notes = "分页列表查询扬尘工程信息", httpMethod = "POST") + @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询分部分项工程信息") + @ApiOperation(value = " 分页列表查询分部分项工程信息", notes = "分页列表查询分部分项工程信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "engineeringName", value = "工程名称", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), @@ -66,8 +67,8 @@ public class GovProjectSubItemController { * * @return */ - @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询扬尘项目信息") - @ApiOperation(value = " 分页列表查询扬尘项目信息", notes = "分页列表查询扬尘项目信息", httpMethod = "POST") + @OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询分部分项项目信息") + @ApiOperation(value = " 分页列表查询分部分项项目信息", notes = "分页列表查询分部分项项目信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentApplyController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentApplyController.java new file mode 100644 index 0000000..06c0d48 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentApplyController.java @@ -0,0 +1,184 @@ +package com.zhgd.xmgl.modules.basicdata.controller.project; + +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.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("/project/investmentApply") +@Slf4j +@Api(tags = "投资支付申报管理") +public class InvestmentApplyController { + @Autowired + private IInvestmentApplyService investmentApplyService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "分页查询", operDesc = "分页列表查询投资支付申报信息") + @ApiOperation(value = " 分页列表查询投资支付申报信息", notes = "分页列表查询投资支付申报信息", httpMethod = "POST") + @ApiImplicitParams({ + @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(InvestmentApply.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentApplyService.page(page, queryWrapper); + 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 = "/list") + public Result> queryList(@RequestBody InvestmentApply investmentApply) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentApply); + 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) { + 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/project/InvestmentContractController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentContractController.java new file mode 100644 index 0000000..7eedf3e --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentContractController.java @@ -0,0 +1,100 @@ +package com.zhgd.xmgl.modules.basicdata.controller.project; + +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("/project/investmentContract") +@Slf4j +@Api(tags = "投资支付合同管理") +public class InvestmentContractController { + @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/project/InvestmentPaymentController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentController.java index 69a6da0..693bc60 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentController.java @@ -49,6 +49,7 @@ public class InvestmentPaymentController { @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"), diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentItemController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentItemController.java index 605436d..72a8951 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentItemController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentItemController.java @@ -2,11 +2,9 @@ package com.zhgd.xmgl.modules.basicdata.controller.project; 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.InvestmentPaymentItem; import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentItemService; import io.swagger.annotations.Api; @@ -50,15 +48,14 @@ public class InvestmentPaymentItemController { @ApiOperation(value = " 分页列表查询投资支付子项信息", notes = "分页列表查询投资支付子项信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "reportContent", value = "汇报内容", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "investmentPaymentId", value = "投资支付ID", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "investmentPaymentId", value = "投资支付记录ID", paramType = "body", required = true, 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) { - QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentItem.class, map); - Page page = PageUtil.getPage(map); - IPage pageList = investmentPaymentItemService.page(page, queryWrapper); + IPage pageList = investmentPaymentItemService.pageList(map); return Result.success(pageList); } @@ -88,7 +85,7 @@ public class InvestmentPaymentItemController { @ApiOperation(value = " 添加投资支付子项信息", notes = "添加投资支付子项信息", httpMethod = "POST") @PostMapping(value = "/add") public Result add(@RequestBody InvestmentPaymentItem investmentPaymentItem) { - investmentPaymentItemService.save(investmentPaymentItem); + investmentPaymentItemService.saveInfo(investmentPaymentItem); return Result.success("添加成功!"); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentStatController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentStatController.java new file mode 100644 index 0000000..1e4eace --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InvestmentPaymentStatController.java @@ -0,0 +1,189 @@ +package com.zhgd.xmgl.modules.basicdata.controller.project; + +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.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.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-04 + * @version: V1.0 + */ +@RestController +@RequestMapping("/project/investmentPaymentStat") +@Slf4j +@Api(tags = "投资支付统计管理") +public class InvestmentPaymentStatController { + @Autowired + private IInvestmentPaymentStatService investmentPaymentStatService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "分页查询", operDesc = "分页列表查询投资支付统计信息") + @ApiOperation(value = " 分页列表查询投资支付统计信息", notes = "分页列表查询投资支付统计信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "investmentPaymentId", 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(InvestmentPaymentStat.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentPaymentStatService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentPaymentStat + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "列表查询", operDesc = "列表查询投资支付统计信息") + @ApiOperation(value = " 列表查询投资支付统计信息", notes = "列表查询投资支付统计信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentStat); + List list = investmentPaymentStatService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param investmentPaymentStat + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "新增", operDesc = "添加投资支付统计信息") + @ApiOperation(value = " 添加投资支付统计信息", notes = "添加投资支付统计信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + investmentPaymentStat.setProjectSn(SecurityUtil.getUser().getSn()); + 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 { + investmentPaymentStat.setProjectSn(SecurityUtil.getUser().getSn()); + 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; + } + + /** + * 批量删除 + * + * @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.investmentPaymentStatService.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(); + 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/controller/project/ProjectNodePlanController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/ProjectNodePlanController.java index 408a3b9..7b51370 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/ProjectNodePlanController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/ProjectNodePlanController.java @@ -52,8 +52,8 @@ public class ProjectNodePlanController { @ApiOperation(value = " 分页列表查询项目全景计划信息", notes = "分页列表查询项目全景计划信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "nodeName", value = "节点名称", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "realCompleteTime_begin", value = "开始时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "realCompleteTime_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") }) @@ -61,7 +61,7 @@ public class ProjectNodePlanController { public Result> queryPageList(@ApiIgnore @RequestBody Map map) { QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(ProjectNodePlan.class, map); Page page = PageUtil.getPage(map); - IPage pageList = projectNodePlanService.page(page, queryWrapper); + IPage pageList = projectNodePlanService.pageList(page, queryWrapper); return Result.success(pageList); } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentApply.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentApply.java new file mode 100644 index 0000000..cbefb76 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentApply.java @@ -0,0 +1,66 @@ +package com.zhgd.xmgl.modules.safety.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 投资支付申报 + * @author: pengj + * @date: 2023-07-05 + * @version: V1.0 + */ +@Data +@TableName("investment_apply") +@ApiModel(value = "InvestmentApply实体类", description = "InvestmentApply") +public class InvestmentApply implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 投资支付申报ID(主键ID) + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "投资支付申报ID(主键ID)") + private Long id; + /** + * 申报时段名称 + */ + @Excel(name = "申报时段名称", width = 15) + @ApiModelProperty(value = "申报时段名称") + private String name; + /** + * 申报时段 + */ + @Excel(name = "申报时段", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "申报时段") + private Date applyTime; + /** + * 项目sn + */ + @Excel(name = "投资支付记录ID", width = 15) + @ApiModelProperty(value = "投资支付记录ID") + private Long investmentPaymentId; + /** + * 项目sn + */ + @Excel(name = "项目sn", width = 15) + @ApiModelProperty(value = "项目sn") + private String projectSn; + /** + * 工程sn + */ + @Excel(name = "工程sn", width = 15) + @ApiModelProperty(value = "工程sn") + private String engineeringSn; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentContract.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentContract.java new file mode 100644 index 0000000..9837b06 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentContract.java @@ -0,0 +1,95 @@ +package com.zhgd.xmgl.modules.safety.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Description: 投资支付合同 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@Data +@TableName("investment_contract") +@ApiModel(value = "InvestmentContract实体类", description = "InvestmentContract") +public class InvestmentContract implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 投资支付id(主键ID) + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "投资支付id(主键ID)") + private Long id; + /** + * 费用类型 + */ + @Excel(name = "费用类型", width = 15) + @ApiModelProperty(value = "费用类型") + private String type; + /** + * 合同金额 + */ + @Excel(name = "合同金额", width = 15) + @ApiModelProperty(value = "合同金额") + private BigDecimal contractAmount; + /** + * 结算金额 + */ + @Excel(name = "结算金额", width = 15) + @ApiModelProperty(value = "结算金额") + private BigDecimal settlementAmount; + /** + * 结算定额日期 + */ + @Excel(name = "结算定额日期", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "结算定额日期") + private Date settlementTime; + /** + * 申请单位 + */ + @Excel(name = "申请单位", width = 15) + @ApiModelProperty(value = "申请单位") + private String applicationUnit; + /** + * 中标通知书日期 + */ + @Excel(name = "中标通知书日期", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "中标通知书日期") + private Date bidderTime; + /** + * 合同签订日期 + */ + @Excel(name = "合同签订日期", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "合同签订日期") + private Date contractTime; + /** + * 项目sn + */ + @Excel(name = "项目sn", width = 15) + @ApiModelProperty(value = "项目sn") + private String projectSn; + /** + * 工程sn + */ + @Excel(name = "工程sn", width = 15) + @ApiModelProperty(value = "工程sn") + private String engineeringSn; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPayment.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPayment.java index 897d04a..f0c5098 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPayment.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPayment.java @@ -11,6 +11,7 @@ import org.jeecgframework.poi.excel.annotation.Excel; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; /** @@ -32,65 +33,23 @@ public class InvestmentPayment implements Serializable { @ApiModelProperty(value = "投资支付id(主键ID)") private Long id; /** - * 费用类型 + * 合同ID */ - @Excel(name = "费用类型", width = 15) - @ApiModelProperty(value = "费用类型") - private String type; - /** - * 合同金额 - */ - @Excel(name = "合同金额", width = 15) - @ApiModelProperty(value = "合同金额") - private String contractAmount; - /** - * 结算金额 - */ - @Excel(name = "结算金额", width = 15) - @ApiModelProperty(value = "结算金额") - private String settlementAmount; - /** - * 结算定额日期 - */ - @Excel(name = "结算定额日期", width = 20, format = "yyyy-MM-dd") - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "结算定额日期") - private Date settlementTime; - /** - * 申请单位 - */ - @Excel(name = "申请单位", width = 15) - @ApiModelProperty(value = "申请单位") - private String applicationUnit; - /** - * 中标通知书日期 - */ - @Excel(name = "中标通知书日期", width = 20, format = "yyyy-MM-dd") - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "中标通知书日期") - private Date bidderTime; - /** - * 合同签订日期 - */ - @Excel(name = "合同签订日期", width = 20, format = "yyyy-MM-dd") - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "合同签订日期") - private Date contractTime; + @Excel(name = "合同ID", width = 15) + @ApiModelProperty(value = "合同ID") + private Long contractId; /** * 累计拨款金额(万元) */ @Excel(name = "累计拨款金额(万元)", width = 15) @ApiModelProperty(value = "累计拨款金额(万元)") - private String totalAmount; + private BigDecimal totalAmount; /** * 付款金额(万元) */ @Excel(name = "付款金额(万元)", width = 15) @ApiModelProperty(value = "付款金额(万元)") - private String payAmount; + private BigDecimal payAmount; /** * 付款日期 */ @@ -104,7 +63,7 @@ public class InvestmentPayment implements Serializable { */ @Excel(name = "未支付工程款(万元)", width = 15) @ApiModelProperty(value = "未支付工程款(万元)") - private String unPayAmount; + private BigDecimal unPayAmount; /** * 支付百分比(%) */ diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentDetail.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentDetail.java index 8ddda89..e590748 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentDetail.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentDetail.java @@ -9,6 +9,7 @@ import lombok.Data; import org.jeecgframework.poi.excel.annotation.Excel; import java.io.Serializable; +import java.math.BigDecimal; /** * @Description: 投资支付子项详细 @@ -63,13 +64,13 @@ public class InvestmentPaymentDetail implements Serializable { */ @Excel(name = "合同单价", width = 15) @ApiModelProperty(value = "合同单价") - private String contractUnitPrice; + private BigDecimal contractUnitPrice; /** * 合同金额 */ @Excel(name = "合同金额", width = 15) @ApiModelProperty(value = "合同金额") - private String contractAmount; + private BigDecimal contractAmount; /** * 至上期未完成工程量 */ @@ -81,7 +82,7 @@ public class InvestmentPaymentDetail implements Serializable { */ @Excel(name = "至上期未完成金额", width = 15) @ApiModelProperty(value = "至上期未完成金额") - private String lastAmount; + private BigDecimal lastAmount; /** * 本期完成工程量 */ @@ -93,7 +94,7 @@ public class InvestmentPaymentDetail implements Serializable { */ @Excel(name = "本期完成金额", width = 15) @ApiModelProperty(value = "本期完成金额") - private String nowAmount; + private BigDecimal nowAmount; /** * 截止本期末累计完成工程量 */ @@ -105,7 +106,7 @@ public class InvestmentPaymentDetail implements Serializable { */ @Excel(name = "截止本期末累计完成金额", width = 15) @ApiModelProperty(value = "截止本期末累计完成金额") - private String endAmount; + private BigDecimal endAmount; /** * 备注 */ diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentItem.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentItem.java index 9b47895..f5d3cba 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentItem.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentItem.java @@ -9,6 +9,7 @@ import lombok.Data; import org.jeecgframework.poi.excel.annotation.Excel; import java.io.Serializable; +import java.math.BigDecimal; /** * @Description: 投资支付子项 @@ -29,11 +30,11 @@ public class InvestmentPaymentItem implements Serializable { @ApiModelProperty(value = "投资支付子项ID(主键ID)") private Long id; /** - * 投资支付ID + * 投资支付申报ID */ - @Excel(name = "投资支付ID", width = 15) - @ApiModelProperty(value = "投资支付ID") - private Long investmentPaymentId; + @Excel(name = "投资支付申报ID", width = 15) + @ApiModelProperty(value = "投资支付申报ID") + private Long investmentApplyId; /** * 汇报内容 */ @@ -45,25 +46,25 @@ public class InvestmentPaymentItem implements Serializable { */ @Excel(name = "总工程造价(元)", width = 15) @ApiModelProperty(value = "总工程造价(元)") - private String amount; + private BigDecimal totalAmount; /** * 本期完成工程造价(元) */ @Excel(name = "本期完成工程造价(元)", width = 15) @ApiModelProperty(value = "本期完成工程造价(元)") - private String completeAmount; + private BigDecimal completeAmount; /** * 至上期末完成工程造价(元) */ @Excel(name = "至上期末完成工程造价(元)", width = 15) @ApiModelProperty(value = "至上期末完成工程造价(元)") - private String lastEndAmount; + private BigDecimal lastEndAmount; /** * 至本期末完成工程造价(元) */ @Excel(name = "至本期末完成工程造价(元)", width = 15) @ApiModelProperty(value = "至本期末完成工程造价(元)") - private String nowEndAmount; + private BigDecimal nowEndAmount; /** * 本期完成形象进度(%) */ @@ -76,4 +77,16 @@ public class InvestmentPaymentItem implements Serializable { @Excel(name = "至本期末完成形象进度(%)", width = 15) @ApiModelProperty(value = "至本期末完成形象进度(%)") private String completeScheduleRatio; + /** + * 项目sn + */ + @Excel(name = "项目sn", width = 15) + @ApiModelProperty(value = "项目sn") + private String projectSn; + /** + * 工程sn + */ + @Excel(name = "工程sn", width = 15) + @ApiModelProperty(value = "工程sn") + private String engineeringSn; } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentStat.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentStat.java new file mode 100644 index 0000000..490c59b --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/InvestmentPaymentStat.java @@ -0,0 +1,80 @@ +package com.zhgd.xmgl.modules.safety.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description: 投资支付统计 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@Data +@TableName("investment_payment_stat") +@ApiModel(value = "InvestmentPaymentStat实体类", description = "InvestmentPaymentStat") +public class InvestmentPaymentStat implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 支付记录统计ID(主键ID) + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "支付记录统计ID(主键ID)") + private Long id; + /** + * 投资支付ID + */ + @Excel(name = "投资支付ID", width = 15) + @ApiModelProperty(value = "投资支付ID") + private Integer investmentApplyId; + /** + * 含税造价 + */ + @Excel(name = "含税造价", width = 15) + @ApiModelProperty(value = "含税造价") + private BigDecimal constructionCost; + /** + * 合同约定进度款 + */ + @Excel(name = "合同约定进度款", width = 15) + @ApiModelProperty(value = "合同约定进度款") + private BigDecimal payment; + /** + * 预付款 + */ + @Excel(name = "预付款", width = 15) + @ApiModelProperty(value = "预付款") + private BigDecimal advanceCharge; + /** + * 上期未支付款项 + */ + @Excel(name = "上期未支付款项", width = 15) + @ApiModelProperty(value = "上期未支付款项") + private BigDecimal unPayment; + /** + * 实际申请款项 + */ + @Excel(name = "实际申请款项", width = 15) + @ApiModelProperty(value = "实际申请款项") + private BigDecimal applyPayment; + /** + * 项目sn + */ + @Excel(name = "项目sn", width = 15) + @ApiModelProperty(value = "项目sn") + private String projectSn; + /** + * 工程sn + */ + @Excel(name = "工程sn", width = 15) + @ApiModelProperty(value = "工程sn") + private String engineeringSn; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectNodePlan.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectNodePlan.java index 14319a3..1f5f5e2 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectNodePlan.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectNodePlan.java @@ -1,12 +1,15 @@ package com.zhgd.xmgl.modules.safety.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; @@ -48,35 +51,43 @@ public class ProjectNodePlan implements Serializable { @ApiModelProperty(value = "节点类型") private String type; /** - * 标准开始时间 + * 标准完成时间 */ - @Excel(name = "标准开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "标准开始时间") - private Date realStartTime; + @Excel(name = "标准完成时间", width = 20, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "标准完成时间") + private Date standardCompleteTime; /** * 计划开始日期 */ - @Excel(name = "计划开始日期", width = 20, format = "yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "计划开始日期") - private Date planStartTime; + @Excel(name = "计划开始日期", width = 20, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "计划完成日期") + private Date planCompleteTime; /** - * 截止完成日期 + * 预计完成日期 */ - @Excel(name = "截止完成日期", width = 20, format = "yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "截止完成日期") - private Date planEndTime; + @Excel(name = "预计完成日期", width = 20, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "预计完成日期") + private Date expectCompleteTime; /** * 实际完成时间 */ - @Excel(name = "实际完成时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "实际完成时间", width = 20, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "实际完成时间") - private Date realEndTime; + private Date realCompleteTime; /** * 状态(字典数据) */ @Excel(name = "状态(字典数据)", width = 15) @ApiModelProperty(value = "状态(字典数据)") - private String state; + private Integer state; /** * 职能条线 */ @@ -125,4 +136,8 @@ public class ProjectNodePlan implements Serializable { @Excel(name = "工程sn", width = 15) @ApiModelProperty(value = "工程sn") private String engineeringSn; + + @TableField(exist = false) + @ApiModelProperty(value = "状态") + private String status; } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectSubItem.java b/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectSubItem.java index 938075e..e1d5432 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectSubItem.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/entity/ProjectSubItem.java @@ -129,6 +129,26 @@ public class ProjectSubItem implements Serializable { @Excel(name = "附件地址", width = 15) @ApiModelProperty(value = "附件地址") private String annexFile; + /** + * 逾期问题描述 + */ + @Excel(name = "逾期问题描述", width = 15) + @ApiModelProperty(value = "逾期问题描述") + private String overdueIssueDesc; + /** + * 整改期限 + */ + @Excel(name = "整改期限", width = 15) + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(value = "整改期限") + private Date deadline; + /** + * 文件说明 + */ + @Excel(name = "文件说明", width = 15) + @ApiModelProperty(value = "文件说明") + private String overdueIssueFile; /** * 项目sn */ diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentApplyMapper.java b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentApplyMapper.java new file mode 100644 index 0000000..ca3e6db --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentApplyMapper.java @@ -0,0 +1,18 @@ +package com.zhgd.xmgl.modules.safety.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhgd.annotation.DataScope; +import com.zhgd.xmgl.modules.safety.entity.InvestmentApply; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description: 投资支付申报 + * @author: pengj + * @date: 2023-07-05 + * @version: V1.0 + */ +@Mapper +@DataScope +public interface InvestmentApplyMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentContractMapper.java b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentContractMapper.java new file mode 100644 index 0000000..906c32c --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentContractMapper.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.safety.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhgd.xmgl.modules.safety.entity.InvestmentContract; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description: 投资支付合同 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@Mapper +public interface InvestmentContractMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentPaymentStatMapper.java b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentPaymentStatMapper.java new file mode 100644 index 0000000..a56d69a --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/InvestmentPaymentStatMapper.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.safety.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentStat; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description: 投资支付统计 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@Mapper +public interface InvestmentPaymentStatMapper extends BaseMapper { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentApplyMapper.xml b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentApplyMapper.xml new file mode 100644 index 0000000..97aaea6 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentApplyMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentContractMapper.xml b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentContractMapper.xml new file mode 100644 index 0000000..0e0b9d6 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentContractMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentPaymentStatMapper.xml b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentPaymentStatMapper.xml new file mode 100644 index 0000000..21f04d1 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/mapper/xml/InvestmentPaymentStatMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentApplyService.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentApplyService.java new file mode 100644 index 0000000..bca24f4 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentApplyService.java @@ -0,0 +1,25 @@ +package com.zhgd.xmgl.modules.safety.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto; +import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto; +import com.zhgd.xmgl.modules.safety.entity.InvestmentApply; + +import java.util.Map; + +/** + * @Description: 投资支付申报 + * @author: pengj + * @date: 2023-07-05 + * @version: V1.0 + */ +public interface IInvestmentApplyService extends IService { + + Page pageListForSuperior(Map map); + + Page pageListByGov(Map map); + + + boolean saveInfo(InvestmentApply investmentApply); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentContractService.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentContractService.java new file mode 100644 index 0000000..062f01a --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentContractService.java @@ -0,0 +1,25 @@ +package com.zhgd.xmgl.modules.safety.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.xmgl.modules.safety.dto.InvestmentEntPageDto; +import com.zhgd.xmgl.modules.safety.dto.InvestmentProPageDto; +import com.zhgd.xmgl.modules.safety.entity.InvestmentContract; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.Map; + +/** + * @Description: 投资支付合同 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +public interface IInvestmentContractService extends IService { + + + Page pageListForSuperior(Map map); + + Page pageListByGov(Map map); + + boolean saveInfo(InvestmentContract investmentContract); +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentItemService.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentItemService.java index 39b4826..045581f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentItemService.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentItemService.java @@ -1,7 +1,10 @@ package com.zhgd.xmgl.modules.safety.service; -import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentItem; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentItem; + +import java.util.Map; /** * @Description: 投资支付子项 @@ -11,4 +14,7 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface IInvestmentPaymentItemService extends IService { + IPage pageList(Map map); + + boolean saveInfo(InvestmentPaymentItem investmentPaymentItem); } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentService.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentService.java index 96dfb20..017e7d3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentService.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentService.java @@ -1,12 +1,8 @@ package com.zhgd.xmgl.modules.safety.service; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; -import com.zhgd.xmgl.modules.safety.dto.InvestmentEntPageDto; -import com.zhgd.xmgl.modules.safety.dto.InvestmentProPageDto; import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment; - -import java.util.Map; +import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo; /** * @Description: 投资支付 @@ -16,8 +12,7 @@ import java.util.Map; */ public interface IInvestmentPaymentService extends IService { - Page pageListForSuperior(Map map); - - Page pageListByGov(Map map); + boolean saveInfo(InvestmentPaymentVo investmentPaymentVo); + boolean updateInfo(InvestmentPaymentVo investmentPaymentVo); } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentStatService.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentStatService.java new file mode 100644 index 0000000..28c4ff1 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/IInvestmentPaymentStatService.java @@ -0,0 +1,14 @@ +package com.zhgd.xmgl.modules.safety.service; + +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentStat; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 投资支付统计 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +public interface IInvestmentPaymentStatService extends IService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/IProjectNodePlanService.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/IProjectNodePlanService.java index 0760a7c..3c6c551 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/service/IProjectNodePlanService.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/IProjectNodePlanService.java @@ -1,5 +1,6 @@ package com.zhgd.xmgl.modules.safety.service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto; @@ -20,4 +21,6 @@ public interface IProjectNodePlanService extends IService { Page pageListByGov(Map map); + Page pageList(Page page, Wrapper wrapper); + } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentApplyServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentApplyServiceImpl.java new file mode 100644 index 0000000..78ff2a2 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentApplyServiceImpl.java @@ -0,0 +1,53 @@ +package com.zhgd.xmgl.modules.safety.service.impl; + +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto; +import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.basicdata.service.IProjectService; +import com.zhgd.xmgl.modules.safety.entity.InvestmentApply; +import com.zhgd.xmgl.modules.safety.mapper.InvestmentApplyMapper; +import com.zhgd.xmgl.modules.safety.service.IInvestmentApplyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * @Description: 投资支付申报 + * @author: pengj + * @date: 2023-07-05 + * @version: V1.0 + */ +@Service +public class InvestmentApplyServiceImpl extends ServiceImpl implements IInvestmentApplyService { + + @Autowired + private IEngineeringService engineeringService; + + @Autowired + private IProjectService projectService; + + @Override + public Page pageListForSuperior(Map map) { + return engineeringService.pageListForSuperior(map); + } + + @Override + public Page pageListByGov(Map map) { + return projectService.pageListForGov(map); + } + + @Override + public boolean saveInfo(InvestmentApply investmentApply) { + if (StringUtils.isNotBlank(investmentApply.getEngineeringSn())) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentApply.getEngineeringSn())).getProjectSn(); + investmentApply.setProjectSn(projectSn); + } + return this.save(investmentApply); + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentContractServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentContractServiceImpl.java new file mode 100644 index 0000000..6cc43ca --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentContractServiceImpl.java @@ -0,0 +1,63 @@ +package com.zhgd.xmgl.modules.safety.service.impl; + +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.basicdata.service.IProjectService; +import com.zhgd.xmgl.modules.safety.dto.InvestmentEntPageDto; +import com.zhgd.xmgl.modules.safety.dto.InvestmentProPageDto; +import com.zhgd.xmgl.modules.safety.entity.InvestmentContract; +import com.zhgd.xmgl.modules.safety.mapper.InvestmentContractMapper; +import com.zhgd.xmgl.modules.safety.service.IInvestmentContractService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.Map; + +/** + * @Description: 投资支付合同 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@Service +public class InvestmentContractServiceImpl extends ServiceImpl implements IInvestmentContractService { + + @Autowired + private IEngineeringService engineeringService; + + @Autowired + private IProjectService projectService; + + @Override + public Page pageListForSuperior(Map map) { + Page pageList = PageUtil.copyProperties(engineeringService.pageListForSuperior(map), InvestmentEntPageDto.class); + for (InvestmentEntPageDto record : pageList.getRecords()) { + record.setContractNum(pageList.getTotal()); + } + return pageList; + } + + @Override + public Page pageListByGov(Map map) { + Page pageList = PageUtil.copyProperties(projectService.pageListForGov(map), InvestmentProPageDto.class); + for (InvestmentProPageDto record : pageList.getRecords()) { + record.setContractNum(pageList.getTotal()); + } + return pageList; + } + + @Override + public boolean saveInfo(InvestmentContract investmentContract) { + if (StringUtils.isNotBlank(investmentContract.getEngineeringSn())) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentContract.getEngineeringSn())).getProjectSn(); + investmentContract.setProjectSn(projectSn); + } + return this.save(investmentContract); + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentItemServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentItemServiceImpl.java index 775d2bf..b093f5c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentItemServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentItemServiceImpl.java @@ -1,11 +1,29 @@ package com.zhgd.xmgl.modules.safety.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.handler.exception.CustomException; +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.entity.InvestmentPaymentItem; import com.zhgd.xmgl.modules.safety.mapper.InvestmentPaymentItemMapper; +import com.zhgd.xmgl.modules.safety.service.IInvestmentApplyService; import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentItemService; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * @Description: 投资支付子项 @@ -16,4 +34,37 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class InvestmentPaymentItemServiceImpl extends ServiceImpl implements IInvestmentPaymentItemService { + @Autowired + private IEngineeringService engineeringService; + + @Autowired + private IInvestmentApplyService investmentApplyService; + + @Override + public IPage pageList(Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentItem.class, map); + if (StringUtils.isBlank(MapUtils.getString(map, "investmentApplyId"))) { + String investmentPaymentId = MapUtils.getString(map, "investmentPaymentId"); + if(StringUtils.isBlank(investmentPaymentId)) { + throw new CustomException("缺少参数"); + } + List investmentApplyList = investmentApplyService.list(Wrappers.lambdaQuery().eq(InvestmentApply::getInvestmentPaymentId, investmentPaymentId)); + List applyIds = Arrays.asList(0L); + if (investmentApplyList.size() > 0) { + applyIds = investmentApplyList.stream().map(i -> i.getId()).collect(Collectors.toList()); + } + queryWrapper.lambda().in(InvestmentPaymentItem::getInvestmentApplyId, applyIds); + } + Page page = PageUtil.getPage(map); + return baseMapper.selectPage(page, queryWrapper); + } + + @Override + public boolean saveInfo(InvestmentPaymentItem investmentPaymentItem) { + if (StringUtils.isNotBlank(investmentPaymentItem.getEngineeringSn())) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentItem.getEngineeringSn())).getProjectSn(); + investmentPaymentItem.setProjectSn(projectSn); + } + return this.save(investmentPaymentItem); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentServiceImpl.java index 72534cc..3a5859b 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentServiceImpl.java @@ -1,19 +1,23 @@ package com.zhgd.xmgl.modules.safety.service.impl; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; -import com.zhgd.xmgl.modules.basicdata.service.IProjectService; -import com.zhgd.xmgl.modules.safety.dto.InvestmentEntPageDto; -import com.zhgd.xmgl.modules.safety.dto.InvestmentProPageDto; +import com.zhgd.xmgl.modules.safety.entity.InvestmentApply; import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment; import com.zhgd.xmgl.modules.safety.mapper.InvestmentPaymentMapper; +import com.zhgd.xmgl.modules.safety.service.IInvestmentApplyService; import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentService; +import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Map; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; /** * @Description: 投资支付 @@ -28,23 +32,53 @@ public class InvestmentPaymentServiceImpl extends ServiceImpl pageListForSuperior(Map map) { - Page pageList = PageUtil.copyProperties(engineeringService.pageListForSuperior(map), InvestmentEntPageDto.class); - for (InvestmentEntPageDto record : pageList.getRecords()) { - record.setContractNum(pageList.getTotal()); + public boolean saveInfo(InvestmentPaymentVo investmentPaymentVo) { + if (StringUtils.isNotBlank(investmentPaymentVo.getEngineeringSn())) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentVo.getEngineeringSn())).getProjectSn(); + investmentPaymentVo.setProjectSn(projectSn); } - return pageList; + // 调整绑定申报列表信息 + build(investmentPaymentVo); + return this.save(investmentPaymentVo); } @Override - public Page pageListByGov(Map map) { - Page pageList = PageUtil.copyProperties(projectService.pageListForGov(map), InvestmentProPageDto.class); - for (InvestmentProPageDto record : pageList.getRecords()) { - record.setContractNum(pageList.getTotal()); + public boolean updateInfo(InvestmentPaymentVo investmentPaymentVo) { + // 调整绑定申报列表信息 + build(investmentPaymentVo); + return this.updateById(investmentPaymentVo); + } + + private void build(InvestmentPaymentVo investmentPaymentVo) { + List investmentApplyList = investmentApplyService.list(Wrappers.lambdaQuery().eq(InvestmentApply::getInvestmentPaymentId, investmentPaymentVo.getId())); + List newIds = investmentPaymentVo.getApplyIdList(); + List oldIds = investmentApplyList.stream().map(m -> m.getId()).collect(Collectors.toList()); + List addIds = new ArrayList<>(); + List delIds = new ArrayList<>(); + for (Long newId : newIds) { + if (!oldIds.contains(newId)) { + addIds.add(Long.valueOf(newId)); + } + } + for (Long oldId : oldIds) { + if (!newIds.contains(oldId)) { + delIds.add(oldId); + } + } + if (delIds.size() > 0) { + LambdaUpdateWrapper wrapper = Wrappers.lambdaUpdate(); + wrapper.set(InvestmentApply::getInvestmentPaymentId, null); + wrapper.in(InvestmentApply::getId, delIds); + investmentApplyService.update(wrapper); + } + if (addIds.size() > 0) { + LambdaUpdateWrapper wrapper = Wrappers.lambdaUpdate(); + wrapper.set(InvestmentApply::getInvestmentPaymentId, investmentPaymentVo.getId()); + wrapper.in(InvestmentApply::getId, addIds); + investmentApplyService.update(wrapper); } - return pageList; } } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentStatServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentStatServiceImpl.java new file mode 100644 index 0000000..98dce51 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InvestmentPaymentStatServiceImpl.java @@ -0,0 +1,19 @@ +package com.zhgd.xmgl.modules.safety.service.impl; + +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentStat; +import com.zhgd.xmgl.modules.safety.mapper.InvestmentPaymentStatMapper; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentStatService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 投资支付统计 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@Service +public class InvestmentPaymentStatServiceImpl extends ServiceImpl implements IInvestmentPaymentStatService { + +} diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/ProjectNodePlanServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/ProjectNodePlanServiceImpl.java index 68ffee8..9a3b564 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/ProjectNodePlanServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/ProjectNodePlanServiceImpl.java @@ -1,17 +1,23 @@ package com.zhgd.xmgl.modules.safety.service.impl; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto; import com.zhgd.xmgl.modules.basicdata.dto.ProjectPageDto; +import com.zhgd.xmgl.modules.basicdata.entity.SystemDictData; import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; import com.zhgd.xmgl.modules.basicdata.service.IProjectService; +import com.zhgd.xmgl.modules.basicdata.service.ISystemDictDataService; import com.zhgd.xmgl.modules.safety.entity.ProjectNodePlan; import com.zhgd.xmgl.modules.safety.mapper.ProjectNodePlanMapper; import com.zhgd.xmgl.modules.safety.service.IProjectNodePlanService; +import com.zhgd.xmgl.util.CommonUtil; +import com.zhgd.xmgl.util.ParamEnum; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; /** @@ -29,6 +35,9 @@ public class ProjectNodePlanServiceImpl extends ServiceImpl pageListForSuperior(Map map) { return engineeringService.pageListForSuperior(map); @@ -38,4 +47,14 @@ public class ProjectNodePlanServiceImpl extends ServiceImpl pageListByGov(Map map) { return projectService.pageListForGov(map); } + + @Override + public Page pageList(Page page, Wrapper wrapper) { + Page pageList = baseMapper.selectPage(page, wrapper); + List systemDictData = systemDictDataService.getByType(String.valueOf(ParamEnum.SysDictType.NODE_PLAN_STATE)); + for (ProjectNodePlan record : pageList.getRecords()) { + record.setStatus(CommonUtil.getDictValue(systemDictData, record.getState())); + } + return pageList; + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/vo/InvestmentPaymentVo.java b/src/main/java/com/zhgd/xmgl/modules/safety/vo/InvestmentPaymentVo.java new file mode 100644 index 0000000..5046a41 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/safety/vo/InvestmentPaymentVo.java @@ -0,0 +1,16 @@ +package com.zhgd.xmgl.modules.safety.vo; + +import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +@ApiModel(value = "投资支付支付记录(VO)", description = "InvestmentPaymentVo") +public class InvestmentPaymentVo extends InvestmentPayment { + + @ApiModelProperty(value="申报ID列表") + private List applyIdList; +} diff --git a/src/main/java/com/zhgd/xmgl/security/JwtAuthenticationEntryPoint.java b/src/main/java/com/zhgd/xmgl/security/JwtAuthenticationEntryPoint.java index b27c1a8..96b3f41 100644 --- a/src/main/java/com/zhgd/xmgl/security/JwtAuthenticationEntryPoint.java +++ b/src/main/java/com/zhgd/xmgl/security/JwtAuthenticationEntryPoint.java @@ -36,7 +36,7 @@ public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Se response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin")); PrintWriter printWriter = response.getWriter(); JSONObject resParam = new JSONObject(); - resParam.put("message", "登录失效"/*authException.getMessage()*/); + resParam.put("message", "登录信息异常,请刷新或重新登录!"/*authException.getMessage()*/); resParam.put("success", false); resParam.put("code", "401"); //printWriter.write(resParam.toJSONString()); diff --git a/src/main/java/com/zhgd/xmgl/util/ParamEnum.java b/src/main/java/com/zhgd/xmgl/util/ParamEnum.java index 2bb2257..a6ffc54 100644 --- a/src/main/java/com/zhgd/xmgl/util/ParamEnum.java +++ b/src/main/java/com/zhgd/xmgl/util/ParamEnum.java @@ -46,7 +46,9 @@ public class ParamEnum { ATTEND_DEV_PRODUCE("attend_dev_produce", "考勤设备厂商"), ATTEND_SYNC_API("attend_sync_api", "考勤相关信息同步接口"), ENVIRONMENT_ALARM_TYPE("environment_alarm_type", "扬尘各类型预警"), - ENVIRONMENT_ALARM_TYPE_THRESHOLD("environment_alarm_type_threshold", "扬尘各类型预警阈值"); + ENVIRONMENT_ALARM_TYPE_THRESHOLD("environment_alarm_type_threshold", "扬尘各类型预警阈值"), + + NODE_PLAN_STATE("node_plan_state", "项目进度管理状态"); private String value; private String desc; diff --git a/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms b/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms new file mode 100644 index 0000000..e34bd41 --- /dev/null +++ b/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms @@ -0,0 +1,50 @@ +{ + "properties" : { }, + "id" : "28d127145ffb4c6792edaeb1e21a85cd", + "script" : null, + "groupId" : "1f3d3e5b9fe340bab84de67b0de08f44", + "name" : "投资管理", + "createTime" : null, + "updateTime" : 1688652815858, + "lock" : null, + "createBy" : "admin", + "updateBy" : "admin", + "path" : "/index/payment", + "method" : "GET", + "parameters" : [ ], + "options" : [ ], + "requestBody" : "", + "headers" : [ ], + "paths" : [ ], + "responseBody" : null, + "description" : null, + "requestBodyDefinition" : null, + "responseBodyDefinition" : null +} +================================ +import java.math.BigDecimal +Map result = new HashMap() +BigDecimal paymentByMonth = db.selectValue("SELECT IFNULL(SUM(s.payment), 0) FROM investment_apply a INNER JOIN investment_payment_stat s ON a.id = s.investment_apply_id WHERE DATE_FORMAT(apply_time, '%Y-%m') = DATE_FORMAT(now(), '%Y-%m') AND #projectalias ") +BigDecimal applyAmountByMonth = db.selectValue("SELECT IFNULL(SUM(s.apply_payment), 0) FROM investment_apply a INNER JOIN investment_payment_stat s ON a.id = s.investment_apply_id WHERE DATE_FORMAT(apply_time, '%Y-%m') = DATE_FORMAT(now(), '%Y-%m') AND #projectalias") +BigDecimal realPayAmountByMonth = db.selectValue("SELECT IFNULL(SUM(pay_amount), 0) FROM investment_payment WHERE DATE_FORMAT(pay_time, '%Y-%m') = DATE_FORMAT(now(), '%Y-%m') AND #project") +BigDecimal totalAmount = db.selectValue("SELECT IFNULL(SUM(contract_amount), 0) FROM investment_contract WHERE #project") +BigDecimal settlementAmount = db.selectValue("SELECT IFNULL(SUM(settlement_amount), 0) FROM investment_contract WHERE #project") +BigDecimal settlementAmountByYear = db.selectValue("SELECT IFNULL(SUM(settlement_amount), 0) FROM investment_contract WHERE DATE_FORMAT(contract_time, '%Y') = DATE_FORMAT(now(), '%Y') AND #project") +BigDecimal realPayAmountTotal = db.selectValue("SELECT IFNULL(SUM(pay_amount), 0) FROM investment_payment WHERE #project") +BigDecimal realPayAmountByYear = db.selectValue("SELECT IFNULL(SUM(pay_amount), 0) FROM investment_payment WHERE DATE_FORMAT(pay_time, '%Y') = DATE_FORMAT(now(), '%Y') AND #project") +BigDecimal applyAmountTotal = db.selectValue("SELECT IFNULL(SUM(apply_payment), 0) FROM investment_payment_stat WHERE #project") +BigDecimal paymentTotal = db.selectValue("SELECT IFNULL(SUM(payment), 0) FROM investment_payment_stat WHERE #project") + +result.put("paymentByMonth", paymentByMonth) +result.put("applyAmountByMonth", applyAmountByMonth) +result.put("realPayAmountByMonth", realPayAmountByMonth) +result.put("unPayAmountByMonth", applyAmountByMonth.subtract(realPayAmountByMonth)) + +result.put("payRatio", realPayAmountTotal == 0 ? 0 : realPayAmountTotal.divide(totalAmount, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")).doubleValue()) +result.put("paymentTotal", paymentTotal) +result.put("applyAmountTotal", applyAmountTotal) +result.put("settlementAmount", settlementAmount) +result.put("settlementAmountByYear", settlementAmountByYear) +result.put("realPayAmountTotal", realPayAmountTotal) +result.put("realPayAmountByYear", realPayAmountByYear) +return result \ No newline at end of file diff --git a/src/main/resources/magic/api/惠州项目管理项目版/支付管理.ms b/src/main/resources/magic/api/惠州项目管理项目版/支付管理.ms new file mode 100644 index 0000000..1e1a177 --- /dev/null +++ b/src/main/resources/magic/api/惠州项目管理项目版/支付管理.ms @@ -0,0 +1,41 @@ +{ + "properties" : { }, + "id" : "6bb8d54bda3a4fd1aa9766571d94a7fb", + "script" : null, + "groupId" : "de890cb5bb01484ab1feeedd1eb1c1dd", + "name" : "支付管理", + "createTime" : null, + "updateTime" : 1688649593817, + "lock" : null, + "createBy" : null, + "updateBy" : "admin", + "path" : "/index/payment", + "method" : "GET", + "parameters" : [ ], + "options" : [ ], + "requestBody" : "", + "headers" : [ ], + "paths" : [ ], + "responseBody" : null, + "description" : null, + "requestBodyDefinition" : null, + "responseBodyDefinition" : null +} +================================ +import java.math.BigDecimal +Map result = new HashMap() +BigDecimal totalAmount = db.selectValue("SELECT IFNULL(SUM(contract_amount), 0) FROM investment_contract WHERE #project") +BigDecimal payAmount = db.selectValue("SELECT IFNULL(SUM(pay_amount), 0) FROM investment_payment WHERE #project") +BigDecimal applyAmountTotal = db.selectValue("SELECT IFNULL(SUM(s.apply_payment), 0) FROM investment_apply a INNER JOIN investment_payment_stat s ON a.id = s.investment_apply_id WHERE #projectalias") +BigDecimal applyAmountByYear = db.selectValue("SELECT IFNULL(SUM(s.apply_payment), 0) FROM investment_apply a INNER JOIN investment_payment_stat s ON a.id = s.investment_apply_id WHERE DATE_FORMAT(a.apply_time, '%Y') = DATE_FORMAT(now(), '%Y') AND #projectalias ") +BigDecimal applyAmountByMonth = db.selectValue("SELECT IFNULL(SUM(s.apply_payment), 0) FROM investment_apply a INNER JOIN investment_payment_stat s ON a.id = s.investment_apply_id WHERE DATE_FORMAT(apply_time, '%Y-%m') = DATE_FORMAT(now(), '%Y-%m') AND #projectalias ") +Map payAmountByYear = db.selectValue("SELECT IFNULL(SUM(pay_amount), 0) FROM investment_payment WHERE DATE_FORMAT(pay_time, '%Y') = DATE_FORMAT(now(), '%Y') AND #project") +Map payAmountByMonth = db.selectValue("SELECT IFNULL(SUM(pay_amount), 0) FROM investment_payment WHERE DATE_FORMAT(pay_time, '%Y-%m') = DATE_FORMAT(now(), '%Y-%m') AND #project") +result.put("payRatio", payAmount == 0 ? 0 : payAmount.divide(totalAmount, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")).doubleValue()) +result.put("applyAmountTotal", applyAmountTotal) +result.put("applyAmountByYear", applyAmountByYear) +result.put("applyAmountByMonth", applyAmountByMonth) +result.put("payAmountTotal", payAmount) +result.put("payAmountByYear", payAmountByYear) +result.put("payAmountByMonth", payAmountByMonth) +return result \ No newline at end of file