Commit a5da07276bda549997fc542876d62ce7ec6c4c94

Authored by Administrator
1 parent a455a86c61

update

Showing 5 changed files with 204 additions and 46 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBabyQuery.java View file @ a5da072
... ... @@ -6,7 +6,6 @@
6 6 import java.util.Date;
7 7  
8 8  
9   -
10 9 public class BabyPatientExtendEarBabyQuery extends BaseQuery {
11 10 private String id;
12 11 private String name;
... ... @@ -20,6 +19,7 @@
20 19 private String vcCardNo;
21 20 private String buildDoctor;
22 21 private String hospitalId;
  22 + private String[] hospitalIds;
23 23 private Integer buildType;
24 24 private String enable;
25 25 private String[] enables;
... ... @@ -40,6 +40,14 @@
40 40 * 生日
41 41 */
42 42 private Date birthEnd;
  43 +
  44 + public String[] getHospitalIds() {
  45 + return hospitalIds;
  46 + }
  47 +
  48 + public void setHospitalIds(String[] hospitalIds) {
  49 + this.hospitalIds = hospitalIds;
  50 + }
43 51  
44 52 public String[] getEnables() {
45 53 return enables;
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBaby.xml View file @ a5da072
... ... @@ -130,11 +130,11 @@
130 130 and (
131 131 name LIKE concat("%",#{queryNo,jdbcType=VARCHAR},"%")
132 132 or
133   - mcert_no LIKE concat("%",#{queryNo,jdbcType=VARCHAR},"%")
  133 + mcert_no LIKE concat("%",#{queryNo,jdbcType=VARCHAR},"%")
134 134 or
135 135 mphone LIKE concat(#{queryNo,jdbcType=VARCHAR},"%")
136 136 or
137   - cardno LIKE concat(#{queryNo,jdbcType=VARCHAR},"%")
  137 + cardno LIKE concat(#{queryNo,jdbcType=VARCHAR},"%")
138 138 )
139 139 </if>
140 140 <if test="sex != null and sex >= 0">
... ... @@ -179,6 +179,14 @@
179 179 <if test="hospitalId != null and hospitalId != ''">
180 180 and hospital_id = #{hospitalId,jdbcType=VARCHAR}
181 181 </if>
  182 + <if test="hospitalIds != null">
  183 + and hospital_id in
  184 + <foreach item="item" index="index" collection="hospitalIds" open="(" separator="," close=")">
  185 + #{item}
  186 + </foreach>
  187 + </if>
  188 +
  189 +
182 190 <if test="buildType != null and buildType >= 0">
183 191 and build_type = #{buildType,jdbcType=INTEGER}
184 192 </if>
... ... @@ -196,7 +204,7 @@
196 204 </if>
197 205 <if test="noEnable != null and noEnable != ''">
198 206 and (enable != #{noEnable,jdbcType=VARCHAR}
199   - or `enable` is null
  207 + or `enable` is null
200 208 )
201 209 </if>
202 210 <if test="yn != null and yn >= 0">
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml View file @ a5da072
... ... @@ -41,6 +41,16 @@
41 41 <result column="scr_ispass" property="scrIspass" jdbcType="INTEGER"/>
42 42 <result column="pid" property="pid" jdbcType="VARCHAR"/>
43 43  
  44 + <result column="motherGjb2Del35" property="motherGjb2Del35" jdbcType="INTEGER"/>
  45 + <result column="motherGjb2Del176" property="motherGjb2Del176" jdbcType="INTEGER"/>
  46 + <result column="motherGjb2Del235" property="motherGjb2Del235" jdbcType="INTEGER"/>
  47 + <result column="motherGjb2Del299" property="motherGjb2Del299" jdbcType="INTEGER"/>
  48 + <result column="motherGjb3Slc26a4538" property="motherGjb3Slc26a4538" jdbcType="INTEGER"/>
  49 + <result column="motherGjb3Slc26a42168" property="motherGjb3Slc26a42168" jdbcType="INTEGER"/>
  50 + <result column="motherGjb3Slc26a4Ivs7" property="motherGjb3Slc26a4Ivs7" jdbcType="INTEGER"/>
  51 + <result column="motherRrna1494" property="motherRrna1494" jdbcType="INTEGER"/>
  52 + <result column="motherRrna1555" property="motherRrna1555" jdbcType="INTEGER"/>
  53 +
44 54 </resultMap>
45 55  
46 56  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEarController.java View file @ a5da072
... ... @@ -31,8 +31,7 @@
31 31 * @since BME V100R001C40B104
32 32 */
33 33 @Controller
34   -public class BabyEarController extends BaseController
35   -{
  34 +public class BabyEarController extends BaseController {
36 35  
37 36 //日志调测器
38 37 private static final Logger logger = LoggerFactory.getLogger(BabyEarController.class);
39 38  
40 39  
... ... @@ -44,15 +43,14 @@
44 43 * 听力筛查建档
45 44 *
46 45 * @param babyEarAddRequest 儿童听筛请求对象
47   - *
48 46 * @return 操作是否成功
49 47 */
50 48 @TokenRequired
51 49 @ResponseBody
52   - @RequestMapping(method = RequestMethod.POST,value = "/babyear")
53   - public BaseResponse addBabyEar(@RequestBody BabyEarAddRequest babyEarAddRequest,HttpServletRequest request){
  50 + @RequestMapping(method = RequestMethod.POST, value = "/babyear")
  51 + public BaseResponse addBabyEar(@RequestBody BabyEarAddRequest babyEarAddRequest, HttpServletRequest request) {
54 52 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
55   - return babyEarFacade.addOrUpdateBabyEar(babyEarAddRequest,loginState.getId());
  53 + return babyEarFacade.addOrUpdateBabyEar(babyEarAddRequest, loginState.getId());
56 54 }
57 55  
58 56 /**
59 57  
60 58  
... ... @@ -63,18 +61,19 @@
63 61 */
64 62 @TokenRequired
65 63 @ResponseBody
66   - @RequestMapping(method = RequestMethod.GET,value = "/queryBabyInfo/{id}")
67   - public BaseResponse queryBabyInfo(@PathVariable("id")String id){
  64 + @RequestMapping(method = RequestMethod.GET, value = "/queryBabyInfo/{id}")
  65 + public BaseResponse queryBabyInfo(@PathVariable("id") String id) {
68 66 return babyEarFacade.queryBabyInfo(id);
69 67 }
70 68  
71 69 /**
72 70 * 听筛建档初始化数据
  71 + *
73 72 * @return
74 73 */
75 74 @ResponseBody
76   - @RequestMapping(method = RequestMethod.GET,value = "/babyear/init")
77   - public BaseResponse babyEarInit(){
  75 + @RequestMapping(method = RequestMethod.GET, value = "/babyear/init")
  76 + public BaseResponse babyEarInit() {
78 77 return babyEarFacade.babyEarInit();
79 78 }
80 79  
81 80  
... ... @@ -82,11 +81,11 @@
82 81 /**
83 82 * 删除儿童听力筛查
84 83 */
85   - @RequestMapping(value = "/babyear",method = RequestMethod.DELETE)
  84 + @RequestMapping(value = "/babyear", method = RequestMethod.DELETE)
86 85 @ResponseBody
87 86 @TokenRequired
88   - public BaseResponse delOneBabyEar(@RequestParam("id")String id,HttpServletRequest request){
89   - return babyEarFacade.deleteBabyEar(id,getUserId(request));
  87 + public BaseResponse delOneBabyEar(@RequestParam("id") String id, HttpServletRequest request) {
  88 + return babyEarFacade.deleteBabyEar(id, getUserId(request));
90 89 }
91 90  
92 91 /**
... ... @@ -96,8 +95,8 @@
96 95 */
97 96 @TokenRequired
98 97 @ResponseBody
99   - @RequestMapping(value = "/babyear",method = RequestMethod.GET)
100   - public BaseResponse findOneBabyEar(String babyId){
  98 + @RequestMapping(value = "/babyear", method = RequestMethod.GET)
  99 + public BaseResponse findOneBabyEar(String babyId) {
101 100 return babyEarFacade.findBabyEarById(babyId);
102 101 }
103 102  
... ... @@ -108,8 +107,8 @@
108 107 */
109 108 @TokenRequired
110 109 @ResponseBody
111   - @RequestMapping(value = "/babyearView",method = RequestMethod.GET)
112   - public BaseResponse getBabyEarInfo(String babyId){
  110 + @RequestMapping(value = "/babyearView", method = RequestMethod.GET)
  111 + public BaseResponse getBabyEarInfo(String babyId) {
113 112 return babyEarFacade.getBabyEarInfo(babyId);
114 113 }
115 114  
116 115  
117 116  
... ... @@ -120,13 +119,13 @@
120 119 * @param httpServletRequest
121 120 * @return
122 121 */
123   - @RequestMapping(value = "/babyearsrc",method = RequestMethod.POST)
  122 + @RequestMapping(value = "/babyearsrc", method = RequestMethod.POST)
124 123 @ResponseBody
125 124 @TokenRequired
126 125 // @Link DeafEnums 耳聾基因結果
127   - public BaseResponse addOrUpdateBabySrc(BabyScreenAddRequest babyScreenAddRequest,HttpServletRequest httpServletRequest){
  126 + public BaseResponse addOrUpdateBabySrc(BabyScreenAddRequest babyScreenAddRequest, HttpServletRequest httpServletRequest) {
128 127 LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
129   - return babyEarFacade.addOneBabyEarSrc(babyScreenAddRequest,loginState.getId());
  128 + return babyEarFacade.addOneBabyEarSrc(babyScreenAddRequest, loginState.getId());
130 129 }
131 130  
132 131 /**
133 132  
134 133  
... ... @@ -135,12 +134,12 @@
135 134 * @param id
136 135 * @return
137 136 */
138   - @RequestMapping(value = "/babyearsrc",method = RequestMethod.DELETE)
  137 + @RequestMapping(value = "/babyearsrc", method = RequestMethod.DELETE)
139 138 @ResponseBody
140 139 @TokenRequired
141   - public BaseResponse delOneBabySrc(@RequestParam("id")String id,HttpServletRequest httpServletRequest){
  140 + public BaseResponse delOneBabySrc(@RequestParam("id") String id, HttpServletRequest httpServletRequest) {
142 141 LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
143   - return babyEarFacade.delOneBabyEarSrc(id, loginState.getId());
  142 + return babyEarFacade.delOneBabyEarSrc(id, loginState.getId());
144 143 }
145 144  
146 145 /**
147 146  
148 147  
149 148  
150 149  
151 150  
... ... @@ -149,24 +148,25 @@
149 148 * @param babyId
150 149 * @return
151 150 */
152   - @RequestMapping(value = "/babyearsrc/{babyId}",method = RequestMethod.GET)
  151 + @RequestMapping(value = "/babyearsrc/{babyId}", method = RequestMethod.GET)
153 152 @ResponseBody
154 153 @TokenRequired
155   - public BaseResponse getBabyIdBabySrc(@PathVariable("babyId")String babyId,HttpServletRequest httpServletRequest){
  154 + public BaseResponse getBabyIdBabySrc(@PathVariable("babyId") String babyId, HttpServletRequest httpServletRequest) {
156 155 LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
157   - return babyEarFacade.findBabyEarSrc(babyId, loginState.getId());
  156 + return babyEarFacade.findBabyEarSrc(babyId, loginState.getId());
158 157 }
  158 +
159 159 /**
160 160 * 获取听筛记录
161 161 *
162 162 * @param id
163 163 * @return
164 164 */
165   - @RequestMapping(value = "/babyearsrc",method = RequestMethod.GET)
  165 + @RequestMapping(value = "/babyearsrc", method = RequestMethod.GET)
166 166 @ResponseBody
167 167 @TokenRequired
168   - public BaseResponse getOneBabySrc(@RequestParam("id")String id){
169   - return babyEarFacade.findOneBabyEarSrc(id);
  168 + public BaseResponse getOneBabySrc(@RequestParam("id") String id) {
  169 + return babyEarFacade.findOneBabyEarSrc(id);
170 170 }
171 171  
172 172 /**
173 173  
174 174  
175 175  
... ... @@ -175,12 +175,28 @@
175 175 * @param earScreenListRequest 查询条件
176 176 * @return
177 177 */
178   - @RequestMapping(value = "/babyearListsrc",method = RequestMethod.GET)
  178 + @RequestMapping(value = "/babyearListsrc", method = RequestMethod.GET)
179 179 @ResponseBody
180 180 @TokenRequired
181   - public BaseResponse babyearListsrc(EarScreenListRequest earScreenListRequest,HttpServletRequest httpServletRequest){
  181 + public BaseResponse babyearListsrc(EarScreenListRequest earScreenListRequest, HttpServletRequest httpServletRequest) {
182 182 LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
183   - return babyEarFacade.findListBabyEarSrc(earScreenListRequest,loginState.getId());
  183 + return babyEarFacade.findListBabyEarSrc(earScreenListRequest, loginState.getId());
184 184 }
  185 +
  186 + /**
  187 + * 儿童听力筛查区域查询列表
  188 + * @param earScreenListRequest
  189 + * @param httpServletRequest
  190 + * @return
  191 + */
  192 + @RequestMapping(value = "/babyearListRegion", method = RequestMethod.GET)
  193 + @ResponseBody
  194 + @TokenRequired
  195 + public BaseResponse babyearListRegion(EarScreenListRequest earScreenListRequest, HttpServletRequest httpServletRequest) {
  196 + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
  197 + return babyEarFacade.babyearListRegion(earScreenListRequest, loginState.getId());
  198 + }
  199 +
  200 +
185 201 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java View file @ a5da072
... ... @@ -1762,17 +1762,25 @@
1762 1762 data.put("rrna1555", babyPatientExtendEarScreen.getRrna1555() == null ? "" : babyPatientExtendEarScreen.getRrna1555());
1763 1763 data.put("rrna1555Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getRrna1555() == null ? 0 : babyPatientExtendEarScreen.getRrna1555()));
1764 1764  
1765   - data.put("motherGjb2Del35", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb2Del35() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb2Del35()));
1766   - data.put("motherGjb2Del176", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb2Del176() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb2Del176()));
1767   - data.put("motherGjb2Del235", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb2Del235() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb2Del235()));
1768   - data.put("motherGjb2Del299", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb2Del299() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb2Del299()));
1769   - data.put("motherGjb3Slc26a4538", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb3Slc26a4538() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb3Slc26a4538()));
1770   - data.put("motherGjb3Slc26a42168", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb3Slc26a42168() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb3Slc26a42168()));
1771   - data.put("motherGjb3Slc26a4Ivs7", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb3Slc26a4Ivs7() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb3Slc26a4Ivs7()));
1772   - data.put("motherRrna1494", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherRrna1494() == null ? 0 : babyPatientExtendEarScreen.getMotherRrna1494()));
1773   - data.put("motherRrna1555", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherRrna1555() == null ? 0 : babyPatientExtendEarScreen.getMotherRrna1555()));
  1765 + data.put("motherGjb2Del35Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb2Del35() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb2Del35()));
  1766 + data.put("motherGjb2Del35", babyPatientExtendEarScreen.getMotherGjb2Del35() == null ? "" : babyPatientExtendEarScreen.getMotherGjb2Del35());
  1767 + data.put("motherGjb2Del176Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb2Del176() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb2Del176()));
  1768 + data.put("motherGjb2Del176", babyPatientExtendEarScreen.getMotherGjb2Del176() == null ? "" : babyPatientExtendEarScreen.getMotherGjb2Del176());
  1769 + data.put("motherGjb2Del235Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb2Del235() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb2Del235()));
  1770 + data.put("motherGjb2Del235", babyPatientExtendEarScreen.getMotherGjb2Del235() == null ? "" : babyPatientExtendEarScreen.getMotherGjb2Del235());
  1771 + data.put("motherGjb2Del299Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb2Del299() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb2Del299()));
  1772 + data.put("motherGjb2Del299", babyPatientExtendEarScreen.getMotherGjb2Del299() == null ? "" : babyPatientExtendEarScreen.getMotherGjb2Del299());
  1773 + data.put("motherGjb3Slc26a4538Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb3Slc26a4538() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb3Slc26a4538()));
  1774 + data.put("motherGjb3Slc26a4538", babyPatientExtendEarScreen.getMotherGjb3Slc26a4538() == null ? "" : babyPatientExtendEarScreen.getMotherGjb3Slc26a4538());
  1775 + data.put("motherGjb3Slc26a42168Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb3Slc26a42168() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb3Slc26a42168()));
  1776 + data.put("motherGjb3Slc26a42168", babyPatientExtendEarScreen.getMotherGjb3Slc26a42168() == null ? "" : babyPatientExtendEarScreen.getMotherGjb3Slc26a42168());
  1777 + data.put("motherGjb3Slc26a4Ivs7Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherGjb3Slc26a4Ivs7() == null ? 0 : babyPatientExtendEarScreen.getMotherGjb3Slc26a4Ivs7()));
  1778 + data.put("motherGjb3Slc26a4Ivs7", babyPatientExtendEarScreen.getMotherGjb3Slc26a4Ivs7() == null ? "" : babyPatientExtendEarScreen.getMotherGjb3Slc26a4Ivs7());
  1779 + data.put("motherRrna1494Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherRrna1494() == null ? 0 : babyPatientExtendEarScreen.getMotherRrna1494()));
  1780 + data.put("motherRrna1494", babyPatientExtendEarScreen.getMotherRrna1494() == null ? "" : babyPatientExtendEarScreen.getMotherRrna1494());
  1781 + data.put("motherRrna1555Str", DeafEnums.getTitle(babyPatientExtendEarScreen.getMotherRrna1555() == null ? 0 : babyPatientExtendEarScreen.getMotherRrna1555()));
  1782 + data.put("motherRrna1555", babyPatientExtendEarScreen.getMotherRrna1555() == null ? "" : babyPatientExtendEarScreen.getMotherRrna1555());
1774 1783  
1775   -
1776 1784 data.put("processOptionType", babyPatientExtendEarScreen.getProcessOptionType());//1=复筛 2=诊断
1777 1785 data.put("processOptionTypeStr", babyPatientExtendEarScreen.getProcessOptionType() == null ? "初诊" : babyPatientExtendEarScreen.getProcessOptionType() == 1 ? "复筛" : "诊断");//1=复筛 2=诊断
1778 1786 data.put("processOptionDesc", babyPatientExtendEarScreen.getProcessOptionDesc());
... ... @@ -2090,6 +2098,114 @@
2090 2098 br.setData(resMap);
2091 2099 }
2092 2100 return br;
  2101 + }
  2102 +
  2103 + /**
  2104 + * 区域儿童听力筛查管理
  2105 + *
  2106 + * @param earScreenListRequest
  2107 + * @param userId
  2108 + * @return
  2109 + */
  2110 + public BaseResponse babyearListRegion(EarScreenListRequest earScreenListRequest, Integer userId) {
  2111 + //获取当前用户能看到的那些医院
  2112 + List<String> hospital = groupsFacade.findGroupHospital(userId, false);
  2113 + String[] hospitalIdArray = new String[hospital.size()];
  2114 +
  2115 + BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery();
  2116 + screenQuery.setSrcStartTime(earScreenListRequest.getSrcStartTime());
  2117 + screenQuery.setSrcEndTime(earScreenListRequest.getSrcEndTime());
  2118 + screenQuery.setCheckDoctorId(earScreenListRequest.getCheckDoctorId());
  2119 + screenQuery.setScreenType(earScreenListRequest.getScreenType());
  2120 + screenQuery.setScrIspass(earScreenListRequest.getIsPass());
  2121 + screenQuery.setLeftRight(earScreenListRequest.getLeftRight());
  2122 + screenQuery.setSrcSkill(earScreenListRequest.getSrcSkill());
  2123 + screenQuery.setNextStartTime(earScreenListRequest.getNextStartTime());
  2124 + screenQuery.setNextEndTime(earScreenListRequest.getNextEndTime());
  2125 + //当前登录人医院Id
  2126 +
  2127 + screenQuery.setCheckHospitalIds(hospital.toArray(hospitalIdArray));
  2128 + screenQuery.setStatus(0);
  2129 + screenQuery.setSort("screen_date");
  2130 + screenQuery.setNeed("y");
  2131 + screenQuery.setPage(earScreenListRequest.getPage());
  2132 + screenQuery.setOffset((earScreenListRequest.getPage() - 1) * earScreenListRequest.getLimit());
  2133 + screenQuery.setLimit(earScreenListRequest.getLimit());
  2134 +
  2135 + //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id
  2136 + if (StringUtils.isNotEmpty(earScreenListRequest.getKeyWord()) || earScreenListRequest.getBirthStartTime() != null || earScreenListRequest.getBirthEndTime() != null) {//关键字:姓名、联系方式、就诊卡 查询babyId
  2137 + BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery();
  2138 + babyQuery.setQueryNo(earScreenListRequest.getKeyWord());
  2139 + babyQuery.setHospitalIds(hospital.toArray(hospitalIdArray));
  2140 + babyQuery.setBirthStart(earScreenListRequest.getBirthStartTime());
  2141 + babyQuery.setBirthEnd(earScreenListRequest.getBirthEndTime());
  2142 + List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery);
  2143 + if (CollectionUtils.isNotEmpty(models)) {
  2144 + List<String> babyIds = new ArrayList<>();
  2145 + for (BabyPatientExtendEarBaby babyModel : models) {
  2146 + babyIds.add(babyModel.getBabyPatientId());
  2147 + }
  2148 + screenQuery.setBabyIds(babyIds.toArray(new String[babyIds.size()]));
  2149 + } else {
  2150 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有找到数据");
  2151 + }
  2152 + }
  2153 +
  2154 +
  2155 + List<BabyPatientExtendEarScreen> babyPatientExtendEarScreens = babyPatientExtendEarScreenService.queryEarScreenList(screenQuery);
  2156 + List<EarScreenResult> earScreenResults = new ArrayList<>();
  2157 + for (BabyPatientExtendEarScreen earScreen : babyPatientExtendEarScreens) {
  2158 + EarScreenResult screenResult = new EarScreenResult();
  2159 + screenResult.setId(earScreen.getId());
  2160 + BabyModel babyModel = babyService.getOneBabyById(earScreen.getBabyId());
  2161 + if (babyModel != null) {
  2162 + screenResult.setBabyName(babyModel.getName());
  2163 + screenResult.setMommyName(babyModel.getMname());
  2164 + screenResult.setSex(SexEnum.getTextById(babyModel.getSex()));
  2165 + screenResult.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), earScreen.getScreenDate()));
  2166 + screenResult.setBirthday(DateUtil.getyyyy_MM_dd(babyModel.getBirth()));
  2167 + screenResult.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(babyModel.getMphone()));
  2168 + }
  2169 + if (StringUtils.isNotEmpty(earScreen.getHighRiskCause()))//听力高危因素文字 HighRiskEnum
  2170 + {
  2171 + StringBuffer hfBuff = new StringBuffer();
  2172 + String[] highFactors = earScreen.getHighRiskCause().split(",");
  2173 + for (String hf : highFactors) {
  2174 + if (StringUtils.isNotEmpty(hf)) {
  2175 + String name = HighRiskEnum.getTitle(Integer.parseInt(hf));
  2176 + hfBuff.append(name + "、");
  2177 + }
  2178 + }
  2179 + String hfString = null;
  2180 + if (hfBuff.toString().endsWith("、")) {
  2181 + hfString = hfBuff.substring(0, hfBuff.length() - 1);
  2182 + } else {
  2183 + hfString = hfBuff.toString();
  2184 + }
  2185 + screenResult.setHighRiskCause(hfString);
  2186 + }
  2187 + String srcResult = "通过";
  2188 +
  2189 + if (earScreen.getScrIspass() != null) {
  2190 + if (earScreen.getScrIspass() == 2) {//不通过
  2191 + srcResult = "未通过";
  2192 + }
  2193 + }
  2194 + screenResult.setSrcResult(srcResult);
  2195 + screenResult.setBabyId(earScreen.getBabyId());
  2196 + screenResult.setSrcType(earScreen.getScreenType() == 1 ? "初筛" : "复筛");
  2197 + if (StringUtils.isNotEmpty(earScreen.getCheckDoctorId())) {
  2198 + screenResult.setSrcDoctor(usersService.getUsers(Integer.valueOf(earScreen.getCheckDoctorId())).getName());
  2199 + }
  2200 + screenResult.setSrcTime(DateUtil.getyyyy_MM_dd(earScreen.getScreenDate()));
  2201 + earScreenResults.add(screenResult);
  2202 + }
  2203 + BaseListResponse baseResponse = new BaseListResponse();
  2204 + baseResponse.setObject(earScreenResults);
  2205 + baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  2206 + baseResponse.setPageInfo(screenQuery.getPageInfo());
  2207 + baseResponse.setErrormsg("成功");
  2208 + return baseResponse;
2093 2209 }
2094 2210 }