Commit 45b28399e405a8512a1fbdfb57d8cad8743ad48c
1 parent
54fc1265d4
Exists in
master
and in
8 other branches
修改新电子病历
Showing 1 changed file with 2 additions and 2 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/MongoSyncService.java
View file @
45b2839
| ... | ... | @@ -32,13 +32,13 @@ |
| 32 | 32 | System.out.println(json); |
| 33 | 33 | try { |
| 34 | 34 | if ("ADD".equals(action)) { |
| 35 | - Object entity = JsonUtil.str2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), Class.forName(LymsEncodeUtil.aesDecrypt(className, mongo_crypto_key))); | |
| 35 | + Object entity = JsonUtil.jkstr2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), Class.forName(LymsEncodeUtil.aesDecrypt(className, mongo_crypto_key))); | |
| 36 | 36 | Assert.notNull(entity, "execute insert method must not null."); |
| 37 | 37 | mongoTemplate.save(entity); |
| 38 | 38 | return true; |
| 39 | 39 | } else if ("UPDATE".equals(action)) { |
| 40 | 40 | Class cla = Class.forName(LymsEncodeUtil.aesDecrypt(className, mongo_crypto_key)); |
| 41 | - Object obj = JsonUtil.str2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), cla); | |
| 41 | + Object obj = JsonUtil.jkstr2Obj(LymsEncodeUtil.aesDecrypt(json, mongo_crypto_key), cla); | |
| 42 | 42 | Update update = MongoConvertHelper.convertToNativeUpdate(ReflectionUtils.getUpdateField(obj)); |
| 43 | 43 | Assert.notNull(update, "execute update method must not null."); |
| 44 | 44 | mongoTemplate.updateMulti(new MongoQuery(new MongoCondition("id", LymsEncodeUtil.aesDecrypt(id, mongo_crypto_key), MongoOper.IS)).convertToMongoQuery(), update, cla); |