diff --git a/epmet-cloud-generator/src/main/resources/generator.properties b/epmet-cloud-generator/src/main/resources/generator.properties index e63a311..7a58589 100644 --- a/epmet-cloud-generator/src/main/resources/generator.properties +++ b/epmet-cloud-generator/src/main/resources/generator.properties @@ -3,7 +3,7 @@ main= #\u5305\u540D package=com.epmet.plugin.power -moduleName= +moduleName=axis #\u4F5C\u8005 author=generator #\u7248\u672C\u53F7 diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructDTO.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructDTO.java new file mode 100644 index 0000000..b503092 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructDTO.java @@ -0,0 +1,99 @@ +package com.epmet.plugin.power.dto.axis; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 动力主轴结构 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +public class PowerAxisStructDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 名称 + */ + private String name; + + /** + * 绑定组织主键 + */ + private String agencyId; + + /** + * 绑定组织名称 + */ + private String agencyName; + + /** + * 绑定组织类别编码 + */ + private String agencyType; + + /** + * 上级主键 + */ + private String pid; + + /** + * 上级主键路径 全部上级主键,以:拼接 + */ + private String pids; + + /** + * 类别编码 + */ + private String categoryCode; + + /** + * 排序 正序 + */ + private Integer sort; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerKernelHouseholdDTO.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerKernelHouseholdDTO.java new file mode 100644 index 0000000..3e70505 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerKernelHouseholdDTO.java @@ -0,0 +1,95 @@ +package com.epmet.plugin.power.dto.axis; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 动力主轴党员中心户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +public class PowerKernelHouseholdDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 关联动力主轴ID + */ + private String structReferenceId; + + /** + * 户主ID + */ + private String ownerId; + + /** + * 户主姓名 + */ + private String ownerName; + + /** + * 房屋ID + */ + private String houseId; + + /** + * 房屋地址 + */ + private String address; + + /** + * 房屋经度 + */ + private BigDecimal longitude; + + /** + * 房屋纬度 + */ + private BigDecimal latitude; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerServiceStationDTO.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerServiceStationDTO.java new file mode 100644 index 0000000..8a77ca9 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerServiceStationDTO.java @@ -0,0 +1,90 @@ +package com.epmet.plugin.power.dto.axis; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 动力主轴党群服务站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +public class PowerServiceStationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 关联动力主轴ID + */ + private String structReferenceId; + + /** + * 服务站名称 + */ + private String name; + + /** + * 服务站地址 + */ + private String address; + + /** + * 服务站经度 + */ + private BigDecimal longitude; + + /** + * 服务站纬度 + */ + private BigDecimal latitude; + + /** + * 排序 正序 + */ + private Integer sort; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/PliPowerAxisApplication.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/PliPowerAxisApplication.java similarity index 96% rename from epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/PliPowerAxisApplication.java rename to epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/PliPowerAxisApplication.java index ffe9f00..827863a 100644 --- a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/PliPowerAxisApplication.java +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/PliPowerAxisApplication.java @@ -6,7 +6,7 @@ * 版权所有,侵权必究! */ -package com.epmet.plugin.power; +package com.epmet; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java new file mode 100644 index 0000000..0d6e8d6 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java @@ -0,0 +1,86 @@ +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; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; + + +import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; +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; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 动力主轴结构 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@RestController +@RequestMapping("powerAxisStruct") +public class PowerAxisStructController { + + @Autowired + private PowerAxisStructService powerAxisStructService; + + @RequestMapping("page") + 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){ + PowerAxisStructDTO data = powerAxisStructService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody PowerAxisStructDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + powerAxisStructService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody PowerAxisStructDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + powerAxisStructService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + powerAxisStructService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = powerAxisStructService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PowerAxisStructExcel.class); + } + + + +} diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerKernelHouseholdController.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerKernelHouseholdController.java new file mode 100644 index 0000000..fd60fba --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerKernelHouseholdController.java @@ -0,0 +1,83 @@ +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; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.plugin.power.dto.axis.PowerKernelHouseholdDTO; +import com.epmet.plugin.power.modules.axis.excel.PowerKernelHouseholdExcel; +import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 动力主轴党员中心户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@RestController +@RequestMapping("powerKernelHousehold") +public class PowerKernelHouseholdController { + + @Autowired + private PowerKernelHouseholdService powerKernelHouseholdService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = powerKernelHouseholdService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + PowerKernelHouseholdDTO data = powerKernelHouseholdService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody PowerKernelHouseholdDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + powerKernelHouseholdService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody PowerKernelHouseholdDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + powerKernelHouseholdService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + powerKernelHouseholdService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = powerKernelHouseholdService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PowerKernelHouseholdExcel.class); + } + + + +} diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerServiceStationController.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerServiceStationController.java new file mode 100644 index 0000000..be5b1fd --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerServiceStationController.java @@ -0,0 +1,83 @@ +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; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.plugin.power.dto.axis.PowerServiceStationDTO; +import com.epmet.plugin.power.modules.axis.excel.PowerServiceStationExcel; +import com.epmet.plugin.power.modules.axis.service.PowerServiceStationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 动力主轴党群服务站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@RestController +@RequestMapping("powerServiceStation") +public class PowerServiceStationController { + + @Autowired + private PowerServiceStationService powerServiceStationService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = powerServiceStationService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + PowerServiceStationDTO data = powerServiceStationService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody PowerServiceStationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + powerServiceStationService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody PowerServiceStationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + powerServiceStationService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + powerServiceStationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = powerServiceStationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PowerServiceStationExcel.class); + } + + + +} diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java new file mode 100644 index 0000000..f4d0299 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java @@ -0,0 +1,17 @@ +package com.epmet.plugin.power.modules.axis.dao; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 动力主轴结构 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Mapper +public interface PowerAxisStructDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java new file mode 100644 index 0000000..999e137 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java @@ -0,0 +1,18 @@ +package com.epmet.plugin.power.modules.axis.dao; + + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.plugin.power.modules.axis.entity.PowerKernelHouseholdEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 动力主轴党员中心户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Mapper +public interface PowerKernelHouseholdDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerServiceStationDao.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerServiceStationDao.java new file mode 100644 index 0000000..2caa14d --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerServiceStationDao.java @@ -0,0 +1,17 @@ +package com.epmet.plugin.power.modules.axis.dao; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.plugin.power.modules.axis.entity.PowerServiceStationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 动力主轴党群服务站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Mapper +public interface PowerServiceStationDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisStructEntity.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisStructEntity.java new file mode 100644 index 0000000..1b209cd --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisStructEntity.java @@ -0,0 +1,70 @@ +package com.epmet.plugin.power.modules.axis.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 动力主轴结构 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pli_power_axis_struct") +public class PowerAxisStructEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 名称 + */ + private String name; + + /** + * 绑定组织主键 + */ + private String agencyId; + + /** + * 绑定组织名称 + */ + private String agencyName; + + /** + * 绑定组织类别编码 + */ + private String agencyType; + + /** + * 上级主键 + */ + private String pid; + + /** + * 上级主键路径 全部上级主键,以:拼接 + */ + private String pids; + + /** + * 类别编码 + */ + private String categoryCode; + + /** + * 排序 正序 + */ + private Integer sort; + +} diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerKernelHouseholdEntity.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerKernelHouseholdEntity.java new file mode 100644 index 0000000..ed8042e --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerKernelHouseholdEntity.java @@ -0,0 +1,66 @@ +package com.epmet.plugin.power.modules.axis.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 动力主轴党员中心户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pli_power_kernel_household") +public class PowerKernelHouseholdEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 关联动力主轴ID + */ + private String structReferenceId; + + /** + * 户主ID + */ + private String ownerId; + + /** + * 户主姓名 + */ + private String ownerName; + + /** + * 房屋ID + */ + private String houseId; + + /** + * 房屋地址 + */ + private String address; + + /** + * 房屋经度 + */ + private BigDecimal longitude; + + /** + * 房屋纬度 + */ + private BigDecimal latitude; + +} diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerServiceStationEntity.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerServiceStationEntity.java new file mode 100644 index 0000000..b6f4e98 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerServiceStationEntity.java @@ -0,0 +1,61 @@ +package com.epmet.plugin.power.modules.axis.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 动力主轴党群服务站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pli_power_service_station") +public class PowerServiceStationEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 关联动力主轴ID + */ + private String structReferenceId; + + /** + * 服务站名称 + */ + private String name; + + /** + * 服务站地址 + */ + private String address; + + /** + * 服务站经度 + */ + private BigDecimal longitude; + + /** + * 服务站纬度 + */ + private BigDecimal latitude; + + /** + * 排序 正序 + */ + private Integer sort; + +} diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerAxisStructExcel.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerAxisStructExcel.java new file mode 100644 index 0000000..c51fe97 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerAxisStructExcel.java @@ -0,0 +1,66 @@ +package com.epmet.plugin.power.modules.axis.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 动力主轴结构 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +public class PowerAxisStructExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "名称") + private String name; + + @Excel(name = "绑定组织主键") + private String agencyId; + + @Excel(name = "绑定组织名称") + private String agencyName; + + @Excel(name = "绑定组织类别编码") + private String agencyType; + + @Excel(name = "上级主键") + private String pid; + + @Excel(name = "上级主键路径 全部上级主键,以:拼接") + private String pids; + + @Excel(name = "类别编码") + private String categoryCode; + + @Excel(name = "排序 正序") + private Integer sort; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerKernelHouseholdExcel.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerKernelHouseholdExcel.java new file mode 100644 index 0000000..33ed209 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerKernelHouseholdExcel.java @@ -0,0 +1,64 @@ +package com.epmet.plugin.power.modules.axis.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 动力主轴党员中心户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +public class PowerKernelHouseholdExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "关联动力主轴ID") + private String structReferenceId; + + @Excel(name = "户主ID") + private String ownerId; + + @Excel(name = "户主姓名") + private String ownerName; + + @Excel(name = "房屋ID") + private String houseId; + + @Excel(name = "房屋地址") + private String address; + + @Excel(name = "房屋经度") + private BigDecimal longitude; + + @Excel(name = "房屋纬度") + private BigDecimal latitude; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerServiceStationExcel.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerServiceStationExcel.java new file mode 100644 index 0000000..9490a3a --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/excel/PowerServiceStationExcel.java @@ -0,0 +1,61 @@ +package com.epmet.plugin.power.modules.axis.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 动力主轴党群服务站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Data +public class PowerServiceStationExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "关联动力主轴ID") + private String structReferenceId; + + @Excel(name = "服务站名称") + private String name; + + @Excel(name = "服务站地址") + private String address; + + @Excel(name = "服务站经度") + private BigDecimal longitude; + + @Excel(name = "服务站纬度") + private BigDecimal latitude; + + @Excel(name = "排序 正序") + private Integer sort; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerAxisStructRedis.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerAxisStructRedis.java new file mode 100644 index 0000000..e7aff08 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerAxisStructRedis.java @@ -0,0 +1,34 @@ +package com.epmet.plugin.power.modules.axis.redis; + + +import com.epmet.commons.tools.redis.RedisUtils; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + + +/** + * 动力主轴结构 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Component +public class PowerAxisStructRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerKernelHouseholdRedis.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerKernelHouseholdRedis.java new file mode 100644 index 0000000..ceb51c3 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerKernelHouseholdRedis.java @@ -0,0 +1,33 @@ +package com.epmet.plugin.power.modules.axis.redis; + + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * 动力主轴党员中心户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Component +public class PowerKernelHouseholdRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerServiceStationRedis.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerServiceStationRedis.java new file mode 100644 index 0000000..9a3b4cc --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/redis/PowerServiceStationRedis.java @@ -0,0 +1,33 @@ +package com.epmet.plugin.power.modules.axis.redis; + + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * 动力主轴党群服务站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Component +public class PowerServiceStationRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java new file mode 100644 index 0000000..3e82148 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java @@ -0,0 +1,79 @@ +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.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 + */ +public interface PowerAxisStructService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-04-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-04-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PowerAxisStructDTO + * @author generator + * @date 2022-04-18 + */ + PowerAxisStructDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-18 + */ + void save(PowerAxisStructDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-18 + */ + void update(PowerAxisStructDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-04-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerKernelHouseholdService.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerKernelHouseholdService.java new file mode 100644 index 0000000..ab23319 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerKernelHouseholdService.java @@ -0,0 +1,80 @@ +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.PowerKernelHouseholdDTO; +import com.epmet.plugin.power.modules.axis.entity.PowerKernelHouseholdEntity; + +import java.util.List; +import java.util.Map; + +/** + * 动力主轴党员中心户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +public interface PowerKernelHouseholdService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-04-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-04-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PowerKernelHouseholdDTO + * @author generator + * @date 2022-04-18 + */ + PowerKernelHouseholdDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-18 + */ + void save(PowerKernelHouseholdDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-18 + */ + void update(PowerKernelHouseholdDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-04-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerServiceStationService.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerServiceStationService.java new file mode 100644 index 0000000..75eacd3 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerServiceStationService.java @@ -0,0 +1,80 @@ +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.PowerServiceStationDTO; +import com.epmet.plugin.power.modules.axis.entity.PowerServiceStationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 动力主轴党群服务站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +public interface PowerServiceStationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-04-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-04-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PowerServiceStationDTO + * @author generator + * @date 2022-04-18 + */ + PowerServiceStationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-18 + */ + void save(PowerServiceStationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-04-18 + */ + void update(PowerServiceStationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-04-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java new file mode 100644 index 0000000..7314833 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java @@ -0,0 +1,88 @@ +package com.epmet.plugin.power.modules.axis.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +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.modules.axis.dao.PowerAxisStructDao; +import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity; +import com.epmet.plugin.power.modules.axis.redis.PowerAxisStructRedis; +import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 动力主轴结构 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Service +public class PowerAxisStructServiceImpl extends BaseServiceImpl implements PowerAxisStructService { + + @Autowired + private PowerAxisStructRedis powerAxisStructRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PowerAxisStructDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PowerAxisStructDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PowerAxisStructDTO get(String id) { + PowerAxisStructEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PowerAxisStructDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PowerAxisStructDTO dto) { + PowerAxisStructEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisStructEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PowerAxisStructDTO dto) { + PowerAxisStructEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisStructEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java new file mode 100644 index 0000000..ea64e5f --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java @@ -0,0 +1,88 @@ +package com.epmet.plugin.power.modules.axis.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +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.PowerKernelHouseholdDTO; +import com.epmet.plugin.power.modules.axis.dao.PowerKernelHouseholdDao; +import com.epmet.plugin.power.modules.axis.entity.PowerKernelHouseholdEntity; +import com.epmet.plugin.power.modules.axis.redis.PowerKernelHouseholdRedis; +import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 动力主轴党员中心户 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Service +public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl implements PowerKernelHouseholdService { + + @Autowired + private PowerKernelHouseholdRedis powerKernelHouseholdRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PowerKernelHouseholdDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PowerKernelHouseholdDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PowerKernelHouseholdDTO get(String id) { + PowerKernelHouseholdEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PowerKernelHouseholdDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PowerKernelHouseholdDTO dto) { + PowerKernelHouseholdEntity entity = ConvertUtils.sourceToTarget(dto, PowerKernelHouseholdEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PowerKernelHouseholdDTO dto) { + PowerKernelHouseholdEntity entity = ConvertUtils.sourceToTarget(dto, PowerKernelHouseholdEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java new file mode 100644 index 0000000..f8d9de1 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java @@ -0,0 +1,88 @@ +package com.epmet.plugin.power.modules.axis.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +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.PowerServiceStationDTO; +import com.epmet.plugin.power.modules.axis.dao.PowerServiceStationDao; +import com.epmet.plugin.power.modules.axis.entity.PowerServiceStationEntity; +import com.epmet.plugin.power.modules.axis.redis.PowerServiceStationRedis; +import com.epmet.plugin.power.modules.axis.service.PowerServiceStationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 动力主轴党群服务站 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-04-18 + */ +@Service +public class PowerServiceStationServiceImpl extends BaseServiceImpl implements PowerServiceStationService { + + @Autowired + private PowerServiceStationRedis powerServiceStationRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PowerServiceStationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PowerServiceStationDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PowerServiceStationDTO get(String id) { + PowerServiceStationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PowerServiceStationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PowerServiceStationDTO dto) { + PowerServiceStationEntity entity = ConvertUtils.sourceToTarget(dto, PowerServiceStationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PowerServiceStationDTO dto) { + PowerServiceStationEntity entity = ConvertUtils.sourceToTarget(dto, PowerServiceStationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml new file mode 100644 index 0000000..b53d95b --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml new file mode 100644 index 0000000..bea72fd --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerServiceStationDao.xml b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerServiceStationDao.xml new file mode 100644 index 0000000..8cafa10 --- /dev/null +++ b/epmet-plugins-module/pli-power-axis/pli-power-axis-server/src/main/resources/mapper/poweraxis/PowerServiceStationDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 8061615..e75186a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ - + epmet-cloud-generator epmet-plugins-module epmet-plugins-common