Commit cd3c822986e8c32b4d872faf22d795e70e2bc685

Authored by liquanyu
1 parent a38b632244
Exists in master and in 1 other branch dev

his lis开发

Showing 4 changed files with 40 additions and 28 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterLisMapper.java View file @ cd3c822
... ... @@ -10,7 +10,7 @@
10 10  
11 11 void saveLisData(LisReportModel model);
12 12  
13   - void saveLisItemsData(List<LisReportItemModel> items);
  13 + void saveLisItemsData(List<LisReportItemModel> list);
14 14  
15 15 void deleteLisData(LisReportModel model);
16 16  
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java View file @ cd3c822
... ... @@ -25,27 +25,40 @@
25 25 @Override
26 26 public BaseResponse saveLisData(String lisData) {
27 27  
28   - List<LisReportModel> lisList =JsonUtil.jkstr2List(lisData, new TypeReference<List<LisReportModel>>() {});
29   - System.out.println(lisList);
  28 + try {
  29 + final List<LisReportModel> lisList =JsonUtil.jkstr2List(lisData, new TypeReference<List<LisReportModel>>() {});
  30 + System.out.println("saveLis data size = "+ lisList.size());
30 31  
31   - if (CollectionUtils.isNotEmpty(lisList))
32   - {
33   - for(LisReportModel model : lisList)
  32 + if (CollectionUtils.isNotEmpty(lisList))
34 33 {
35   - List<LisReportModel> dbLis = masterLisMapper.queryLisDataByModel(model);
36   - if (CollectionUtils.isEmpty(dbLis))
37   - {
38   - masterLisMapper.saveLisData(model);
39   - List<LisReportItemModel> items = model.getItems();
40   - if (CollectionUtils.isNotEmpty(items))
41   - {
42   - masterLisMapper.saveLisItemsData(items);
  34 + new Thread(new Runnable() {
  35 + @Override
  36 + public void run() {
  37 + for(LisReportModel model : lisList)
  38 + {
  39 + List<LisReportModel> dbLis = masterLisMapper.queryLisDataByModel(model);
  40 + if (CollectionUtils.isEmpty(dbLis))
  41 + {
  42 + masterLisMapper.saveLisData(model);
  43 + List<LisReportItemModel> items = model.getItems();
  44 + if (CollectionUtils.isNotEmpty(items))
  45 + {
  46 + masterLisMapper.saveLisItemsData(items);
  47 + }
  48 + }
  49 +
  50 + }
43 51 }
44   - }
  52 + },"saveLisDataThread").start();
45 53  
46 54 }
  55 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
47 56 }
48   - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  57 + catch (Exception e)
  58 + {
  59 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SYSTEM_ERROR).setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION);
  60 + }
  61 +
49 62 }
50 63  
51 64 @Override
platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml View file @ cd3c822
... ... @@ -61,17 +61,16 @@
61 61 values
62 62 <foreach collection="list" item="item" index="index" separator="," >
63 63 (
64   - #{item.rId},
65   - #{item.code},
66   - #{item.name},
67   - #{item.result},
68   - #{item.resultFlag},
69   - #{item.ref},
70   - #{item.resultType},
71   - #{item.unit},
72   - #{item.modifyDate},
73   - #{item.printOrder},
74   - #{item.hospitalId}
  64 + #{item.lisId,jdbcType=VARCHAR},
  65 + #{item.code,jdbcType=VARCHAR},
  66 + #{item.name,jdbcType=VARCHAR},
  67 + #{item.result,jdbcType=VARCHAR},
  68 + #{item.resultFlag,jdbcType=VARCHAR},
  69 + #{item.ref,jdbcType=VARCHAR},
  70 + #{item.resultType,jdbcType=VARCHAR},
  71 + #{item.unit,jdbcType=VARCHAR},
  72 + #{item.printOrder,jdbcType=VARCHAR},
  73 + #{item.hospitalId,jdbcType=VARCHAR}
75 74 )
76 75 </foreach>
77 76 </insert>
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ cd3c822
... ... @@ -256,7 +256,7 @@
256 256 public void run() {
257 257 dzfySyncDataSSL();
258 258 }
259   - },"qhdfy-thread").start();
  259 + },"dzfy-thread").start();
260 260  
261 261 }
262 262