提交 7a3ced7a authored 作者: zhoushaopan's avatar zhoushaopan

feat(自查模块): 修改了发起自查业务

修改了发起自查业务
上级 56a42d37
...@@ -54,11 +54,15 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -54,11 +54,15 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
...@@ -127,6 +131,9 @@ public class SelfCheckController { ...@@ -127,6 +131,9 @@ public class SelfCheckController {
@Resource @Resource
private HistoryDeviceBillService historyDeviceBillService; private HistoryDeviceBillService historyDeviceBillService;
@Resource
private JdbcTemplate jdbcTemplate;
/** /**
* 月度 * 月度
*/ */
...@@ -401,10 +408,10 @@ public class SelfCheckController { ...@@ -401,10 +408,10 @@ public class SelfCheckController {
historyDeviceBillList.add(historyDeviceBill); historyDeviceBillList.add(historyDeviceBill);
}); });
//保存 //保存
executor.execute(()->{ // executor.execute(()->{
historyDeviceBillService.batchSave(historyDeviceBillList); // historyDeviceBillService.batchSave(historyDeviceBillList);
}); // });
// historyDeviceBillService.batchSave(historyDeviceBillList); historyDeviceBillService.batchSave(historyDeviceBillList);
} }
}else { }else {
// 是0 和1 // 是0 和1
...@@ -426,10 +433,10 @@ public class SelfCheckController { ...@@ -426,10 +433,10 @@ public class SelfCheckController {
historyDeviceBillList.add(historyDeviceBill); historyDeviceBillList.add(historyDeviceBill);
}); });
//保存 //保存
// historyDeviceBillService.batchSave(historyDeviceBillList); historyDeviceBillService.batchSave(historyDeviceBillList);
executor.execute(()->{ // executor.execute(()->{
historyDeviceBillService.batchSave(historyDeviceBillList); // historyDeviceBillService.batchSave(historyDeviceBillList);
}); // });
} }
List<DeviceLibrary> checkDeviceList0 = selfCheckSaveVo.getCheckDeviceList0(); List<DeviceLibrary> checkDeviceList0 = selfCheckSaveVo.getCheckDeviceList0();
if (checkDeviceList0.size() > 0){ if (checkDeviceList0.size() > 0){
...@@ -449,10 +456,10 @@ public class SelfCheckController { ...@@ -449,10 +456,10 @@ public class SelfCheckController {
historyDeviceBillList.add(historyDeviceBill); historyDeviceBillList.add(historyDeviceBill);
}); });
//保存 //保存
// historyDeviceBillService.batchSave(historyDeviceBillList); historyDeviceBillService.batchSave(historyDeviceBillList);
executor.execute(()->{ // executor.execute(()->{
historyDeviceBillService.batchSave(historyDeviceBillList); // historyDeviceBillService.batchSave(historyDeviceBillList);
}); // });
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论