Browse Source

update

dev_power_axis
YUJT 3 years ago
parent
commit
7aba30b586
  1. 19
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisDataVisualController.java
  2. 10
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerKernelHouseholdController.java
  3. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java
  4. 13
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java
  5. 13
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelMemberDao.java
  6. 1
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerServiceStationDao.java
  7. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java
  8. 8
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerKernelHouseholdService.java
  9. 1
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerServiceStationService.java
  10. 12
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java
  11. 26
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java
  12. 11
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerServiceStationServiceImpl.java
  13. 13
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml
  14. 43
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml
  15. 10
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerServiceStationDao.xml

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

@ -12,8 +12,6 @@ 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;
/***
* 动力主轴相关数据可视化接口
@ -45,9 +43,8 @@ public class PowerAxisDataVisualController {
* @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));
public Result<List<PowerAxisServiceStationResultDTO>> getListPostition(@RequestBody PowerAxisServiceStationFormDTO form) {
return new Result().ok(powerServiceStationService.getListPosition(form));
}
/**
@ -101,14 +98,13 @@ public class PowerAxisDataVisualController {
* @date 2022/4/23 10:19
*/
@PostMapping("axis/{structLevel}/listPosition")
public ResultDTO getListPosition(@PathVariable int structLevel,@RequestBody PowerAxisDataListPositionFormDTO form) {
List<PowerAxisListPositionResultDTO> list = powerAxisStructService.getListPosition(structLevel,form);
return ResultDTO.success("成功", list, powerAxisStructService.queryTotal(structLevel,form));
public Result<List<PowerAxisListPositionResultDTO>> getListPosition(@PathVariable int structLevel, @RequestBody PowerAxisDataListPositionFormDTO form) {
return new Result().ok(powerAxisStructService.getListPosition(structLevel, form));
}
/**
* 党员中心户列表
* 党员中心户分页列表
*
* @param form
* @return com.epmet.plugin.power.dto.axis.ResultDTO
@ -130,9 +126,8 @@ public class PowerAxisDataVisualController {
* @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));
public Result<List<PowerKernelListPostitionResultDTO>> getListPosition(@RequestBody PowerKernelListPostitionFormDTO form) {
return new Result().ok(powerKernelHouseholdService.getListPosition(form));
}
}

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

@ -1,8 +1,11 @@
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.constant.FieldConstant;
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.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
@ -21,6 +24,7 @@ import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseFromDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerKernelHouseholdEntity;
import com.epmet.plugin.power.modules.axis.excel.PowerKernelHouseholdExcel;
import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService;
import lombok.extern.java.Log;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
@ -46,9 +50,9 @@ public class PowerKernelHouseholdController {
@RequestMapping("page")
public ResultDTO page(@RequestBody PowerKernelHouseFromDTO form) {
PageData<PowerKernelHouseholdDTO> page = powerKernelHouseholdService.page(form);
return ResultDTO.success("成功", page, powerKernelHouseholdService.getPageTotal(form));
public Result<PageData<PowerKernelHouseholdDTO>> page(@RequestParam Map<String, Object> params, @LoginUser TokenDto tokenDto) {
params.put(FieldConstant.CUSTOMER_ID_HUMP, tokenDto.getCustomerId());
return new Result().ok(powerKernelHouseholdService.page(params));
}
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET})

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

@ -89,9 +89,6 @@ public interface PowerAxisStructDao extends BaseDao<PowerAxisStructEntity> {
List<PowerAxisListPositionResultDTO> querylistPosition(@Param("customerId") String customerId,@Param("code") String code ,@Param("agencyId") String agencyId);
long queryTotal(@Param("customerId") String customerId,@Param("code") String code,@Param("agencyId") String agencyId);
/**
* 根据节点接报组装其上级节点树
*

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

@ -2,10 +2,7 @@ package com.epmet.plugin.power.modules.axis.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.page.PageData;
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.PowerKernelHouseFromDTO;
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;
@ -15,6 +12,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 动力主轴党员中心户
@ -32,8 +30,6 @@ public interface PowerKernelHouseholdDao extends BaseDao<PowerKernelHouseholdEnt
List<PowerKernelListPostitionResultDTO> getListPosition(PowerKernelListPostitionFormDTO form, List<String> axisStructIds);
long getListTotal(PowerKernelListPostitionFormDTO form);
/**
* 根据节点ID查询已绑定的房屋ID
*
@ -54,11 +50,6 @@ public interface PowerKernelHouseholdDao extends BaseDao<PowerKernelHouseholdEnt
List<PowerKernelListPostitionResultDTO> queryListPosition(String axisStructId, String customerId, int limit);
PageData<PowerKernelHouseholdDTO> getPage(@Param("axisStructId") String axisStructId,
@Param("kernelMemberName") String kernelMemberName,
@Param("limit") int limit,
@Param("page") int page,
@Param("customerId") String customerId);
List<PowerKernelHouseholdDTO> getPage(Map<String, Object> params);
long getPageTotal(PowerKernelHouseFromDTO form);
}

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

@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.dto.axis.form.PowerKernelMemFormDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerKernelMemberEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -16,6 +17,14 @@ import java.util.List;
@Mapper
public interface PowerKernelMemberDao extends BaseDao<PowerKernelMemberEntity> {
void deleteBind(String houseId, String customerId);
/**
* 删除中心党员绑定关系
*
* @param houseId 房屋ID
* @param customerId 客户ID
* @return void
* @author LZN
* @date 2022/4/26/0026 16:31
*/
void deleteBind(@Param("houseId") String houseId, @Param("customerId") String customerId);
}

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

