From e5f9895385eee6f9c49afc7ff3f866c603302f78 Mon Sep 17 00:00:00 2001 From: pengjie <17373303529@163.com> Date: Wed, 19 Jul 2023 16:09:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/FileController.java | 30 +-- .../admin/SystemUserAuthController.java | 58 +++--- .../controller/admin/VideoOpController.java | 2 +- .../EntInspectQuestionExamineController.java | 25 +++ .../EntInspectRecordController.java | 37 ++++ .../EntInvestmentApplyController.java | 190 ++++++++++++++++++ .../EntInvestmentContractController.java | 100 +++++++++ .../EntInvestmentPaymentController.java | 101 ++++++++++ .../EntInvestmentPaymentDetailController.java | 185 +++++++++++++++++ .../EntInvestmentPaymentItemController.java | 172 ++++++++++++++++ .../EntInvestmentPaymentStatController.java | 151 ++++++++++++++ .../EntProjectNodePlanController.java | 48 ++--- .../EntProjectSubItemController.java | 42 +++- .../government/GovProjectController.java | 41 +++- .../GovProjectSubItemController.java | 3 +- .../government/GovSystemUserController.java | 52 +++-- .../project/ProjectNodePlanController.java | 16 -- .../project/ProjectSubItemController.java | 2 +- .../basicdata/dto/SystemUserAuthDto.java | 4 + .../service/impl/FileDetailServiceImpl.java | 1 + .../service/impl/SystemUserServiceImpl.java | 6 +- .../safety/entity/ProjectNodePlan.java | 12 +- .../modules/safety/entity/ProjectSubItem.java | 7 + .../impl/EnterpriseScoreServiceImpl.java | 12 +- .../impl/ProjectSubItemServiceImpl.java | 22 +- .../api/惠州项目管理政务版/在建项目指标.ms | 4 +- .../magic/api/惠州项目管理政务版/投资管理.ms | 5 +- 27 files changed, 1182 insertions(+), 146 deletions(-) create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentApplyController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentContractController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentDetailController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentItemController.java create mode 100644 src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentStatController.java diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/FileController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/FileController.java index 894a11a..ab72719 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/FileController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/FileController.java @@ -79,21 +79,21 @@ public class FileController { /** * 下载文件 */ - @OperLog(operModul = "文件管理", operType = "文件下载", operDesc = "文件下载") - @ApiOperation(value = "文件下载", notes = "文件下载", httpMethod="POST") - @ApiImplicitParam(name = "fileUrl", value = "文件路径", paramType = "body", dataType = "String") - @PostMapping("/download") - public void download(@ApiIgnore @RequestBody Map map, HttpServletResponse response) throws Exception { - // 获取文件信息 - String fileUrl = MapUtils.getString(map, "fileUrl"); - FileInfo fileInfo = fileStorageService.getFileInfoByUrl(fileUrl); - if (null == fileInfo) { - throw new Exception("缩略图文件下载失败,文件不存在!fileInfo:" + fileInfo); - } - response.setHeader("Content-disposition", "attachment; filename=" + fileUrl.substring(fileUrl.lastIndexOf("/") + 1)); - response.setContentType("application/octet-stream");// 定义输出类型 - fileStorageService.download(fileInfo).outputStream(response.getOutputStream()); - } +// @OperLog(operModul = "文件管理", operType = "文件下载", operDesc = "文件下载") +// @ApiOperation(value = "文件下载", notes = "文件下载", httpMethod="POST") +// @ApiImplicitParam(name = "fileUrl", value = "文件路径", paramType = "body", dataType = "String") +// @PostMapping("/download") +// public void download(@ApiIgnore @RequestBody Map map, HttpServletResponse response) throws Exception { +// // 获取文件信息 +// String fileUrl = MapUtils.getString(map, "fileUrl"); +// FileInfo fileInfo = fileStorageService.getFileInfoByUrl(fileUrl); +// if (null == fileInfo) { +// throw new Exception("缩略图文件下载失败,文件不存在!fileInfo:" + fileInfo); +// } +// response.setHeader("Content-disposition", "attachment; filename=" + fileUrl.substring(fileUrl.lastIndexOf("/") + 1)); +// response.setContentType("application/octet-stream");// 定义输出类型 +// fileStorageService.download(fileInfo).outputStream(response.getOutputStream()); +// } /** * 获取预览文件流 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 f0fbf1c..6c39bee 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 @@ -1,6 +1,7 @@ package com.zhgd.xmgl.modules.basicdata.controller.admin; import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.qiwenshare.common.result.RestResult; import com.zhgd.annotation.OperLog; @@ -8,13 +9,11 @@ import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.constant.CommonConstant; import com.zhgd.mybatis.Aes; import com.zhgd.xmgl.modules.basicdata.dto.SystemUserAuthDto; +import com.zhgd.xmgl.modules.basicdata.entity.EnterpriseMain; import com.zhgd.xmgl.modules.basicdata.entity.Government; import com.zhgd.xmgl.modules.basicdata.entity.SystemUser; import com.zhgd.xmgl.modules.basicdata.entity.SystemUserDataScope; -import com.zhgd.xmgl.modules.basicdata.service.IGovernmentService; -import com.zhgd.xmgl.modules.basicdata.service.ISystemRoleService; -import com.zhgd.xmgl.modules.basicdata.service.ISystemUserDataScopeService; -import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService; +import com.zhgd.xmgl.modules.basicdata.service.*; import com.zhgd.xmgl.modules.basicdata.vo.UserLoginVo; import com.zhgd.xmgl.security.JwtTokenProvider; import com.zhgd.xmgl.security.SecurityUser; @@ -27,6 +26,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -35,6 +35,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletRequest; import java.util.Date; import java.util.Map; +import java.util.stream.Collectors; /** @@ -55,6 +56,9 @@ public class SystemUserAuthController { @Autowired private IGovernmentService governmentService; + @Autowired + private IEnterpriseMainService enterpriseMainService; + @Autowired private JwtTokenProvider jwtTokenProvider; @@ -191,6 +195,10 @@ public class SystemUserAuthController { } } userInfo.setProjectDateAuth(government.getProjectDateAuth()); + if (userInfo.getAccountType() == 3) { + userInfo.setEnterpriseType(enterpriseMainService.list(Wrappers.lambdaQuery().eq(EnterpriseMain::getEnterpriseSn, user.getSn())) + .stream().map(e -> e.getMainType()).collect(Collectors.toList())); + } } } @@ -218,28 +226,28 @@ public class SystemUserAuthController { public Result analysis(@RequestBody Map map) { Result result = new Result(); try { -// 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")) { -// account = "hzxmgl"; -// } -// if (userId.equals("test")) { -// account = "hzxm"; -// } -// if (StringUtils.isBlank(account)) { -// result.error500("用户不存在"); -// return result; -// } + 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")) { + account = "hzxmgl"; + } + if (userId.equals("test")) { + account = "hzxm"; + } + if (StringUtils.isBlank(account)) { + result.error500("用户不存在"); + return result; + } SystemUser user = systemUserService.getOne(Wrappers.lambdaQuery() - .eq(SystemUser::getAccount, "pjadmin")); + .eq(SystemUser::getAccount, account)); SystemUserAuthDto userInfo = new SystemUserAuthDto(); checkLogin(user, userInfo, result); if (result.getCode() != CommonConstant.SC_INTERNAL_SERVER_ERROR_500) { diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/VideoOpController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/VideoOpController.java index 00d47cf..906ea38 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/VideoOpController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/admin/VideoOpController.java @@ -95,7 +95,7 @@ public class VideoOpController { Map apply = new HashMap<>(); apply.put("cameraIndexCode", codes[i]); apply.put("protocol", MapUtils.getString(map, "protocol")); - String url = monitorApi.previewURL(apply); + String url = monitorApi.previewURLV1(apply); resultUrl.add(url); } result.setSuccess(true); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInspectQuestionExamineController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInspectQuestionExamineController.java index 4c4b641..1897ef6 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInspectQuestionExamineController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInspectQuestionExamineController.java @@ -74,4 +74,29 @@ public class EntInspectQuestionExamineController { } return result; } + + /** + * 单个问题审批 + * @param inspectQuestionExamine + * @return + */ + @OperLog(operModul = "监督执法问题审批管理", operType = "修改", operDesc = "单个问题审批") + @ApiOperation(value = "单个问题审批", notes = "单个问题审批", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InspectQuestionExamine inspectQuestionExamine) { + Result result = new Result(); + InspectQuestionExamine inspectQuestionExamineEntity = inspectQuestionExamineService.getById(inspectQuestionExamine.getId()); + if (inspectQuestionExamineEntity == null) { + result.error500("未找到对应实体"); + } else { + inspectQuestionExamine.setInspectQuestionId(inspectQuestionExamineEntity.getInspectQuestionId()); + boolean ok = inspectQuestionExamineService.examine(inspectQuestionExamine); + if (ok) { + result.success("审批成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInspectRecordController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInspectRecordController.java index 7acb466..cdcd7b1 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInspectRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInspectRecordController.java @@ -11,6 +11,7 @@ import com.zhgd.xmgl.modules.safety.dto.InspectRecordDto; import com.zhgd.xmgl.modules.safety.dto.InspectRecordStatDto; import com.zhgd.xmgl.modules.safety.entity.InspectRecord; import com.zhgd.xmgl.modules.safety.service.IInspectRecordService; +import com.zhgd.xmgl.modules.safety.vo.InspectRecordVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -90,6 +91,18 @@ public class EntInspectRecordController { return Result.success(list); } + /** + * 添加(PC) + * @param inspectRecordVo + * @return + */ + @OperLog(operModul = "监督执法记录管理", operType = "新增", operDesc = "PC添加监督执法记录信息") + @ApiOperation(value = "PC添加监督执法记录信息", notes = "PC添加监督执法记录信息", httpMethod = "POST") + @PostMapping(value = "/save") + public Result save(@RequestBody InspectRecordVo inspectRecordVo) { + return Result.success(inspectRecordsService.saveInfo(inspectRecordVo)); + } + /** * 提交审核 * @@ -104,6 +117,30 @@ public class EntInspectRecordController { return Result.success("操作成功!"); } + /** + * 对整改执法单审批 + * @param inspectRecord + * @return + */ + @OperLog(operModul = "监督执法问题审批管理", operType = "修改", operDesc = "对整改执法单审批") + @ApiOperation(value = "对整改执法单审批", notes = "对整改执法单审批", httpMethod = "POST") + @PostMapping(value = "/examine") + public Result examine(@RequestBody InspectRecord inspectRecord) { + Result result = new Result(); + InspectRecord inspectRecordEntity = inspectRecordsService.getById(inspectRecord.getId()); + if (inspectRecordEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = inspectRecordsService.examine(inspectRecord); + if (ok) { + result.success("审批成功!"); + } else { + result.error500("暂无可审批问题!"); + } + } + return result; + } + /** * 通过id查询 * diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentApplyController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentApplyController.java new file mode 100644 index 0000000..9b0d9f4 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentApplyController.java @@ -0,0 +1,190 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.safety.entity.InvestmentApply; +import com.zhgd.xmgl.modules.safety.service.IInvestmentApplyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付申报 + * @author: pengj + * @date: 2023-07-05 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentApply") +@Slf4j +@Api(tags = "投资支付申报管理") +public class EntInvestmentApplyController { + @Autowired + private IInvestmentApplyService investmentApplyService; + + @Autowired + private IEngineeringService engineeringService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "分页查询", operDesc = "分页列表查询投资支付申报信息") + @ApiOperation(value = " 分页列表查询投资支付申报信息", notes = "分页列表查询投资支付申报信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "name", value = "申报时段名称", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + IPage pageList = investmentApplyService.pageList(map); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentApply + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "列表查询", operDesc = "列表查询已支付投资申报信息") + @ApiOperation(value = " 列表查询已支付投资申报信息", notes = "列表查询已支付投资申报信息", httpMethod = "POST") + @ApiImplicitParam(name = "investmentPaymentId", value = "投资支付记录ID", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/payList") + public Result> payList(@RequestBody InvestmentApply investmentApply) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentApply); + queryWrapper.lambda().isNotNull(InvestmentApply::getInvestmentPaymentId); + List list = investmentApplyService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param investmentApply + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "新增", operDesc = "添加投资支付申报信息") + @ApiOperation(value = " 添加投资支付申报信息", notes = "添加投资支付申报信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentApply investmentApply) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentApply.getEngineeringSn())).getProjectSn(); + investmentApply.setProjectSn(projectSn); + investmentApplyService.saveInfo(investmentApply); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentApply + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "修改", operDesc = "编辑投资支付申报信息") + @ApiOperation(value = "编辑投资支付申报信息", notes = "编辑投资支付申报信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentApply investmentApply) { + Result result = new Result(); + InvestmentApply investmentApplyEntity = investmentApplyService.getById(investmentApply.getId()); + if (investmentApplyEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentApplyService.updateById(investmentApply); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "删除", operDesc = "删除投资支付申报信息") + @ApiOperation(value = "删除投资支付申报信息", notes = "删除投资支付申报信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付申报ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody InvestmentApply investmentApply) { + Result result = new Result(); + InvestmentApply investmentApplyEntity = investmentApplyService.getById(investmentApply.getId()); + if (investmentApplyEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentApplyService.removeById(investmentApply.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + /** + * 批量删除 + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "批量删除", operDesc = "批量删除投资支付申报信息") + @ApiOperation(value = "批量删除投资支付申报信息", notes = "批量删除投资支付申报信息", httpMethod = "POST") + @ApiImplicitParam(name = "ids", value = "投资支付申报ID字符串", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/deleteBatch") + public Result deleteBatch(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.investmentApplyService.removeByIds(Arrays.asList(ids.split(","))); + result.success("删除成功!"); + } + return result; + } + + /** + * 通过id查询 + * @return + */ + @OperLog(operModul = "投资支付申报管理", operType = "查询", operDesc = "通过id查询投资支付申报信息") + @ApiOperation(value = "通过id查询投资支付申报信息", notes = "通过id查询投资支付申报信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付申报ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentApply investmentApply = investmentApplyService.getById(MapUtils.getString(map, "id")); + if (investmentApply == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentApply); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentContractController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentContractController.java new file mode 100644 index 0000000..199c60c --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentContractController.java @@ -0,0 +1,100 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.safety.entity.InvestmentContract; +import com.zhgd.xmgl.modules.safety.service.IInvestmentContractService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付合同 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentContract") +@Slf4j +@Api(tags = "投资支付合同管理") +public class EntInvestmentContractController { + @Autowired + private IInvestmentContractService investmentContractService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "分页查询", operDesc = "分页列表查询投资支付合同信息") + @ApiOperation(value = " 分页列表查询投资支付合同信息", notes = "分页列表查询投资支付合同信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "contractTime_begin", value = "开始时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "contractTime_end", value = "截止时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentContract.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentContractService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentContract + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "列表查询", operDesc = "列表查询投资支付合同信息") + @ApiOperation(value = " 列表查询投资支付合同信息", notes = "列表查询投资支付合同信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentContract investmentContract) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentContract); + List list = investmentContractService.list(queryWrapper); + return Result.success(list); + } + + /** + * 通过id查询 + * + * @return + */ + @OperLog(operModul = "投资支付合同管理", operType = "查询", operDesc = "通过id查询投资支付合同信息") + @ApiOperation(value = "通过id查询投资支付合同信息", notes = "通过id查询投资支付合同信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付合同ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentContract investmentContract = investmentContractService.getById(MapUtils.getString(map, "id")); + if (investmentContract == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentContract); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentController.java new file mode 100644 index 0000000..82b36a7 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentController.java @@ -0,0 +1,101 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付 + * @author: pengj + * @date: 2023-07-01 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentPayment") +@Slf4j +@Api(tags = "投资支付管理") +public class EntInvestmentPaymentController { + @Autowired + private IInvestmentPaymentService investmentPaymentService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付管理", operType = "分页查询", operDesc = "分页列表查询投资支付信息") + @ApiOperation(value = " 分页列表查询投资支付信息", notes = "分页列表查询投资支付信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "contractId", value = "合同ID", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "payTime_begin", value = "开始时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "payTime_end", value = "截止时间", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPayment.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentPaymentService.page(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentPayment + * @return + */ + @OperLog(operModul = "投资支付管理", operType = "列表查询", operDesc = "列表查询投资支付信息") + @ApiOperation(value = " 列表查询投资支付信息", notes = "列表查询投资支付信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentPayment investmentPayment) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentPayment); + List list = investmentPaymentService.list(queryWrapper); + return Result.success(list); + } + + /** + * 通过id查询 + * + * @return + */ + @OperLog(operModul = "投资支付管理", operType = "查询", operDesc = "通过id查询投资支付信息") + @ApiOperation(value = "通过id查询投资支付信息", notes = "通过id查询投资支付信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentPayment investmentPayment = investmentPaymentService.getById(MapUtils.getString(map, "id")); + if (investmentPayment == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentPayment); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentDetailController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentDetailController.java new file mode 100644 index 0000000..24b7f4a --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentDetailController.java @@ -0,0 +1,185 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.jeecg.common.util.PageUtil; +import com.zhgd.xmgl.modules.safety.dto.InvestmentPaymentDetailDto; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentDetail; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentDetailService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付子项详细 + * @author: pengj + * @date: 2023-07-01 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentPaymentDetail") +@Slf4j +@Api(tags = "投资支付子项详细管理") +public class EntInvestmentPaymentDetailController { + @Autowired + private IInvestmentPaymentDetailService investmentPaymentDetailService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "分页查询", operDesc = "分页列表查询投资支付子项详细信息") + @ApiOperation(value = " 分页列表查询投资支付子项详细信息", notes = "分页列表查询投资支付子项详细信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "itemId", value = "投资支付子项id", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentDetail.class, map); + Page page = PageUtil.getPage(map); + IPage pageList = investmentPaymentDetailService.pageList(page, queryWrapper); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentPaymentDetail + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "列表查询", operDesc = "列表查询投资支付子项详细信息") + @ApiOperation(value = " 列表查询投资支付子项详细信息", notes = "列表查询投资支付子项详细信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentDetail); + List list = investmentPaymentDetailService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param investmentPaymentDetail + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "新增", operDesc = "添加投资支付子项详细信息") + @ApiOperation(value = " 添加投资支付子项详细信息", notes = "添加投资支付子项详细信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) { + investmentPaymentDetailService.save(investmentPaymentDetail); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentPaymentDetail + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "修改", operDesc = "编辑投资支付子项详细信息") + @ApiOperation(value = "编辑投资支付子项详细信息", notes = "编辑投资支付子项详细信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) { + Result result = new Result(); + InvestmentPaymentDetail investmentPaymentDetailEntity = investmentPaymentDetailService.getById(investmentPaymentDetail.getId()); + if (investmentPaymentDetailEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentDetailService.updateById(investmentPaymentDetail); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "删除", operDesc = "删除投资支付子项详细信息") + @ApiOperation(value = "删除投资支付子项详细信息", notes = "删除投资支付子项详细信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付子项详细ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) { + Result result = new Result(); + InvestmentPaymentDetail investmentPaymentDetailEntity = investmentPaymentDetailService.getById(investmentPaymentDetail.getId()); + if (investmentPaymentDetailEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentDetailService.removeById(investmentPaymentDetail.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + /** + * 批量删除 + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "批量删除", operDesc = "批量删除投资支付子项详细信息") + @ApiOperation(value = "批量删除投资支付子项详细信息", notes = "批量删除投资支付子项详细信息", httpMethod = "POST") + @ApiImplicitParam(name = "ids", value = "投资支付子项详细ID字符串", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/deleteBatch") + public Result deleteBatch(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.investmentPaymentDetailService.removeByIds(Arrays.asList(ids.split(","))); + result.success("删除成功!"); + } + return result; + } + + /** + * 通过id查询 + * @return + */ + @OperLog(operModul = "投资支付子项详细管理", operType = "查询", operDesc = "通过id查询投资支付子项详细信息") + @ApiOperation(value = "通过id查询投资支付子项详细信息", notes = "通过id查询投资支付子项详细信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付子项详细ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentPaymentDetail investmentPaymentDetail = investmentPaymentDetailService.getById(MapUtils.getString(map, "id")); + if (investmentPaymentDetail == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentPaymentDetail); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentItemController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentItemController.java new file mode 100644 index 0000000..dc7b2d6 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentItemController.java @@ -0,0 +1,172 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentItem; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentItemService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付子项 + * @author: pengj + * @date: 2023-07-01 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentPaymentItem") +@Slf4j +@Api(tags = "投资支付子项管理") +public class EntInvestmentPaymentItemController { + @Autowired + private IInvestmentPaymentItemService investmentPaymentItemService; + + @Autowired + private IEngineeringService engineeringService; + + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "分页查询", operDesc = "分页列表查询投资支付子项信息") + @ApiOperation(value = " 分页列表查询投资支付子项信息", notes = "分页列表查询投资支付子项信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "reportContent", value = "汇报内容", paramType = "body", dataType = "String"), + @ApiImplicitParam(name = "investmentApplyId", value = "投资支付申报ID", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer") + }) + @PostMapping(value = "/page") + public Result> queryPageList(@ApiIgnore @RequestBody Map map) { + IPage pageList = investmentPaymentItemService.pageList(map); + return Result.success(pageList); + } + + /** + * 列表查询 + * + * @param investmentPaymentItem + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "列表查询", operDesc = "列表查询投资支付子项信息") + @ApiOperation(value = " 列表查询投资支付子项信息", notes = "列表查询投资支付子项信息", httpMethod = "POST") + @PostMapping(value = "/list") + public Result> queryList(@RequestBody InvestmentPaymentItem investmentPaymentItem) { + if (null == investmentPaymentItem.getInvestmentApplyId()) { + return Result.success(null); + } + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentItem); + List list = investmentPaymentItemService.list(queryWrapper); + return Result.success(list); + } + + + /** + * 添加 + * + * @param investmentPaymentItem + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "新增", operDesc = "添加投资支付子项信息") + @ApiOperation(value = " 添加投资支付子项信息", notes = "添加投资支付子项信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentPaymentItem investmentPaymentItem) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentItem.getEngineeringSn())).getProjectSn(); + investmentPaymentItem.setProjectSn(projectSn); + investmentPaymentItemService.saveInfo(investmentPaymentItem); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentPaymentItem + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "修改", operDesc = "编辑投资支付子项信息") + @ApiOperation(value = "编辑投资支付子项信息", notes = "编辑投资支付子项信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentPaymentItem investmentPaymentItem) { + Result result = new Result(); + InvestmentPaymentItem investmentPaymentItemEntity = investmentPaymentItemService.getById(investmentPaymentItem.getId()); + if (investmentPaymentItemEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentItemService.updateById(investmentPaymentItem); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "删除", operDesc = "删除投资支付子项信息") + @ApiOperation(value = "删除投资支付子项信息", notes = "删除投资支付子项信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付子项ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody InvestmentPaymentItem investmentPaymentItem) { + Result result = new Result(); + InvestmentPaymentItem investmentPaymentItemEntity = investmentPaymentItemService.getById(investmentPaymentItem.getId()); + if (investmentPaymentItemEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentItemService.removeById(investmentPaymentItem.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + + /** + * 通过id查询 + * @return + */ + @OperLog(operModul = "投资支付子项管理", operType = "查询", operDesc = "通过id查询投资支付子项信息") + @ApiOperation(value = "通过id查询投资支付子项信息", notes = "通过id查询投资支付子项信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付子项ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentPaymentItem investmentPaymentItem = investmentPaymentItemService.getById(MapUtils.getString(map, "id")); + if (investmentPaymentItem == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentPaymentItem); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentStatController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentStatController.java new file mode 100644 index 0000000..f978497 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntInvestmentPaymentStatController.java @@ -0,0 +1,151 @@ +package com.zhgd.xmgl.modules.basicdata.controller.enterprise; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.zhgd.annotation.OperLog; +import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.system.query.QueryGenerator; +import com.zhgd.xmgl.modules.basicdata.entity.Engineering; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; +import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentStat; +import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentStatService; +import com.zhgd.xmgl.security.SecurityUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Map; + + +/** + * @Title: Controller + * @Description: 投资支付统计 + * @author: pengj + * @date: 2023-07-04 + * @version: V1.0 + */ +@RestController +@RequestMapping("/ent/investmentPaymentStat") +@Slf4j +@Api(tags = "投资支付统计管理") +public class EntInvestmentPaymentStatController { + @Autowired + private IInvestmentPaymentStatService investmentPaymentStatService; + + @Autowired + private IEngineeringService engineeringService; + /** + * 分页列表查询 + * + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "分页查询", operDesc = "查询对应申报时段的投资支付统计信息") + @ApiOperation(value = " 查询对应申报时段的投资支付统计信息", notes = "查询对应申报时段的投资支付统计信息", httpMethod = "POST") + @ApiImplicitParam(name = "investmentApplyId", value = "投资支付申报ID", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/queryByApplyId") + public Result queryPageList(@ApiIgnore @RequestBody Map map) { + String investmentApplyId = MapUtils.getString(map, "investmentApplyId"); + if (StringUtils.isBlank(investmentApplyId)) { + return Result.success(null); + } + QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentStat.class, map); + return Result.success(investmentPaymentStatService.getOne(queryWrapper)); + } + + + /** + * 添加 + * + * @param investmentPaymentStat + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "新增", operDesc = "添加投资支付统计信息") + @ApiOperation(value = " 添加投资支付统计信息", notes = "添加投资支付统计信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentStat.getEngineeringSn())).getProjectSn(); + investmentPaymentStat.setProjectSn(projectSn); + investmentPaymentStatService.save(investmentPaymentStat); + return Result.success("添加成功!"); + } + + /** + * 编辑 + * + * @param investmentPaymentStat + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "修改", operDesc = "编辑投资支付统计信息") + @ApiOperation(value = "编辑投资支付统计信息", notes = "编辑投资支付统计信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + Result result = new Result(); + InvestmentPaymentStat investmentPaymentStatEntity = investmentPaymentStatService.getById(investmentPaymentStat.getId()); + if (investmentPaymentStatEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentStatService.updateById(investmentPaymentStat); + if (ok) { + result.success("修改成功!"); + } else { + result.success("操作失败!"); + } + } + + return result; + } + + /** + * 通过id删除 + * + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "删除", operDesc = "删除投资支付统计信息") + @ApiOperation(value = "删除投资支付统计信息", notes = "删除投资支付统计信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付统计ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody InvestmentPaymentStat investmentPaymentStat) { + Result result = new Result(); + InvestmentPaymentStat investmentPaymentStatEntity = investmentPaymentStatService.getById(investmentPaymentStat.getId()); + if (investmentPaymentStatEntity == null) { + result.error500("未找到对应实体"); + } else { + boolean ok = investmentPaymentStatService.removeById(investmentPaymentStat.getId()); + if (ok) { + result.success("删除成功!"); + } else { + result.success("操作失败!"); + } + } + return result; + } + + /** + * 通过id查询 + * @return + */ + @OperLog(operModul = "投资支付统计管理", operType = "查询", operDesc = "通过id查询投资支付统计信息") + @ApiOperation(value = "通过id查询投资支付统计信息", notes = "通过id查询投资支付统计信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "投资支付统计ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + InvestmentPaymentStat investmentPaymentStat = investmentPaymentStatService.getById(MapUtils.getString(map, "id")); + if (investmentPaymentStat == null) { + result.error500("未找到对应实体"); + } else { + result.setResult(investmentPaymentStat); + result.setSuccess(true); + } + return result; + } +} diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectNodePlanController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectNodePlanController.java index 7fdba90..758b8ef 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 @@ -2,17 +2,14 @@ package com.zhgd.xmgl.modules.basicdata.controller.enterprise; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.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.basicdata.dto.EngineeringPageDto; import com.zhgd.xmgl.modules.safety.entity.ProjectNodePlan; import com.zhgd.xmgl.modules.safety.service.IProjectNodePlanService; -import com.zhgd.xmgl.security.SecurityUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -46,8 +43,23 @@ public class EntProjectNodePlanController { @Autowired private IProjectNodePlanService projectNodePlanService; - @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(projectNodePlanService.pageListForSuperior(map)); + } + /** * 分页列表查询 @@ -57,9 +69,10 @@ public class EntProjectNodePlanController { @OperLog(operModul = "项目全景计划管理", operType = "分页查询", operDesc = "分页列表查询项目全景计划信息") @ApiOperation(value = " 分页列表查询项目全景计划信息", notes = "分页列表查询项目全景计划信息", httpMethod = "POST") @ApiImplicitParams({ + @ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"), @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") }) @@ -86,23 +99,6 @@ public class EntProjectNodePlanController { return Result.success(list); } - - /** - * 添加 - * - * @param projectNodePlan - * @return - */ - @OperLog(operModul = "项目全景计划管理", operType = "新增", operDesc = "添加项目全景计划信息") - @ApiOperation(value = " 添加项目全景计划信息", notes = "添加项目全景计划信息", httpMethod = "POST") - @PostMapping(value = "/add") - public Result add(@RequestBody ProjectNodePlan projectNodePlan) { - String projectSn = engineeringService.getOne(Wrappers.lambdaQuery().eq(Engineering::getEngineeringSn, projectNodePlan.getEngineeringSn())).getProjectSn(); - projectNodePlan.setProjectSn(projectSn); - projectNodePlanService.save(projectNodePlan); - return Result.success("添加成功!"); - } - /** * 编辑 * @@ -118,7 +114,6 @@ public class EntProjectNodePlanController { if (projectNodePlanEntity == null) { result.error500("未找到对应实体"); } else { - projectNodePlan.setProjectSn(SecurityUtil.getUser().getSn()); boolean ok = projectNodePlanService.updateById(projectNodePlan); if (ok) { result.success("修改成功!"); @@ -126,7 +121,6 @@ public class EntProjectNodePlanController { result.success("操作失败!"); } } - return result; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectSubItemController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectSubItemController.java index f5e1c8f..4f81469 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectSubItemController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/enterprise/EntProjectSubItemController.java @@ -8,12 +8,12 @@ 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.entity.Engineering; import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService; import com.zhgd.xmgl.modules.safety.dto.ProjectSubItemDto; import com.zhgd.xmgl.modules.safety.entity.ProjectSubItem; import com.zhgd.xmgl.modules.safety.service.IProjectSubItemService; -import com.zhgd.xmgl.security.SecurityUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -25,6 +25,7 @@ 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 org.springframework.web.multipart.MultipartFile; import springfox.documentation.annotations.ApiIgnore; import java.util.List; @@ -48,6 +49,24 @@ public class EntProjectSubItemController { @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(projectSubItemService.pageListForSuperior(map)); + } + /** * 分页列表查询 * @@ -56,8 +75,10 @@ public class EntProjectSubItemController { @OperLog(operModul = "分部分项管理", operType = "分页查询", operDesc = "分页列表查询分部分项信息") @ApiOperation(value = " 分页列表查询分部分项信息", notes = "分页列表查询分部分项信息", httpMethod = "POST") @ApiImplicitParams({ + @ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "name", value = "分部分项名称", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:已逾期)", paramType = "body", dataType = "Integer"), + @ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:逾期未开始;5:逾期进行中;6:逾期已完成)", paramType = "body", dataType = "Integer"), + @ApiImplicitParam(name = "approvalStatus", value = "审核状态(0:未审核通过;1:已审核通过)", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), @@ -79,10 +100,10 @@ public class EntProjectSubItemController { @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 = "name", value = "分部分项名称", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:已逾期)", paramType = "body", dataType = "Integer"), + @ApiImplicitParam(name = "approvalStatus", value = "审核状态(0:未审核通过;1:已审核通过)", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"), @@ -105,9 +126,9 @@ public class EntProjectSubItemController { @OperLog(operModul = "分部分项管理", operType = "列表查询", operDesc = "列表查询分部分项信息") @ApiOperation(value = " 列表查询分部分项信息", notes = "列表查询分部分项信息", httpMethod = "POST") @PostMapping(value = "/list") - public Result> queryList(@RequestBody ProjectSubItem projectSubItem) { + public Result> queryList(@RequestBody ProjectSubItem projectSubItem) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(projectSubItem); - List list = projectSubItemService.list(queryWrapper); + List list = projectSubItemService.getList(queryWrapper); return Result.success(list); } @@ -143,7 +164,6 @@ public class EntProjectSubItemController { if (projectSubItemEntity == null) { result.error500("未找到对应实体"); } else { - projectSubItem.setProjectSn(SecurityUtil.getUser().getSn()); boolean ok = projectSubItemService.updateInfo(projectSubItem); if (ok) { result.success("修改成功!"); @@ -200,4 +220,14 @@ public class EntProjectSubItemController { } return result; } + + /** + * 甘特图mpp文件导入(导入分部分项数据) + */ + @OperLog(operModul = "分部分项管理", operType = "导入", operDesc = "甘特图mpp文件导入") + @ApiOperation(value = "甘特图mpp文件导入", notes = "甘特图mpp文件导入", httpMethod="POST") + @PostMapping("/importMpp") + public Result importMpp(MultipartFile file) { + return Result.success(projectSubItemService.importMpp(file)); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectController.java index 3efbb09..a778c3e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovProjectController.java @@ -3,14 +3,14 @@ package com.zhgd.xmgl.modules.basicdata.controller.government; import com.baomidou.mybatisplus.core.metadata.IPage; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; -import com.zhgd.xmgl.modules.wisdom.dto.MapEnvironAlarmDto; import com.zhgd.xmgl.modules.basicdata.dto.ProjectDto; -import com.zhgd.xmgl.modules.wisdom.dto.MapAiAlarmDto; import com.zhgd.xmgl.modules.basicdata.entity.Enterprise; import com.zhgd.xmgl.modules.basicdata.entity.Project; +import com.zhgd.xmgl.modules.basicdata.service.IProjectService; +import com.zhgd.xmgl.modules.wisdom.dto.MapAiAlarmDto; +import com.zhgd.xmgl.modules.wisdom.dto.MapEnvironAlarmDto; import com.zhgd.xmgl.modules.wisdom.service.IAiMonitorAlarmService; import com.zhgd.xmgl.modules.wisdom.service.IEnvironmentAlarmService; -import com.zhgd.xmgl.modules.basicdata.service.IProjectService; import com.zhgd.xmgl.security.SecurityUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -172,4 +173,38 @@ public class GovProjectController { } return result; } + + public final static double x_pi = 3.14159265358979324 * 3000.0 / 180.0; + public static void main(String[] args) { + System.out.println(bd2gd(121.70240924447587, 36.85019248472488)); + } + + public static double[] gcj02_To_Bd09(double lat, double lon) { + double x = lon, y = lat; + double z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi); + double theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi); + double tempLon = z * Math.cos(theta) + 0.0065; + double tempLat = z * Math.sin(theta) + 0.006; + double[] gps = {tempLat, tempLon}; + return gps; + } + + /** + * 百度坐标转换高德坐标 + * + * @param bd_lon 经度 + * @param bd_lat 纬度 + * @return + */ + public static Map bd2gd(double bd_lon, double bd_lat) { + double x = bd_lon - 0.0065, y = bd_lat - 0.006; + double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi); + double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi); + double gd_lon = z * Math.cos(theta); + double gd_lat = z * Math.sin(theta); + Map data = new HashMap<>(); + data.put("lon", gd_lon); + data.put("lat", gd_lat); + return data; + } } 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 074e42c..259bda4 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,7 +2,6 @@ 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; @@ -90,7 +89,7 @@ public class GovProjectSubItemController { @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "name", value = "分部分项名称", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:已逾期)", paramType = "body", dataType = "Integer"), + @ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:逾期未开始;5:逾期进行中;6:逾期已完成)", paramType = "body", dataType = "Integer"), @ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "realEndTime_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/government/GovSystemUserController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovSystemUserController.java index 7a8b23e..ffbcb36 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovSystemUserController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/government/GovSystemUserController.java @@ -1,10 +1,13 @@ package com.zhgd.xmgl.modules.basicdata.controller.government; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.xmgl.modules.basicdata.dto.SystemUserDto; +import com.zhgd.xmgl.modules.basicdata.entity.EngineeringMain; import com.zhgd.xmgl.modules.basicdata.entity.SystemUser; +import com.zhgd.xmgl.modules.basicdata.service.IEngineeringMainService; import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService; import com.zhgd.xmgl.modules.basicdata.vo.SystemUserVo; import com.zhgd.xmgl.valid.AddGroup; @@ -25,6 +28,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** @@ -42,6 +46,9 @@ public class GovSystemUserController { @Autowired private ISystemUserService systemUserService; + @Autowired + private IEngineeringMainService engineeringMainService; + /** * 分页列表查询 * @return @@ -162,25 +169,28 @@ public class GovSystemUserController { return result; } -// /** -// * 通过政务id查询系统用户表信息 -// * @return -// */ -// @OperLog(operModul = "用户管理", operType = "查询", operDesc = "通过政务id查询系统用户表信息") -// @ApiOperation(value = "通过政务id查询系统用户表信息", notes = "通过政务id查询系统用户表信息" , httpMethod="POST") -// @ApiImplicitParam(name = "governmentId", value = "政务id", paramType = "body", required = true, dataType = "Integer") -// @PostMapping(value = "/queryByGovernmentId") -// public Result queryByGovernmentId(@ApiIgnore @RequestBody Map map) { -// Result result = new Result(); -// SystemUser systemUser = systemUserService.getOne(Wrappers.lambdaQuery() -// .eq(SystemUser::getSn, MapUtils.getString(map,"governmentId")) -// .eq(SystemUser::getIsManager, true)); -// if(systemUser==null) { -// result.error500("未找到对应实体"); -// }else { -// result.setResult(systemUser); -// result.setSuccess(true); -// } -// return result; -// } + /** + * 通过工程SN查询对应企业用户信息 + * @return + */ + @OperLog(operModul = "用户管理", operType = "查询", operDesc = "通过工程SN查询对应企业用户信息") + @ApiOperation(value = "通过工程SN查询对应企业用户信息", notes = "通过工程SN查询对应企业用户信息" , httpMethod="POST") + @ApiImplicitParam(name = "engineeringSn", value = "工程sn", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/queryByEngineering") + public Result queryByEngineering(@ApiIgnore @RequestBody Map map) { + Result result = new Result(); + String engineeringSn = MapUtils.getString(map, "engineeringSn"); + List enterpriseSnList = engineeringMainService.list(Wrappers.lambdaQuery().eq(EngineeringMain::getEngineeringSn, engineeringSn)) + .stream().map(e -> e.getEnterpriseSn()).collect(Collectors.toList()); + SystemUser systemUser = systemUserService.getOne(Wrappers.lambdaQuery() + .in(SystemUser::getSn, enterpriseSnList) + .eq(SystemUser::getIsManager, true)); + if(systemUser==null) { + result.error500("未找到对应实体"); + }else { + result.setResult(systemUser); + 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 2f458a0..cff581c 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 @@ -80,22 +80,6 @@ public class ProjectNodePlanController { return Result.success(list); } - -// /** -// * 添加 -// * -// * @param projectNodePlan -// * @return -// */ -// @OperLog(operModul = "项目全景计划管理", operType = "新增", operDesc = "添加项目全景计划信息") -// @ApiOperation(value = " 添加项目全景计划信息", notes = "添加项目全景计划信息", httpMethod = "POST") -// @PostMapping(value = "/add") -// public Result add(@RequestBody ProjectNodePlan projectNodePlan) { -// projectNodePlan.setProjectSn(SecurityUtil.getUser().getSn()); -// projectNodePlanService.save(projectNodePlan); -// return Result.success("添加成功!"); -// } - /** * 编辑 * diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/ProjectSubItemController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/ProjectSubItemController.java index 357c540..6449ed3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/ProjectSubItemController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/ProjectSubItemController.java @@ -53,7 +53,7 @@ public class ProjectSubItemController { @ApiOperation(value = " 分页列表查询分部分项信息", notes = "分页列表查询分部分项信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "name", value = "分部分项名称", paramType = "body", dataType = "String"), - @ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:已逾期)", paramType = "body", dataType = "Integer"), + @ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:逾期未开始;5:逾期进行中;6:逾期已完成)", paramType = "body", dataType = "Integer"), @ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"), @ApiImplicitParam(name = "realEndTime_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/dto/SystemUserAuthDto.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/SystemUserAuthDto.java index 3d38795..a29788a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/SystemUserAuthDto.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/dto/SystemUserAuthDto.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; +import java.util.List; /** * @author pengj @@ -68,4 +69,7 @@ public class SystemUserAuthDto { @ApiModelProperty(value = "是否为工程账号") private Boolean isEngineering; + + @ApiModelProperty(value = "企业类型") + private List enterpriseType; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/FileDetailServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/FileDetailServiceImpl.java index 7251e42..db97dfd 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/FileDetailServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/FileDetailServiceImpl.java @@ -110,6 +110,7 @@ public class FileDetailServiceImpl extends ServiceImpl wrapper = Wrappers.query(); SecurityUser user = SecurityUtil.getUser(); wrapper.eq("u.account_type", user.getAccountType()); - if (systemUser.getSn() == null) { - wrapper.eq("u.sn", user.getSn()); - } else { - wrapper.eq("u.sn", systemUser.getSn()); - } + wrapper.eq("u.sn", systemUser.getSn()); wrapper.ne("u.user_id", user.getUserId()); return baseMapper.getPageList(wrapper); } 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 80c5e93..e18cc82 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 @@ -94,18 +94,18 @@ public class ProjectNodePlan implements Serializable { @Excel(name = "职能条线", width = 15) @ApiModelProperty(value = "职能条线") private String phaseName; - /** - * 节点责任人编号 - */ - @Excel(name = "节点责任人编号", width = 15) - @ApiModelProperty(value = "节点责任人编号") - private String chargerNumber; /** * 节点责任人 */ @Excel(name = "节点责任人", width = 15) @ApiModelProperty(value = "节点责任人") private String chargerName; + /** + * 节点责任人联系方式 + */ + @Excel(name = "节点责任人联系方式", width = 15) + @ApiModelProperty(value = "节点责任人联系方式") + private String chargerPhone; /** * 节点失效标记:0-有效、1-失效 */ 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 9074264..a420471 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 @@ -161,4 +161,11 @@ public class ProjectSubItem implements Serializable { @Excel(name = "工程sn", width = 15) @ApiModelProperty(value = "工程sn") private String engineeringSn; + + /** + * 审核状态(0:未审核通过;1:已审核通过) + */ + @Excel(name = "审核状态(0:未审核通过;1:已审核通过)", width = 15) + @ApiModelProperty(value = "审核状态(0:未审核通过;1:已审核通过)") + private Integer approvalStatus; } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/EnterpriseScoreServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/EnterpriseScoreServiceImpl.java index dd73793..bc6ae35 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/EnterpriseScoreServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/EnterpriseScoreServiceImpl.java @@ -77,11 +77,13 @@ public class EnterpriseScoreServiceImpl extends ServiceImpl pageList(Page page, QueryWrapper wrapper) { - wrapper.eq("parent_id", 0); + wrapper.lambda().eq(ProjectSubItem::getParentId, 0); + wrapper.lambda().orderByAsc(ProjectSubItem::getPlanStartTime); Page pageList = PageUtil.copyProperties(baseMapper.selectPage(page, wrapper), ProjectSubItemDto.class); List records = pageList.getRecords(); build(records); @@ -78,7 +79,8 @@ public class ProjectSubItemServiceImpl extends ServiceImpl pageParentList(Page page, QueryWrapper wrapper) { - wrapper.eq("parent_id", 0); + wrapper.lambda().eq(ProjectSubItem::getParentId, 0); + wrapper.lambda().orderByAsc(ProjectSubItem::getPlanStartTime); Page pageList = baseMapper.selectPage(page, wrapper); build1(pageList.getRecords()); return pageList; @@ -86,7 +88,9 @@ public class ProjectSubItemServiceImpl extends ServiceImpl getList(QueryWrapper wrapper) { - wrapper.eq("parent_id", 0); + wrapper.lambda().eq(ProjectSubItem::getApprovalStatus, 1); + wrapper.lambda().eq(ProjectSubItem::getParentId, 0); + wrapper.lambda().orderByAsc(ProjectSubItem::getPlanStartTime); List records = PageUtil.copyProperties(baseMapper.selectList(wrapper), ProjectSubItemDto.class); build(records); return records; @@ -283,13 +287,13 @@ public class ProjectSubItemServiceImpl extends ServiceImpl 0){ - if (task.getPercentageComplete().intValue() == 100 || (actualFinishDate != null && actualFinishDate.getTime() <= System.currentTimeMillis())) { - projectSubItem.setState(6); - } else if (task.getPercentageComplete().intValue() == 0 || actualStartDate == null || actualStartDate.getTime() > System.currentTimeMillis()) { +// if (task.getPercentageComplete().intValue() == 100 || (actualFinishDate != null && actualFinishDate.getTime() <= System.currentTimeMillis())) { +// projectSubItem.setState(6); +// } else if (task.getPercentageComplete().intValue() == 0 || actualStartDate == null || actualStartDate.getTime() > System.currentTimeMillis()) { +// projectSubItem.setState(4); +// } else { projectSubItem.setState(4); - } else { - projectSubItem.setState(5); - } +// } } else if (task.getPercentageComplete().intValue() == 100 || (actualFinishDate != null && actualFinishDate.getTime() <= System.currentTimeMillis())) { projectSubItem.setState(3); } else if (task.getPercentageComplete().intValue() == 0 || actualStartDate == null || actualStartDate.getTime() > System.currentTimeMillis()) { diff --git a/src/main/resources/magic/api/惠州项目管理政务版/在建项目指标.ms b/src/main/resources/magic/api/惠州项目管理政务版/在建项目指标.ms index 76e4e43..e229bfd 100644 --- a/src/main/resources/magic/api/惠州项目管理政务版/在建项目指标.ms +++ b/src/main/resources/magic/api/惠州项目管理政务版/在建项目指标.ms @@ -5,7 +5,7 @@ "groupId" : "1f3d3e5b9fe340bab84de67b0de08f44", "name" : "在建项目指标", "createTime" : null, - "updateTime" : 1688352901714, + "updateTime" : 1689678565388, "lock" : null, "createBy" : null, "updateBy" : "admin", @@ -34,4 +34,4 @@ "responseBodyDefinition" : null } ================================ -return db.selectOne("SELECT IFNULL(SUM(IF(major_project_type = 1, 1, 0)), 0) importance, IFNULL(SUM(IF(project_type = 1 AND state = 1, 1, 0)), 0) bridge, IFNULL(SUM(IF(project_type = 2 AND state = 1, 1, 0)), 0) tunnel, IFNULL(SUM(IF(project_type = 3 AND state = 1, 1, 0)), 0) station, IFNULL(SUM(IF(build_status in (0,1), 1, 0)), 0) newBuild, IFNULL(SUM(IF(build_status = 5, 1, 0)), 0) reBuild, IFNULL(SUM(IF(build_status = 6, 1, 0)), 0) extension, IFNULL(SUM(IF(build_status in (1, 5, 6), 1, 0)), 0) total, IFNULL(SUM(IF(build_status = 4, 1, 0)), 0) finished, IFNULL(SUM(IF(build_status = 2, 1, 0)), 0) shutdown, IFNULL(SUM(IF(build_status in (1, 2, 4), 1, 0)), 0) total1 FROM project WHERE #project ") \ No newline at end of file +return db.selectOne("SELECT IFNULL(SUM(IF(major_project_type = 1 AND state = 1, 1, 0)), 0) importance, IFNULL(SUM(IF(project_type = 1 AND state = 1, 1, 0)), 0) bridge, IFNULL(SUM(IF(project_type = 2 AND state = 1, 1, 0)), 0) tunnel, IFNULL(SUM(IF(project_type = 3 AND state = 1, 1, 0)), 0) station, IFNULL(SUM(IF(build_status in (0,1) AND state = 1, 1, 0)), 0) newBuild, IFNULL(SUM(IF(build_status = 5, 1, 0)), 0) reBuild, IFNULL(SUM(IF(build_status = 6, 1, 0)), 0) extension, IFNULL(SUM(IF(build_status in (0, 1, 5, 6) AND state = 1, 1, 0)), 0) total, IFNULL(SUM(IF(build_status = 4, 1, 0)), 0) finished, IFNULL(SUM(IF(build_status = 2, 1, 0)), 0) shutdown, IFNULL(SUM(IF(build_status in (1, 2, 4), 1, 0)), 0) total1 FROM project WHERE #project ") \ No newline at end of file diff --git a/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms b/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms index f3fd151..242c729 100644 --- a/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms +++ b/src/main/resources/magic/api/惠州项目管理政务版/投资管理.ms @@ -5,7 +5,7 @@ "groupId" : "1f3d3e5b9fe340bab84de67b0de08f44", "name" : "投资管理", "createTime" : null, - "updateTime" : 1688970096225, + "updateTime" : 1689561440845, "lock" : null, "createBy" : "admin", "updateBy" : "admin", @@ -39,7 +39,8 @@ BigDecimal big = new BigDecimal(10000); result.put("paymentByMonth", paymentByMonth.divide(big)) result.put("applyAmountByMonth", applyAmountByMonth.divide(big)) result.put("realPayAmountByMonth", realPayAmountByMonth.divide(big)) -result.put("unPayAmountByMonth", applyAmountByMonth.subtract(realPayAmountByMonth).divide(big)) +var unPayAmountByMonth = applyAmountByMonth.subtract(realPayAmountByMonth); +result.put("unPayAmountByMonth", unPayAmountByMonth > 0 ? unPayAmountByMonth.divide(big) : 0) result.put("totalAmount", totalAmount.divide(big)) result.put("payRatio", realPayAmountTotal == 0 ? 0 : realPayAmountTotal.divide(totalAmount, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")).doubleValue())