From d4d6863b7d43b928afd552e15c151824a3bf143f Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Thu, 12 Dec 2024 18:53:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E5=A4=B4bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PouringOrderLedgerController.java | 91 ++++++----- .../baotou/entity/PouringOrderLedger.java | 147 +++++++++++------- .../mapper/PouringOrderLedgerMapper.java | 5 + .../mapper/xml/PouringOrderLedgerMapper.xml | 60 +++++-- .../controller/PlanMilestoneController.java | 10 ++ .../plan/service/IPlanMilestoneService.java | 3 + .../plan/service/IPlanRecordService.java | 4 +- .../impl/PlanMilestoneServiceImpl.java | 14 ++ .../service/impl/PlanRecordServiceImpl.java | 28 +++- .../service/IPouringOrderLedgerService.java | 6 + .../baotou/service/IUserModuleService.java | 3 + .../impl/PouringOrderLedgerServiceImpl.java | 60 +++++++ .../service/impl/UserModuleServiceImpl.java | 46 ++++-- .../controller/BaseModuleController.java | 10 +- .../modules/basicdata/entity/BaseModule.java | 4 + .../basicdata/service/IBaseModuleService.java | 16 +- .../service/impl/BaseMenuServiceImpl.java | 2 + .../service/impl/BaseModuleServiceImpl.java | 14 ++ .../service/impl/SystemUserServiceImpl.java | 2 + 19 files changed, 384 insertions(+), 141 deletions(-) diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/PouringOrderLedgerController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/PouringOrderLedgerController.java index 22c5abc48..c7bcfd44b 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/PouringOrderLedgerController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/PouringOrderLedgerController.java @@ -1,13 +1,11 @@ package com.zhgd.xmgl.modules.baotou.controller; -import cn.hutool.core.convert.Convert; import com.alibaba.fastjson.JSON; 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.baotou.service.IPouringOrderLedgerService; import com.zhgd.xmgl.modules.baotou.entity.PouringOrderLedger; -import com.zhgd.xmgl.util.FlowUtil; +import com.zhgd.xmgl.modules.baotou.service.IPouringOrderLedgerService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -19,7 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** @@ -42,8 +42,8 @@ public class PouringOrderLedgerController { * * @return */ - @OperLog(operModul = "浇筑令台账管理", operType = "分页查询", operDesc = "分页列表查询浇筑令台账信息") - @ApiOperation(value = "分页列表查询浇筑令台账信息", notes = "分页列表查询浇筑令台账信息", httpMethod = "GET") + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "分页查询", operDesc = "分页列表查询混凝土浇筑申请记录") + @ApiOperation(value = "分页列表查询混凝土浇筑申请记录", notes = "分页列表查询混凝土浇筑申请记录", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), @@ -58,8 +58,8 @@ public class PouringOrderLedgerController { * * @return */ - @OperLog(operModul = "浇筑令台账管理", operType = "列表查询", operDesc = "列表查询浇筑令台账信息") - @ApiOperation(value = "列表查询浇筑令台账信息", notes = "列表查询浇筑令台账信息", httpMethod = "GET") + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "列表查询", operDesc = "列表查询混凝土浇筑申请记录") + @ApiOperation(value = "列表查询混凝土浇筑申请记录", notes = "列表查询混凝土浇筑申请记录", httpMethod = "GET") @GetMapping(value = "/list") public Result> queryList(@ApiIgnore @RequestParam HashMap param) { return Result.success(pouringOrderLedgerService.queryList(param)); @@ -71,39 +71,14 @@ public class PouringOrderLedgerController { * @param pouringOrderLedger * @return */ - @OperLog(operModul = "浇筑令台账管理", operType = "添加", operDesc = "添加浇筑令台账信息") - @ApiOperation(value = "添加浇筑令台账信息", notes = "添加浇筑令台账信息", httpMethod = "POST") + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "添加", operDesc = "添加混凝土浇筑申请记录") + @ApiOperation(value = "添加混凝土浇筑申请记录", notes = "添加混凝土浇筑申请记录", httpMethod = "POST") @PostMapping(value = "/add") public Result add(@RequestBody @Validate PouringOrderLedger pouringOrderLedger) { pouringOrderLedgerService.add(pouringOrderLedger); return Result.ok(); } - @OperLog(operModul = "浇筑令台账管理", operType = "添加", operDesc = "工作流添加浇筑令台账信息") - @ApiOperation(value = "工作流添加浇筑令台账信息", notes = "工作流添加浇筑令台账信息", httpMethod = "POST") - @PostMapping(value = "/flow/add") - public Result addFromFlow(@RequestBody @Validate Map map) { - log.info("工作流添加浇筑令台账信息:{}", JSON.toJSONString(map)); - PouringOrderLedger ledger = new PouringOrderLedger(); - String concreteNumber = MapUtils.getString(map, "concreteNumber"); - Long device = FlowUtil.getPullDownLong(map, "device"); - String castingLocation = MapUtils.getString(map, "castingLocation"); - String plannedVolume = MapUtils.getString(map, "plannedVolume"); - String projectSn = MapUtils.getString(map, "projectSn"); - Long concreteSupplier = Optional.ofNullable(map.get("concreteSupplier")).map(o -> Convert.toLong(((List) o).get(0))).orElse(null); - Long projectGroupId = Optional.ofNullable(map.get("projectGroupId")).map(o -> Convert.toLong(((List) o).get(0))).orElse(null); - Long epcPcContractor = Optional.ofNullable(map.get("epcPcContractor")).map(o -> Convert.toLong(((List) o).get(0))).orElse(null); - ledger.setConcreteNumber(concreteNumber); - ledger.setDevice(device); - ledger.setCastingLocation(castingLocation); - ledger.setConcreteSupplier(concreteSupplier); - ledger.setProjectGroupId(projectGroupId); - ledger.setEpcPcContractor(epcPcContractor); - ledger.setPlannedVolume(plannedVolume); - ledger.setProjectSn(projectSn); - pouringOrderLedgerService.add(ledger); - return Result.ok(); - } /** * 编辑 @@ -111,8 +86,8 @@ public class PouringOrderLedgerController { * @param pouringOrderLedger * @return */ - @OperLog(operModul = "浇筑令台账管理", operType = "编辑", operDesc = "编辑浇筑令台账信息") - @ApiOperation(value = "编辑浇筑令台账信息", notes = "编辑浇筑令台账信息", httpMethod = "POST") + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "编辑", operDesc = "编辑混凝土浇筑申请记录") + @ApiOperation(value = "编辑混凝土浇筑申请记录", notes = "编辑混凝土浇筑申请记录", httpMethod = "POST") @PostMapping(value = "/edit") public Result edit(@RequestBody PouringOrderLedger pouringOrderLedger) { pouringOrderLedgerService.edit(pouringOrderLedger); @@ -124,8 +99,8 @@ public class PouringOrderLedgerController { * * @return */ - @OperLog(operModul = "浇筑令台账管理", operType = "删除", operDesc = "删除浇筑令台账信息") - @ApiOperation(value = "删除浇筑令台账信息", notes = "删除浇筑令台账信息", httpMethod = "POST") + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "删除", operDesc = "删除混凝土浇筑申请记录") + @ApiOperation(value = "删除混凝土浇筑申请记录", notes = "删除混凝土浇筑申请记录", httpMethod = "POST") @ApiImplicitParam(name = "id", value = "浇筑令台账ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") @PostMapping(value = "/delete") public Result delete(@ApiIgnore @RequestBody HashMap map) { @@ -139,12 +114,46 @@ public class PouringOrderLedgerController { * @param id * @return */ - @OperLog(operModul = "浇筑令台账管理", operType = "通过id查询", operDesc = "通过id查询浇筑令台账信息") - @ApiOperation(value = "通过id查询浇筑令台账信息", notes = "通过id查询浇筑令台账信息", httpMethod = "GET") + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "通过id查询", operDesc = "通过id查询混凝土浇筑申请记录") + @ApiOperation(value = "通过id查询混凝土浇筑申请记录", notes = "通过id查询混凝土浇筑申请记录", httpMethod = "GET") @ApiImplicitParam(name = "id", value = "浇筑令台账ID", paramType = "query", required = true, dataType = "Integer") @GetMapping(value = "/queryById") public Result queryById(@RequestParam(name = "id", required = true) String id) { return Result.success(pouringOrderLedgerService.queryById(id)); } + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "添加", operDesc = "工作流添加混凝土浇筑申请记录") + @ApiOperation(value = "工作流添加混凝土浇筑申请记录", notes = "工作流添加混凝土浇筑申请记录", httpMethod = "POST") + @PostMapping(value = "/flow/add") + public Result addFromFlow(@RequestBody @Validate Map map) { + log.info("工作流添加混凝土浇筑申请记录:{}", JSON.toJSONString(map)); + pouringOrderLedgerService.addFromFlow(map); + return Result.ok(); + } + + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "", operDesc = "统计供应站") + @ApiOperation(value = "统计供应站", notes = "统计供应站", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"), + }) + @GetMapping(value = "/countSupplyStation") + public Result> countSupplyStation(@ApiIgnore @RequestParam HashMap param) { + return Result.success(pouringOrderLedgerService.countSupplyStation(param)); + } + + @OperLog(operModul = "混凝土浇筑申请记录管理", operType = "", operDesc = "查询统计供应站详情") + @ApiOperation(value = "查询统计供应站详情", notes = "查询统计供应站详情", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"), + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "levelType", value = "时间级别:1月2年", paramType = "query", required = true, dataType = "String"), + @ApiImplicitParam(name = "month", value = "月", paramType = "query", required = false, dataType = "String"), + @ApiImplicitParam(name = "year", value = "年", paramType = "query", required = false, dataType = "String"), + }) + @GetMapping(value = "/getCountSupplyStationDetails") + public Result> getCountSupplyStationDetails(@ApiIgnore @RequestParam HashMap param) { + return Result.success(pouringOrderLedgerService.getCountSupplyStationDetails(param)); + } + } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/PouringOrderLedger.java b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/PouringOrderLedger.java index f0d62cdc6..614cbaeae 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/PouringOrderLedger.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/PouringOrderLedger.java @@ -22,83 +22,99 @@ import io.swagger.annotations.ApiModelProperty; @TableName("pouring_order_ledger") @ApiModel(value="PouringOrderLedger实体类",description="PouringOrderLedger") public class PouringOrderLedger implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; /**id*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value="id") + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value="id") private java.lang.Long id ; - /**浇筑合编号*/ - @Excel(name = "浇筑合编号", width = 15) - @ApiModelProperty(value="浇筑合编号") + /**编号*/ + @ApiModelProperty(value="编号") private java.lang.String castingNumber ; - /** - * 混泥土编号 - */ - @Excel(name = "混泥土编号", width = 15) - @ApiModelProperty(value = "混泥土编号") - private java.lang.String concreteNumber; - /** - * 装置 - */ - @Excel(name = "装置", width = 15) - @ApiModelProperty(value = "装置") - private java.lang.Long device; - /** - * 浇筑部位 - */ - @Excel(name = "浇筑部位", width = 15) - @ApiModelProperty(value = "浇筑部位") - private java.lang.String castingLocation; - /**混凝土供应商*/ - @Excel(name = "混凝土供应商", width = 15) - @ApiModelProperty(value="混凝土供应商") - private java.lang.Long concreteSupplier ; + /**装置*/ + @ApiModelProperty(value="装置") + private java.lang.Long device ; /**项目组id*/ - @Excel(name = "项目组id", width = 15) - @ApiModelProperty(value="项目组id") + @ApiModelProperty(value="项目组id") private java.lang.Long projectGroupId ; + /**监理单位id*/ + @ApiModelProperty(value="监理单位id") + private java.lang.Long supervisor ; /**EPC/PC承包商*/ - @Excel(name = "EPC/PC承包商", width = 15) - @ApiModelProperty(value="EPC/PC承包商") + @ApiModelProperty(value="EPC/PC承包商") private java.lang.Long epcPcContractor ; - /**计划方量*/ - @Excel(name = "计划方量", width = 15) - @ApiModelProperty(value="计划方量") - private java.lang.String plannedVolume ; + /**浇筑部位*/ + @ApiModelProperty(value="浇筑部位") + private java.lang.String castingLocation ; + /**浇筑开始时间*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value="浇筑开始时间") + private java.util.Date pouringBeginTime ; + /**浇筑结束时间*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value="浇筑结束时间") + private java.util.Date pouringEndTime ; + /**明细表*/ + @ApiModelProperty(value="明细表") + private java.lang.String detail ; + /**施工员*/ + @ApiModelProperty(value="施工员") + private java.lang.Long constructionWorker ; + /**施工员日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value="施工员日期") + private java.util.Date constructionDate ; /**项目sn*/ - @Excel(name = "项目sn", width = 15) - @ApiModelProperty(value="项目sn") + @ApiModelProperty(value="项目sn") private java.lang.String projectSn ; /**创建时间 yyyy-MM-dd HH:mm:ss*/ - @Excel(name = "创建时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value="创建时间 yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value="创建时间 yyyy-MM-dd HH:mm:ss") private java.util.Date createTime ; /**更新时间 yyyy-MM-dd HH:mm:ss*/ - @Excel(name = "更新时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value="更新时间 yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value="更新时间 yyyy-MM-dd HH:mm:ss") private java.util.Date updateTime ; - /**浇筑开始时间 yyyy-MM-dd HH:mm:ss*/ - @Excel(name = "浇筑开始时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value="浇筑开始时间 yyyy-MM-dd HH:mm:ss") - private java.util.Date pouringBeginTime ; - /**浇筑结束时间 yyyy-MM-dd HH:mm:ss*/ - @Excel(name = "浇筑结束时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss") - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value="浇筑结束时间 yyyy-MM-dd HH:mm:ss") - private java.util.Date pouringEndTime ; - /**状态:1未浇筑;2已浇筑;*/ - @Excel(name = "状态:1未浇筑;2已浇筑;", width = 15) @ApiModelProperty(value="状态:1未浇筑;2已浇筑;") - private java.lang.Integer status; + private java.lang.Integer status ; + /**配合比*/ + @ApiModelProperty(value="配合比") + private java.lang.String mixProportion ; + /**设计坍落度*/ + @ApiModelProperty(value="设计坍落度") + private java.lang.String designSlump ; + /**预计浇筑量*/ + @ApiModelProperty(value="预计浇筑量") + private java.math.BigDecimal estimatedPouringVolume ; + /**施工值班负责人*/ + @ApiModelProperty(value="施工值班负责人") + private java.lang.Long constructionShiftSupervisor ; + /**设计强度值*/ + @ApiModelProperty(value="设计强度值") + private java.lang.String designStrength ; + /**施工缝预留位置*/ + @ApiModelProperty(value="施工缝预留位置") + private java.lang.String constructionJointReservePosition ; + /**人料机准备情况*/ + @ApiModelProperty(value="人料机准备情况") + private java.lang.String manpowerMachineReadiness ; + /**供应站*/ + @ApiModelProperty(value="供应站") + private java.lang.String supplyStation ; + /**专业监理工程师*/ + @ApiModelProperty(value="专业监理工程师") + private java.lang.Long professionalSupervisionEngineer ; + /**专业监理工程师日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value="专业监理工程师日期") + private java.util.Date professionalSupervisionEngineerDate ; @TableField(exist = false) @ApiModelProperty(value = "项目组名称") @@ -109,8 +125,19 @@ public class PouringOrderLedger implements Serializable { @TableField(exist = false) @ApiModelProperty(value = "EPC/PC承包商名称") private java.lang.String epcPcContractorName; - @TableField(exist = false) @ApiModelProperty(value = "装置名称") private java.lang.String deviceName; + @TableField(exist = false) + @ApiModelProperty(value="监理单位名称") + private java.lang.String supervisorName ; + @TableField(exist = false) + @ApiModelProperty(value="施工员名称") + private java.lang.String constructionWorkerName ; + @TableField(exist = false) + @ApiModelProperty(value="施工值班负责人名称") + private java.lang.String constructionShiftSupervisorName ; + @TableField(exist = false) + @ApiModelProperty(value="专业监理工程师名称") + private java.lang.String professionalSupervisionEngineerName ; } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/PouringOrderLedgerMapper.java b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/PouringOrderLedgerMapper.java index e5a33681a..6a82c1eda 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/PouringOrderLedgerMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/PouringOrderLedgerMapper.java @@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -29,4 +30,8 @@ public interface PouringOrderLedgerMapper extends BaseMapper PouringOrderLedger getById(String id); List countPouringEnterprise(Map map); + + List countSupplyStation(HashMap param); + + List> getCountSupplyStationDetail(HashMap param); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/PouringOrderLedgerMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/PouringOrderLedgerMapper.xml index aa5ba85c7..d26fe80ef 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/PouringOrderLedgerMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/PouringOrderLedgerMapper.xml @@ -1,18 +1,23 @@ - @@ -20,14 +25,20 @@ @@ -42,4 +53,35 @@ where 1 = 1 and pol.project_sn = #{projectSn} group by ei.id + + + + diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanMilestoneController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanMilestoneController.java index f5ebc7f92..c7eca4686 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanMilestoneController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanMilestoneController.java @@ -147,4 +147,14 @@ public class PlanMilestoneController { return Result.success(p); } + @OperLog(operModul = "进度里程碑管理", operType = "分页查询", operDesc = "分页列表查询最近上级的wps进度里程碑信息") + @ApiOperation(value = "分页列表查询最近上级的wps进度里程碑信息", notes = "分页列表查询最近上级的wps进度里程碑信息", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + }) + @GetMapping(value = "/xxxx") + public Object dxxfsds(@ApiIgnore @RequestParam HashMap param) { + return planMilestoneService.xxx(MapUtils.getLong(param, "")); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanMilestoneService.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanMilestoneService.java index b9e7fc557..4314c8b6f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanMilestoneService.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanMilestoneService.java @@ -56,4 +56,7 @@ public interface IPlanMilestoneService extends IService { List getParentMilestones(PlanRecord record, List allPlanMilestones); + boolean checkHaveMilestone(Long recordId); + + Object xxx(Long recordId); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanRecordService.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanRecordService.java index f19795f89..3f2c89717 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanRecordService.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanRecordService.java @@ -66,7 +66,9 @@ public interface IPlanRecordService extends IService { IPage queryTreePage(HashMap param); - List getWorkChildren(String recordId); + List getWorkChildren(Long recordId); + + List getChildren(Long recordId); List getPlanShares(Map param); diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanMilestoneServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanMilestoneServiceImpl.java index 5e29af0e9..f65b309fb 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanMilestoneServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanMilestoneServiceImpl.java @@ -161,5 +161,19 @@ public class PlanMilestoneServiceImpl extends ServiceImpl(); } + @Override + public boolean checkHaveMilestone(Long recordId) { + List records = planRecordService.getChildren(recordId); + List rids = records.stream().map(PlanRecord::getId).collect(Collectors.toList()); + List milestones = planMilestoneMapper.selectList(new LambdaQueryWrapper() + .in(PlanMilestone::getRecordId, rids)); + return CollUtil.isNotEmpty(milestones); + } + + @Override + public Object xxx(Long recordId) { + return planRecordService.getChildren(recordId); + } + } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java index 0d5b00f07..912cfe52b 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java @@ -242,13 +242,18 @@ public class PlanRecordServiceImpl extends ServiceImpl getWorkChildren(String recordId) { - return baseMapper.getChildren(Long.valueOf(recordId)).stream().filter(o -> o.getWorkType() == 1).collect(Collectors.toList()); + public List getWorkChildren(Long recordId) { + return baseMapper.getChildren(recordId).stream().filter(o -> o.getWorkType() == 1).collect(Collectors.toList()); + } + + @Override + public List getChildren(Long recordId) { + return baseMapper.getChildren(recordId); } @Override public List getPlanShares(Map param) { - String recordId = MapUtils.getString(param, "recordId"); + Long recordId = MapUtils.getLong(param, "recordId"); String beginDate = MapUtils.getString(param, "periodStart"); String endDate = MapUtils.getString(param, "periodEnd"); List feedbackPeriods = new ArrayList<>(); @@ -264,7 +269,7 @@ public class PlanRecordServiceImpl extends ServiceImpl planRecords = planRecordMapper.selectList(new LambdaQueryWrapper().eq(PlanRecord::getProjectSn, projectSn)); //判断是否最后一级wbs,是的话需要显示里程碑 - List children = baseMapper.getChildren(Long.valueOf(recordId)); + List children = baseMapper.getChildren(recordId); children.add(record); List trees = BeanUtil.copyToList(ListUtils.listToTree(JSONArray.parseArray(JSON.toJSONString(children)), "id", "parentId", "children"), PlanRecord.class); Map map = this.getChildFeedbackPeriodMap(trees.get(0), planRecords, milestones, planPeriod); @@ -280,6 +285,15 @@ public class PlanRecordServiceImpl extends ServiceImpl DateUtil.compare(DateUtil.parseDate(endDate), o.getPeriodStart()) >= 0).collect(Collectors.toList()); } } + if (record.getWorkType() == 2) { + boolean have = planMilestoneService.checkHaveMilestone(recordId); + if (have) { + //去掉里程碑 + for (PlanFeedbackPeriod period : feedbackPeriods) { + period.setMilestoneVals(new ArrayList<>()); + } + } + } return feedbackPeriods; } @@ -346,14 +360,14 @@ public class PlanRecordServiceImpl extends ServiceImpl entry : startMap.entrySet()) { PlanFeedbackPeriod period = entry.getValue(); - if (BigDecimal.ZERO.compareTo(child.getWeight()) != 0) { + if (child.getWeight() != null && !NumberUtil.equals(BigDecimal.ZERO, child.getWeight())) { period.setPlanPer(NumberUtil.mul(new BigDecimal("100"), NumberUtil.div(period.getPlanYdz(), child.getWeight(), 2))); period.setActualPer(NumberUtil.mul(new BigDecimal("100"), NumberUtil.div(period.getActualYdz(), child.getWeight(), 2))); } } for (Map.Entry entry : startMap1.entrySet()) { PlanFeedbackPeriod period = entry.getValue(); - if (BigDecimal.ZERO.compareTo(child.getWeight()) != 0) { + if (child.getWeight() != null && !NumberUtil.equals(BigDecimal.ZERO, child.getWeight())) { period.setPlanPer(NumberUtil.mul(new BigDecimal("100"), NumberUtil.div(period.getPlanYdz(), child.getWeight(), 2))); period.setActualPer(NumberUtil.mul(new BigDecimal("100"), NumberUtil.div(period.getActualYdz(), child.getWeight(), 2))); } @@ -541,7 +555,7 @@ public class PlanRecordServiceImpl extends ServiceImpl entry : startMap.entrySet()) { PlanFeedbackPeriod period = entry.getValue(); - if (BigDecimal.ZERO.compareTo(child.getWeight()) != 0) { + if (child.getWeight() != null && BigDecimal.ZERO.compareTo(child.getWeight()) != 0) { period.setPlanPer(NumberUtil.mul(new BigDecimal("100"), NumberUtil.div(period.getPlanYdz(), child.getWeight(), 2))); period.setActualPer(NumberUtil.mul(new BigDecimal("100"), NumberUtil.div(period.getActualYdz(), child.getWeight(), 2))); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/IPouringOrderLedgerService.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/IPouringOrderLedgerService.java index 1fd130f15..0d329bf72 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/IPouringOrderLedgerService.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/IPouringOrderLedgerService.java @@ -55,4 +55,10 @@ public interface IPouringOrderLedgerService extends IService String getNextCastingNumber(String projectSn); List countPouringEnterprise(Map map); + + void addFromFlow(Map map); + + List countSupplyStation(HashMap param); + + Map getCountSupplyStationDetails(HashMap param); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/IUserModuleService.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/IUserModuleService.java index 5de38dcf0..3f2b8332a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/IUserModuleService.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/IUserModuleService.java @@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.baotou.service; import com.zhgd.xmgl.modules.baotou.entity.UserModule; import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.core.metadata.IPage; +import org.json.JSONObject; import java.util.HashMap; import java.util.List; @@ -52,4 +53,6 @@ public interface IUserModuleService extends IService { UserModule queryById(String id); void saveUserModules(List moduleIdList, int type); + void saveAppUserModules(List modules); + } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/PouringOrderLedgerServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/PouringOrderLedgerServiceImpl.java index fd8b90f44..db28ffcb7 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/PouringOrderLedgerServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/PouringOrderLedgerServiceImpl.java @@ -1,5 +1,9 @@ package com.zhgd.xmgl.modules.baotou.service.impl; +import java.math.BigDecimal; +import java.util.Date; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.convert.Convert; import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -11,7 +15,9 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.base.entity.vo.TrendOneVo; import com.zhgd.xmgl.modules.baotou.entity.PouringOrderLedger; import com.zhgd.xmgl.modules.baotou.mapper.PouringOrderLedgerMapper; +import com.zhgd.xmgl.modules.baotou.plan.entity.PlanFeedbackPeriod; import com.zhgd.xmgl.modules.baotou.service.IPouringOrderLedgerService; +import com.zhgd.xmgl.util.FlowUtil; import com.zhgd.xmgl.util.PageUtil; import com.zhgd.xmgl.util.RefUtil; import org.apache.commons.lang3.StringUtils; @@ -111,4 +117,58 @@ public class PouringOrderLedgerServiceImpl extends ServiceImpl map) { + PouringOrderLedger e = new PouringOrderLedger(); + e.setCastingNumber(FlowUtil.getString(map,"castingNumber")); + e.setDevice(FlowUtil.getPullDownLong(map,"device")); + e.setProjectGroupId(FlowUtil.getPullDownLong(map,"projectGroupId")); + e.setSupervisor(FlowUtil.getPullDownLong(map,"supervisor")); + e.setEpcPcContractor(FlowUtil.getPullDownLong(map,"epcPcContractor")); + e.setCastingLocation(FlowUtil.getString(map,"castingLocation")); + e.setPouringBeginTime(FlowUtil.getStartDate(map,"pouringPeriod")); + e.setPouringEndTime(FlowUtil.getEndDate(map,"pouringPeriod")); + e.setDetail(FlowUtil.getJSONString(map,"detail")); + e.setConstructionWorker(FlowUtil.getPullDownLong(map,"constructionWorker")); + e.setConstructionDate(FlowUtil.getDate(map,"constructionDate")); + e.setProjectSn(FlowUtil.getString(map,"projectSn")); + e.setStatus(FlowUtil.getPullDownInteger(map,"status")); + e.setMixProportion(FlowUtil.getString(map,"mixProportion")); + e.setDesignSlump(FlowUtil.getString(map,"designSlump")); + e.setEstimatedPouringVolume(Convert.toBigDecimal(map.get("estimatedPouringVolume"))); + e.setConstructionShiftSupervisor(FlowUtil.getPullDownLong(map,"constructionShiftSupervisor")); + e.setDesignStrength(FlowUtil.getString(map,"designStrength")); + e.setConstructionJointReservePosition(FlowUtil.getString(map,"constructionJointReservePosition")); + e.setManpowerMachineReadiness(FlowUtil.getString(map,"manpowerMachineReadiness")); + e.setSupplyStation(FlowUtil.getString(map,"supplyStation")); + e.setProfessionalSupervisionEngineer(FlowUtil.getPullDownLong(map,"professionalSupervisionEngineer")); + e.setProfessionalSupervisionEngineerDate(FlowUtil.getDate(map,"professionalSupervisionEngineerDate")); + baseMapper.insert(e); + } + + @Override + public List countSupplyStation(HashMap param) { + return baseMapper.countSupplyStation(param); + } + + @Override + public Map getCountSupplyStationDetails(HashMap param) { + List> periodMilestones = baseMapper.getCountSupplyStationDetail(param); + int pageNo = Integer.parseInt(param.getOrDefault("pageNo", 1).toString()); + int pageSize = Integer.parseInt(param.getOrDefault("pageSize", 10).toString()); + if (pageSize < 0) { + pageSize = Integer.MAX_VALUE; + } + int i = cn.hutool.core.util.PageUtil.getStart(pageNo - 1, pageSize); + List> records = CollUtil.sub(periodMilestones, i, i + pageSize); + IPage> p = new Page<>(); + p.setTotal(periodMilestones.size()); + p.setRecords(records); + p.setCurrent(pageNo); + p.setSize(pageSize); + Map rt = new HashMap<>(); + rt.put("page", p); + return rt; + } + } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/UserModuleServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/UserModuleServiceImpl.java index 6886edeb6..9d8325e72 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/UserModuleServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/UserModuleServiceImpl.java @@ -1,39 +1,43 @@ package com.zhgd.xmgl.modules.baotou.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; +import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.redis.lock.redisson.DistributedLock; import com.zhgd.xmgl.modules.baotou.entity.UserModule; import com.zhgd.xmgl.modules.baotou.mapper.UserModuleMapper; import com.zhgd.xmgl.modules.baotou.service.IUserModuleService; import com.zhgd.xmgl.security.util.SecurityUtils; -import org.springframework.stereotype.Service; -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.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.util.PageUtil; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.zhgd.xmgl.util.RefUtil; +import org.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + import java.util.HashMap; import java.util.List; -import com.zhgd.xmgl.util.RefUtil; -import org.springframework.beans.factory.annotation.Autowired; +import java.util.Objects; /** * @Description: 账号常用模块 * @author: pds - * @date: 2024-10-18 + * @date: 2024-10-18 * @version: V1.0 */ @Service public class UserModuleServiceImpl extends ServiceImpl implements IUserModuleService { @Autowired private UserModuleMapper userModuleMapper; + @Override public IPage queryPageList(HashMap param) { QueryWrapper queryWrapper = this.getQueryWrapper(param); Page page = PageUtil.getPage(param); - IPage pageList = baseMapper.queryList(page, queryWrapper,param); + IPage pageList = baseMapper.queryList(page, queryWrapper, param); pageList.setRecords(this.dealList(pageList.getRecords())); return pageList; } @@ -41,7 +45,7 @@ public class UserModuleServiceImpl extends ServiceImpl queryList(HashMap param) { QueryWrapper queryWrapper = getQueryWrapper(param); - return dealList(baseMapper.queryList(queryWrapper,param)); + return dealList(baseMapper.queryList(queryWrapper, param)); } private QueryWrapper getQueryWrapper(HashMap param) { @@ -63,7 +67,7 @@ public class UserModuleServiceImpl extends ServiceImpl moduleIdList, int type) { Long userId = SecurityUtils.getUser().getUserId(); - this.doSaveUserModules(moduleIdList, userId,type); + this.doSaveUserModules(moduleIdList, userId, type); + } + + @Override + public void saveAppUserModules(List modules) { + Long userId = SecurityUtils.getUser().getUserId(); + userModuleMapper.delete(new LambdaQueryWrapper() + .eq(UserModule::getUserId, userId)); + for (JSONObject l : modules) { + UserModule userModule = new UserModule(); + userModule.setUserId(userId); + userModule.setModuleId(Objects.equals(l.getInt("isMenu"), 1) ? l.getLong("menuId") : l.getLong("moduleId")); + userModule.setType(2); + baseMapper.insert(userModule); + } } @DistributedLock(keyPrefix = "doSaveUserModules:", key = "#userId", tryLok = true, lockTime = 0) diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/BaseModuleController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/BaseModuleController.java index 2e12a40cb..47fd9458a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/BaseModuleController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/BaseModuleController.java @@ -19,6 +19,7 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.MapUtils; +import org.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.web.bind.annotation.*; @@ -245,9 +246,8 @@ public class BaseModuleController { @ApiOperation(value = "列表查询账号常用模块信息app使用", notes = "列表查询账号常用模块信息app使用", httpMethod = "GET") @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = false, dataType = "String") @GetMapping(value = "/queryAppUserModuleList") - public Result> queryUserModuleList(@ApiIgnore @RequestParam HashMap param) { - param.put("type", 2); - return Result.success(baseModuleService.queryUserModuleList(param)); + public Result> queryAppUserModuleList(@ApiIgnore @RequestParam HashMap param) { + return Result.success(baseModuleService.queryAppUserModuleList(param)); } @ApiOperation(value = "列查询所有的模块列表app使用", notes = "列查询所有的模块列表app使用", httpMethod = "POST") @@ -263,8 +263,8 @@ public class BaseModuleController { @ApiOperation(value = "保存账号常用模块信息app使用", notes = "保存账号常用模块信息app使用", httpMethod = "POST") @PostMapping(value = "/saveAppUserModules") - public Result saveUserModules(@RequestBody @ApiIgnore List moduleIdList) { - userModuleService.saveUserModules(moduleIdList,2); + public Result saveAppUserModules(@RequestBody @ApiIgnore List modules) { + userModuleService.saveAppUserModules(modules); return Result.ok(); } } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseModule.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseModule.java index 69f31fb49..25ec1ba75 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseModule.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/BaseModule.java @@ -99,4 +99,8 @@ public class BaseModule implements Serializable { @TableField(exist = false) @ApiModelProperty(value = "模块所属菜单") private List menuList; + @TableField(exist = false) + private java.lang.Long menuId ; + @TableField(exist = false) + private java.lang.Integer isMenu ; } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IBaseModuleService.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IBaseModuleService.java index d0e47738d..f19eaeb55 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IBaseModuleService.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/IBaseModuleService.java @@ -1,9 +1,9 @@ package com.zhgd.xmgl.modules.basicdata.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.zhgd.xmgl.modules.basicdata.entity.dto.ModuleListPageDto; -import com.zhgd.xmgl.modules.basicdata.entity.BaseModule; import com.baomidou.mybatisplus.extension.service.IService; +import com.zhgd.xmgl.modules.basicdata.entity.BaseModule; +import com.zhgd.xmgl.modules.basicdata.entity.dto.ModuleListPageDto; import java.util.HashMap; import java.util.List; @@ -12,12 +12,13 @@ import java.util.Map; /** * @Description: 模块 * @author: pds - * @date: 2020-10-12 + * @date: 2020-10-12 * @version: V1.0 */ public interface IBaseModuleService extends IService { /** * 查询总企业默认的模块列表 + * * @param map * @return */ @@ -25,12 +26,14 @@ public interface IBaseModuleService extends IService { /** * 查询企业下项目默认的模块列表 + * * @param map * @return */ List getProjectModuleList(Map map); - /**查询企业用户配置的模块列表 + /** + * 查询企业用户配置的模块列表 * * @param map * @return @@ -39,6 +42,7 @@ public interface IBaseModuleService extends IService { /** * 列表查询所有模块信息 + * * @param map * @return */ @@ -46,6 +50,7 @@ public interface IBaseModuleService extends IService { /** * 分页列表查询所有模块信息 + * * @param dto * @return */ @@ -54,6 +59,7 @@ public interface IBaseModuleService extends IService { /** * 查询项目配置的模块和菜单列表 + * * @param paramMap * @return */ @@ -61,5 +67,7 @@ public interface IBaseModuleService extends IService { List queryUserModuleList(HashMap param); + List queryAppUserModuleList(HashMap param); + Map getModuleAndMenuListForApp(HashMap paramMap); } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/BaseMenuServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/BaseMenuServiceImpl.java index 2983099d1..398686c56 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/BaseMenuServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/BaseMenuServiceImpl.java @@ -21,6 +21,7 @@ import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; @@ -73,6 +74,7 @@ public class BaseMenuServiceImpl extends ServiceImpl i } @Override + @Transactional(propagation = Propagation.NOT_SUPPORTED) public void fixAuthDistribute() { List baseMenus = baseMenuMapper.selectList(null); for (BaseMenu baseMenu : baseMenus) { diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/BaseModuleServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/BaseModuleServiceImpl.java index 80eda1e3c..b945b03e3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/BaseModuleServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/BaseModuleServiceImpl.java @@ -150,6 +150,20 @@ public class BaseModuleServiceImpl extends ServiceImpluserModuleMap.containsKey(o.getModuleId())).collect(Collectors.toList()); } + @Override + public List queryAppUserModuleList(HashMap param) { + param.put("userId", SecurityUtils.getUser().getUserId()); + param.put("moduleType", 2); + Map map = baseModuleService.getModuleAndMenuList(param); + List moduleList = (List) map.get("moduleList"); + if (CollUtil.isEmpty(moduleList)) { + return new ArrayList<>(); + } + param.put("type", 2); + Map userModuleMap = baseModuleMapper.queryUserModuleList(param).stream().collect(Collectors.toMap(BaseModule::getModuleId, Function.identity())); + return moduleList.stream().filter(o->userModuleMap.containsKey(o.getModuleId())).collect(Collectors.toList()); + } + @Override public Map getModuleAndMenuListForApp(HashMap paramMap) { paramMap.put("projectSn", defaultProjectSn); diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java index ada0b9158..4e0ae0341 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/service/impl/SystemUserServiceImpl.java @@ -1163,6 +1163,8 @@ public class SystemUserServiceImpl extends ServiceImpl