@ -20,5 +20,4 @@ public interface PowerServiceStationDao extends BaseDao<PowerServiceStationEntit
List<PowerAxisServiceStationResultDTO> getListPosition(PowerAxisServiceStationFormDTO form);
long queryTotal(PowerAxisServiceStationFormDTO form);
}

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

@ -111,7 +111,6 @@ public interface PowerAxisStructService extends BaseService<PowerAxisStructEntit
*/
PowerAxisStructEntity queryModifyById(String id);
/**
* 根据agencyId获取id列表
*
@ -145,8 +144,6 @@ public interface PowerAxisStructService extends BaseService<PowerAxisStructEntit
List<PowerAxisListPositionResultDTO> getListPosition(int structLevel,PowerAxisDataListPositionFormDTO form);
long queryTotal(int structLevel,PowerAxisDataListPositionFormDTO form);
/**
* 根据节点接报组装其上级节点树
*

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

@ -6,7 +6,6 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.plugin.power.dto.axis.PowerKernelHouseholdDTO;
import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseFormDTO;
import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseFromDTO;
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;
@ -27,12 +26,12 @@ public interface PowerKernelHouseholdService extends BaseService<PowerKernelHous
/**
* 默认分页
*
* @param form
* @param params
* @return PageData<PowerKernelHouseholdDTO>
* @author generator
* @date 2022-04-18
*/
PageData<PowerKernelHouseholdDTO> page(PowerKernelHouseFromDTO form);
PageData<PowerKernelHouseholdDTO> page(Map<String, Object> params);
/**
* 默认查询
@ -95,10 +94,7 @@ public interface PowerKernelHouseholdService extends BaseService<PowerKernelHous
*/
List<PowerKernelListPostitionResultDTO> getListPosition(PowerKernelListPostitionFormDTO form);
long getListTotal(PowerKernelListPostitionFormDTO form);
void bind(PowerKernelHouseFormDTO form);
long getPageTotal(PowerKernelHouseFromDTO form);
}

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

@ -82,5 +82,4 @@ public interface PowerServiceStationService extends BaseService<PowerServiceStat
List<PowerAxisServiceStationResultDTO> getListPosition(PowerAxisServiceStationFormDTO form);
long queryTotal(PowerAxisServiceStationFormDTO form);
}

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

@ -269,18 +269,6 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl<PowerAxisStructD
return list;
}
@Override
public long queryTotal(int structLevel, PowerAxisDataListPositionFormDTO form) {
PowerAxisListPositionFormDTO dto = new PowerAxisListPositionFormDTO();
String customerId = loginUserUtil.getLoginUserCustomerId();
dto.setCustomerId(customerId);
dto.setStructLevel(structLevel);
dto.setTagCategory(PowerTagCategoryEnum.STRUCT.category());
String code = baseDao.queryCategoryCode(dto);
long total = baseDao.queryTotal(customerId, code, form.getAgencyId());
return total;
}
@Override
public List<PowerAxisStructTreeResultDTO> listParentTreeByLevel(String structLevel, String customerId) {
List<PowerAxisStructTreeResultDTO> result = baseDao.listParentTreeByLevel(Integer.parseInt(structLevel), customerId);

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

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.user.LoginUserUtil;
@ -51,9 +52,16 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl<PowerKernel
private PowerKernelHouseholdService powerKernelHouseholdService;
@Override
public PageData<PowerKernelHouseholdDTO> page(PowerKernelHouseFromDTO form) {
String customerId = loginUserUtil.getLoginUserCustomerId();
return baseDao.getPage(form.getAxisStructId(),form.getKernelMemberName(),form.getLimit(),form.getPage(),customerId);
public PageData<PowerKernelHouseholdDTO> page(Map<String, Object> params) {
//分页
IPage<PowerKernelHouseholdDTO> page = getPage(params);
//查询
List<PowerKernelHouseholdDTO> list = baseDao.getPage(params);
return getPageData(list, page.getTotal(), PowerKernelHouseholdDTO.class);
}
@Override
@ -125,13 +133,6 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl<PowerKernel
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();
@ -189,10 +190,5 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl<PowerKernel
}
}
@Override
public long getPageTotal(PowerKernelHouseFromDTO form) {
return baseDao.getPageTotal(form);
}
}

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

