Commit 110789191e9205832cfc7f206731255d568190de
1 parent
cd1fbba20a
Exists in
master
and in
6 other branches
服务同步
Showing 3 changed files with 20 additions and 10 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
1107891
| ... | ... | @@ -7,7 +7,6 @@ |
| 7 | 7 | import com.lyms.platform.common.enums.SieveStatusEnums; |
| 8 | 8 | import com.lyms.platform.common.enums.YnEnums; |
| 9 | 9 | import com.lyms.platform.common.utils.DateUtil; |
| 10 | -import com.lyms.platform.common.utils.LogUtil; | |
| 11 | 10 | import com.lyms.platform.pojo.*; |
| 12 | 11 | import com.lyms.platform.query.*; |
| 13 | 12 | import org.apache.commons.collections.CollectionUtils; |
| 14 | 13 | |
| ... | ... | @@ -71,13 +70,13 @@ |
| 71 | 70 | patientsQuery.mysqlBuild(iPatientDao.queryPatientCount(query)); |
| 72 | 71 | query.start(patientsQuery.getOffset()).end(patientsQuery.getLimit()); |
| 73 | 72 | } |
| 73 | + | |
| 74 | 74 | if(!StringUtils.isEmpty(patientsQuery.getDesc())){ |
| 75 | 75 | return iPatientDao.queryPatient(query.addOrder(Sort.Direction.DESC, patientsQuery.getSort())); |
| 76 | 76 | } |
| 77 | 77 | if(!StringUtils.isEmpty(patientsQuery.getSort())){ |
| 78 | 78 | return iPatientDao.queryPatient(query.addOrder(Sort.Direction.ASC, patientsQuery.getSort())); |
| 79 | 79 | } |
| 80 | - | |
| 81 | 80 | |
| 82 | 81 | return iPatientDao.queryPatient(query.addOrder(Sort.Direction.DESC, "id")); |
| 83 | 82 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
1107891
| 1 | 1 | package com.lyms.platform.operate.web; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.common.enums.YnEnums; | |
| 4 | +import com.lyms.platform.query.PatientsQuery; | |
| 3 | 5 | import net.sourceforge.pinyin4j.PinyinHelper; |
| 4 | 6 | import org.apache.log4j.Logger; |
| 5 | 7 | import org.springframework.util.StopWatch; |
| ... | ... | @@ -14,6 +16,15 @@ |
| 14 | 16 | private static org.apache.log4j.Logger log = Logger.getLogger("HTTP-INVOKE"); |
| 15 | 17 | |
| 16 | 18 | public static void main(String[] args) throws Exception{ |
| 19 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 20 | + //排查本院隐藏建档 | |
| 21 | + patientsQuery.setExtEnable(false); | |
| 22 | + patientsQuery.setBuildTypeNot(1); | |
| 23 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 24 | + patientsQuery.setType(1); | |
| 25 | + System.out.println(patientsQuery.convertToQuery().convertToMongoQuery()); | |
| 26 | + | |
| 27 | + | |
| 17 | 28 | StopWatch stopWatch = new StopWatch("time"); |
| 18 | 29 | String[] arr={ "王二六","张三", "李四", "王五","赵六", "JAVA", "123","怡情"}; |
| 19 | 30 | List<String> names = new ArrayList<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
1107891
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 6 | 6 | import com.lyms.platform.common.enums.*; |
| 7 | 7 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 8 | +import com.lyms.platform.common.result.BaseResponse; | |
| 8 | 9 | import com.lyms.platform.common.result.RespBuilder; |
| 9 | 10 | import com.lyms.platform.common.utils.DateUtil; |
| 10 | 11 | import com.lyms.platform.common.utils.ExceptionUtils; |
| ... | ... | @@ -12,10 +13,7 @@ |
| 12 | 13 | import com.lyms.platform.common.utils.SystemConfig; |
| 13 | 14 | import com.lyms.platform.operate.web.request.AntExcAddOther; |
| 14 | 15 | import com.lyms.platform.operate.web.request.MatDeliverAddRequest; |
| 15 | -import com.lyms.platform.operate.web.result.BabyCheckPageResult; | |
| 16 | -import com.lyms.platform.operate.web.result.BabyPageResult; | |
| 17 | -import com.lyms.platform.operate.web.result.HighScoreResult; | |
| 18 | -import com.lyms.platform.operate.web.result.ResidentsPageResult; | |
| 16 | +import com.lyms.platform.operate.web.result.*; | |
| 19 | 17 | import com.lyms.platform.operate.web.utils.*; |
| 20 | 18 | import com.lyms.platform.permission.dao.master.CouponMapper; |
| 21 | 19 | import com.lyms.platform.permission.model.Organization; |
| 22 | 20 | |
| ... | ... | @@ -30,13 +28,11 @@ |
| 30 | 28 | import org.apache.commons.collections.map.HashedMap; |
| 31 | 29 | import org.apache.commons.lang.StringUtils; |
| 32 | 30 | import org.apache.commons.lang.math.NumberUtils; |
| 33 | -import org.bson.types.ObjectId; | |
| 34 | 31 | import org.springframework.beans.factory.annotation.Autowired; |
| 35 | 32 | import org.springframework.data.domain.Sort; |
| 36 | 33 | import org.springframework.data.mongodb.core.MongoTemplate; |
| 37 | 34 | import org.springframework.data.mongodb.core.query.Criteria; |
| 38 | 35 | import org.springframework.data.mongodb.core.query.Query; |
| 39 | -import org.springframework.data.mongodb.core.query.Update; | |
| 40 | 36 | import org.springframework.stereotype.Component; |
| 41 | 37 | |
| 42 | 38 | import java.util.*; |
| ... | ... | @@ -103,7 +99,8 @@ |
| 103 | 99 | @Autowired |
| 104 | 100 | private CouponMapper couponMapper; |
| 105 | 101 | |
| 106 | - | |
| 102 | + @Autowired | |
| 103 | + private PatientServiceFacade patientServiceFacade; | |
| 107 | 104 | /** |
| 108 | 105 | * 建档查询 |
| 109 | 106 | * |
| ... | ... | @@ -133,7 +130,10 @@ |
| 133 | 130 | map.put("lastMenses", DateUtil.getyyyy_MM_dd(data.getFuckLastMens())); |
| 134 | 131 | } |
| 135 | 132 | map.put("lastMenstrualPeriodBasisDoctorId", couponMapper.findUserName(data.getLastMenstrualPeriodBasisDoctorId())); |
| 136 | - | |
| 133 | + BaseResponse baseResponse = patientServiceFacade.findPatientServiceList(id,0); | |
| 134 | + List<PatientSerResult> patientSerResults = (List<PatientSerResult>) baseResponse.getObject(); | |
| 135 | + map.put("patientSerResults",patientSerResults); | |
| 136 | + //显示服务信息 | |
| 137 | 137 | br.setData(map); |
| 138 | 138 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 139 | 139 | br.setErrormsg("成功"); |