Commit a8710cb1b8a2e79cc3b41cfa9585bb130014aeb0

Authored by yangfei
1 parent 4b1f462fb2

服务同步接口异常日志

Showing 2 changed files with 9 additions and 2 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/MatdeliverFollowModelDaoImpl.java View file @ a8710cb
... ... @@ -48,8 +48,10 @@
48 48  
49 49 public List<MatdeliverFollowModel> queryByPidsGoup(List pids) {
50 50 AggregationOperation match = Aggregation.match(Criteria.where("parentid").in(pids));
51   - AggregationOperation group = Aggregation.group("parentid").max("updateDate").as("updateDate");
52   - Aggregation aggregation = Aggregation.newAggregation(match, group);
  51 + AggregationOperation group = Aggregation.group("parentid", "hospitalId","deliveryDate","deliverId","contactResult","makeType","makeRemark","makeCreateUser","contactReason","visitResult","visitReason").max("updateDate").as("updateDate");
  52 + AggregationOperation fields = Aggregation.project("_id", "parentid", "hospitalId","deliveryDate","deliverId","contactResult","makeType","makeRemark","makeCreateUser","contactReason","visitResult","visitReason");
  53 +
  54 + Aggregation aggregation = Aggregation.newAggregation(match, group,fields);
53 55 AggregationResults<MatdeliverFollowModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_matdeliver_follow", MatdeliverFollowModel.class);
54 56 return result.getMappedResults();
55 57 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SyncDataController.java View file @ a8710cb
... ... @@ -15,6 +15,7 @@
15 15 import com.lyms.platform.query.SyncDataQuery;
16 16 import org.apache.commons.codec.binary.Base64;
17 17 import org.apache.commons.lang.StringUtils;
  18 +import org.apache.log4j.Logger;
18 19 import org.springframework.beans.factory.annotation.Autowired;
19 20 import org.springframework.stereotype.Controller;
20 21 import org.springframework.util.ReflectionUtils;
... ... @@ -35,6 +36,8 @@
35 36 @Controller
36 37 public class SyncDataController extends BaseController {
37 38  
  39 + private Logger log = Logger.getLogger(this.getClass());
  40 +
38 41 @Autowired
39 42 private SyncDataService syncDataService;
40 43  
... ... @@ -63,6 +66,7 @@
63 66 SysBaseFacade sysBaseFacade = (SysBaseFacade) webApplicationContext.getBean(action);
64 67 return sysBaseFacade.execute(synForm);
65 68 } catch (Exception e) {
  69 + log.error("sysnDataSer异常",e);
66 70 BaseResponse baseResponse = new BaseResponse();
67 71 baseResponse.setObject(e.getMessage());
68 72 baseResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);
... ... @@ -106,6 +110,7 @@
106 110 }
107 111 return baseResponse;
108 112 } catch (Exception e) {
  113 + log.error("sysnReflectDataSer异常",e);
109 114 e.printStackTrace();
110 115 baseResponse.setObject(e.getMessage());
111 116 baseResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);