Browse Source

Merge branch 'dev_power_axis' into dev_contract

dev_power_axis
YUJT 4 years ago
parent
commit
b7caae677c
  1. 4
      epmet-cloud-generator/src/main/resources/template/Controller.java.vm
  2. 45
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructDTO.java
  3. 10
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerKernelHouseholdDTO.java
  4. 1
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisLeaderDetailFormDTO.java
  5. 10
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisListPositionFormDTO.java
  6. 10
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisServiceStationFormDTO.java
  7. 3
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructFormDTO.java
  8. 1
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructListByCategoryCodeFormDTO.java
  9. 1
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructStructTreeFormDTO.java
  10. 1
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructViewFormDTO.java
  11. 1
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelHouseHoldViewListFormDTO.java
  12. 1
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelListPostitionFormDTO.java
  13. 37
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/StructLeaderBindFormDTO.java
  14. 35
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/StructLeaderBriefFormDTO.java
  15. 2
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisLeaderDetailResultDTO.java
  16. 11
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisListPositionResultDTO.java
  17. 11
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisServiceStationResultDTO.java
  18. 6
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisSimpleListDTO.java
  19. 7
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisStructTreeResultDTO.java
  20. 4
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/enums/PowerTagCategoryEnum.java
  21. 4
      epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml
  22. 58
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/ViewController/PowerAxisStructViewController.java
  23. 43
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/ViewController/PowerAxiskernelHouseholdViewController.java
  24. 138
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisDataVisualController.java
  25. 91
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java
  26. 49
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructLeaderController.java
  27. 8
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisTagController.java
  28. 35
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerKernelHouseholdController.java
  29. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisLeaderDao.java
  30. 83
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java
  31. 33
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructLeaderDao.java
  32. 15
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java
  33. 13
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java
  34. 9
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerServiceStationDao.java
  35. 1
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisLeaderEntity.java
  36. 1
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisTagEntity.java
  37. 10
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisLeaderService.java
  38. 33
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructLeaderService.java
  39. 75
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java
  40. 14
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisTagService.java
  41. 6
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerKernelHouseholdService.java
  42. 6
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerServiceStationService.java
  43. 19
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisLeaderServiceImpl.java
  44. 71
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructLeaderServiceImpl.java
  45. 196
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java
  46. 19
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java
  47. 102
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java
  48. 32
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java
  49. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/bootstrap.yml
  50. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/logback-spring.xml
  51. 13
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisLeaderDao.xml
  52. 161
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml
  53. 26
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructLeaderDao.xml
  54. 14
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml
  55. 118
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml
  56. 25
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerServiceStationDao.xml

4
epmet-cloud-generator/src/main/resources/template/Controller.java.vm

@ -39,7 +39,7 @@ public class ${className}Controller {
return new Result<PageData<${className}DTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET})
public Result<${className}DTO> get(@PathVariable("id") String id){
${className}DTO data = ${classname}Service.get(id);
return new Result<${className}DTO>().ok(data);
@ -63,7 +63,7 @@ public class ${className}Controller {
return new Result();
}
@PostMapping("delete")
@RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE})
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");

45
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerAxisStructDTO.java

@ -1,12 +1,14 @@
package com.epmet.plugin.power.dto.axis;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* 动力主轴结构
* 动力主轴结构
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-18
@ -19,81 +21,90 @@ public class PowerAxisStructDTO implements Serializable {
/**
* 主键
*/
private String id;
private String id;
/**
* 客户ID
*/
private String customerId;
private String customerId;
/**
* 名称
*/
private String name;
private String name;
/**
* 绑定组织主键
*/
private String agencyId;
private String agencyId;
/**
* 绑定组织名称
*/
private String agencyName;
private String agencyName;
/**
* 绑定组织类别编码
*/
private String agencyType;
private String agencyType;
/**
* 上级主键
*/
private String pid;
private String pid;
/**
* 上级主键路径 全部上级主键:拼接
*/
private String pids;
private String pids;
private BigDecimal longitude;
private BigDecimal latitude;
/**
* 类别编码
*/
private String categoryCode;
private String categoryCode;
/**
* 排序 正序
*/
private Integer sort;
private Integer sort;
/**
* 对应节点等级 0,1,2
*/
private Integer structLevel;
/**
* 删除标识 0.未删除 1.已删除
*/
private String delFlag;
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
private Integer revision;
/**
* 创建人
*/
private String createdBy;
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
private Date updatedTime;
}

10
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/PowerKernelHouseholdDTO.java

@ -42,6 +42,16 @@ public class PowerKernelHouseholdDTO implements Serializable {
*/
private String ownerName;
/**
* 户主ID
*/
private String ownerIdCard;
/**
* 户主电话
*/
private String ownerPhone;
/**
* 房屋ID
*/

1
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisLeaderDetailFormDTO.java

@ -6,4 +6,5 @@ import lombok.Data;
public class PowerAxisLeaderDetailFormDTO {
private String axisStructId;
private String leaderId;
private String customerId;
}

10
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisListPositionFormDTO.java

@ -0,0 +1,10 @@
package com.epmet.plugin.power.dto.axis.form;
import lombok.Data;
@Data
public class PowerAxisListPositionFormDTO {
private String tagCategory;
private String customerId;
private int structLevel;
}

10
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisServiceStationFormDTO.java

@ -0,0 +1,10 @@
package com.epmet.plugin.power.dto.axis.form;
import lombok.Data;
@Data
public class PowerAxisServiceStationFormDTO {
private String axisStructId;
private int limit;
private String customerId;
}

3
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructFormDTO.java

@ -7,7 +7,8 @@ import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PowerAxisStructFormDTO{
public class PowerAxisStructFormDTO {
private String agencyId;
private String name;
private String customerId;
}

1
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructListByCategoryCodeFormDTO.java

@ -6,4 +6,5 @@ import lombok.Data;
public class PowerAxisStructListByCategoryCodeFormDTO {
private String agencyId;
private String categoryCode;
private String customerId;
}

1
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructStructTreeFormDTO.java

@ -5,4 +5,5 @@ import lombok.Data;
@Data
public class PowerAxisStructStructTreeFormDTO {
private String agencyId;
private String customerId;
}

1
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructViewFormDTO.java

@ -4,5 +4,6 @@ import lombok.Data;
@Data
public class PowerAxisStructViewFormDTO {
private String customerId;
private String agencyId;
}

1
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelHouseHoldViewListFormDTO.java

@ -7,4 +7,5 @@ public class PowerKernelHouseHoldViewListFormDTO {
private String axisStructId;
private int pageNo;
private int pageSize;
private String customerId;
}

1
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelListPostitionFormDTO.java

@ -6,4 +6,5 @@ import lombok.Data;
public class PowerKernelListPostitionFormDTO {
private String axisStructId;
private int limit;
private String customerId;
}

37
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/StructLeaderBindFormDTO.java

@ -0,0 +1,37 @@
package com.epmet.plugin.power.dto.axis.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StructLeaderBindFormDTO implements Serializable {
private static final long serialVersionUID = 523592353978009455L;
/**
* 节点ID
*/
@NotBlank(message = "绑定节点不能为空")
private String axisStructId;
/**
* 负责人ID
*/
@NotBlank(message = "绑定负责人不能为空")
private String leaderId;
/**
* 负责人类别
*/
@NotBlank(message = "负责人类别不能为空")
private String categoryCode;
private String customerId;
}

35
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/StructLeaderBriefFormDTO.java

@ -0,0 +1,35 @@
package com.epmet.plugin.power.dto.axis.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StructLeaderBriefFormDTO implements Serializable {
private static final long serialVersionUID = 523592353978009455L;
/**
* 节点级别
*/
@NotBlank(message = "节点级别不能为空")
private int structLevel;
/**
* 节点ID
*/
@NotBlank(message = "绑定节点不能为空")
private String axisStructId;
/**
* 手机号或姓名
*/
private String keyWord;
private String customerId;
}

2
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisLeaderDetailResultDTO.java

@ -7,7 +7,7 @@ public class PowerAxisLeaderDetailResultDTO {
private String name;
private String gender;
private String mobile;
private String introduction;
private String interoduction;
private String categoryName;
private String avatar;
}

11
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisListPositionResultDTO.java

@ -0,0 +1,11 @@
package com.epmet.plugin.power.dto.axis.result;
import lombok.Data;
@Data
public class PowerAxisListPositionResultDTO {
private String axisStructId;
private String longitude;
private String latitude;
private String axisStructName;
}

11
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisServiceStationResultDTO.java

@ -0,0 +1,11 @@
package com.epmet.plugin.power.dto.axis.result;
import lombok.Data;
@Data
public class PowerAxisServiceStationResultDTO {
private String stationId;
private String longitude;
private String latitude;
private String address;
}

6
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisSimpleListDTO.java

@ -2,8 +2,12 @@ package com.epmet.plugin.power.dto.axis.result;
import lombok.Data;
import java.io.Serializable;
@Data
public class PowerAxisSimpleListDTO {
public class PowerAxisSimpleListDTO implements Serializable {
private static final long serialVersionUID = 1760957932589482970L;
private String id;
private String name;
private String mobile;

7
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/result/PowerAxisStructTreeResultDTO.java

@ -3,8 +3,13 @@ package com.epmet.plugin.power.dto.axis.result;
import com.epmet.commons.tools.utils.TreeNode;
import lombok.Data;
import java.io.Serializable;
@Data
public class PowerAxisStructTreeResultDTO extends TreeNode {
public class PowerAxisStructTreeResultDTO extends TreeNode implements Serializable {
private static final long serialVersionUID = 5859286638629746692L;
private Long id;
private Long pid;
private String name;

4
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/enums/PowerTagCategoryEnum.java

@ -12,6 +12,10 @@ public enum PowerTagCategoryEnum {
* 动力主轴负责人
*/
LEADER("leader"),
/**
* 默认参数
*/
PARAM("param"),
/**
* 动力主轴节点
*/

4
epmet-plugins-module/pli-power-base/pli-power-base-server/pom.xml

@ -223,8 +223,8 @@
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_pli_power?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_pli_power_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>

58
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/ViewController/PowerAxisStructViewController.java

@ -1,58 +0,0 @@
package com.epmet.plugin.power.modules.axis.ViewController;
import com.epmet.commons.tools.utils.Result;
import com.epmet.plugin.power.dto.axis.form.PowerAxisLeaderDetailFormDTO;
import com.epmet.plugin.power.dto.axis.form.PowerAxisStructStructTreeFormDTO;
import com.epmet.plugin.power.dto.axis.form.PowerAxisStructViewFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisLeaderDetailResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisStructResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisStructViewResultDTO;
import com.epmet.plugin.power.modules.axis.service.PowerAxisLeaderService;
import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/data/axis")
public class PowerAxisStructViewController {
@Autowired
private PowerAxisStructService powerAxisStructService;
@Autowired
private PowerAxisLeaderService powerAxisLeaderService;
/**
* 关键指标统计
*/
@PostMapping("/statistics")
public Result getStatistics(@RequestBody PowerAxisStructViewFormDTO form){
PowerAxisStructViewResultDTO result = powerAxisStructService.getStatistics(form);
return new Result().ok(result);
}
/**
* 动力主轴负责人详细信息
*/
@PostMapping("/leader")
public Result getLeaderDetail(@RequestBody PowerAxisLeaderDetailFormDTO form){
PowerAxisLeaderDetailResultDTO dto = powerAxisLeaderService.getLeaderDetail(form);
return new Result().ok(dto);
}
/**
*动力主轴结构树
*/
@PostMapping("/structTree")
public Result getStructTree(@RequestBody PowerAxisStructStructTreeFormDTO form){
List<PowerAxisStructTreeResultDTO> dto = powerAxisStructService.getStructTree(form);
return new Result().ok(dto);
}
}

43
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/ViewController/PowerAxiskernelHouseholdViewController.java

@ -1,43 +0,0 @@
package com.epmet.plugin.power.modules.axis.ViewController;
import com.epmet.commons.tools.utils.Result;
import com.epmet.plugin.power.dto.axis.ResultDTO;
import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseHoldViewListFormDTO;
import com.epmet.plugin.power.dto.axis.form.PowerKernelListPostitionFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO;
import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/data/kernelHousehold")
public class PowerAxiskernelHouseholdViewController {
@Autowired
private PowerKernelHouseholdService powerKernelHouseholdService;
/**
* 党员中心户列表
*/
@PostMapping("/list")
public ResultDTO getList(@RequestBody PowerKernelHouseHoldViewListFormDTO form){
PowerKernelHouseHoldViewListResultDTO dto = powerKernelHouseholdService.getList(form);
return ResultDTO.success("查询成功",dto,powerKernelHouseholdService.getTotal(form));
}
/**
* 党员中心户坐标集合
*/
@PostMapping("/listPosition")
public ResultDTO getListPosition(@RequestBody PowerKernelListPostitionFormDTO form){
List<PowerKernelListPostitionResultDTO> dto = powerKernelHouseholdService.getListPosition(form);
return ResultDTO.success("成功",dto,powerKernelHouseholdService.getListTotal(form));
}
}

138
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisDataVisualController.java

@ -0,0 +1,138 @@
package com.epmet.plugin.power.modules.axis.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.plugin.power.dto.axis.ResultDTO;
import com.epmet.plugin.power.dto.axis.form.*;
import com.epmet.plugin.power.dto.axis.result.*;
import com.epmet.plugin.power.modules.axis.service.PowerAxisLeaderService;
import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService;
import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService;
import com.epmet.plugin.power.modules.axis.service.PowerServiceStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Random;
import java.util.UUID;
/***
* 动力主轴相关数据可视化接口
* @author work@yujt.net.cn
* @date 2022/4/23/0023 10:27
*/
@RestController
@RequestMapping("data")
public class PowerAxisDataVisualController {
@Autowired
private PowerAxisStructService powerAxisStructService;
@Autowired
private PowerAxisLeaderService powerAxisLeaderService;
@Autowired
private PowerServiceStationService powerServiceStationService;
@Autowired
private PowerKernelHouseholdService powerKernelHouseholdService;
/**
* 党群服务站集合坐标
*
* @param form
* @return com.epmet.plugin.power.dto.axis.ResultDTO
* @author LZN
* @date 2022/4/22 19:53
*/
@PostMapping("serviceStation/listPosition")
public ResultDTO getListPostition(@RequestBody PowerAxisServiceStationFormDTO form) {
List<PowerAxisServiceStationResultDTO> list = powerServiceStationService.getListPosition(form);
return ResultDTO.success("成功", list, powerServiceStationService.queryTotal(form));
}
/**
* 关键指标统计
*
* @param form
* @return com.epmet.commons.tools.utils.Result
* @author LZN
* @date 2022/4/23 10:20
*/
@PostMapping("axis/statistics")
public Result getStatistics(@RequestBody PowerAxisStructViewFormDTO form) {
PowerAxisStructViewResultDTO result = powerAxisStructService.getStatistics(form);
return new Result().ok(result);
}
/**
* 动力主轴负责人详细信息
*
* @param form
* @return com.epmet.commons.tools.utils.Result
* @author LZN
* @date 2022/4/23 10:20
*/
@PostMapping("axis/leader")
public Result getLeaderDetail(@RequestBody PowerAxisLeaderDetailFormDTO form) {
PowerAxisLeaderDetailResultDTO dto = powerAxisLeaderService.getLeaderDetail(form);
return new Result().ok(dto);
}
/**
* 动力主轴结构树
*
* @param form
* @return com.epmet.commons.tools.utils.Result
* @author LZN
* @date 2022/4/23 10:20
*/
@PostMapping("axis/structTree")
public Result getStructTree(@RequestBody PowerAxisStructStructTreeFormDTO form) {
List<PowerAxisStructTreeResultDTO> dto = powerAxisStructService.getStructTree(form);
return new Result().ok(dto);
}
/**
* 动力主轴节点坐标集合
*
* @param structLevel
* @return com.epmet.plugin.power.dto.axis.ResultDTO
* @author LZN
* @date 2022/4/23 10:19
*/
@PostMapping("axis/{structLevel}/listPosition")
public ResultDTO getListPosition(@PathVariable int structLevel) {
List<PowerAxisListPositionResultDTO> list = powerAxisStructService.getListPosition(structLevel);
return ResultDTO.success("成功", list, powerAxisStructService.queryTotal(structLevel));
}
/**
* 党员中心户列表
*
* @param form
* @return com.epmet.plugin.power.dto.axis.ResultDTO
* @author LZN
* @date 2022/4/23 10:20
*/
@PostMapping("kernelHousehold/list")
public ResultDTO getList(@RequestBody PowerKernelHouseHoldViewListFormDTO form) {
List<PowerKernelHouseHoldViewListResultDTO> dto = powerKernelHouseholdService.getList(form);
return ResultDTO.success("查询成功", dto, powerKernelHouseholdService.getTotal(form));
}
/**
* 党员中心户坐标集合
*
* @param form
* @return com.epmet.plugin.power.dto.axis.ResultDTO
* @author LZN
* @date 2022/4/23 10:20
*/
@PostMapping("kernelHousehold/listPosition")
public ResultDTO getListPosition(@RequestBody PowerKernelListPostitionFormDTO form) {
List<PowerKernelListPostitionResultDTO> dto = powerKernelHouseholdService.getListPosition(form);
return ResultDTO.success("成功", dto, powerKernelHouseholdService.getListTotal(form));
}
}

91
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java

@ -1,9 +1,10 @@
package com.epmet.plugin.power.modules.axis.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -15,7 +16,6 @@ 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.form.PowerAxisStructListByCategoryCodeFormDTO;
import com.epmet.plugin.power.dto.axis.result.*;
import com.epmet.plugin.power.dto.axis.form.PowerAxisStructFormDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity;
@ -30,7 +30,7 @@ import java.util.Map;
/**
* 动力主轴结构
* 动力主轴结构
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-18
@ -43,21 +43,22 @@ public class PowerAxisStructController {
private PowerAxisStructService powerAxisStructService;
@RequestMapping("page")
public Result<PageData<PowerAxisStructDTO>> page(@RequestParam Map<String, Object> params){
public Result<PageData<PowerAxisStructDTO>> page(@RequestParam Map<String, Object> params) {
PageData<PowerAxisStructDTO> page = powerAxisStructService.page(params);
return new Result<PageData<PowerAxisStructDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<PowerAxisStructDTO> get(@PathVariable("id") String id){
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET})
public Result<PowerAxisStructDTO> get(@PathVariable("id") String id) {
PowerAxisStructDTO data = powerAxisStructService.get(id);
return new Result<PowerAxisStructDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody PowerAxisStructDTO dto){
public Result save(@RequestBody PowerAxisStructDTO dto, @LoginUser TokenDto tokenDto) {
//效验数据
dto.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
powerAxisStructService.save(dto);
return new Result();
@ -65,15 +66,16 @@ public class PowerAxisStructController {
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody PowerAxisStructDTO dto){
public Result update(@RequestBody PowerAxisStructDTO dto, @LoginUser TokenDto tokenDto) {
//效验数据
dto.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
powerAxisStructService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
powerAxisStructService.delete(ids);
@ -98,90 +100,47 @@ public class PowerAxisStructController {
public Result<List<PowerAxisStructLeaderResultDTO>> selectAllForTree(@RequestBody PowerAxisStructLeaderFormDTO formDto) {
return new Result().ok(powerAxisStructService.selectAllForTree(formDto));
}
/**
* 根据名字查询
*/
@PostMapping("/queryDeptByName")
public Result queryDeptByName(@RequestBody PowerAxisStructFormDTO form){
public Result queryDeptByName(@RequestBody PowerAxisStructFormDTO form) {
List<PowerAxisStructResultDTO> result = powerAxisStructService.queryDeptByName(form);
return new Result<List<PowerAxisStructResultDTO>>().ok(result);
}
/**
* 获取树状列表
*/
@PostMapping("/getTreeList")
public Result queryList(){
List<PowerAxisStructListResultDTO> list = powerAxisStructService.queryList();
return new Result<List<PowerAxisStructListResultDTO>>().ok(list);
}
/**
* 添加组织
*/
@PostMapping("/addOrg")
public Result addOrg(@RequestBody PowerAxisStructEntity form){
powerAxisStructService.addOrg(form);
return new Result();
}
/**
* 修改组织
*/
@PostMapping("/modifyOrg")
public Result modifyOrg(@RequestBody PowerAxisStructEntity form){
powerAxisStructService.modifyRog(form);
return new Result();
}
/**
* 根据id删除
*/
@PostMapping("/deleteById/{id}")
public Result deleteById(@PathVariable String id){
public Result deleteById(@PathVariable String id) {
powerAxisStructService.delete(id);
return new Result();
}
/**
* 获取上级网格党支部
*/
@PostMapping("/GridPartyBranchList")
public Result<List<PowerAxisStructGridPartyBranchResultDTO>> getGridPartyBranchList(){
List<PowerAxisStructGridPartyBranchResultDTO> list = powerAxisStructService.getGridPartyBranchList();
return new Result<List<PowerAxisStructGridPartyBranchResultDTO>>().ok(list);
}
/**
* 获取上级组织
* 根据节点接报组装其上级节点树
*
* @param structLevel 节点级别
* @param tokenDto 登录用户
* @return com.epmet.commons.tools.utils.Result<com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO>
* @author work@yujt.net.cn
* @date 2022/4/23/0023 14:44
*/
@PostMapping("/getPartyCommList")
public Result<List<PowerAxisStructPartyCommResultDTO>> getPartyCommList(){
List<PowerAxisStructPartyCommResultDTO> list = powerAxisStructService.getPartyCommList();
return new Result<List<PowerAxisStructPartyCommResultDTO>>().ok(list);
@PostMapping("bylevel/{structLevel}/parenttree")
public Result<PowerAxisStructTreeResultDTO> listParentTreeByLevel(@PathVariable String structLevel, @LoginUser TokenDto tokenDto) {
return new Result().ok(powerAxisStructService.listParentTreeByLevel(structLevel, tokenDto.getCustomerId()));
}
/**
* 查询父id
*/
@PostMapping("/getPid")
public Result<List<String>> getPid(){
List<String> pid = powerAxisStructService.getPid();
return new Result<List<String>>().ok(pid);
}
/**
* 根据id查询修改表单数据
*/
@PostMapping("/queryModifyById/{id}")
public Result<PowerAxisStructEntity> queryModifyById(@PathVariable String id){
public Result<PowerAxisStructEntity> queryModifyById(@PathVariable String id) {
PowerAxisStructEntity power = powerAxisStructService.queryModifyById(id);
return new Result<PowerAxisStructEntity>().ok(power);
}
/**
* 按节点类型获取节点列表
*/
@PostMapping("/listByCategoryCode")
public Result getListByCategoryCode(@RequestBody PowerAxisStructListByCategoryCodeFormDTO form){
List<PowerAixsStructListByCategoryResultDTO> dto = powerAxisStructService.getListByCategoryCode(form);
return new Result().ok(dto);
}
}

49
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructLeaderController.java

@ -1,7 +1,9 @@
package com.epmet.plugin.power.modules.axis.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -10,6 +12,9 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.plugin.power.dto.axis.PowerAxisStructLeaderDTO;
import com.epmet.plugin.power.dto.axis.form.StructLeaderBindFormDTO;
import com.epmet.plugin.power.dto.axis.form.StructLeaderBriefFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO;
import com.epmet.plugin.power.modules.axis.excel.PowerAxisStructLeaderExcel;
import com.epmet.plugin.power.modules.axis.service.PowerAxisStructLeaderService;
import org.springframework.beans.factory.annotation.Autowired;
@ -21,33 +26,33 @@ import java.util.Map;
/**
* 动力主轴负责人关系
* 动力主轴负责人关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-19
*/
@RestController
@RequestMapping("powerAxisStructLeader")
@RequestMapping("axisstructleader")
public class PowerAxisStructLeaderController {
@Autowired
private PowerAxisStructLeaderService powerAxisStructLeaderService;
@RequestMapping("page")
public Result<PageData<PowerAxisStructLeaderDTO>> page(@RequestParam Map<String, Object> params){
public Result<PageData<PowerAxisStructLeaderDTO>> page(@RequestParam Map<String, Object> params) {
PageData<PowerAxisStructLeaderDTO> page = powerAxisStructLeaderService.page(params);
return new Result<PageData<PowerAxisStructLeaderDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<PowerAxisStructLeaderDTO> get(@PathVariable("id") String id){
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET})
public Result<PowerAxisStructLeaderDTO> get(@PathVariable("id") String id) {
PowerAxisStructLeaderDTO data = powerAxisStructLeaderService.get(id);
return new Result<PowerAxisStructLeaderDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody PowerAxisStructLeaderDTO dto){
public Result save(@RequestBody PowerAxisStructLeaderDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
powerAxisStructLeaderService.save(dto);
@ -56,7 +61,7 @@ public class PowerAxisStructLeaderController {
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody PowerAxisStructLeaderDTO dto){
public Result update(@RequestBody PowerAxisStructLeaderDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
powerAxisStructLeaderService.update(dto);
@ -64,7 +69,7 @@ public class PowerAxisStructLeaderController {
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
powerAxisStructLeaderService.delete(ids);
@ -77,6 +82,34 @@ public class PowerAxisStructLeaderController {
ExcelUtils.exportExcelToTarget(response, null, list, PowerAxisStructLeaderExcel.class);
}
/**
* 查询当前组织下绑定的所有负责人
*
* @param tokenDto 用户信息
* @param formDto 查询条件
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO>>
* @author work@yujt.net.cn
* @date 2022/4/24/0024 19:35
*/
@PostMapping("listbrief")
public Result<List<PowerAxisSimpleListDTO>> listLeaderByStructId(@LoginUser TokenDto tokenDto, @RequestBody StructLeaderBriefFormDTO formDto) {
return new Result().ok(powerAxisStructLeaderService.listLeaderByStructId(tokenDto, formDto));
}
/**
* 绑定节点负责人
*
* @param tokenDto 用户信息
* @param formDto 表单信息
* @return com.epmet.commons.tools.utils.Result
* @author work@yujt.net.cn
* @date 2022/4/25/0025 9:21
*/
@PostMapping("bind")
public Result bindAxisStructLeader(@LoginUser TokenDto tokenDto, @RequestBody StructLeaderBindFormDTO formDto) {
powerAxisStructLeaderService.bindAxisStructLeader(tokenDto, formDto);
return new Result();
}
}

8
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisTagController.java

@ -1,7 +1,9 @@
package com.epmet.plugin.power.modules.axis.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -65,7 +67,7 @@ public class PowerAxisTagController {
return new Result();
}
@PostMapping("delete")
@RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE})
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
@ -88,8 +90,8 @@ public class PowerAxisTagController {
* @date 2022/4/18/0018 18:12
*/
@PostMapping("listSimple/{tagCategory}")
public Result<List<PowerAxisTagCategoryResultDTO>> listSimple(@PathVariable("tagCategory") String tagCategory) {
return new Result().ok(powerAxisTagService.listSimple(tagCategory));
public Result<List<PowerAxisTagCategoryResultDTO>> listSimple(@PathVariable("tagCategory") String tagCategory, @LoginUser TokenDto tokenDto) {
return new Result().ok(powerAxisTagService.listSimple(tagCategory, tokenDto.getCustomerId()));
}
/**

35
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerKernelHouseholdController.java

@ -21,6 +21,7 @@ import com.epmet.plugin.power.modules.axis.excel.PowerKernelHouseholdExcel;
import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@ -41,11 +42,7 @@ public class PowerKernelHouseholdController {
@Autowired
private PowerKernelHouseholdService powerKernelHouseholdService;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
@RequestMapping("page")
public Result<PageData<PowerKernelHouseholdDTO>> page(@RequestParam Map<String, Object> params){
@ -96,35 +93,7 @@ public class PowerKernelHouseholdController {
*/
@PostMapping("/bind")
public Result Bind(@RequestBody PowerKernelHouseFormDTO form){
String customerId = loginUserUtil.getLoginUserCustomerId();
Set<String> houseIds = new HashSet<>();
Collections.addAll(houseIds,form.getHouseIdList());
Result<List<HouseInfoDTO>> listResult = govOrgOpenFeignClient.queryListHouseInfo(houseIds, customerId);
if(!listResult.success()){
return listResult;
}
List<HouseInfoDTO> houseList = listResult.getData();
List<PowerKernelHouseholdEntity> list = Lists.newArrayList();
PowerKernelHouseholdEntity entity;
for(HouseInfoDTO houseInfo : houseList){
Result<IcHouseDTO> icHouseDTOResult = govOrgOpenFeignClient.get(houseInfo.getHomeId());
if(!icHouseDTOResult.success()){
continue ;
}
IcHouseDTO houseDto = icHouseDTOResult.getData();
entity = new PowerKernelHouseholdEntity();
entity.setHouseId(houseInfo.getHomeId());
entity.setLongitude(new BigDecimal(houseInfo.getBuildingLongitude()));
entity.setLatitude(new BigDecimal(houseInfo.getBuildingLatitude()));
entity.setAddress(houseInfo.getAllName());
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
entity.setOwnerPhone(houseDto.getOwnerPhone());
entity.setOwnerIdCard(houseDto.getOwnerIdCard());
entity.setOwnerName(houseDto.getOwnerName());
powerKernelHouseholdService.insert(entity);
}
powerKernelHouseholdService.bind(form);
return new Result();
}

2
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisLeaderDao.java

@ -21,7 +21,7 @@ import java.util.List;
public interface PowerAxisLeaderDao extends BaseDao<PowerAxisLeaderEntity> {
List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids);
List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids,String customerId);
PowerAxisLeaderDetailResultDTO getLeaderDetail(PowerAxisLeaderDetailFormDTO form);
}

83
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java

@ -7,6 +7,7 @@ import com.epmet.plugin.power.dto.axis.form.*;
import com.epmet.plugin.power.dto.axis.result.*;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@ -14,7 +15,7 @@ import java.util.Map;
import java.util.List;
/**
* 动力主轴结构
* 动力主轴结构
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-18
@ -36,45 +37,81 @@ public interface PowerAxisStructDao extends BaseDao<PowerAxisStructEntity> {
*/
List<PowerAxisStructResultDTO> queryDeptByName(PowerAxisStructFormDTO form);
/**
* 获取树状列表
*/
List<PowerAxisStructListResultDTO> queryList();
void delete(String id);
/**
* 获取上级网格党支部
* 查询同组织下是否有同名的节点
*
* @param customerId 客户ID
* @param name 节点名
* @param agencyId 组织ID
* @param pid 上级节点
* @return int
* @author work@yujt.net.cn
* @date 2022/4/23/0023 11:00
*/
List<PowerAxisStructGridPartyBranchResultDTO> getGridPartyBranchList();
int countRepeatStructByName(@Param("customerId") String customerId,
@Param("name") String name,
@Param("agencyId") String agencyId,
@Param("pid") String pid,
@Param("id") String id);
/**
* 获取pid
* 查询同组织下是否有同级的节点 主要用于一级节点判重
*
* @param customerId 客户ID
* @param agencyId 组织ID
* @param categoryCode 节点级别编码一级节点级别编码
* @param id 主键
* @return int
* @author work@yujt.net.cn
* @date 2022/4/23/0023 10:57
*/
List<String> getPid();
int countRepeatStructByCategory(@Param("customerId") String customerId,
@Param("agencyId") String agencyId,
@Param("categoryCode") String categoryCode,
@Param("id") String id);
/**
* 获取上级党委
*/
List<PowerAxisStructPartyCommResultDTO> getPartyCommList();
List<String> getIdsByAgencyId(String agencyId, String customerId);
int queryGridParty(PowerAxisStructViewFormDTO form,String gridCateGoryCode);
int queryName(PowerAxisStructEntity form);
int queryGroupParty(PowerAxisStructViewFormDTO form,String groupCateGoryCode);
int queryCategory(PowerAxisStructEntity form);
int getKernelHouseHold(PowerAxisStructViewFormDTO form);
List<String> getIdsByAgencyId(String agencyId);
int getServiceStation(PowerAxisStructViewFormDTO form);
List<PowerAixsStructListByCategoryResultDTO> getListByCategoryCode(PowerAxisStructListByCategoryCodeFormDTO form);
List<PowerAxisStructTreeResultDTO> getStructTree(PowerAxisStructStructTreeFormDTO form);
int queryGridParty(PowerAxisStructViewFormDTO form);
String queryCategoryCode(PowerAxisListPositionFormDTO form);
int queryGroupParty(PowerAxisStructViewFormDTO form);
List<PowerAxisListPositionResultDTO> querylistPosition(String customerId, String code);
int getKernelHouseHold();
int getServiceStation();
long queryTotal(String customerId, String code);
List<PowerAxisStructTreeResultDTO> getStructTree(PowerAxisStructStructTreeFormDTO form);
/**
* 根据节点接报组装其上级节点树
*
* @param structLevel 节点级别
* @param customerId 客户ID
* @return java.util.List<com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO>
* @author work@yujt.net.cn
* @date 2022/4/23/0023 14:38
*/
List<PowerAxisStructTreeResultDTO> listParentTreeByLevel(@Param("structLevel") int structLevel, @Param("customerId") String customerId);
/**
* 查询cateGoryCode
*
* @param customerId
* @param level
* @param tagCateGory
* @return java.lang.String
* @author LZN
* @date 2022/4/24 19:29
*/
String getCateGoryCode(String customerId, int level, String tagCateGory);
}

33
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructLeaderDao.java

@ -1,12 +1,17 @@
package com.epmet.plugin.power.modules.axis.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.dto.axis.form.StructLeaderBriefFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSLeaderResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructLeaderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 动力主轴负责人关系
* 动力主轴负责人关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-19
@ -14,5 +19,29 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface PowerAxisStructLeaderDao extends BaseDao<PowerAxisStructLeaderEntity> {
PowerAxisSLeaderResultDTO queryLeaderDetailById(String axisStructId);
PowerAxisSLeaderResultDTO queryLeaderDetailById(String axisStructId, String customerId);
/**
* 查询当前组织下绑定的所有负责人
*
* @param formDto 查询条件
* @return java.util.List<com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO>
* @author work@yujt.net.cn
* @date 2022/4/24/0024 19:35
*/
List<PowerAxisSimpleListDTO> listLeaderBriefByRootStructId(StructLeaderBriefFormDTO formDto);
/**
* 删除节点负责人
*
* @param customerId 客户ID
* @param axisStructId 节点ID
* @param leaderId 负责人ID
* @return void
* @author work@yujt.net.cn
* @date 2022/4/25/0025 9:16
*/
void deleteStructLeader(@Param("customerId") String customerId,
@Param("axisStructId") String axisStructId,
@Param("leaderId") String leaderId);
}

15
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java

@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.dto.axis.result.PowerAxisAllTagCategoryResultDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisTagEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -24,4 +25,18 @@ public interface PowerAxisTagDao extends BaseDao<PowerAxisTagEntity> {
* @date 2022/4/19/0019 9:14
*/
List<PowerAxisAllTagCategoryResultDTO> listSimpleAll();
/**
* 根据ID查询节点等级
*
* @param customerId 客户ID
* @param tagCategory 标签类别
* @param axisStructId 节点ID
* @return int
* @author work@yujt.net.cn
* @date 2022/4/23/0023 15:42
*/
Integer selectStructLevelById(@Param("customerId") String customerId,
@Param("tagCategory") String tagCategory,
@Param("axisStructId") String axisStructId);
}

13
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java

@ -10,6 +10,7 @@ import com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResult
import com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerKernelHouseholdEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -23,11 +24,19 @@ import java.util.List;
public interface PowerKernelHouseholdDao extends BaseDao<PowerKernelHouseholdEntity> {
PowerKernelHouseHoldViewListResultDTO getList(PowerKernelHouseHoldViewListFormDTO form);
List<PowerKernelHouseHoldViewListResultDTO> getList(PowerKernelHouseHoldViewListFormDTO form);
long getTotal(PowerKernelHouseHoldViewListFormDTO form);
List<PowerKernelListPostitionResultDTO> getListPosition(PowerKernelListPostitionFormDTO form);
List<PowerKernelListPostitionResultDTO> getListPosition(PowerKernelListPostitionFormDTO form,List<String> axisStructIds);
long getListTotal(PowerKernelListPostitionFormDTO form);
List<String> queryHouseIdList(String[] houseIdList, String customerId,String axisStructId);
List<String> queryIds(String customerId, String axisStructId);
List<PowerKernelListPostitionResultDTO> queryListPosition(String axisStructId, String customerId, int limit);
}

9
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerServiceStationDao.java

@ -2,9 +2,13 @@ package com.epmet.plugin.power.modules.axis.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.dto.axis.form.PowerAxisServiceStationFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisServiceStationResultDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerServiceStationEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 动力主轴党群服务站
*
@ -13,5 +17,8 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface PowerServiceStationDao extends BaseDao<PowerServiceStationEntity> {
List<PowerAxisServiceStationResultDTO> getListPosition(PowerAxisServiceStationFormDTO form);
long queryTotal(PowerAxisServiceStationFormDTO form);
}

1
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisLeaderEntity.java

@ -51,4 +51,5 @@ public class PowerAxisLeaderEntity extends BaseEpmetEntity {
*/
private String avatar;
}

1
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/entity/PowerAxisTagEntity.java

@ -6,7 +6,6 @@ import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 动力主轴标签

10
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisLeaderService.java

@ -81,11 +81,21 @@ public interface PowerAxisLeaderService extends BaseService<PowerAxisLeaderEntit
/**
* 根据动力主轴id列表获取人员信息
*
* @param ids
* @return java.util.List<com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO>
* @author LZN
* @date 2022/4/24 19:38
*/
List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids);
/**
* 动力主轴负责人详细信息
*
* @param form
* @return com.epmet.plugin.power.dto.axis.result.PowerAxisLeaderDetailResultDTO
* @author LZN
* @date 2022/4/24 19:38
*/
PowerAxisLeaderDetailResultDTO getLeaderDetail(PowerAxisLeaderDetailFormDTO form);
}

33
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructLeaderService.java

@ -2,15 +2,19 @@ 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.commons.tools.security.dto.TokenDto;
import com.epmet.plugin.power.dto.axis.PowerAxisStructLeaderDTO;
import com.epmet.plugin.power.dto.axis.form.StructLeaderBindFormDTO;
import com.epmet.plugin.power.dto.axis.form.StructLeaderBriefFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSLeaderResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructLeaderEntity;
import java.util.List;
import java.util.Map;
/**
* 动力主轴负责人关系
* 动力主轴负责人关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-19
@ -79,6 +83,33 @@ public interface PowerAxisStructLeaderService extends BaseService<PowerAxisStruc
/**
* 查询节点负责人信息
*
* @param axisStructId
* @return com.epmet.plugin.power.dto.axis.result.PowerAxisSLeaderResultDTO
* @author LZN
* @date 2022/4/24 19:39
*/
PowerAxisSLeaderResultDTO queryLeaderDetailById(String axisStructId);
/**
* 查询当前组织下绑定的所有负责人
*
* @param tokenDto 用户信息
* @param formDto 查询条件
* @return java.util.List<com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO>
* @author work@yujt.net.cn
* @date 2022/4/24/0024 19:35
*/
List<PowerAxisSimpleListDTO> listLeaderByStructId(TokenDto tokenDto, StructLeaderBriefFormDTO formDto);
/**
* 绑定节点负责人
*
* @param tokenDto 用户信息
* @param formDto 表单信息
* @return void
* @author work@yujt.net.cn
* @date 2022/4/25/0025 9:21
*/
void bindAxisStructLeader(TokenDto tokenDto, StructLeaderBindFormDTO formDto);
}

75
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java

@ -12,7 +12,7 @@ import java.util.List;
import java.util.Map;
/**
* 动力主轴结构
* 动力主轴结构
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-18
@ -84,11 +84,6 @@ public interface PowerAxisStructService extends BaseService<PowerAxisStructEntit
*/
List<PowerAxisStructResultDTO> queryDeptByName(PowerAxisStructFormDTO form);
/**
* 获取树状列表
*/
List<PowerAxisStructListResultDTO> queryList();
/**
* 查询动力主轴全部机构用于前端组装展示树
@ -99,61 +94,67 @@ public interface PowerAxisStructService extends BaseService<PowerAxisStructEntit
*/
List<PowerAxisStructLeaderResultDTO> selectAllForTree(PowerAxisStructLeaderFormDTO formDto);
/**
* 添加组织
*/
void addOrg(PowerAxisStructEntity form);
/**
* 修改组织
*/
void modifyRog(PowerAxisStructEntity form);
/**
* 删除
*
* @param id
*/
void delete(String id);
/**
* 获取上级网格党支部
*/
List<PowerAxisStructGridPartyBranchResultDTO> getGridPartyBranchList();
/**
* 查询父id
* @return String
*/
List<String> getPid();
/**
* 获取上级党委列表
*/
List<PowerAxisStructPartyCommResultDTO> getPartyCommList();
/**
* 根据id查询修改表单数据
*
* @param id
* @return com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity
* @author LZN
* @date 2022/4/24 19:39
*/
PowerAxisStructEntity queryModifyById(String id);
/**
* 根据agencyId获取id列表
*
* @param agencyId
* @return java.util.List<java.lang.String>
* @author LZN
* @date 2022/4/24 19:39
*/
List<String> getIdByAgencyId(String agencyId);
/**
* 按节点类型获取节点列表
*/
List<PowerAixsStructListByCategoryResultDTO> getListByCategoryCode(PowerAxisStructListByCategoryCodeFormDTO form);
/**
*
* 关键指标统计
*
* @param form
* @return com.epmet.plugin.power.dto.axis.result.PowerAxisStructViewResultDTO
* @author LZN
* @date 2022/4/24 19:40
*/
PowerAxisStructViewResultDTO getStatistics(PowerAxisStructViewFormDTO form);
/**
* 树结构
*
* @param form
* @return java.util.List<com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO>
* @author LZN
* @date 2022/4/24 19:40
*/
List<PowerAxisStructTreeResultDTO> getStructTree(PowerAxisStructStructTreeFormDTO form);
List<PowerAxisListPositionResultDTO> getListPosition(int structLevel);
long queryTotal(int structLevel);
/**
* 根据节点接报组装其上级节点树
*
* @param structLevel 节点级别
* @param customerId 客户ID
* @return java.util.List<com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO>
* @author work@yujt.net.cn
* @date 2022/4/23/0023 14:37
*/
List<PowerAxisStructTreeResultDTO> listParentTreeByLevel(String structLevel, String customerId);
}

14
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisTagService.java

@ -87,7 +87,7 @@ public interface PowerAxisTagService extends BaseService<PowerAxisTagEntity> {
* @author work@yujt.net.cn
* @date 2022/4/18/0018 17:24
*/
List<PowerAxisTagCategoryResultDTO> listSimple(String tagCategory);
List<PowerAxisTagCategoryResultDTO> listSimple(String tagCategory, String customerId);
/**
* 查询所有标签
@ -109,4 +109,16 @@ public interface PowerAxisTagService extends BaseService<PowerAxisTagEntity> {
* @date 2022/4/21/0021 17:21
*/
int selectStructLevelByCode(String customerId, String tagCategory, String categoryCode);
/**
* 根据ID查询节点等级
*
* @param customerId 客户ID
* @param tagCategory 标签类别
* @param axisStructId 节点ID
* @return java.lang.Integer
* @author work@yujt.net.cn
* @date 2022/4/23/0023 15:51
*/
Integer selectStructLevelById(String customerId, String tagCategory, String axisStructId);
}

6
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerKernelHouseholdService.java

@ -86,7 +86,7 @@ public interface PowerKernelHouseholdService extends BaseService<PowerKernelHous
/**
* 党员中心户列表
*/
PowerKernelHouseHoldViewListResultDTO getList(PowerKernelHouseHoldViewListFormDTO form);
List<PowerKernelHouseHoldViewListResultDTO> getList(PowerKernelHouseHoldViewListFormDTO form);
long getTotal(PowerKernelHouseHoldViewListFormDTO form);
/**
@ -95,4 +95,8 @@ public interface PowerKernelHouseholdService extends BaseService<PowerKernelHous
List<PowerKernelListPostitionResultDTO> getListPosition(PowerKernelListPostitionFormDTO form);
long getListTotal(PowerKernelListPostitionFormDTO form);
void bind(PowerKernelHouseFormDTO form);
}

6
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerServiceStationService.java

@ -5,6 +5,8 @@ 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.dto.axis.form.PowerAxisServiceStationFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisServiceStationResultDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerServiceStationEntity;
import java.util.List;
@ -77,4 +79,8 @@ public interface PowerServiceStationService extends BaseService<PowerServiceStat
* @date 2022-04-18
*/
void delete(String[] ids);
List<PowerAxisServiceStationResultDTO> getListPosition(PowerAxisServiceStationFormDTO form);
long queryTotal(PowerAxisServiceStationFormDTO form);
}

19
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisLeaderServiceImpl.java

@ -6,6 +6,7 @@ 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.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.plugin.power.dto.axis.PowerAxisLeaderDTO;
import com.epmet.plugin.power.dto.axis.form.PowerAxisLeaderDetailFormDTO;
@ -39,6 +40,9 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
@Resource
PowerAxisStructLeaderDao powerAxisStructLeaderDao;
@Autowired
LoginUserUtil loginUserUtil;
@Override
public PageData<PowerAxisLeaderDTO> page(Map<String, Object> params) {
IPage<PowerAxisLeaderEntity> page = baseDao.selectPage(
@ -89,7 +93,9 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
boolean i = updateById(entity);
if (i) {
// 关联表,先删除(by structReferenceId),再插入
delStructLeaderRelation(dto.getCustomerId(), dto.getStructReferenceId());
powerAxisStructLeaderDao.deleteStructLeader(
dto.getCustomerId(), dto.getStructReferenceId(), dto.getId()
);
addStructLeaderRelation(
dto.getCustomerId(), dto.getStructReferenceId(), entity.getId(), dto.getCategoryCode()
);
@ -105,21 +111,16 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
@Override
public List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids) {
return baseDao.getSimpleList(ids);
String customerId = loginUserUtil.getLoginUserCustomerId();
return baseDao.getSimpleList(ids, customerId);
}
@Override
public PowerAxisLeaderDetailResultDTO getLeaderDetail(PowerAxisLeaderDetailFormDTO form) {
form.setCustomerId(loginUserUtil.getLoginUserCustomerId());
return baseDao.getLeaderDetail(form);
}
private void delStructLeaderRelation(String customerId, String structId) {
LambdaQueryWrapper<PowerAxisStructLeaderEntity> lqw = new LambdaQueryWrapper<>();
lqw.eq(PowerAxisStructLeaderEntity::getStructReferenceId, structId)
.eq(PowerAxisStructLeaderEntity::getCustomerId, customerId);
powerAxisStructLeaderDao.delete(lqw);
}
private void addStructLeaderRelation(String customerId, String structId, String leaderId, String categoryCode) {
PowerAxisStructLeaderEntity structLeader = new PowerAxisStructLeaderEntity();
structLeader.setCustomerId(customerId);

71
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructLeaderServiceImpl.java

@ -1,17 +1,32 @@
package com.epmet.plugin.power.modules.axis.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.epmet.commons.mybatis.enums.EpmetDelFlagEnum;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.plugin.power.dto.axis.form.StructLeaderBindFormDTO;
import com.epmet.plugin.power.dto.axis.form.StructLeaderBriefFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSLeaderResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO;
import com.epmet.plugin.power.enums.PowerTagLevelEnum;
import com.epmet.plugin.power.modules.axis.dao.PowerAxisStructDao;
import com.epmet.plugin.power.modules.axis.dao.PowerAxisStructLeaderDao;
import com.epmet.plugin.power.dto.axis.PowerAxisStructLeaderDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructLeaderEntity;
import com.epmet.plugin.power.modules.axis.service.PowerAxisStructLeaderService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -20,7 +35,7 @@ import java.util.List;
import java.util.Map;
/**
* 动力主轴负责人关系
* 动力主轴负责人关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-19
@ -28,8 +43,11 @@ import java.util.Map;
@Service
public class PowerAxisStructLeaderServiceImpl extends BaseServiceImpl<PowerAxisStructLeaderDao, PowerAxisStructLeaderEntity> implements PowerAxisStructLeaderService {
// @Autowired
// private PowerAxisStructLeaderRedis powerAxisStructLeaderRedis;
@Autowired
private LoginUserUtil loginUserUtil;
@Autowired
private PowerAxisStructDao powerAxisStructDao;
@Override
public PageData<PowerAxisStructLeaderDTO> page(Map<String, Object> params) {
@ -47,8 +65,8 @@ public class PowerAxisStructLeaderServiceImpl extends BaseServiceImpl<PowerAxisS
return ConvertUtils.sourceToTarget(entityList, PowerAxisStructLeaderDTO.class);
}
private QueryWrapper<PowerAxisStructLeaderEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<PowerAxisStructLeaderEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<PowerAxisStructLeaderEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -85,7 +103,48 @@ public class PowerAxisStructLeaderServiceImpl extends BaseServiceImpl<PowerAxisS
@Override
public PowerAxisSLeaderResultDTO queryLeaderDetailById(String axisStructId) {
return baseDao.queryLeaderDetailById(axisStructId);
String customerId = loginUserUtil.getLoginUserCustomerId();
return baseDao.queryLeaderDetailById(axisStructId, customerId);
}
@Override
public List<PowerAxisSimpleListDTO> listLeaderByStructId(TokenDto tokenDto, StructLeaderBriefFormDTO formDto) {
int structLevel = formDto.getStructLevel();
String axisStructId = formDto.getAxisStructId();
String customerId = tokenDto.getCustomerId();
String rootId;
if (PowerTagLevelEnum.ROOT.level() == structLevel) {
rootId = axisStructId;
} else {
LambdaQueryWrapper<PowerAxisStructEntity> lqw = new LambdaQueryWrapper<>();
lqw.eq(PowerAxisStructEntity::getCustomerId, customerId)
.eq(PowerAxisStructEntity::getPid, axisStructId)
.eq(PowerAxisStructEntity::getDelFlag, EpmetDelFlagEnum.NORMAL.value());
PowerAxisStructEntity axisStructEntity = powerAxisStructDao.selectOne(lqw);
if (null == axisStructEntity) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "节点匹配错误");
}
rootId = StringUtils.split(axisStructEntity.getPids(), StrConstant.COLON)[NumConstant.ZERO];
}
formDto.setCustomerId(customerId);
formDto.setAxisStructId(rootId);
return baseDao.listLeaderBriefByRootStructId(formDto);
}
@Override
public void bindAxisStructLeader(TokenDto tokenDto, StructLeaderBindFormDTO formDto) {
baseDao.deleteStructLeader(formDto.getCustomerId(), formDto.getAxisStructId(), formDto.getLeaderId());
PowerAxisStructLeaderEntity structLeader = new PowerAxisStructLeaderEntity();
structLeader.setCustomerId(formDto.getCustomerId());
structLeader.setLeaderId(formDto.getLeaderId());
structLeader.setStructReferenceId(formDto.getAxisStructId());
structLeader.setCategoryCode(formDto.getCategoryCode());
baseDao.insert(structLeader);
}
}

196
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java

@ -9,7 +9,6 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
@ -91,15 +90,28 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl<PowerAxisStructD
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PowerAxisStructDTO dto) {
verifyStructField(dto);
PowerAxisStructEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisStructEntity.class);
insert(entity);
this.assembleStruct(entity, dto.getStructLevel());
baseDao.insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(PowerAxisStructDTO dto) {
if (dto.getId().equals(dto.getPid())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "不能选择自身为上级节点");
}
verifyStructField(dto);
PowerAxisStructEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisStructEntity.class);
updateById(entity);
this.assembleStruct(entity, dto.getStructLevel());
baseDao.updateById(entity);
}
@Override
@ -111,59 +123,56 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl<PowerAxisStructD
@Override
public List<PowerAxisStructResultDTO> queryDeptByName(PowerAxisStructFormDTO form) {
String customerId = loginUserUtil.getLoginUserCustomerId();
form.setCustomerId(customerId);
List<PowerAxisStructResultDTO> list = powerAxisStructDao.queryDeptByName(form);
return list;
}
@Override
public List<PowerAxisStructListResultDTO> queryList() {
List<PowerAxisStructListResultDTO> list = powerAxisStructDao.queryList();
return list;
}
@Override
public List<PowerAxisStructLeaderResultDTO> selectAllForTree(PowerAxisStructLeaderFormDTO formDto) {
return baseDao.selectAllForTree(formDto);
}
@Override
public void addOrg(PowerAxisStructEntity form) {
int structLevel = powerAxisTagService.selectStructLevelByCode(loginUserUtil.getLoginUserCustomerId(), PowerTagCategoryEnum.STRUCT.category(), form.getCategoryCode());
// 验证表单字段
private void verifyStructField(PowerAxisStructDTO structDto) {
String customerId = structDto.getCustomerId();
String categoryCode = structDto.getCategoryCode();
String agencyId = structDto.getAgencyId();
Integer structLevel = structDto.getStructLevel();
if (PowerTagLevelEnum.ROOT.level() == structLevel) {
if (baseDao.queryCategory(form) > NumConstant.ZERO) {
if (baseDao.countRepeatStructByCategory(customerId, agencyId, categoryCode, structDto.getId()) > NumConstant.ZERO) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一组织下只允许存在一个顶级节点");
}
} else {
int parentStructLevel = powerAxisTagService.selectStructLevelById(customerId, PowerTagCategoryEnum.STRUCT.category(), structDto.getPid());
if (structLevel - parentStructLevel > NumConstant.ONE) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "无法跨级添加节点");
}
}
if (baseDao.queryName(form) > NumConstant.ZERO) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一组织下不允许存在重名的节点");
if (baseDao.countRepeatStructByName(customerId, structDto.getName(), agencyId, structDto.getPid(), structDto.getId()) > NumConstant.ZERO) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一节点下不允许添加同名的子节点");
}
this.assembleStruct(form, loginUserUtil.getLoginUserCustomerId());
baseDao.insert(form);
}
/**
* 组装节点对象
*
* @param struct 提交的表单
* @param customerId 客户ID
* @param struct 提交的表单
* @param structLevel 节点级别
* @return void
* @author work@yujt.net.cn
* @date 2022/4/22/0022 14:04
*/
private void assembleStruct(PowerAxisStructEntity struct, String customerId) {
struct.setCustomerId(customerId);
private void assembleStruct(PowerAxisStructEntity struct, int structLevel) {
// 上级节点
String pid = struct.getPid();
// 类别编码
String categoryCode = struct.getCategoryCode();
if (StringUtils.isBlank(pid)) {
// 查询类别编码对应的节点级别
int structLevel = powerAxisTagService.selectStructLevelByCode(customerId, PowerTagCategoryEnum.STRUCT.category(), categoryCode);
if (PowerTagLevelEnum.ROOT.level() == structLevel) {
pid = NumConstant.ZERO_STR;
} else {
@ -198,54 +207,11 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl<PowerAxisStructD
}
}
@Override
public void modifyRog(PowerAxisStructEntity form) {
if (form.getId().equals(form.getPid())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "不能选择自身为上级节点");
}
int structLevel = powerAxisTagService.selectStructLevelByCode(loginUserUtil.getLoginUserCustomerId(), PowerTagCategoryEnum.STRUCT.category(), form.getCategoryCode());
if (PowerTagLevelEnum.ROOT.level() == structLevel) {
if (baseDao.queryCategory(form) > NumConstant.ZERO) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一组织下只允许存在一个顶级节点");
}
}
if (baseDao.queryName(form) > NumConstant.ZERO) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "同一组织下不允许存在重名的节点");
}
this.assembleStruct(form, loginUserUtil.getLoginUserCustomerId());
baseDao.updateById(form);
}
// private void
@Override
public void delete(String id) {
baseDao.delete(id);
}
/**
* 获取上级网格党支部
*/
@Override
public List<PowerAxisStructGridPartyBranchResultDTO> getGridPartyBranchList() {
List<PowerAxisStructGridPartyBranchResultDTO> list = baseDao.getGridPartyBranchList();
return list;
}
@Override
public List<String> getPid() {
List<String> pid = baseDao.getPid();
return pid;
}
@Override
public List<PowerAxisStructPartyCommResultDTO> getPartyCommList() {
List<PowerAxisStructPartyCommResultDTO> list = baseDao.getPartyCommList();
return list;
}
@Override
public PowerAxisStructEntity queryModifyById(String id) {
PowerAxisStructEntity entity = baseDao.selectById(id);
@ -254,48 +220,106 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl<PowerAxisStructD
@Override
public List<String> getIdByAgencyId(String agencyId) {
List<String> ids = baseDao.getIdsByAgencyId(agencyId);
String customerId = loginUserUtil.getLoginUserCustomerId();
List<String> ids = baseDao.getIdsByAgencyId(agencyId, customerId);
return ids;
}
/**
* 按节点类型获取节点列表
*/
@Override
public List<PowerAixsStructListByCategoryResultDTO> getListByCategoryCode(PowerAxisStructListByCategoryCodeFormDTO form) {
List<PowerAixsStructListByCategoryResultDTO> dto = baseDao.getListByCategoryCode(form);
return dto;
}
@Override
public PowerAxisStructViewResultDTO getStatistics(PowerAxisStructViewFormDTO form) {
form.setCustomerId(loginUserUtil.getLoginUserCustomerId());
// 查网格党支部数 grid_party
int gridParty = baseDao.queryGridParty(form);
String gridCateGoryCode = baseDao.getCateGoryCode(form.getCustomerId(),PowerTagLevelEnum.CHILD_FIRST.level(),PowerTagCategoryEnum.STRUCT.category());
int gridParty = baseDao.queryGridParty(form,gridCateGoryCode);
// 查楼院党小组数 group_party
int groupParty = baseDao.queryGroupParty(form);
String groupCateGoryCode = baseDao.getCateGoryCode(form.getCustomerId(),PowerTagLevelEnum.CHILD_SECOND.level(),PowerTagCategoryEnum.STRUCT.category());
int groupParty = baseDao.queryGroupParty(form,groupCateGoryCode);
// 查询党员数
int partyNum = 0;
// 查询党员中心户数
int kernelHouseHold = baseDao.getKernelHouseHold();
int kernelHouseHold = baseDao.getKernelHouseHold(form);
// 查询服务站数
int serviceStation = baseDao.getServiceStation();
int serviceStation = baseDao.getServiceStation(form);
// 查询志愿者队伍数
int VolunteerTeamNum = 0;
int volunteerTeamNum = 0;
PowerAxisStructViewResultDTO result = new PowerAxisStructViewResultDTO();
result.setGridNum(gridParty);
result.setGroupNum(groupParty);
result.setPartyMemberNum(partyNum);
result.setKernelHouseHoldNum(kernelHouseHold);
result.setServiceStationNum(serviceStation);
result.setVolunteerTeamNum(VolunteerTeamNum);
result.setVolunteerTeamNum(volunteerTeamNum);
List<PowerAxisTagCategoryResultDTO> tagList = powerAxisTagService.listSimple(PowerTagCategoryEnum.PARAM.category(), loginUserUtil.getLoginUserCustomerId());
tagList.forEach(
item -> {
int numTemp;
switch (item.getCategoryCode()) {
case "volunteerTeamNum":
numTemp = Integer.parseInt(item.getCategoryName());
if (numTemp > NumConstant.ZERO) {
result.setVolunteerTeamNum(numTemp);
}
break;
case "partyMemberNum":
numTemp = Integer.parseInt(item.getCategoryName());
if (numTemp > NumConstant.ZERO) {
result.setPartyMemberNum(numTemp);
}
break;
case "kernelHouseHoldNum":
numTemp = Integer.parseInt(item.getCategoryName());
if (numTemp > NumConstant.ZERO) {
result.setKernelHouseHoldNum(numTemp);
}
break;
default:
break;
}
}
);
return result;
}
@Override
public List<PowerAxisStructTreeResultDTO> getStructTree(PowerAxisStructStructTreeFormDTO form) {
form.setCustomerId(loginUserUtil.getLoginUserCustomerId());
List<PowerAxisStructTreeResultDTO> dto = baseDao.getStructTree(form);
return TreeUtils.build(dto);
}
@Override
public List<PowerAxisListPositionResultDTO> getListPosition(int structLevel) {
PowerAxisListPositionFormDTO form = new PowerAxisListPositionFormDTO();
String customerId = loginUserUtil.getLoginUserCustomerId();
form.setCustomerId(customerId);
form.setStructLevel(structLevel);
form.setTagCategory(PowerTagCategoryEnum.STRUCT.category());
String code = baseDao.queryCategoryCode(form);
List<PowerAxisListPositionResultDTO> list = baseDao.querylistPosition(customerId, code);
return list;
}
@Override
public long queryTotal(int structLevel) {
PowerAxisListPositionFormDTO form = new PowerAxisListPositionFormDTO();
String customerId = loginUserUtil.getLoginUserCustomerId();
form.setCustomerId(customerId);
form.setStructLevel(structLevel);
form.setTagCategory(PowerTagCategoryEnum.STRUCT.category());
String code = baseDao.queryCategoryCode(form);
long total = baseDao.queryTotal(customerId, code);
return total;
}
@Override
public List<PowerAxisStructTreeResultDTO> listParentTreeByLevel(String structLevel, String customerId) {
List<PowerAxisStructTreeResultDTO> result = baseDao.listParentTreeByLevel(Integer.parseInt(structLevel), customerId);
return TreeUtils.build(result);
}
}

19
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java

@ -36,9 +36,6 @@ import java.util.Map;
@Service
public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, PowerAxisTagEntity> implements PowerAxisTagService {
// @Autowired
// private PowerAxisTagRedis powerAxisTagRedis;
@Autowired
private LoginUserUtil loginUserUtil;
@ -46,7 +43,7 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
@Override
public PageData<PowerAxisTagDTO> page(Map<String, Object> params) {
IPage<PowerAxisTagEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getPage(params, FieldConstant.CREATED_TIME, true),
getWrapper(params)
);
return getPageData(page, PowerAxisTagDTO.class);
@ -63,7 +60,8 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<PowerAxisTagEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id)
.orderByAsc("TAG_CATEGORY", "STRUCT_LEVEL");
return wrapper;
}
@ -78,6 +76,7 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
@Transactional(rollbackFor = Exception.class)
public void save(PowerAxisTagDTO dto) {
PowerAxisTagEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisTagEntity.class);
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
insert(entity);
}
@ -85,6 +84,7 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
@Transactional(rollbackFor = Exception.class)
public void update(PowerAxisTagDTO dto) {
PowerAxisTagEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisTagEntity.class);
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
updateById(entity);
}
@ -96,7 +96,7 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
}
@Override
public List<PowerAxisTagCategoryResultDTO> listSimple(String tagCategory) {
public List<PowerAxisTagCategoryResultDTO> listSimple(String tagCategory, String customerId) {
if (StringUtils.isBlank(tagCategory)) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "缺少参数");
@ -105,7 +105,7 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
QueryWrapper<PowerAxisTagEntity> wrapper = new QueryWrapper<>();
wrapper.eq("TAG_CATEGORY", tagCategory)
.eq("FORBIDDEN_FLAG", EpmetDelFlagEnum.NORMAL.value())
.eq(FieldConstant.CUSTOMER_ID, loginUserUtil.getLoginUserCustomerId())
.eq(FieldConstant.CUSTOMER_ID, customerId)
.orderByAsc("STRUCT_LEVEL", FieldConstant.CREATED_TIME);
return ConvertUtils.sourceToTarget(baseDao.selectList(wrapper), PowerAxisTagCategoryResultDTO.class);
@ -130,4 +130,9 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
}
return list.get(NumConstant.ZERO).getStructLevel();
}
@Override
public Integer selectStructLevelById(String customerId, String tagCategory, String axisStructId) {
return baseDao.selectStructLevelById(customerId, tagCategory, axisStructId);
}
}

102
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java

@ -5,26 +5,36 @@ 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.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcHouseDTO;
import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.plugin.power.dto.axis.PowerKernelHouseholdDTO;
import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseFormDTO;
import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseHoldViewListFormDTO;
import com.epmet.plugin.power.dto.axis.form.PowerKernelListPostitionFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO;
import com.epmet.plugin.power.enums.PowerTagCategoryEnum;
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.PowerAxisTagService;
import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService;
import org.apache.commons.compress.utils.Lists;
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;
import java.math.BigDecimal;
import java.util.*;
/**
* 动力主轴党员中心户
@ -38,6 +48,18 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl<PowerKernel
@Autowired
private PowerKernelHouseholdRedis powerKernelHouseholdRedis;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
@Autowired
private PowerKernelHouseholdService powerKernelHouseholdService;
@Autowired
private PowerAxisTagService powerAxisTagService;
@Override
public PageData<PowerKernelHouseholdDTO> page(Map<String, Object> params) {
IPage<PowerKernelHouseholdEntity> page = baseDao.selectPage(
@ -54,11 +76,15 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl<PowerKernel
return ConvertUtils.sourceToTarget(entityList, PowerKernelHouseholdDTO.class);
}
private QueryWrapper<PowerKernelHouseholdEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<PowerKernelHouseholdEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
String axisStructId = (String) params.get("axisStructId");
String ownerName = (String) params.get("ownerName");
QueryWrapper<PowerKernelHouseholdEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id)
.eq(StringUtils.isNotBlank(axisStructId), "STRUCT_REFERENCE_ID", axisStructId)
.like(StringUtils.isNotBlank(ownerName), "OWNER_NAME", ownerName);
return wrapper;
}
@ -94,27 +120,83 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl<PowerKernel
* 党员中心户列表
*/
@Override
public PowerKernelHouseHoldViewListResultDTO getList(PowerKernelHouseHoldViewListFormDTO form) {
public List<PowerKernelHouseHoldViewListResultDTO> getList(PowerKernelHouseHoldViewListFormDTO form) {
form.setPageNo((form.getPageNo() - 1) * form.getPageSize());
PowerKernelHouseHoldViewListResultDTO dto = baseDao.getList(form);
form.setCustomerId(loginUserUtil.getLoginUserCustomerId());
List<PowerKernelHouseHoldViewListResultDTO> dto = baseDao.getList(form);
return dto;
}
@Override
public long getTotal(PowerKernelHouseHoldViewListFormDTO form) {
form.setCustomerId(loginUserUtil.getLoginUserCustomerId());
return baseDao.getTotal(form);
}
@Override
public List<PowerKernelListPostitionResultDTO> getListPosition(PowerKernelListPostitionFormDTO form) {
List<PowerKernelListPostitionResultDTO> dto = baseDao.getListPosition(form);
return dto;
return baseDao.queryListPosition(form.getAxisStructId(),form.getCustomerId(),form.getLimit());
}
@Override
public long getListTotal(PowerKernelListPostitionFormDTO form) {
form.setCustomerId(loginUserUtil.getLoginUserCustomerId());
return baseDao.getListTotal(form);
}
@Override
public void bind(PowerKernelHouseFormDTO form) {
String customerId = loginUserUtil.getLoginUserCustomerId();
// 查询出重复的houseId
List<String> idList = baseDao.queryHouseIdList(form.getHouseIdList(), form.getAxisStructId(), customerId);
// 将idList转换为Set集合进行去重
Set<String> setIdList = new HashSet<>();
for (String id : idList) {
setIdList.add(id);
}
// 将前端发送的houseId放入Set集合
Set<String> houseIds = new HashSet<>();
Collections.addAll(houseIds, form.getHouseIdList());
// 去重
houseIds.removeAll(setIdList);
Result<List<HouseInfoDTO>> listResult = govOrgOpenFeignClient.queryListHouseInfo(houseIds, customerId);
if (!listResult.success()) {
return;
}
List<HouseInfoDTO> houseList = listResult.getData();
PowerKernelHouseholdEntity entity;
for (HouseInfoDTO houseInfo : houseList) {
Result<IcHouseDTO> icHouseDTOResult = govOrgOpenFeignClient.get(houseInfo.getHomeId());
if (!icHouseDTOResult.success()) {
continue;
}
IcHouseDTO houseDto = icHouseDTOResult.getData();
entity = new PowerKernelHouseholdEntity();
entity.setHouseId(houseInfo.getHomeId());
if (StringUtils.isNotBlank(houseInfo.getBuildingLatitude()) && StringUtils.isNotBlank(houseInfo.getBuildingLongitude())) {
entity.setLatitude(new BigDecimal(houseInfo.getBuildingLatitude()));
entity.setLongitude(new BigDecimal(houseInfo.getBuildingLongitude()));
} else {
entity.setLatitude(BigDecimal.ZERO);
entity.setLongitude(BigDecimal.ZERO);
}
entity.setAddress(houseInfo.getAllName());
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
entity.setOwnerPhone(houseDto.getOwnerPhone());
entity.setOwnerIdCard(houseDto.getOwnerIdCard());
entity.setOwnerName(houseDto.getOwnerName());
entity.setStructReferenceId(form.getAxisStructId());
powerKernelHouseholdService.insert(entity);
}
}
}

32
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java

@ -4,10 +4,14 @@ 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.annotation.LoginUser;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.plugin.power.dto.axis.PowerServiceStationDTO;
import com.epmet.plugin.power.dto.axis.form.PowerAxisServiceStationFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisServiceStationResultDTO;
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;
@ -33,6 +37,9 @@ public class PowerServiceStationServiceImpl extends BaseServiceImpl<PowerService
@Autowired
private PowerServiceStationRedis powerServiceStationRedis;
@Autowired
private LoginUserUtil loginUser;
@Override
public PageData<PowerServiceStationDTO> page(Map<String, Object> params) {
IPage<PowerServiceStationEntity> page = baseDao.selectPage(
@ -49,11 +56,15 @@ public class PowerServiceStationServiceImpl extends BaseServiceImpl<PowerService
return ConvertUtils.sourceToTarget(entityList, PowerServiceStationDTO.class);
}
private QueryWrapper<PowerServiceStationEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
private QueryWrapper<PowerServiceStationEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
String name = (String) params.get("name");
String axisStructId = (String) params.get("axisStructId");
QueryWrapper<PowerServiceStationEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id)
.eq(StringUtils.isNotBlank(name), "NAME", name)
.eq(StringUtils.isNotBlank(axisStructId), "STRUCT_REFERENCE_ID", axisStructId);
return wrapper;
}
@ -67,6 +78,7 @@ public class PowerServiceStationServiceImpl extends BaseServiceImpl<PowerService
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PowerServiceStationDTO dto) {
dto.setCustomerId(loginUser.getLoginUserCustomerId());
PowerServiceStationEntity entity = ConvertUtils.sourceToTarget(dto, PowerServiceStationEntity.class);
insert(entity);
}
@ -85,4 +97,18 @@ public class PowerServiceStationServiceImpl extends BaseServiceImpl<PowerService
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public List<PowerAxisServiceStationResultDTO> getListPosition(PowerAxisServiceStationFormDTO form) {
form.setCustomerId(loginUser.getLoginUserCustomerId());
List<PowerAxisServiceStationResultDTO> list = baseDao.getListPosition(form);
return list;
}
@Override
public long queryTotal(PowerAxisServiceStationFormDTO form) {
form.setCustomerId(loginUser.getLoginUserCustomerId());
long total = baseDao.queryTotal(form);
return total;
}
}

