Commit b9e5afcd authored by wujiang's avatar wujiang

提交代码

parent 3a0f50b0
...@@ -94,42 +94,32 @@ ...@@ -94,42 +94,32 @@
<select id="pageList" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO"> <select id="pageList" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO">
SELECT SELECT
icbc.sequence_nbr, MAX(icbc.sequence_nbr) AS sequenceNbr,
ifnull( icbc.cust_name, ph.owners_name ) AS custName, MAX(ifnull ( icbc.cust_name, ph.owners_name )) AS custName,
ifnull( icbc.phone, ph.telephone ) AS phone, MAX(ifnull ( icbc.phone, ph.telephone )) AS phone,
ifnull( icbc.id_card, ph.id_card ) AS idCard, MAX(ifnull ( icbc.id_card, ph.id_card )) AS idCard,
ph.amos_user_id, MAX(ph.amos_user_id) AS amosUserId,
icbc.open_account_status, MAX(icbc.open_account_status) AS openAccountStatus,
icbc.out_user_id as outUserId, MAX(icbc.out_user_id) AS outUserId,
icbc.protocol_status, MAX(icbc.protocol_status) AS protocolStatus,
icbc.medium_id, MAX(icbc.medium_id) AS mediumId,
icbc.type, MAX(ph.rec_date) AS recDate,
ph.rec_date, MAX(ph.regional_companies_name) AS regionalCompaniesName,
ph.regional_companies_name as regionalCompaniesName, MAX(ph.regional_companies_code) AS regionalCompaniesCode,
ph.regional_companies_code as regionalCompaniesCode, MAX(wr.paymentAmount) AS paymentAmount,
wr.paymentAmount, MAX(wr.payment_time) AS paymentTime
wr.payment_time as paymentTime
FROM FROM
( (
SELECT SELECT
amos_user_id, *
MAX(developer_code) AS developer_code, FROM hygf_peasant_household
MAX(regional_companies_code ) AS regional_companies_code , WHERE is_delete = 0
MAX(is_delete) AS is_delete,
MAX(owners_name) AS owners_name,
MAX(telephone) AS telephone,
MAX(id_card) AS id_card,
MAX(regional_companies_name) AS regional_companies_name,
MAX(project_address) AS project_address,
MAX(rec_date) AS rec_date
FROM hygf_peasant_household GROUP BY amos_user_id
) ph ) ph
LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
LEFT JOIN ( SELECT amos_user_id, MAX ( payment_time ) payment_time, SUM ( payment_amount ) paymentAmount FROM hygf_icbc_withhold_record WHERE withhold_status = '成功' GROUP BY amos_user_id ) wr ON wr.amos_user_id = icbc.amos_user_id LEFT JOIN ( SELECT amos_user_id, MAX ( payment_time ) payment_time, SUM ( payment_amount ) paymentAmount FROM hygf_icbc_withhold_record WHERE withhold_status = '成功' GROUP BY amos_user_id ) wr ON wr.amos_user_id = icbc.amos_user_id
<where> <where>
ph.is_delete = 0
<if test="param.custName != null and param.custName != ''"> <if test="param.custName != null and param.custName != ''">
AND (ph.owners_name LIKE CONCAT('%', #{param.custName}, '%') OR icbc.cust_name LIKE CONCAT('%', #{param.custName}, '%')) AND (ph.owners_name LIKE CONCAT('%', #{param.custName}, '%'))
</if> </if>
<if test="param.idCard != null and param.idCard != ''"> <if test="param.idCard != null and param.idCard != ''">
AND (ph.id_card LIKE CONCAT('%', #{param.idCard}, '%') OR icbc.id_card LIKE CONCAT('%', #{param.idCard}, '%')) AND (ph.id_card LIKE CONCAT('%', #{param.idCard}, '%') OR icbc.id_card LIKE CONCAT('%', #{param.idCard}, '%'))
...@@ -161,6 +151,7 @@ ...@@ -161,6 +151,7 @@
<if test="param.offset != null and param.limit != null"> <if test="param.offset != null and param.limit != null">
LIMIT ${param.offset}, ${param.limit} LIMIT ${param.offset}, ${param.limit}
</if> </if>
GROUP BY ph.amos_user_id
ORDER BY ORDER BY
ph.rec_date DESC ph.rec_date DESC
</select> </select>
......
...@@ -813,11 +813,11 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -813,11 +813,11 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
bizContent.setIdType("0"); bizContent.setIdType("0");
bizContent.setIdNo(peasantHousehold.getIdCard()); bizContent.setIdNo(peasantHousehold.getIdCard());
LocalDate today = LocalDate.now(); LocalDate today = LocalDate.now();
LocalDate nextYearToday = today.plusYears(1); LocalDate nextYearToday = today.plusYears(25);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String formattedDate = nextYearToday.format(formatter); String formattedDate = nextYearToday.format(formatter);
bizContent.setProtocolEndDate(formattedDate); bizContent.setProtocolEndDate(formattedDate);
bizContent.setProtocolLimitAmount("20000000"); bizContent.setProtocolLimitAmount("2500000000");
//bizContent.setCvn2("463"); //bizContent.setCvn2("463");
//bizContent.setExpired("2002"); //bizContent.setExpired("2002");
bizContent.setBankFlag("0");//0工行卡 1其他行卡 bizContent.setBankFlag("0");//0工行卡 1其他行卡
...@@ -994,6 +994,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -994,6 +994,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(response)); JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(response));
jsonObject.put("custName",hygfIcbcRecord.getCustName()); jsonObject.put("custName",hygfIcbcRecord.getCustName());
jsonObject.put("mediumId",hygfIcbcRecord.getMediumId()); jsonObject.put("mediumId",hygfIcbcRecord.getMediumId());
jsonObject.put("accountBalanceYuan",String.valueOf(Integer.parseInt(response.getAccountBalance())/100.0));
return jsonObject; return jsonObject;
}else }else
{ {
......
...@@ -1980,6 +1980,60 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -1980,6 +1980,60 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
powerStationConstructionData.setConstructionCollectorBoxInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionCollectorBoxInfo()); powerStationConstructionData.setConstructionCollectorBoxInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionCollectorBoxInfo());
powerStationConstructionData.setConstructionGridBoxInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionGridBoxInfo()); powerStationConstructionData.setConstructionGridBoxInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionGridBoxInfo());
powerStationConstructionData.setConstructionStatus(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionStatus()); powerStationConstructionData.setConstructionStatus(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionStatus());
if(webConstuctionData.getWebConstuctionDataAttachment().isCommitFlow())
{
if(Objects.isNull(powerStationConstructionData.getInstallerInfo())){
throw new BadRequest("安装人员不能为空");
}
if(Objects.isNull(powerStationConstructionData.getConstructionInstructionsFile())){
throw new BadRequest("施工交底文件不能为空");
}
if(Objects.isNull(powerStationConstructionData.getSafetyPrecautionVideo())){
throw new BadRequest("施工前站班视频/照片不能为空");
}
if(Objects.isNull(powerStationConstructionData.getBracketOverallPlan1())){
throw new BadRequest("安装整体图不能为空");
}
if(Objects.isNull(powerStationConstructionData.getBracketOverallPlan2())){
throw new BadRequest("底座安装不能为空");
}
if(Objects.isNull(powerStationConstructionData.getArrayInclinationTestPhoto())){
throw new BadRequest("方阵倾角照片(即安装角度照片)不能为空");
}
if(Objects.isNull(powerStationConstructionData.getArrayOverallPlan1())){
throw new BadRequest("电站航拍图不能为空");
}
if(Objects.isNull(powerStationConstructionData.getArrayOverallPlan2())){
throw new BadRequest("支架整体安装照片(多张)不能为空");
}
if(Objects.isNull(powerStationConstructionData.getArrayOverallPlan3())){
throw new BadRequest("逆变器侧面序列码不能为空");
}
if(Objects.isNull(powerStationConstructionData.getInverterOverallPlan())){
throw new BadRequest("设备安装整体图不能为空");
}
if(Objects.isNull(powerStationConstructionData.getPhotovoltaicCableRouting())){
throw new BadRequest("进出线安装(即组串接线)不能为空");
}
if(Objects.isNull(powerStationConstructionData.getElectricityMeterBoxExterior())){
throw new BadRequest("通信帮二维码/序列码不能为空");
}
if(Objects.isNull(powerStationConstructionData.getElectricityMeterBoxInterior())){
throw new BadRequest("并网箱铭牌不能为空");
}
if(Objects.isNull(powerStationConstructionData.getBracketGrounding())){
throw new BadRequest("支架两点接地不能为空");
}
if(Objects.isNull(powerStationConstructionData.getGroundingPoint())){
throw new BadRequest("接地电阻不能为空");
}
if(Objects.isNull(powerStationConstructionData.getAcCableRouting())){
throw new BadRequest("交流电缆走线不能为空");
}
if(Objects.isNull(powerStationConstructionData.getArchiveAttachments())){
throw new BadRequest("备案附件不能为空");
}
}
this.addOrUpdate(powerStationConstructionData); this.addOrUpdate(powerStationConstructionData);
return webConstuctionData; return webConstuctionData;
} }
...@@ -2002,6 +2056,9 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -2002,6 +2056,9 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
WorkOrderPowerStation workOrderPowerStation = workOrderPowerStationServiceImpl.getOne(new LambdaQueryWrapper<WorkOrderPowerStation>().eq(WorkOrderPowerStation::getPeasantHouseholdId,sequenceNbr)); WorkOrderPowerStation workOrderPowerStation = workOrderPowerStationServiceImpl.getOne(new LambdaQueryWrapper<WorkOrderPowerStation>().eq(WorkOrderPowerStation::getPeasantHouseholdId,sequenceNbr));
if(workOrderPowerStation!=null) if(workOrderPowerStation!=null)
{ {
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderId(workOrderPowerStation.getWorkOrderId());
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderPowerStationId(workOrderPowerStation.getSequenceNbr());
//查询施工信息 //查询施工信息
LambdaQueryWrapper<PowerStationConstructionData> up=new LambdaQueryWrapper<>(); LambdaQueryWrapper<PowerStationConstructionData> up=new LambdaQueryWrapper<>();
up.eq(PowerStationConstructionData::getWorkOrderId,workOrderPowerStation.getWorkOrderId()); up.eq(PowerStationConstructionData::getWorkOrderId,workOrderPowerStation.getWorkOrderId());
...@@ -2030,8 +2087,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -2030,8 +2087,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
webConstuctionData.getWebConstuctionDataAttachment().setOtherPhotos(powerStationConstructionData.getOtherPhotos()); webConstuctionData.getWebConstuctionDataAttachment().setOtherPhotos(powerStationConstructionData.getOtherPhotos());
webConstuctionData.getWebConstuctionDataAttachment().setArchiveAttachments(powerStationConstructionData.getArchiveAttachments()); webConstuctionData.getWebConstuctionDataAttachment().setArchiveAttachments(powerStationConstructionData.getArchiveAttachments());
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderId(powerStationConstructionData.getWorkOrderId());
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderPowerStationId(powerStationConstructionData.getWorkOrderPowerStationId());
webConstuctionData.getWebConstuctionDataBaseInfo().setInstallerInfo(powerStationConstructionData.getInstallerInfo()); webConstuctionData.getWebConstuctionDataBaseInfo().setInstallerInfo(powerStationConstructionData.getInstallerInfo());
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionComponentInfo(powerStationConstructionData.getConstructionComponentInfo()); webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionComponentInfo(powerStationConstructionData.getConstructionComponentInfo());
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionInverterInfo(powerStationConstructionData.getConstructionInverterInfo()); webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionInverterInfo(powerStationConstructionData.getConstructionInverterInfo());
...@@ -2040,6 +2095,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W ...@@ -2040,6 +2095,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionStatus(powerStationConstructionData.getConstructionStatus()); webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionStatus(powerStationConstructionData.getConstructionStatus());
} }
} }
webConstuctionData.getWebConstuctionDataAttachment().setCommitFlow(false);
return webConstuctionData; return webConstuctionData;
} }
} }
\ 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