|
@@ -543,23 +543,29 @@ public class YiZhuLuRuServer {
|
|
|
|
|
|
CacheOnce<XinZhenYzActOrder> drug = new CacheOnce<>();
|
|
|
|
|
|
+ SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
|
|
+ YiZhuLuRuDao mapper = sqlSession.getMapper(YiZhuLuRuDao.class);
|
|
|
+
|
|
|
resList.forEach(item -> {
|
|
|
setTempInfo(drug, item, patInfo);
|
|
|
item.setActOrderNo(queue.poll());
|
|
|
returnOrderList.add(item.getActOrderNo());
|
|
|
- dao.insertEntryOrder(patInfo, item, userCode);
|
|
|
+ mapper.insertEntryOrder(patInfo, item, userCode);
|
|
|
|
|
|
if (ListUtil.notBlank(item.getChildren())) {
|
|
|
item.getChildren().forEach(children -> {
|
|
|
setTempInfo(drug, children, patInfo);
|
|
|
children.setActOrderNo(queue.poll());
|
|
|
returnOrderList.add(children.getActOrderNo());
|
|
|
-
|
|
|
children.setParentNo(item.getActOrderNo());
|
|
|
- dao.insertEntryOrder(patInfo, children, userCode);
|
|
|
+ mapper.insertEntryOrder(patInfo, children, userCode);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
});
|
|
|
+
|
|
|
+ sqlSession.commit();
|
|
|
+ sqlSession.close();
|
|
|
}
|
|
|
|
|
|
private void setTempInfo(CacheOnce<XinZhenYzActOrder> drug, XinZhenYzActOrder data, XinZhenYiZhu patInfo) {
|