2
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/bootstrap.yml

@ -82,7 +82,7 @@ mybatis-plus:
#数据库相关配置
db-config:
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
id-type: ASSIGN_ID
id-type: ASSIGN_UUID
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
field-strategy: NOT_NULL
#驼峰下划线转换

2
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/logback-spring.xml

@ -143,7 +143,7 @@
</appender>
<!-- 开发、测试环境 -->
<springProfile name="dev,test">
<springProfile name="dev,test,local">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.epmet.plugin.power.modules.axis.dao" level="DEBUG"/>

13
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisLeaderDao.xml

@ -33,25 +33,32 @@
<foreach collection="list" item="id">
STRUCT_REFERENCE_ID = #{id}
</foreach>
and ppal.customer_id = #{customerId}
</where>
</select>
<select id="getLeaderDetail"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisLeaderDetailResultDTO">
SELECT
NAME,
ppal.NAME,
gender,
mobile,
INTERODUCTION,
ppat.CATEGORY_NAME,
CATEGORY_NAME,
AVATAR
FROM
pli_power_axis_leader AS ppal
LEFT JOIN
pli_power_axis_struct AS poas
ON
poas.id = #{axisStructId}
LEFT JOIN
pli_power_axis_tag AS ppat
ON
ppal.CATEGORY_CODE = ppat.CATEGORY_CODE
poas.CATEGORY_CODE = ppat.CATEGORY_CODE
WHERE
ppal.id = #{leaderId}
AND
ppal.customer_id = #{customerId}
</select>

