代码提交
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
package com.njcn.prepare.harmonic.controller.newalgorithm;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetSubStationDTO;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatSubstationService;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatSubstationVoltageMPOService;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/12/28 13:47【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "变电站指标统计")
|
||||
@RestController
|
||||
@RequestMapping("/rStartSubstationVoltage")
|
||||
@RequiredArgsConstructor
|
||||
public class RStatSubstationVoltageController extends BaseController {
|
||||
|
||||
private final RStatSubstationVoltageMPOService service;
|
||||
|
||||
private final CommTerminalGeneralClient commTerminalGeneralClient;
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/rStartSubstationHandler")
|
||||
@ApiOperation("变电站指标统计")
|
||||
@ApiImplicitParam(name = "orgParam", value = "参数", required = true)
|
||||
public HttpResult<String> rStartSubstationHandler(@RequestBody @Validated OrgParam orgParam) {
|
||||
log.info(LocalDateTime.now() + "rStartSubstationHandler开始执行");
|
||||
String methodDescribe = getMethodDescribe("rStartSubstationHandler");
|
||||
/**
|
||||
* 支持补录
|
||||
*/
|
||||
DeptGetLineParam deptGetLineParam = new DeptGetLineParam();
|
||||
|
||||
if (StringUtils.isEmpty(orgParam.getOrgId())) {
|
||||
Dept data = deptFeignClient.getRootDept().getData();
|
||||
deptGetLineParam.setDeptId(data.getId());
|
||||
} else {
|
||||
deptGetLineParam.setDeptId(orgParam.getOrgId());
|
||||
}
|
||||
deptGetLineParam.setServerName(ServerInfo.PREPARE_BOOT);
|
||||
List<DeptGetSubStationDTO> data = commTerminalGeneralClient.deptSubStation(deptGetLineParam).getData();
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
service.handler(data,orgParam.getDataDate(),orgParam.getType());
|
||||
long end = System.currentTimeMillis();
|
||||
System.out.println("该方法总耗时为 ---> "+(end-start));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeDPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:48【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatLoadTypeDPOMapper extends MppBaseMapper<RStatLoadTypeDPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeMPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatLoadTypeMPOMapper extends MppBaseMapper<RStatLoadTypeMPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeQPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatLoadTypeQPOMapper extends MppBaseMapper<RStatLoadTypeQPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeYPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatLoadTypeYPOMapper extends MppBaseMapper<RStatLoadTypeYPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageDPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageDPOMapper extends MppBaseMapper<RStatOrgBusbarVoltageDPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageMPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageMPOMapper extends MppBaseMapper<RStatOrgBusbarVoltageMPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageQPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageQPOMapper extends MppBaseMapper<RStatOrgBusbarVoltageQPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageYPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageYPOMapper extends MppBaseMapper<RStatOrgBusbarVoltageYPO> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.newalgorithm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatSubstationVoltageMPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 14:57【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatSubstationVoltageMPOMapper extends MppBaseMapper<RStatSubstationVoltageMPO> {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatLoadTypeDPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeDPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_load_type_d-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="load_type" jdbcType="VARCHAR" property="loadType" />
|
||||
<result column="v_ratio" jdbcType="REAL" property="vRatio" />
|
||||
<result column="i_ratio" jdbcType="REAL" property="iRatio" />
|
||||
<result column="unbalance_ratio" jdbcType="REAL" property="unbalanceRatio" />
|
||||
<result column="i_neg_ratio" jdbcType="REAL" property="iNegRatio" />
|
||||
<result column="flicker_ratio" jdbcType="REAL" property="flickerRatio" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, load_type, v_ratio, i_ratio, unbalance_ratio, i_neg_ratio, flicker_ratio
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatLoadTypeMPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeMPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_load_type_m-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="load_type" jdbcType="VARCHAR" property="loadType" />
|
||||
<result column="effective_measurement" jdbcType="INTEGER" property="effectiveMeasurement" />
|
||||
<result column="v_average" jdbcType="REAL" property="vAverage" />
|
||||
<result column="v_count" jdbcType="INTEGER" property="vCount" />
|
||||
<result column="i_average" jdbcType="REAL" property="iAverage" />
|
||||
<result column="i_count" jdbcType="INTEGER" property="iCount" />
|
||||
<result column="unbalance_average" jdbcType="REAL" property="unbalanceAverage" />
|
||||
<result column="unbalance_count" jdbcType="INTEGER" property="unbalanceCount" />
|
||||
<result column="i_neg_average" jdbcType="REAL" property="iNegAverage" />
|
||||
<result column="i_neg_count" jdbcType="INTEGER" property="iNegCount" />
|
||||
<result column="flicker_average" jdbcType="REAL" property="flickerAverage" />
|
||||
<result column="flicker_count" jdbcType="INTEGER" property="flickerCount" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, load_type, effective_measurement, v_average, v_count, i_average,
|
||||
i_count, unbalance_average, unbalance_count, i_neg_average, i_neg_count, flicker_average,
|
||||
flicker_count
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatLoadTypeQPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeQPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_load_type_q-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="load_type" jdbcType="VARCHAR" property="loadType" />
|
||||
<result column="effective_measurement" jdbcType="INTEGER" property="effectiveMeasurement" />
|
||||
<result column="v_average" jdbcType="REAL" property="vAverage" />
|
||||
<result column="v_count" jdbcType="INTEGER" property="vCount" />
|
||||
<result column="i_average" jdbcType="REAL" property="iAverage" />
|
||||
<result column="i_count" jdbcType="INTEGER" property="iCount" />
|
||||
<result column="unbalance_average" jdbcType="REAL" property="unbalanceAverage" />
|
||||
<result column="unbalance_count" jdbcType="INTEGER" property="unbalanceCount" />
|
||||
<result column="i_neg_average" jdbcType="REAL" property="iNegAverage" />
|
||||
<result column="i_neg_count" jdbcType="INTEGER" property="iNegCount" />
|
||||
<result column="flicker_average" jdbcType="REAL" property="flickerAverage" />
|
||||
<result column="flicker_count" jdbcType="INTEGER" property="flickerCount" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, load_type, effective_measurement, v_average, v_count, i_average,
|
||||
i_count, unbalance_average, unbalance_count, i_neg_average, i_neg_count, flicker_average,
|
||||
flicker_count
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatLoadTypeYPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeYPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_load_type_y-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="load_type" jdbcType="VARCHAR" property="loadType" />
|
||||
<result column="effective_measurement" jdbcType="INTEGER" property="effectiveMeasurement" />
|
||||
<result column="v_average" jdbcType="REAL" property="vAverage" />
|
||||
<result column="v_count" jdbcType="INTEGER" property="vCount" />
|
||||
<result column="i_average" jdbcType="REAL" property="iAverage" />
|
||||
<result column="i_count" jdbcType="INTEGER" property="iCount" />
|
||||
<result column="unbalance_average" jdbcType="REAL" property="unbalanceAverage" />
|
||||
<result column="unbalance_count" jdbcType="INTEGER" property="unbalanceCount" />
|
||||
<result column="i_neg_average" jdbcType="REAL" property="iNegAverage" />
|
||||
<result column="i_neg_count" jdbcType="INTEGER" property="iNegCount" />
|
||||
<result column="flicker_average" jdbcType="REAL" property="flickerAverage" />
|
||||
<result column="flicker_count" jdbcType="INTEGER" property="flickerCount" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, load_type, effective_measurement, v_average, v_count, i_average,
|
||||
i_count, unbalance_average, unbalance_count, i_neg_average, i_neg_count, flicker_average,
|
||||
flicker_count
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatOrgBusbarVoltageDPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageDPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_org_busbar_voltage_d-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="busbar_id" jdbcType="VARCHAR" property="busbarId" />
|
||||
<result column="measurement_count" jdbcType="INTEGER" property="measurementCount" />
|
||||
<result column="v_count" jdbcType="INTEGER" property="vCount" />
|
||||
<result column="v_ratio" jdbcType="REAL" property="vRatio" />
|
||||
<result column="unbalance_count" jdbcType="INTEGER" property="unbalanceCount" />
|
||||
<result column="unbalance_ratio" jdbcType="REAL" property="unbalanceRatio" />
|
||||
<result column="flicker_count" jdbcType="INTEGER" property="flickerCount" />
|
||||
<result column="flicker_ratio" jdbcType="REAL" property="flickerRatio" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, busbar_id, measurement_count, v_count, v_ratio, unbalance_count,
|
||||
unbalance_ratio, flicker_count, flicker_ratio
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatOrgBusbarVoltageMPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageMPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_org_busbar_voltage_m-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="busbar_id" jdbcType="VARCHAR" property="busbarId" />
|
||||
<result column="measurement_count" jdbcType="INTEGER" property="measurementCount" />
|
||||
<result column="v_average" jdbcType="REAL" property="vAverage" />
|
||||
<result column="v_accrued" jdbcType="REAL" property="vAccrued" />
|
||||
<result column="unbalance_average" jdbcType="REAL" property="unbalanceAverage" />
|
||||
<result column="unbalance_accrued" jdbcType="REAL" property="unbalanceAccrued" />
|
||||
<result column="flicker_average" jdbcType="REAL" property="flickerAverage" />
|
||||
<result column="flicker_accrued" jdbcType="REAL" property="flickerAccrued" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, busbar_id, measurement_count, v_average, v_accrued, unbalance_average,
|
||||
unbalance_accrued, flicker_average, flicker_accrued
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatOrgBusbarVoltageQPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageQPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_org_busbar_voltage_q-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="busbar_id" jdbcType="VARCHAR" property="busbarId" />
|
||||
<result column="measurement_count" jdbcType="INTEGER" property="measurementCount" />
|
||||
<result column="v_average" jdbcType="REAL" property="vAverage" />
|
||||
<result column="v_accrued" jdbcType="REAL" property="vAccrued" />
|
||||
<result column="unbalance_average" jdbcType="REAL" property="unbalanceAverage" />
|
||||
<result column="unbalance_accrued" jdbcType="REAL" property="unbalanceAccrued" />
|
||||
<result column="flicker_average" jdbcType="REAL" property="flickerAverage" />
|
||||
<result column="flicker_accrued" jdbcType="REAL" property="flickerAccrued" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, busbar_id, measurement_count, v_average, v_accrued, unbalance_average,
|
||||
unbalance_accrued, flicker_average, flicker_accrued
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatOrgBusbarVoltageYPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageYPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_org_busbar_voltage_y-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="busbar_id" jdbcType="VARCHAR" property="busbarId" />
|
||||
<result column="measurement_count" jdbcType="INTEGER" property="measurementCount" />
|
||||
<result column="v_average" jdbcType="REAL" property="vAverage" />
|
||||
<result column="v_accrued" jdbcType="REAL" property="vAccrued" />
|
||||
<result column="unbalance_average" jdbcType="REAL" property="unbalanceAverage" />
|
||||
<result column="unbalance_accrued" jdbcType="REAL" property="unbalanceAccrued" />
|
||||
<result column="flicker_average" jdbcType="REAL" property="flickerAverage" />
|
||||
<result column="flicker_accrued" jdbcType="REAL" property="flickerAccrued" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, busbar_id, measurement_count, v_average, v_accrued, unbalance_average,
|
||||
unbalance_accrued, flicker_average, flicker_accrued
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatSubstationVoltageMPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.prepare.harmonic.pojo.mysql.po.RStatSubstationVoltageMPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_substation_voltage_m-->
|
||||
<id column="org_no" jdbcType="VARCHAR" property="orgNo" />
|
||||
<id column="data_date" jdbcType="DATE" property="dataDate" />
|
||||
<id column="substation_voltage" jdbcType="VARCHAR" property="substationVoltage" />
|
||||
<result column="substation_count" jdbcType="INTEGER" property="substationCount" />
|
||||
<result column="harmonic_count" jdbcType="INTEGER" property="harmonicCount" />
|
||||
<result column="event_count" jdbcType="INTEGER" property="eventCount" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_no, data_date, substation_voltage, substation_count, harmonic_count, event_count
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeDPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:48【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatLoadTypeDPOService extends IMppService<RStatLoadTypeDPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeMPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatLoadTypeMPOService extends IMppService<RStatLoadTypeMPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeQPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatLoadTypeQPOService extends IMppService<RStatLoadTypeQPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeYPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatLoadTypeYPOService extends IMppService<RStatLoadTypeYPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageDPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageDPOService extends IMppService<RStatOrgBusbarVoltageDPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageMPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageMPOService extends IMppService<RStatOrgBusbarVoltageMPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageQPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageQPOService extends IMppService<RStatOrgBusbarVoltageQPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageYPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageYPOService extends IMppService<RStatOrgBusbarVoltageYPO> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetSubStationDTO;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatSubstationVoltageMPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 14:57【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatSubstationVoltageMPOService extends IMppService<RStatSubstationVoltageMPO> {
|
||||
|
||||
|
||||
void handler(List<DeptGetSubStationDTO> data, String dataDate, Integer type);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatLoadTypeDPOMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatLoadTypeDPOService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:48【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatLoadTypeDPOServiceImpl extends MppServiceImpl<RStatLoadTypeDPOMapper, RStatLoadTypeDPO> implements RStatLoadTypeDPOService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeMPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatLoadTypeMPOMapper;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatLoadTypeMPOService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatLoadTypeMPOServiceImpl extends MppServiceImpl<RStatLoadTypeMPOMapper, RStatLoadTypeMPO> implements RStatLoadTypeMPOService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeQPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatLoadTypeQPOMapper;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatLoadTypeQPOService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatLoadTypeQPOServiceImpl extends MppServiceImpl<RStatLoadTypeQPOMapper, RStatLoadTypeQPO> implements RStatLoadTypeQPOService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatLoadTypeYPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatLoadTypeYPOMapper;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatLoadTypeYPOService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatLoadTypeYPOServiceImpl extends MppServiceImpl<RStatLoadTypeYPOMapper, RStatLoadTypeYPO> implements RStatLoadTypeYPOService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatOrgBusbarVoltageDPOMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatOrgBusbarVoltageDPOService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatOrgBusbarVoltageDPOServiceImpl extends MppServiceImpl<RStatOrgBusbarVoltageDPOMapper, RStatOrgBusbarVoltageDPO> implements RStatOrgBusbarVoltageDPOService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatOrgBusbarVoltageMPOMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageMPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatOrgBusbarVoltageMPOService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatOrgBusbarVoltageMPOServiceImpl extends MppServiceImpl<RStatOrgBusbarVoltageMPOMapper, RStatOrgBusbarVoltageMPO> implements RStatOrgBusbarVoltageMPOService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatOrgBusbarVoltageQPOMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageQPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatOrgBusbarVoltageQPOService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatOrgBusbarVoltageQPOServiceImpl extends MppServiceImpl<RStatOrgBusbarVoltageQPOMapper, RStatOrgBusbarVoltageQPO> implements RStatOrgBusbarVoltageQPOService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatOrgBusbarVoltageYPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatOrgBusbarVoltageYPOMapper;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatOrgBusbarVoltageYPOService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 15:36【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatOrgBusbarVoltageYPOServiceImpl extends MppServiceImpl<RStatOrgBusbarVoltageYPOMapper, RStatOrgBusbarVoltageYPO> implements RStatOrgBusbarVoltageYPOService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.newalgorithm.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetSubStationDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDevGetBandDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatSubstationMPO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.newalgorithm.RStatSubstationVoltageMPOMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.RStatSubstationVoltageMPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.RStatSubstationVoltageMPOService;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/8/4 14:57【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class RStatSubstationVoltageMPOServiceImpl extends MppServiceImpl<RStatSubstationVoltageMPOMapper, RStatSubstationVoltageMPO> implements RStatSubstationVoltageMPOService{
|
||||
|
||||
@Override
|
||||
public void handler(List<DeptGetSubStationDTO> data, String dataDate, Integer type) {
|
||||
List<RStatSubstationVoltageMPO> result = new ArrayList<>();
|
||||
Date date = DateUtil.parse(dataDate);
|
||||
LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
|
||||
|
||||
|
||||
List<String> zwList = new ArrayList<>();
|
||||
List<String> pwList = new ArrayList<>();
|
||||
|
||||
for (DeptGetSubStationDTO datum : data) {
|
||||
if (!CollectionUtils.isEmpty(datum.getStationIds())) {
|
||||
zwList.addAll(datum.getStationIds());
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(datum.getPwStationIds())) {
|
||||
pwList.addAll(datum.getPwStationIds());
|
||||
}
|
||||
}
|
||||
|
||||
zwList.addAll(pwList);
|
||||
List<String> resultL = zwList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
if (!CollectionUtils.isEmpty(resultL)) {
|
||||
resultL.forEach(temp->{
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
if (!CollectionUtils.isEmpty(result)) {
|
||||
this.saveOrUpdateBatchByMultiId(result, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user