Commit b9e5afcd authored by wujiang's avatar wujiang

提交代码

parent 3a0f50b0
......@@ -94,42 +94,32 @@
<select id="pageList" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO">
SELECT
icbc.sequence_nbr,
ifnull( icbc.cust_name, ph.owners_name ) AS custName,
ifnull( icbc.phone, ph.telephone ) AS phone,
ifnull( icbc.id_card, ph.id_card ) AS idCard,
ph.amos_user_id,
icbc.open_account_status,
icbc.out_user_id as outUserId,
icbc.protocol_status,
icbc.medium_id,
icbc.type,
ph.rec_date,
ph.regional_companies_name as regionalCompaniesName,
ph.regional_companies_code as regionalCompaniesCode,
wr.paymentAmount,
wr.payment_time as paymentTime
MAX(icbc.sequence_nbr) AS sequenceNbr,
MAX(ifnull ( icbc.cust_name, ph.owners_name )) AS custName,
MAX(ifnull ( icbc.phone, ph.telephone )) AS phone,
MAX(ifnull ( icbc.id_card, ph.id_card )) AS idCard,
MAX(ph.amos_user_id) AS amosUserId,
MAX(icbc.open_account_status) AS openAccountStatus,
MAX(icbc.out_user_id) AS outUserId,
MAX(icbc.protocol_status) AS protocolStatus,
MAX(icbc.medium_id) AS mediumId,
MAX(ph.rec_date) AS recDate,
MAX(ph.regional_companies_name) AS regionalCompaniesName,
MAX(ph.regional_companies_code) AS regionalCompaniesCode,
MAX(wr.paymentAmount) AS paymentAmount,
MAX(wr.payment_time) AS paymentTime
FROM
(
SELECT
amos_user_id,
MAX(developer_code) AS developer_code,
MAX(regional_companies_code ) AS regional_companies_code ,
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
*
FROM hygf_peasant_household
WHERE is_delete = 0
) ph
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
<where>
ph.is_delete = 0
<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 test="param.idCard != null and param.idCard != ''">
AND (ph.id_card LIKE CONCAT('%', #{param.idCard}, '%') OR icbc.id_card LIKE CONCAT('%', #{param.idCard}, '%'))
......@@ -161,6 +151,7 @@
<if test="param.offset != null and param.limit != null">
LIMIT ${param.offset}, ${param.limit}
</if>
GROUP BY ph.amos_user_id
ORDER BY
ph.rec_date DESC
</select>
......
......@@ -813,11 +813,11 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
bizContent.setIdType("0");
bizContent.setIdNo(peasantHousehold.getIdCard());
LocalDate today = LocalDate.now();
LocalDate nextYearToday = today.plusYears(1);
LocalDate nextYearToday = today.plusYears(25);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String formattedDate = nextYearToday.format(formatter);
bizContent.setProtocolEndDate(formattedDate);
bizContent.setProtocolLimitAmount("20000000");
bizContent.setProtocolLimitAmount("2500000000");
//bizContent.setCvn2("463");
//bizContent.setExpired("2002");
bizContent.setBankFlag("0");//0工行卡 1其他行卡
......@@ -994,6 +994,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(response));
jsonObject.put("custName",hygfIcbcRecord.getCustName());
jsonObject.put("mediumId",hygfIcbcRecord.getMediumId());
jsonObject.put("accountBalanceYuan",String.valueOf(Integer.parseInt(response.getAccountBalance())/100.0));
return jsonObject;
}else
{
......
......@@ -1980,6 +1980,60 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
powerStationConstructionData.setConstructionCollectorBoxInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionCollectorBoxInfo());
powerStationConstructionData.setConstructionGridBoxInfo(webConstuctionData.getWebConstuctionDataBaseInfo().getConstructionGridBoxInfo());
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);
return webConstuctionData;
}
......@@ -2002,6 +2056,9 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
WorkOrderPowerStation workOrderPowerStation = workOrderPowerStationServiceImpl.getOne(new LambdaQueryWrapper<WorkOrderPowerStation>().eq(WorkOrderPowerStation::getPeasantHouseholdId,sequenceNbr));
if(workOrderPowerStation!=null)
{
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderId(workOrderPowerStation.getWorkOrderId());
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderPowerStationId(workOrderPowerStation.getSequenceNbr());
//查询施工信息
LambdaQueryWrapper<PowerStationConstructionData> up=new LambdaQueryWrapper<>();
up.eq(PowerStationConstructionData::getWorkOrderId,workOrderPowerStation.getWorkOrderId());
......@@ -2030,8 +2087,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
webConstuctionData.getWebConstuctionDataAttachment().setOtherPhotos(powerStationConstructionData.getOtherPhotos());
webConstuctionData.getWebConstuctionDataAttachment().setArchiveAttachments(powerStationConstructionData.getArchiveAttachments());
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderId(powerStationConstructionData.getWorkOrderId());
webConstuctionData.getWebConstuctionDataBaseInfo().setWorkOrderPowerStationId(powerStationConstructionData.getWorkOrderPowerStationId());
webConstuctionData.getWebConstuctionDataBaseInfo().setInstallerInfo(powerStationConstructionData.getInstallerInfo());
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionComponentInfo(powerStationConstructionData.getConstructionComponentInfo());
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionInverterInfo(powerStationConstructionData.getConstructionInverterInfo());
......@@ -2040,6 +2095,7 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
webConstuctionData.getWebConstuctionDataBaseInfo().setConstructionStatus(powerStationConstructionData.getConstructionStatus());
}
}
webConstuctionData.getWebConstuctionDataAttachment().setCommitFlow(false);
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