161
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml

@ -50,7 +50,7 @@
left join pli_power_axis_struct_leader sl on s.ID = sl.STRUCT_REFERENCE_ID
left join pli_power_axis_leader l on l.ID = sl.LEADER_ID
left join pli_power_axis_tag t on s.CATEGORY_CODE = t.CATEGORY_CODE
where s.DEL_FLAG = '0'
where s.DEL_FLAG = '0' and sl.del_flag = '0' and l.del_flag = '0'
<if test="agencyId != null and agencyId != ''">
and s.AGENCY_ID = #{agencyId}
</if>
@ -84,83 +84,40 @@
and AGENCY_ID = #{agencyId}
</if>
and del_flag = 0
and customer_id = #{customerId}
</where>
</select>
<select id="queryList" resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisStructListResultDTO">
SELECT
*
FROM
pli_power_axis_struct
where del_flag = 0
</select>
<select id="getGridPartyBranchList"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisStructGridPartyBranchResultDTO">
SELECT
id,
NAME
FROM
pli_power_axis_struct
WHERE
CATEGORY_CODE = 'grid_party'
AND
del_flag = 0
</select>
<select id="getPid" resultType="java.lang.String">
SELECT
id AS pid
FROM
( SELECT
id
FROM
pli_power_axis_struct
WHERE
CATEGORY_CODE = 'community_party' )
AS a
</select>
<select id="getPartyCommList"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisStructPartyCommResultDTO">
SELECT
id,
NAME
FROM
pli_power_axis_struct
WHERE
CATEGORY_CODE = 'community_party'
AND
del_flag = 0
</select>
<select id="queryName" resultType="java.lang.Integer">
<select id="countRepeatStructByName" resultType="java.lang.Integer">
SELECT
count(*)
FROM
pli_power_axis_struct
pli_power_axis_struct s
WHERE
NAME = #{name}
AND
agency_id = #{agencyId}
s.CUSTOMER_ID = #{customerId}
AND s.`NAME` = #{name}
<choose>
<when test="agencyId != null and agencyId != ''">AND s.AGENCY_ID = #{agencyId}</when>
<otherwise>
<if test="pid != null and pid != '' and pid != '0'">
AND s.AGENCY_ID = (SELECT t.agency_id FROM pli_power_axis_struct t WHERE t.ID = #{pid})
</if>
</otherwise>
</choose>
<if test="id != null and id != ''">AND s.ID != #{id}</if>
<if test="pid != null and pid != ''">AND s.pid = #{pid}</if>
</select>
<select id="queryCategory" resultType="java.lang.Integer">
<select id="countRepeatStructByCategory" resultType="java.lang.Integer">
SELECT
count(*)
FROM
pli_power_axis_struct
WHERE
AGENCY_ID = #{agencyId}
AGENCY_ID = #{agencyId} and CUSTOMER_ID = #{customerId} and CATEGORY_CODE = #{categoryCode}
<if test="id != null and id != ''">AND id != #{id}</if>
</select>
<select id="getIdsByAgencyId" resultType="java.lang.String">
select id from pli_power_axis_struct where agency_id = #{agencyId}
</select>
<select id="getListByCategoryCode"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAixsStructListByCategoryResultDTO">
SELECT
id,
NAME
FROM
pli_power_axis_struct
WHERE
AGENCY_ID = #{agencyId}
and
CATEGORY_CODE = #{categoryCode}
select id from pli_power_axis_struct where agency_id = #{agencyId} and customer_id = #{customerId}
</select>
<select id="queryGridParty" resultType="java.lang.Integer">
SELECT
@ -170,7 +127,9 @@
WHERE
AGENCY_ID = #{agencyId}
AND
CATEGORY_CODE = 'grid_party'
CATEGORY_CODE = #{gridCateGoryCode}
AND
customer_id = #{customerId}
</select>
<select id="queryGroupParty" resultType="java.lang.Integer">
SELECT
@ -180,13 +139,15 @@
WHERE
AGENCY_ID = #{agencyId}
AND
CATEGORY_CODE = 'group_party'
CATEGORY_CODE = #{groupCateGoryCode}
AND
customer_id = #{customerId}
</select>
<select id="getKernelHouseHold" resultType="java.lang.Integer">
select count(*) from pli_power_kernel_household
select count(*) from pli_power_kernel_household where customer_id = #{customerId}
</select>
<select id="getServiceStation" resultType="java.lang.Integer">
select count(*) from pli_power_service_station
select count(*) from pli_power_service_station where customer_id = #{customerId}
</select>
<select id="getStructTree"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO">
@ -202,6 +163,70 @@
LEFT JOIN pli_power_axis_leader AS leader ON sl.LEADER_ID = leader.id
WHERE
struct.agency_id = #{agencyId}
AND
struct.customer_id = #{customerId}
</select>
<select id="queryCategoryCode" resultType="java.lang.String">
SELECT
CATEGORY_CODE
FROM
pli_power_axis_tag
WHERE
CUSTOMER_ID = #{customerId}
AND
STRUCT_LEVEL = #{structLevel}
AND
TAG_CATEGORY = #{tagCategory}
</select>
<select id="querylistPosition"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisListPositionResultDTO">
SELECT
id AS axisStructId,
LONGITUDE,
LATITUDE,
NAME AS axisStructName
FROM
pli_power_axis_struct
WHERE
CUSTOMER_ID = #{customerId}
and
CATEGORY_CODE = #{code}
</select>
<select id="queryTotal" resultType="java.lang.Long">
select
count(*)
FROM
pli_power_axis_struct
WHERE
CUSTOMER_ID = #{customerId}
AND
CATEGORY_CODE = #{code}
</select>
<select id="listParentTreeByLevel"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO">
SELECT
struct.id,
struct.NAME,
struct.pid
FROM
pli_power_axis_struct AS struct
LEFT JOIN pli_power_axis_tag tag ON tag.CATEGORY_CODE = struct.CATEGORY_CODE
WHERE
struct.DEL_FLAG = '0'
AND struct.customer_id = #{customerId}
AND tag.struct_level &lt; #{structLevel}
</select>
<select id="getCateGoryCode" resultType="java.lang.String">
SELECT
CATEGORY_CODE
FROM
pli_power_axis_tag
WHERE
customer_id = #{customerId}
AND
TAG_CATEGORY = #{tagCateGory}
AND
STRUCT_LEVEL = #{level}
</select>

26
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructLeaderDao.xml

@ -16,6 +16,9 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteStructLeader">
delete from pli_power_axis_struct_leader where CUSTOMER_ID = #{customerId} and STRUCT_REFERENCE_ID = #{axisStructId} and LEADER_ID = #{leaderId}
</delete>
<select id="queryLeaderDetailById"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisSLeaderResultDTO">
SELECT
@ -31,6 +34,29 @@
LEFT JOIN pli_power_axis_struct_leader sl ON sl.LEADER_ID = l.ID
WHERE sl.STRUCT_REFERENCE_ID = #{axisStructId}
AND sl.DEL_FLAG = '0' AND l.DEL_FLAG = '0'
and l.customer_id = #{customerId}
</select>
<select id="listLeaderBriefByRootStructId"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO">
SELECT
l.ID,
l.`NAME` ,
l.MOBILE
FROM
pli_power_axis_struct s
LEFT JOIN pli_power_axis_struct_leader sl ON s.ID = sl.STRUCT_REFERENCE_ID
LEFT JOIN pli_power_axis_leader l ON sl.LEADER_ID = l.ID
WHERE
s.DEL_FLAG = '0'
AND sl.DEL_FLAG = '0'
AND s.CUSTOMER_ID = #{customerId}
AND ( s.ID = #{axisStructId} OR PIDS LIKE '%${axisStructId}%' )
AND (l.`NAME` LIKE '%${keyWord}%' OR l.MOBILE LIKE '%${keyWord}%')
GROUP BY
l.ID
ORDER BY
s.CREATED_TIME,
s.SORT
</select>

14
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml

@ -31,6 +31,20 @@
<select id="listSimpleAll" resultMap="listSimpleAllResultMap">
select t.TAG_CATEGORY,t.CATEGORY_NAME,t.CATEGORY_CODE,t.STRUCT_LEVEL from pli_power_axis_tag t where t.DEL_FLAG = '0' and t.FORBIDDEN_FLAG = '0' order by t.STRUCT_LEVEL
</select>
<select id="selectStructLevelById" resultType="java.lang.Integer">
SELECT
t.struct_level
FROM
pli_power_axis_struct s
LEFT JOIN pli_power_axis_tag t ON t.CATEGORY_CODE = s.CATEGORY_CODE
WHERE
t.DEL_FLAG = '0'
AND s.DEL_FLAG = '0'
AND t.TAG_CATEGORY = #{tagCategory}
AND s.CUSTOMER_ID = #{customerId}
AND t.CUSTOMER_ID = #{customerId}
AND s.id = #{axisStructId}
</select>
</mapper>

118
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml

@ -20,26 +20,22 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getList"
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO">
SELECT
OWNER_NAME,
HOUSE_ID,
ADDRESS
FROM
pli_power_kernel_household
WHERE
STRUCT_REFERENCE_ID = #{axisStructId}
limit
#{pageNo},#{pageSize}
</select>
<select id="getTotal" resultType="java.lang.Long">
select
SELECT
count(*)
FROM
pli_power_kernel_household
pli_power_kernel_household k
LEFT JOIN
pli_power_axis_struct s
ON
s.id = k.STRUCT_REFERENCE_ID
WHERE
STRUCT_REFERENCE_ID = #{axisStructId}
s.DEL_FLAG = '0'
AND k.DEL_FLAG = '0'
AND k.CUSTOMER_ID = #{customerId}
AND (s.pids LIKE '%${axisStructId}%'
OR s.id = #{axisStructId})
</select>
<select id="getListPosition"
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO">
@ -51,16 +47,92 @@
FROM
pli_power_kernel_household
WHERE
STRUCT_REFERENCE_ID = #{axisStructId}
STRUCT_REFERENCE_ID in
<foreach collection="list" item="axStrId" open="(" close=")" separator=",">
#{axStrId}
</foreach>
AND
customer_id = #{customerId}
limit #{limit}
</select>
<select id="getListTotal" resultType="java.lang.Long">
select
count(*)
from
pli_power_kernel_household
where
STRUCT_REFERENCE_ID = #{axisStructId}
SELECT
count(*)
FROM
pli_power_axis_struct AS s
LEFT JOIN pli_power_kernel_household h ON s.id = h.STRUCT_REFERENCE_ID
WHERE
s.DEL_FLAG = '0'
AND h.DEL_FLAG = '0' AND h.CUSTOMER_ID = #{customerId}
and s.pids LIKE '%${axisStructId}%'
</select>
<select id="getList"
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO">
SELECT
k.OWNER_NAME,
k.HOUSE_ID,
k.ADDRESS
FROM
pli_power_kernel_household k
LEFT JOIN
pli_power_axis_struct s
ON
s.id = k.STRUCT_REFERENCE_ID
WHERE
s.DEL_FLAG = '0'
AND k.DEL_FLAG = '0'
AND k.CUSTOMER_ID = #{customerId}
AND (s.pids LIKE '%${axisStructId}%'
OR s.id = #{axisStructId})
GROUP BY k.id
ORDER BY s.SORT
limit #{pageNo},#{pageSize}
</select>
<select id="queryHouseIdList" resultType="java.lang.String">
SELECT
HOUSE_ID
FROM
pli_power_kernel_household
<where>
house_id in
<foreach collection="houseIdList" item="houseId" open="(" close=")" separator=",">
#{houseId}
</foreach>
AND
STRUCT_REFERENCE_ID = #{axisStructId}
AND
customer_id = #{customerId}
AND
del_flag = '0'
</where>
</select>
<select id="queryIds" resultType="java.lang.String">
SELECT
id
FROM
pli_power_axis_struct
WHERE
pids
LIKE
'%${axisStructId}%'
</select>
<select id="queryListPosition"
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO">
SELECT
h.id AS houseId,
h.longitude,
h.latitude,
h.address
FROM
pli_power_axis_struct AS s
LEFT JOIN pli_power_kernel_household h ON s.id = h.STRUCT_REFERENCE_ID
WHERE
s.DEL_FLAG = '0'
AND h.DEL_FLAG = '0' AND h.CUSTOMER_ID = #{customerId}
and s.pids LIKE '%${axisStructId}%'
GROUP BY h.id
ORDER BY s.SORT
limit #{limit}
</select>

25
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerServiceStationDao.xml

@ -19,6 +19,31 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getListPosition"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisServiceStationResultDTO">
SELECT
id AS stationId,
longitude,
latitude,
address
FROM
pli_power_service_station
WHERE
STRUCT_REFERENCE_ID = #{axisStructId}
and
CUSTOMER_ID = #{customerId}
limit #{limit}
</select>
<select id="queryTotal" resultType="java.lang.Long">
SELECT
count(*)
FROM
pli_power_service_station
WHERE
STRUCT_REFERENCE_ID = #{axisStructId}
AND
CUSTOMER_ID = #{customerId}
</select>
</mapper>
Loading…
Cancel
Save