From 41bede65adc01283962d963a8bd4fea5ffa2b10c Mon Sep 17 00:00:00 2001 From: YUJT Date: Tue, 19 Apr 2022 14:19:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A8=E5=8A=9B=E4=B8=BB?= =?UTF-8?q?=E8=BD=B4=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/axis/PowerAxisStructLeaderDTO.java | 5 ++ .../form/PowerAxisStructLeaderFormDTO.java | 36 ++++++++++ .../PowerAxisStructLeaderResultDTO.java | 70 +++++++++++++++++++ .../controller/PowerAxisStructController.java | 30 +++++--- .../modules/axis/dao/PowerAxisStructDao.java | 17 ++++- .../entity/PowerAxisStructLeaderEntity.java | 5 ++ .../axis/service/PowerAxisStructService.java | 13 +++- .../impl/PowerAxisStructServiceImpl.java | 6 ++ .../mapper/poweraxis/PowerAxisStructDao.xml | 28 ++++++++ .../poweraxis/PowerAxisStructLeaderDao.xml | 1 + 10 files changed, 199 insertions(+), 12 deletions(-) create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java create mode 100644 epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisStructLeaderResultDTO.java diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructLeaderDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructLeaderDTO.java index e97bb1b..2838629 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructLeaderDTO.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructLeaderDTO.java @@ -31,6 +31,11 @@ public class PowerAxisStructLeaderDTO implements Serializable { */ private String structReferenceId; + /** + * 类别编码 + */ + private String categoryCode; + /** * 负责人ID */ diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java new file mode 100644 index 0000000..b71d1db --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.plugin.power.dto.axis.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 动力主轴负责人查询条件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-19 + */ +@Data +public class PowerAxisStructLeaderFormDTO implements Serializable { + + private static final long serialVersionUID = 5824335172425203790L; + + /** + * 组织ID + */ + private String agencyId; + + /** + * 动力主轴节点名称 + */ + private String axisName; + + /** + * 动力主轴节点负责人 + */ + private String leaderName; + + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisStructLeaderResultDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisStructLeaderResultDTO.java new file mode 100644 index 0000000..42ae015 --- /dev/null +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisStructLeaderResultDTO.java @@ -0,0 +1,70 @@ +package com.epmet.plugin.power.dto.axis.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 动力主轴负责人关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-19 + */ +@Data +public class PowerAxisStructLeaderResultDTO implements Serializable { + + private static final long serialVersionUID = -3856848780174795601L; + + /** + * 主键(关联动力主轴ID:AxisStructId) + */ + private String id; + + /** + * 名称 + */ + private String name; + + /** + * 上级主键 + */ + private String pid; + + /** + * 上级主键路径 全部上级主键,以:拼接 + */ + private String pids; + + /** + * 类别编码 + */ + private String categoryCode; + + /** + * 排序 正序 + */ + private Integer sort; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 负责人ID + */ + private String leaderId; + + /** + * 负责人姓名 + */ + private String leaderName; + + /** + * 负责人联系方式 + */ + private String leaderMobile; + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java index 4c682a9..4fe6147 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java @@ -1,7 +1,6 @@ package com.epmet.plugin.power.modules.axis.controller; - import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ExcelUtils; @@ -14,6 +13,8 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; +import com.epmet.plugin.power.dto.axis.form.PowerAxisStructLeaderFormDTO; +import com.epmet.plugin.power.dto.axis.result.PowerAxisStructLeaderResultDTO; import com.epmet.plugin.power.modules.axis.excel.PowerAxisStructExcel; import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService; import org.springframework.beans.factory.annotation.Autowired; @@ -25,7 +26,7 @@ import java.util.Map; /** - * 动力主轴结构 + * 动力主轴结构 * * @author generator generator@elink-cn.com * @since v1.0.0 2022-04-18 @@ -38,20 +39,20 @@ public class PowerAxisStructController { private PowerAxisStructService powerAxisStructService; @RequestMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = powerAxisStructService.page(params); return new Result>().ok(page); } - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { PowerAxisStructDTO data = powerAxisStructService.get(id); return new Result().ok(data); } @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody PowerAxisStructDTO dto){ + public Result save(@RequestBody PowerAxisStructDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); powerAxisStructService.save(dto); @@ -60,7 +61,7 @@ public class PowerAxisStructController { @NoRepeatSubmit @PostMapping("update") - public Result update(@RequestBody PowerAxisStructDTO dto){ + public Result update(@RequestBody PowerAxisStructDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); powerAxisStructService.update(dto); @@ -68,7 +69,7 @@ public class PowerAxisStructController { } @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); powerAxisStructService.delete(ids); @@ -81,6 +82,17 @@ public class PowerAxisStructController { ExcelUtils.exportExcelToTarget(response, null, list, PowerAxisStructExcel.class); } - + /** + * 查询动力主轴全部机构,用于前端组装展示树 + * + * @param formDto 查询条件 + * @return com.epmet.commons.tools.utils.Result> + * @author work@yujt.net.cn + * @date 2022/4/19/0019 14:17 + */ + @PostMapping("list4Tree") + public Result> selectAllForTree(@RequestBody PowerAxisStructLeaderFormDTO formDto) { + return new Result().ok(powerAxisStructService.selectAllForTree(formDto)); + } } diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java index f4d0299..bf66e9d 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java @@ -2,16 +2,29 @@ package com.epmet.plugin.power.modules.axis.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.plugin.power.dto.axis.form.PowerAxisStructLeaderFormDTO; +import com.epmet.plugin.power.dto.axis.result.PowerAxisStructLeaderResultDTO; import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; +import java.util.Map; + /** - * 动力主轴结构 + * 动力主轴结构 * * @author generator generator@elink-cn.com * @since v1.0.0 2022-04-18 */ @Mapper public interface PowerAxisStructDao extends BaseDao { - + + /** + * 查询动力主轴全部机构,用于前端组装展示树 + * + * @return java.util.List + * @author work@yujt.net.cn + * @date 2022/4/19/0019 14:03 + */ + List selectAllForTree(PowerAxisStructLeaderFormDTO formDto); } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisStructLeaderEntity.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisStructLeaderEntity.java index 5ffa0a1..38d7204 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisStructLeaderEntity.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisStructLeaderEntity.java @@ -31,6 +31,11 @@ public class PowerAxisStructLeaderEntity extends BaseEpmetEntity { */ private String structReferenceId; + /** + * 类别编码 + */ + private String categoryCode; + /** * 负责人ID */ diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java index 3e82148..ad94533 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java @@ -4,13 +4,15 @@ package com.epmet.plugin.power.modules.axis.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; +import com.epmet.plugin.power.dto.axis.form.PowerAxisStructLeaderFormDTO; +import com.epmet.plugin.power.dto.axis.result.PowerAxisStructLeaderResultDTO; import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity; import java.util.List; import java.util.Map; /** - * 动力主轴结构 + * 动力主轴结构 * * @author generator generator@elink-cn.com * @since v1.0.0 2022-04-18 @@ -76,4 +78,13 @@ public interface PowerAxisStructService extends BaseService + * @author work@yujt.net.cn + * @date 2022/4/19/0019 14:02 + */ + List selectAllForTree(PowerAxisStructLeaderFormDTO formDto); } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java index 7314833..41e6c67 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java @@ -8,6 +8,8 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; +import com.epmet.plugin.power.dto.axis.form.PowerAxisStructLeaderFormDTO; +import com.epmet.plugin.power.dto.axis.result.PowerAxisStructLeaderResultDTO; import com.epmet.plugin.power.modules.axis.dao.PowerAxisStructDao; import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity; import com.epmet.plugin.power.modules.axis.redis.PowerAxisStructRedis; @@ -85,4 +87,8 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl selectAllForTree(PowerAxisStructLeaderFormDTO formDto) { + return baseDao.selectAllForTree(formDto); + } } \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml index b53d95b..2600090 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml @@ -22,5 +22,33 @@ + + \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructLeaderDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructLeaderDao.xml index c27928f..37ebd28 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructLeaderDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructLeaderDao.xml @@ -8,6 +8,7 @@ +