Commit a9809a82 authored by hezhuozhi's avatar hezhuozhi

Merge remote-tracking branch 'origin/developer_bw' into developer_todo

parents eebbdcc9 2bd24b1c
......@@ -52,9 +52,9 @@ public enum WorkOrderEnum {
*/
private String code;
public static ContractStatusEnum getNodeByCode(String code) {
ContractStatusEnum dealerReviewEnum = null;
for(ContractStatusEnum type: ContractStatusEnum.values()) {
public static WorkOrderEnum getNodeByCode(String code) {
WorkOrderEnum dealerReviewEnum = null;
for(WorkOrderEnum type: WorkOrderEnum.values()) {
if (type.getCode().equals(code)) {
dealerReviewEnum = type;
break;
......
......@@ -12,6 +12,7 @@ import java.util.List;
@Data
public class DataDto {
String time;
String name;
List<String> snCodes;
String regionalCompaniesCode;
}
......@@ -87,6 +87,7 @@ public class JpStationDto extends BaseDto {
@ExcelIgnore
@ApiModelProperty(value = "第三方厂商标识")
private String thirdCode;
@ExcelIgnore
@ApiModelProperty(value = "逆变器SN")
private String nbqSnCode;
/**
......
......@@ -72,7 +72,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
@UserEmpower(field ={"regional_companies_code"} ,dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
Map<String,Object> getcount( @Param("dto") JpStationDto reviewDto);
@UserEmpower(field ={"hygf_jp_station.regional_companies_code"},dealerField ={"hygf_jp_station.amos_company_code","hygf_jp_station.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
@UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<JpStationDto> queryForDealerReviewPagenew(@Param("dto") JpStationDto reviewDto);
List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq);
......
......@@ -20,5 +20,5 @@ public interface TdHYGFInverterDayGenerateMapper extends BaseMapper<TdHYGFInvert
List<Map<String,Object>> selectSnCodeList(String startTime, String endTime, List<String> sncodes);
@UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<TdHYGFInverterDayGenerate> selectListPage(List<String> snCodeList, List<String> maxCreatedTimeList, String startTime, String endTime,@Param("regionalCompaniesCode")String regionalCompaniesCode);
List<TdHYGFInverterDayGenerate> selectListPage(List<String> snCodeList, List<String> maxCreatedTimeList, String startTime, String endTime,@Param("regionalCompaniesCode")String regionalCompaniesCode, @Param("name") String name);
}
......@@ -108,7 +108,7 @@
</select>
<select id="getYsEndTime" resultType="java.util.Map">
SELECT SEQUENCE_NBR as sequenceNbr,rec_date AS time
SELECT SEQUENCE_NBR as sequenceNbr,acceptance_time AS time
FROM hygf_acceptance_check
WHERE acceptance_check_status='3'
</select>
......
......@@ -4,7 +4,7 @@
<select id="getBwEndTime" resultType="java.util.Map">
SELECT SEQUENCE_NBR AS sequenceNbr,rec_date as time
SELECT SEQUENCE_NBR AS sequenceNbr,grid_time as time
FROM hygf_basic_grid_record
WHERE grid_status='3'
</select>
......
......@@ -163,7 +163,7 @@
from
systemctl_region
where
PARENT_REGION_CODE = #{parentCode} and LEVEL = #{level}
PARENT_REGION_CODE = #{parentCode} and `LEVEL` = #{level}
</select>
......
......@@ -625,102 +625,110 @@
select
`sequence_nbr` sequenceNbr,
`rec_date` recDate,
`rec_user_id` recUserId,
`rec_user_name` recUserName,
hygf_jp_station.sn_code snCode,
CAST( (FLOOR(`capacity` * 1000) / 1000) AS DECIMAL(20, 3)) capacity,
`name` ,
`code` ,
`system_code` systemCode,
`access_time` accessTime,
`create_time` createTime,
`address` ,
`longitude` ,
`latitude` ,
`price` ,
`user_name` userName,
`user_phone` userPhone,
`station_contact` stationContact,
`module_count` moduleCount,
`on_grid_type` onGridType,
`on_grid_time` onGridTime,
hygf_jp_station.third_station_id thirdStationId,
`third_code` thirdCode,
`station_id` stationId,
`day_power_use` dayPowerUse,
`month_power_use` monthPowerUse,
`year_power_use` yearPowerUse,
CAST( (FLOOR(`real_time_power` * 1000) / 1000) AS DECIMAL(20, 3)) realTimePower,
CAST( (FLOOR(`accumulated_power`/1000 * 1000) / 1000) AS DECIMAL(20, 3)) accumulatedPower,
`state` ,
`type`,
`organizational_code` organizationalCode,
`is_delete` isDelete,
CAST( (FLOOR(`day_generate` * 1000) / 1000) AS DECIMAL(20, 3)) dayGenerate,
CAST( (FLOOR(`month_generate` * 1000) / 1000) AS DECIMAL(20, 3)) monthGenerate,
CAST( (FLOOR(`year_generate` * 1000) / 1000) AS DECIMAL(20, 3)) yearGenerate,
`day_income` dayIncome,
`month_income` monthIncome,
`year_income` yearIncome,
`area` ,
`cumulative_income` cumulativeIncome,
`email`,
rated_power ratedPower,
CAST( (FLOOR(`day_generate`/capacity * 1000) / 1000) AS DECIMAL(20, 3)) fullhour,
hjs.sequence_nbr sequenceNbr,
hjs.rec_date recDate,
hjs.rec_user_id recUserId,
hjs.rec_user_name recUserName,
hjs.regional_companies_code,
hjs.amos_company_code,
hjs.sn_code snCode,
CAST( (FLOOR(hjs.capacity * 1000) / 1000) AS DECIMAL(20, 3)) capacity,
hjs.name ,
hjs.code ,
hjs.system_code systemCode,
hjs.access_time accessTime,
hjs.create_time createTime,
hjs.address ,
hjs.longitude ,
hjs.latitude ,
hjs.price ,
hjs.user_name userName,
hjs.user_phone userPhone,
hjs.station_contact stationContact,
hjs.module_count moduleCount,
hjs.on_grid_type onGridType,
hjs.on_grid_time onGridTime,
hjs.third_station_id thirdStationId,
hjs.third_code thirdCode,
hjs.station_id stationId,
hjs.day_power_use dayPowerUse,
hjs.month_power_use monthPowerUse,
hjs.year_power_use yearPowerUse,
CAST( (FLOOR(hjs.real_time_power * 1000) / 1000) AS DECIMAL(20, 3)) realTimePower,
CAST( (FLOOR(hjs.accumulated_power/1000 * 1000) / 1000) AS DECIMAL(20, 3)) accumulatedPower,
hjs.state,
hjs.type,
hjs.organizational_code organizationalCode,
hjs.is_delete isDelete,
CAST( (FLOOR(hjs.day_generate * 1000) / 1000) AS DECIMAL(20, 3)) dayGenerate,
CAST( (FLOOR(hjs.month_generate * 1000) / 1000) AS DECIMAL(20, 3)) monthGenerate,
CAST( (FLOOR(hjs.year_generate * 1000) / 1000) AS DECIMAL(20, 3)) yearGenerate,
hjs.day_income dayIncome,
hjs.month_income monthIncome,
hjs.year_income yearIncome,
hjs.area ,
hjs.cumulative_income cumulativeIncome,
hjs.email,
hjs.rated_power ratedPower,
CAST( (FLOOR(hjs.day_generate/hjs.capacity * 1000) / 1000) AS DECIMAL(20, 3)) fullhour,
(select privilege_company.COMPANY_NAME from privilege_company where
privilege_company.ORG_CODE=hygf_jp_station.regional_companies_code) regionalCompaniesName,
newTable.sn_code nbqSnCode
from hygf_jp_station
left join (select hygf_jp_inverter.sn_code, hygf_jp_inverter.third_station_id from hygf_jp_station left join hygf_jp_inverter on hygf_jp_station.third_station_id = hygf_jp_inverter.third_station_id) newTable on hygf_jp_station.third_station_id = newTable.third_station_id
privilege_company.ORG_CODE=hjs.regional_companies_code) regionalCompaniesName,
lc.nbqSnCode
from hygf_jp_station hjs
INNER join
(
select MAX(hjs.sequence_nbr) AS sequence_nbr,group_concat(hji.sn_code) AS nbqSnCode from hygf_jp_station hjs left join hygf_jp_inverter hji on hjs.third_station_id = hji.third_station_id
group by hjs.third_station_id
) lc
on hjs.sequence_nbr = lc.sequence_nbr
<where>
<if test="dto.name!=null">
and hygf_jp_station.name like concat(concat('%',#{dto.name}),'%')
and hjs.name like concat(concat('%',#{dto.name}),'%')
</if>
<if test="dto.userName!=null">
and hygf_jp_station.user_name like concat(concat('%',#{dto.userName}),'%')
and hjs.user_name like concat(concat('%',#{dto.userName}),'%')
</if>
<if test="dto.address!=null">
and hygf_jp_station.address like concat(concat('%',#{dto.address}),'%')
and hjs.address like concat(concat('%',#{dto.address}),'%')
</if>
<if test="dto.area!=null">
and hygf_jp_station.area like concat(concat('%',#{dto.area}),'%')
and hjs.area like concat(concat('%',#{dto.area}),'%')
</if>
<if test="dto.statioId!=null">
and hygf_jp_station.third_station_id in
and hjs.third_station_id in
<foreach collection="dto.statioId" item="item" index="index" open="(" separator="," close=")">
#{item.stationId}
</foreach>
</if>
<if test="dto.thirdStationId!=null">
and hygf_jp_station.third_station_id =#{dto.thirdStationId}
and hjs.third_station_id =#{dto.thirdStationId}
</if>
<if test="dto.type!=null and dto.type!=''">
and hygf_jp_station.type =#{dto.type}
and hjs.type =#{dto.type}
</if>
<if test="dto.regionalCompaniesCode!=null">
and hygf_jp_station.regional_companies_code =#{dto.regionalCompaniesCode}
and hjs.regional_companies_code =#{dto.regionalCompaniesCode}
</if>
<if test="dto.state!=null">
and hygf_jp_station.state =#{dto.state}
and hjs.state =#{dto.state}
</if>
<if test="dto.amosCompanyCode!=null">
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
and hjs.amos_company_code =#{dto.amosCompanyCode}
</if>
<if test="dto.nbqSnCode!=null">
and newTable.sn_code =#{dto.nbqSnCode}
and lc.nbqSnCode like concat('%',#{dto.nbqSnCode},'%')
</if>
</where>
ORDER BY CASE
WHEN state = '报警' THEN 1
WHEN state = '离线' THEN 2
WHEN state = '在线' THEN 3
WHEN hjs.state = '报警' THEN 1
WHEN hjs.state = '离线' THEN 2
WHEN hjs.state = '在线' THEN 3
ELSE 4
END
</select>
<!-- ========电站监控区域=======-->
<!-- <select id="getRegionPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">-->
......
......@@ -178,7 +178,7 @@
</if>
</where>
GROUP BY
power_station_construction_status,work_order_power_station_node
power_station_construction_status
</select>
<select id="gridStatusTotal" resultType="map">
......@@ -394,7 +394,7 @@
SUM(CASE WHEN ph.construction_state = '待勘察' THEN 1 ELSE 0 END) AS wkc,
SUM(CASE WHEN ps.process_status = '不通过' THEN 1 ELSE 0 END) AS kcwtg,
'' AS kcwtgrl,
SUM(CASE WHEN ps.process_status = '进行中' THEN 1 ELSE 0 END) AS kcjxz,
SUM(CASE WHEN ps.process_status != '不通过' and ps.process_status != '完成' THEN 1 ELSE 0 END) AS kcjxz,
'' AS kcjxzrl,
SUM(CASE WHEN ps.process_status = '完成' THEN 1 ELSE 0 END) AS kcywc,
ROUND(COALESCE(SUM(CASE WHEN ps.process_status = '完成' THEN ei.real_scale ELSE 0 END)/1000, 0), 2) AS kcywcrl,
......
......@@ -83,6 +83,9 @@
<if test="regionalCompaniesCode!=null and regionalCompaniesCode != ''">
and regional_companies_code = #{regionalCompaniesCode}
</if>
<if test="name !=null and name != ''">
and name LIKE #{name}
</if>
</where>
order by created_time desc
</select>
......
......@@ -112,8 +112,14 @@ public class HygfIcbcController extends BaseController {
@ApiOperation (httpMethod = "GET", value = "聚富通电子钱包分页查询", notes = "聚富通电子钱包分页查询")
@UserLimits
public ResponseModel<Page<HygfIcbcRecordDTO>> queryForPage(@ApiParam HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO) {
return ResponseHelper.buildResponse(hygfIcbcService.queryForPage(hygfIcbcRecordQueryDTO.getCurrent(), hygfIcbcRecordQueryDTO.getSize(), hygfIcbcRecordQueryDTO));
}
@TycloudOperation (ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping (value = "/repair")
@ApiOperation (httpMethod = "GET", value = "修复入库失败的数据", notes = "修复入库失败的数据")
public ResponseModel<Object> repair(@RequestParam("userId") String userId) {
return ResponseHelper.buildResponse(hygfIcbcService.repair(userId));
}
}
......@@ -275,7 +275,7 @@ public class JpInverterController extends BaseController {
// List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterDayReport(current,size,dataDto.getTime(),dataDto.getSnCodes(),null,dataDto.getRegionalCompaniesCode()));
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterDayReport(current,size,dataDto.getTime(),dataDto.getSnCodes(),null,dataDto.getRegionalCompaniesCode(), dataDto.getName()));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......@@ -309,7 +309,7 @@ public class JpInverterController extends BaseController {
}
// List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterMonthReport(current,size,dataDto.getTime(),dataDto.getSnCodes(),null,dataDto.getRegionalCompaniesCode()));
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterMonthReport(current,size,dataDto.getTime(),dataDto.getSnCodes(),null,dataDto.getRegionalCompaniesCode(), dataDto.getName()));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......@@ -344,7 +344,7 @@ public class JpInverterController extends BaseController {
}
// List<String> dd= snCodes!=null? JSON.parseArray(snCodes,String.class):null;
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterYearReport(current,size,dataDto.getTime(),dataDto.getSnCodes(),null,dataDto.getRegionalCompaniesCode()));
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterYearReport(current,size,dataDto.getTime(),dataDto.getSnCodes(),null,dataDto.getRegionalCompaniesCode(), dataDto.getName()));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -17,7 +17,6 @@ import com.yeejoin.amos.feign.privilege.util.AesUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -26,8 +25,8 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
......@@ -66,6 +65,7 @@ public class TestController extends BaseController {
@Autowired
FinancingInfoMapper financingInfoMapper;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/initTime")
@ApiOperation(httpMethod = "GET", value = "初始时间", notes = "初始时间")
......@@ -199,21 +199,28 @@ public class TestController extends BaseController {
log.info("================电子合同时间更新完成=========================");
}
private Date dealHour(Object dateString) {
if(Objects.isNull(dateString)){
if (Objects.isNull(dateString)) {
return null;
}
// 转换为 LocalDateTime
LocalDateTime localDateTime = LocalDateTime.parse(String.valueOf(dateString));
// 转换为 Date
Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
// 转换为 LocalDateTime
// LocalDateTime localDateTime = LocalDateTime.parse(String.valueOf(dateString));
// 转换为 Date
Date date = null;
date = format.parse(String.valueOf(dateString));
// 加8小时
calendar.add(Calendar.HOUR_OF_DAY, 8);
return calendar.getTime();
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
// 加8小时
calendar.add(Calendar.HOUR_OF_DAY, 8);
return calendar.getTime();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private void dealKcTime() {
......
......@@ -69,8 +69,6 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbcRecord, HygfIcbcRecordMapper>
implements IHygfIcbcService {
private static final String trxChannel = "05"; // 05表示小程序
......@@ -254,8 +252,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
* @param request request
* @param response response
* @return {@link Object}
* @throws
* @author yangyang
* @throws @author yangyang
* @date 2024/7/18 20:15
*/
public Object registerWalletCallback(HttpServletRequest request, HttpServletResponse response) throws Exception {
......@@ -302,7 +299,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
Map<String, String> data = JSONObject.parseObject(decode, Map.class);
log.debug("解密后参数:{}", data);// 进行自己的处理,此处默认处理成功,返回通知方成功,return_code=0
// 其中certNo、custName、newPayAcc字段进行了base64编码,可以调用示例代码中的base64Decode进行解码
//String custName = base64Decode(data.get("custName"));
// String custName = base64Decode(data.get("custName"));
String certNo = base64Decode(data.get("certNo"));
String newPayAcc = base64Decode(data.get("newPayAcc"));
String outUserId = data.get("outUserId");
......@@ -329,7 +326,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
hygfIcbcRequest.setPhase("组装");
hygfIcbcRequest.setException(data.get("custName") + " -> " + peasantHousehold.getOwnersName());
hygfIcbcRequestMapper.updateById(hygfIcbcRequest);
if (hygfIcbcWalletInfo != null) {
hygfIcbcRecord.setCustName(hygfIcbcWalletInfo.getCustName());
hygfIcbcRecord.setIdCard(hygfIcbcWalletInfo.getCertNo());
......@@ -427,11 +424,12 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
.collect(Collectors.groupingBy(PeasantHousehold::getAmosUserId));// 根据农户 ID 分组
List<PeasantHousehold> peasantHouseholdList = peasantHouseholdMap.get(amosUserId);
if(peasantHouseholdList != null && peasantHouseholdList.size() > 0) {
if (peasantHouseholdList != null && peasantHouseholdList.size() > 0) {
peasantHouseholdList.forEach(e -> {
if(e.getSurveyInformationId() != null) {
if (e.getSurveyInformationId() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
e.setRealScale(powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
e.setRealScale(powerStationEngineeringInfoMapper
.getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
}
});
}
......@@ -601,4 +599,43 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
Map<Object, Boolean> distinctMap = new ConcurrentHashMap<>();
return object -> distinctMap.putIfAbsent(distinctField.apply(object), Boolean.TRUE) == null;
}
public String repair(String userId) {
JftApiUserEntrustopenacctQueryResponseV1 hygfIcbcWalletInfo = getHygfIcbcWalletInfo(userId);
PeasantHousehold peasantHousehold = peasantHouseholdService.lambdaQuery().select(PeasantHousehold::getTelephone)
.eq(PeasantHousehold::getAmosUserId, userId).last("limit 1").one();
HygfIcbcRecord hygfIcbcRecord = this.lambdaQuery().eq(HygfIcbcRecord::getAmosUserId, userId).last(" limit 1")
.one();
if (hygfIcbcRecord == null) {
hygfIcbcRecord = new HygfIcbcRecord();
}
if (hygfIcbcWalletInfo != null) {
hygfIcbcRecord.setPhone(peasantHousehold != null ? peasantHousehold.getTelephone() : "");
hygfIcbcRecord.setMediumId(hygfIcbcWalletInfo.getMediumId());
hygfIcbcRecord.setProjectId("PJ140014023565102203");
hygfIcbcRecord.setOpenAccountStatus(hygfIcbcWalletInfo.getOpenacctStatus());
hygfIcbcRecord.setSignEntrsutPrtlStatus("1");
hygfIcbcRecord.setCustName(hygfIcbcWalletInfo.getCustName());
hygfIcbcRecord.setIdCard(hygfIcbcWalletInfo.getCertNo());
hygfIcbcRecord.setProtocolStatus(hygfIcbcWalletInfo.getProtocolStatus());
hygfIcbcRecord.setProtocolStartTime(hygfIcbcWalletInfo.getProtocolStartDate());
hygfIcbcRecord.setProtocolEndTime(hygfIcbcWalletInfo.getProtocolEndDate());
hygfIcbcRecord.setTrxLimitAmount(hygfIcbcWalletInfo.getTrxLimitAmount());
hygfIcbcRecord.setDayLimitAmount(hygfIcbcWalletInfo.getDayLimitAmount());
hygfIcbcRecord.setProtocolLimitAmount(hygfIcbcWalletInfo.getProtocolLimitAmount());
hygfIcbcRecord.setAppId(hygfIcbcWalletInfo.getAppId());
hygfIcbcRecord.setOutUserId(hygfIcbcWalletInfo.getOutUserId());
hygfIcbcRecord.setOutVendorId(hygfIcbcWalletInfo.getOutVendorId());
} else {
return "开卡信息不存在";
}
// hygfIcbcRecord.setDiscardStatus();
hygfIcbcRecord.setAmosUserId(userId);
hygfIcbcRecord.setRecDate(new Date());
this.saveOrUpdate(hygfIcbcRecord);
return "success";
}
}
\ No newline at end of file
......@@ -151,7 +151,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
}
@UserLimits
public Page<TdHYGFInverterDayGenerate> jpInverterDayReport(int current, int size, String time, List<String> sncodes, List<String> stationIds,String regionalCompaniesCode) {
public Page<TdHYGFInverterDayGenerate> jpInverterDayReport(int current, int size, String time, List<String> sncodes, List<String> stationIds,String regionalCompaniesCode, String name) {
Page<TdHYGFInverterDayGenerate> tdHYGFInverterDayGeneratePage = new Page<>();
// Date date = DateUtil.parse(time, "yyyy-MM-dd");
// Date timeStart = DateUtils.dateAddHours(date, -8);
......@@ -194,9 +194,16 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
maxCreatedTimeList.add(sdf.format(item.get("max_created_time")));
}
});
if(StringUtils.isNotEmpty(name)) {
name = '%' + name + "%";
}
Map<String, String> regionalCompaniesNameMap = getRegionalCompaniesNameMap();
PageHelper.startPage(current, size);
List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectListPage(snCodeList, null, startTime, endTime,regionalCompaniesCode);
List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectListPage(snCodeList, null, startTime, endTime,regionalCompaniesCode, name);
tdHYGFInverterDayGenerates.forEach(tdHYGFInverterDayGenerate -> {
Date date1 = new Date(tdHYGFInverterDayGenerate.getCreatedTime());
......@@ -263,19 +270,25 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
return tdHYGFInverterDayGenerates;
}
@UserLimits
public Page<TdHYGFInverterMonthGenerate> jpInverterMonthReport(int current, int size, String time, List<String> sncodes, List<String> stationIds,String regionalCompaniesCode ) {
public Page<TdHYGFInverterMonthGenerate> jpInverterMonthReport(int current, int size, String time, List<String> sncodes, List<String> stationIds,String regionalCompaniesCode , String name) {
Page<TdHYGFInverterMonthGenerate> tdHYGFInverterMonthGeneratePage = new Page<>();
QueryWrapper queryWrapper = new QueryWrapper<TdHYGFInverterMonthGenerate>()
.eq("year_month", time);
// .in("third_station_id", stationIds);
if (CollectionUtil.isNotEmpty(sncodes)) {
queryWrapper.in("sn_code", sncodes);
}
if (StringUtils.isNotEmpty(name)) {
queryWrapper.like("name", "%" + name + "%");
}
queryWrapper.eq(!StringUtils.isEmpty(regionalCompaniesCode),"regional_companies_code",regionalCompaniesCode);
queryWrapper.orderByDesc("day_time");
Map<String, String> regionalCompaniesNameMap = getRegionalCompaniesNameMap();
PageHelper.startPage(current, size);
List<TdHYGFInverterMonthGenerate> tdHYGFInverterMonthGenerates = tdHYGFInverterMonthGenerateMapper.selectList(queryWrapper);
......@@ -329,7 +342,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
return tdHYGFInverterMonthGenerates;
}
@UserLimits
public Page<TdHYGFInverterYearGenerate> jpInverterYearReport(int current, int size, String time, List<String> sncodes, List<String> stationIds,String regionalCompaniesCode) {
public Page<TdHYGFInverterYearGenerate> jpInverterYearReport(int current, int size, String time, List<String> sncodes, List<String> stationIds,String regionalCompaniesCode, String name) {
Page<TdHYGFInverterYearGenerate> tdHYGFInverterYearGeneratePage = new Page<>();
QueryWrapper queryWrapper = new QueryWrapper<TdHYGFInverterYearGenerate>()
.eq("year", time);
......@@ -337,6 +350,9 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
if (CollectionUtil.isNotEmpty(sncodes)) {
queryWrapper.in("sn_code", sncodes);
}
if (StringUtils.isNotEmpty(name)) {
queryWrapper.like("name", "%" + name + "%");
}
queryWrapper.eq(!StringUtils.isEmpty(regionalCompaniesCode),"regional_companies_code",regionalCompaniesCode);
queryWrapper.orderByDesc("month_time");
......
......@@ -475,7 +475,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
List<JpStationDto> listJ= jpStationMapper.queryForDealerReviewPage(reviewDto);
list = getJpStationDtoAlldto(listJ);
count= reviewDto.getThirdStationIds()!=null?reviewDto.getThirdStationIds().size():list.size();
//count= reviewDto.getThirdStationIds()!=null?reviewDto.getThirdStationIds().size():list.size();
count=dataJpStation.size();
}
}
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto>();
......@@ -598,7 +599,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
hd.setState(jpStation.getState());
hd.setThirdStationId(jpStation.getThirdStationId());
hd.setAccumulatedPower(jpStation.getAccumulatedPower()!=null?Double.valueOf(String.format("%.3f",jpStation.getAccumulatedPower())):null);
hd.setFullhour(Double.valueOf(String.format("%.3f", jpStation.getAccumulatedPower()*FD/jpStation.getCapacity())));
hd.setFullhour(jpStation.getAccumulatedPower()!=null ? Double.valueOf(String.format("%.3f", jpStation.getAccumulatedPower()*FD/jpStation.getCapacity())):null);
hd.setCumulativeIncome(jpStation.getCumulativeIncome()!=null?Double.valueOf(String.format("%.3f",jpStation.getCumulativeIncome())):null);
hd.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hd.setRegionalCompaniesName(regionalCompaniesNameMap.get(jpStation.getRegionalCompaniesCode()));
......@@ -621,7 +622,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
hd.setStationContact(jpStation.getStationContact());
hd.setState(jpStation.getState());
hd.setAccumulatedPower(jpStation.getAccumulatedPower() != null ? Double.valueOf(String.format("%.3f", jpStation.getAccumulatedPower() * FDL)) : null);
hd.setFullhour(Double.valueOf(String.format("%.3f", jpStation.getAccumulatedPower() / jpStation.getCapacity())));
hd.setFullhour(jpStation.getAccumulatedPower() != null ? Double.valueOf(String.format("%.3f", jpStation.getAccumulatedPower() / jpStation.getCapacity())) : null);
hd.setCumulativeIncome(jpStation.getCumulativeIncome() != null ? Double.valueOf(String.format("%.3f", jpStation.getCumulativeIncome())) : null);
hd.setRegionalCompaniesName(regionalCompaniesNameMap.get(jpStation.getRegionalCompaniesCode()));
......
......@@ -106,7 +106,7 @@ public class StatisticsHomepageServiceImpl {
List<String> surveKeys = new ArrayList<>(Arrays.asList("未通过","未勘察","已完成(法务审核)","设计待审核","投融待审核","法务待审核"));
List<String> contractKeys = new ArrayList<>(Arrays.asList("双方已签署","农户已签署","未签署","已作废"));
List<String> workOrder = new ArrayList<>(Arrays.asList("未通过","施工资料上传","完工登记","片区运营待审核","工程待审核","设计待审核","已完成","整改待审核" ,"待整改"));
List<String> workOrder = new ArrayList<>(Arrays.asList("未通过","施工资料上传","完工登记","经销商工程待审核","片区运营待审核","工程待审核","设计待审核","已完成","整改待审核" ,"待整改"));
List<String> preparationMoneyKeys = new ArrayList<>(Arrays.asList("待发货","已收货","已发货"));
List<String> desionKeys = new ArrayList<>(Arrays.asList("施工图已上传","典设图已上传"));
List<String> gridKeys = new ArrayList<>(Arrays.asList("待登记","审核中","已完成","未通过","整改待审核" ,"待整改"));
......
......@@ -1513,7 +1513,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
qu.eq(WorkOrderPowerStation::getPeasantHouseholdId, hygfRectificationOrder.getPeasantHouseholeId());
if (hygfRectificationOrder.getAuditResult().equals("通过")){
qu.set(WorkOrderPowerStation::getPowerStationConstructionStatus,WorkOrderEnum.待审核.getCode());
qu.set(WorkOrderPowerStation::getPowerStationConstructionStatus,WorkOrderEnum.getNodeByCode(hygfRectificationOrder.getRectificationSource()).getName());
hygfRectificationOrder.setRectificationStatus(WorkOrderEnum.已完成.getCode());
}else {
qu.set(WorkOrderPowerStation::getPowerStationConstructionStatus,WorkOrderEnum.待整改.getCode());
......
......@@ -272,3 +272,5 @@ hygf.icbc.camsPublicKey=655CE8706E6ED9A30B92E57D8D645ADDE8C541C27C5C5AFD529C610C
hygf.icbc.apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMpjaWjngB4E3ATh+G1DVAmQnIpiPEFAEDqRfNGAVvvH35yDetqewKi0l7OEceTMN1C6NPym3zStvSoQayjYV+eIcZERkx31KhtFu9clZKgRTyPjdKMIth/wBtPKjL/5+PYalLdomM4ONthrPgnkN4x4R0+D4+EBpXo8gNiAFsNwIDAQAB
hygf.icbc.outVendorId=gxjr
hygf.icbc.projectId=PJ140014023565102203
hygf.sms.maintenanceCode=SMS_HYGF_0005
hygf.sms.repaymentCode=SMS_HYGF_0006
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment