Commit a1bcf0f5 authored by hezhuozhi's avatar hezhuozhi

修改投融结束时间为流程结束时间

parent d4a99495
......@@ -88,4 +88,10 @@ public class FinancingInfo extends BaseEntity {
*/
@TableField("tr_create_time")
private Date trCreateTime;
/**
* 投融创建时间
*/
@TableField("tr_end_time")
private Date trEndTime;
}
......@@ -36,4 +36,7 @@ public interface FinancingInfoMapper extends BaseMapper<FinancingInfo> {
List<Map<String,Object>> selectRegionByParentCode(String parentCode, String level);
List<Map<String, Object>> getTrCreateTime();
List<Map<String, Object>> getTrEndTime();
}
......@@ -145,10 +145,19 @@
</select>
<select id="getTrCreateTime" resultType="java.util.Map">
SELECT hfi.sequence_nbr as sequenceNbr,max(hfa.rec_date) AS time
FROM
hygf_financing_info hfi
LEFT JOIN hygf_financing_auditing hfa ON hfa.peasant_household_id=hfi.peasant_household_id
WHERE hfa.next_node_name='融资审核'
GROUP BY hfi.sequence_nbr
</select>
<select id="getTrEndTime" resultType="java.util.Map">
SELECT hfi.sequence_nbr as sequenceNbr,hfa.rec_date AS time
FROM
hygf_financing_info hfi
LEFT JOIN hygf_financing_auditing hfa ON hfa.peasant_household_id=hfi.peasant_household_id
WHERE hfi.status='放款完成' and hfa.next_node_name='融资审核'
WHERE hfa.next_node_name is null
</select>
</mapper>
......@@ -245,6 +245,7 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
</foreach>
</if>
</where>
ORDER BY hph.rec_date DESC ,hph.sequence_nbr DESC
</select>
<select id="getAllPowerStationTimeDetail"
......@@ -263,6 +264,7 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
LEFT JOIN hygf_commercial hc ON hc.survey_information_id = hph.survey_information_id
LEFT JOIN hygf_work_order_power_station hwops ON hph.sequence_nbr = hwops.peasant_household_id
LEFT JOIN hygf_power_station_engineering_info hpsei ON hwops.sequence_nbr = hpsei.work_order_power_station_id
ORDER BY hph.rec_date DESC ,hph.sequence_nbr DESC
</select>
<select id="getKcTime"
......@@ -374,7 +376,7 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
<select id="getTrTime"
resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationTimeStatisticsDto">
SELECT peasant_household_id as sequenceNbr,tr_create_time,disbursement_time as trEndTime
SELECT peasant_household_id as sequenceNbr,tr_create_time,tr_end_time
FROM
hygf_financing_info
<where>
......
......@@ -74,11 +74,11 @@ public class TestController extends BaseController {
ExecutorService executorService = Executors.newFixedThreadPool(5);
// 提交不同的方法
// executorService.submit(this::dealKcTime);
// executorService.submit(this::dealDzhtqyTime);
// executorService.submit(this::dealSgTime);
// executorService.submit(this::dealBwTime);
// executorService.submit(this::dealYsTime);
executorService.submit(this::dealKcTime);
executorService.submit(this::dealDzhtqyTime);
executorService.submit(this::dealSgTime);
executorService.submit(this::dealBwTime);
executorService.submit(this::dealYsTime);
executorService.submit(this::dealTrTime);
// 关闭线程池
executorService.shutdown();
......@@ -90,7 +90,14 @@ public class TestController extends BaseController {
List<Map<String, Object>> trCreateTime = financingInfoMapper.getTrCreateTime();
for (Map<String, Object> stringObjectMap : trCreateTime) {
LambdaUpdateWrapper<FinancingInfo> wrapper = new LambdaUpdateWrapper<>();
wrapper.set(FinancingInfo::getTrCreateTime, dealHour(stringObjectMap.get("time")))
wrapper.set(FinancingInfo::getTrCreateTime, stringObjectMap.get("time"))
.eq(FinancingInfo::getSequenceNbr, stringObjectMap.get("sequenceNbr"));
financingInfoMapper.update(null, wrapper);
}
List<Map<String, Object>> trEndTime = financingInfoMapper.getTrEndTime();
for (Map<String, Object> stringObjectMap : trEndTime) {
LambdaUpdateWrapper<FinancingInfo> wrapper = new LambdaUpdateWrapper<>();
wrapper.set(FinancingInfo::getTrEndTime, stringObjectMap.get("time"))
.eq(FinancingInfo::getSequenceNbr, stringObjectMap.get("sequenceNbr"));
financingInfoMapper.update(null, wrapper);
}
......
......@@ -331,6 +331,9 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
if (params.containsKey("financingCompaniesSeq") && params.get("financingCompaniesSeq")!= null) {
financingInfo.setFinancingCompaniesSeq(Long.valueOf(params.get("financingCompaniesSeq").toString()));
}
if("融资审核".equals(financingAuditingDto.getNextNodeName())){
financingInfo.setTrCreateTime(new Date());
}
//标识对于整改待推送状态
if (params.containsKey("isZG")) {
financingInfo.setStatus("待推送");
......@@ -341,7 +344,9 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
if (params.containsKey("isHistory")) {
financingInfo.setStatus("退回建档");
}
if("放款完成".equals(financingInfo.getStatus())){
financingInfo.setTrEndTime(new Date());
}
this.updateById(financingInfo);
//更新待办
// workflowResultDto.setInstanceId(financingAuditing.getInstanceId());
......
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