Commit b9d60f4b authored by hezhuozhi's avatar hezhuozhi

提交初始化统计时间

parent 89490b8f
......@@ -10,18 +10,14 @@
</select>
<select id="getBwCreateTime" resultType="java.util.Map">
SELECT haga.peasant_household_id as peasantHouseholdId, a.time
FROM hygf_basic_grid_acceptance haga
LEFT JOIN (
SELECT
PROC_INST_ID_ AS processInstanceId,
MIN( START_TIME_ ) AS time
FROM
act_hi_taskinst aht
WHERE
EXISTS ( SELECT 1 FROM hygf_basic_grid_acceptance hbga WHERE hbga.instance_id = aht.PROC_INST_ID_ and aht.NAME_='并网登记提交' )
EXISTS ( SELECT 1 FROM hygf_basic_grid_record hbgr WHERE hbgr.instance_Id = aht.PROC_INST_ID_ and aht.NAME_='并网登记' )
GROUP BY
PROC_INST_ID_
)a ON a.processInstanceId=haga.instance_id
</select>
</mapper>
......@@ -73,11 +73,11 @@ public class TestController extends BaseController {
executorService = Executors.newFixedThreadPool(5);
// 提交不同的方法
// executorService.submit(this::dealKcTime);
executorService.submit(this::dealKcTime);
executorService.submit(this::dealDzhtqyTime);
// executorService.submit(this::dealSgTime);
// executorService.submit(this::dealBwTime);
// executorService.submit(this::dealYsTime);
executorService.submit(this::dealSgTime);
executorService.submit(this::dealBwTime);
executorService.submit(this::dealYsTime);
// 关闭线程池
executorService.shutdown();
......@@ -109,7 +109,7 @@ public class TestController extends BaseController {
for (Map<String, Object> stringObjectMap : bwCreateTime) {
LambdaUpdateWrapper<BasicGridRecord> wrapper = new LambdaUpdateWrapper<>();
wrapper.set(BasicGridRecord::getBwCreateTime,stringObjectMap.get("time"))
.eq(BasicGridRecord::getPeasantHouseholdId,stringObjectMap.get("peasantHouseholdId"));
.eq(BasicGridRecord::getInstanceId,stringObjectMap.get("processInstanceId"));
basicGridRecordMapper.update(null,wrapper);
}
List<Map<String,Object>> bwEndTime = basicGridRecordMapper.getBwEndTime();
......@@ -162,13 +162,13 @@ public class TestController extends BaseController {
private void dealDzhtqyTime() {
log.info("================开始初始电子合同时间=========================");
// Map<Long, Contract> contractMap = qiyuesuoService.getContractMap();
// contractMap.forEach((k,v)->{
// LambdaUpdateWrapper<HouseholdContract> wrapper = new LambdaUpdateWrapper<>();
// wrapper.set(HouseholdContract::getDzhtqyCreateTime, DateUtils.dateParse(v.getPublishTime()))
// .eq(HouseholdContract::getContractLockId,k);
// householdContractMapper.update(null,wrapper);
// });
Map<Long, Contract> contractMap = qiyuesuoService.getContractMap();
contractMap.forEach((k,v)->{
LambdaUpdateWrapper<HouseholdContract> wrapper = new LambdaUpdateWrapper<>();
wrapper.set(HouseholdContract::getDzhtqyCreateTime, DateUtils.dateParse(v.getPublishTime()))
.eq(HouseholdContract::getContractLockId,k);
householdContractMapper.update(null,wrapper);
});
List<Map<String,Object>> dzhtqyEndTime = householdContractMapper.getDzhtqyEndTime();
for (Map<String, Object> stringObjectMap : dzhtqyEndTime) {
LambdaUpdateWrapper<HouseholdContract> wrapper = new LambdaUpdateWrapper<>();
......
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