@ -4,7 +4,6 @@ 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;
@ -14,7 +13,6 @@ 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;
import com.epmet.plugin.power.modules.axis.service.PowerServiceStationService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -34,8 +32,6 @@ import java.util.Map;
@Service
public class PowerServiceStationServiceImpl extends BaseServiceImpl<PowerServiceStationDao, PowerServiceStationEntity> implements PowerServiceStationService {
@Autowired
private PowerServiceStationRedis powerServiceStationRedis;
@Autowired
private LoginUserUtil loginUser;
@ -104,11 +100,4 @@ public class PowerServiceStationServiceImpl extends BaseServiceImpl<PowerService
return list;
}
@Override
public long queryTotal(PowerAxisServiceStationFormDTO form) {
form.setCustomerId(loginUser.getLoginUserCustomerId());
long total = baseDao.queryTotal(form);
return total;
}
}

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

@ -201,18 +201,7 @@
and
AGENCY_ID = #{agencyId}
</select>
<select id="queryTotal" resultType="java.lang.Long">
select
count(*)
FROM
pli_power_axis_struct
WHERE
CUSTOMER_ID = #{customerId}
AND
CATEGORY_CODE = #{code}
and
AGENCY_ID = #{agencyId}
</select>
<select id="listParentTreeByLevel"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO">
SELECT

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

@ -55,22 +55,12 @@
customer_id = #{customerId}
limit #{limit}
</select>
<select id="getListTotal" resultType="java.lang.Long">
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>
<resultMap id="ListOfKernelMember" type="com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO">
<result property="ownerName" column="OWNER_NAME" />
<result property="houseId" column="HOUSE_ID" />
<result property="address" column="ADDRESS" />
<result property="kernelMemberNameConcat" column="KERNEL_MEMBER_NAME" />
<result property="kernelMemberNameConcat" column="kernelMemberNameConcat" />
<collection property="kernelMemberList" ofType="com.epmet.plugin.power.dto.axis.result.PowerkernelMemberListResultDTO">
<result property="kernelMemberId" column="KERNEL_MEMBER_ID" />
<result property="kernelMemberName" column="KERNEL_MEMBER_NAME" />
@ -163,7 +153,7 @@
<result property="kernelMemberId" column="KERNEL_MEMBER_ID" />
<result property="kernelMemberName" column="KERNEL_MEMBER_NAME" />
</collection>
<result property="kernelMemberNameConcat" column="KERNEL_MEMBER_NAME" />
<result property="kernelMemberNameConcat" column="kernelMemberNameConcat" />
<result property="houseId" column="HOUSE_ID" />
<result property="address" column="ADDRESS" />
</resultMap>
@ -182,29 +172,18 @@
h.ADDRESS
FROM
pli_power_kernel_household h
LEFT JOIN pli_power_kernel_member m ON h.HOUSE_ID = m.HOUSE_ID
LEFT JOIN pli_power_kernel_member m ON h.HOUSE_ID = m.HOUSE_ID AND m.DEL_FLAG = '0'
WHERE
h.STRUCT_REFERENCE_ID = #{axisStructId}
AND KERNEL_MEMBER_NAME LIKE '%${kernelMemberName}%'
h.DEL_FLAG = '0'
<if test="axisStructId != null and axisStructId != ''">
AND h.STRUCT_REFERENCE_ID = #{axisStructId}
</if>
<if test="kernelMemberName != null and kernelMemberName != ''">
AND KERNEL_MEMBER_NAME LIKE '%${kernelMemberName}%'
</if>
AND CUSTOMER_ID = #{customerId}
AND h.DEL_FLAG = '0'
AND m.DEL_FLAG = '0'
ORDER BY
h.CREATED_TIME
LIMIT #{page},#{limit}
</select>
<select id="getPageTotal" resultType="java.lang.Long">
SELECT
count(*)
FROM
pli_power_kernel_household h
LEFT JOIN pli_power_kernel_member m ON h.HOUSE_ID = m.HOUSE_ID
WHERE
h.STRUCT_REFERENCE_ID = #{axisStructId}
AND KERNEL_MEMBER_NAME LIKE '%${kernelMemberName}%'
AND h.DEL_FLAG = '0'
AND m.DEL_FLAG = '0'
LIMIT #{page},#{limit}
</select>

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

@ -34,16 +34,6 @@
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