Commit 5e9494fa7fd768dbabc8dd338d133c7dd69659e2

Authored by jiangjiazhi

Merge remote-tracking branch 'origin/master'

Showing 27 changed files

.idea/artifacts/platform_sync_data_war_exploded.xml View file @ 5e9494f
... ... @@ -112,7 +112,7 @@
112 112 </element>
113 113 </element>
114 114 <element id="directory" name="META-INF">
115   - <element id="file-copy" path="$PROJECT_DIR$/platform-sync-data/target/MANIFEST.MF" />
  115 + <element id="file-copy" path="$PROJECT_DIR$/platform-sync-data/target/platform-sync-data/META-INF/MANIFEST.MF" />
116 116 </element>
117 117 <element id="javaee-facet-resources" facet="platform-sync-data/web/Web" />
118 118 </root>
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ 5e9494f
... ... @@ -320,31 +320,10 @@
320 320 <if test="endDate != null">
321 321 and a.use_date <![CDATA[ < ]]> #{endDate}
322 322 </if>
323   - limit #{currentPage},#{pageSize}
324   - </select>
325   - <!-- <select id="findCouponInfo" parameterType="map" resultType="map">
326   - select c.type, a.sequence_id, d.name, e.name as send_hospital, a.use_date, a.used_id, b.coupon_order
327   - from coupon_info a, coupon_template b, coupon_type c, users d, organization e, hospital_coupon_template_group f
328   - where a.coupon_template_id = b.id and b.type_id = c.id and a.user_id = d.id and a.status=2 and a.create_hospital_id = e.id
329   - and a.used_hospital_id in
330   - <foreach collection="hospitalId" open="(" close=")" separator="," item="hid">
331   - #{hid}
332   - </foreach>
333   - and f.hospital_id = a.used_hospital_id and c.type in
334   - <foreach collection="couponType" open="(" close=")" separator="," item="type">
335   - #{type}
336   - </foreach>
337   - <if test="startDate != null">
338   - and a.create_date >= #{startDate}
  323 + <if test="needPage == true">
  324 + limit #{currentPage},#{pageSize}
339 325 </if>
340   - <if test="endDate != null">
341   - and a.create_date <![CDATA[ < ]]> #{endDate}
342   - </if>
343   - <if test="tempId != null and tempId != ''">
344   - and f.coupon_template_group_id = #{tempId}
345   - </if>
346   - limit #{currentPage},#{pageSize}
347   - </select>-->
  326 + </select>
348 327  
349 328 <select id="findCouponInfoCount" parameterType="map" resultType="integer">
350 329 select count(1) from (
... ... @@ -443,7 +422,9 @@
443 422 <if test="endDate != null">
444 423 and a.create_date <![CDATA[ < ]]> #{endDate}
445 424 </if>
446   - limit #{currentPage},#{pageSize}
  425 + <if test="needPage == true">
  426 + limit #{currentPage},#{pageSize}
  427 + </if>
447 428 </select>
448 429  
449 430 <select id="findUserSendInfoCount" parameterType="map" resultType="integer">
platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml View file @ 5e9494f
... ... @@ -163,6 +163,9 @@
163 163 <if test="lisId != null and lisId != ''">
164 164 AND LIS_ID = #{lisId}
165 165 </if>
  166 + <if test="title != null and title != ''">
  167 + AND TITLE = #{title}
  168 + </if>
166 169 <if test="hospitalId != null and hospitalId != ''">
167 170 AND HOSPITAL_ID = #{hospitalId}
168 171 </if>
... ... @@ -229,8 +232,6 @@
229 232 LR.VCCARDNO=#{vcCardNo}
230 233 AND
231 234 LR.HOSPITAL_ID=#{hospitalId}
232   - AND
233   - LI.HOSPITAL_ID=#{hospitalId}
234 235 </select>
235 236  
236 237  
platform-common/src/main/java/com/lyms/platform/common/utils/AddressUtil.java View file @ 5e9494f
... ... @@ -21,36 +21,36 @@
21 21 List<String> list = new ArrayList<String>();
22 22 StringReader input = new StringReader(address.trim());
23 23 IKSegmenter ikSeg = new IKSegmenter(input, true); // true ็”จๆ™บ่ƒฝๅˆ†่ฏ
24   - StringBuffer sb = new StringBuffer(); // ๏ผŒfalse็ป†็ฒ’ๅบฆ
  24 + StringBuffer sb = new StringBuffer(); // ๏ผŒfalse็ป†็ฒ’ๅบฆ
25 25 try {
26 26 int i = 0;
27   - for (Lexeme lexeme = ikSeg.next(); lexeme != null; lexeme = ikSeg
28   - .next()) {
  27 + for (Lexeme lexeme = ikSeg.next(); lexeme != null; lexeme = ikSeg.next()) {
29 28 i++;
30 29 String item = lexeme.getLexemeText();
31   - if (item != null && !isNumeric(item) && item.length() > 1)
32   - {
33   - if (i < 5)
34   - {
  30 + if (item != null && !isNumeric(item) && item.length() > 1) {
  31 + if (i < 5) {
35 32 list.add(item);
36   - }
37   - else
38   - {
  33 + } else {
39 34 sb.append(item);
40 35 }
41 36  
42   - }
43   - else
44   - {
  37 + } else {
45 38 sb.append(item);
46 39 }
47 40 }
48 41 } catch (Exception e) {
49   - ExceptionUtils.catchException(e,"ๅœฐๅ€่งฃๆžๅ‡บ้”™");
  42 + ExceptionUtils.catchException(e, "ๅœฐๅ€่งฃๆžๅ‡บ้”™");
50 43 return null;
51 44 }
52 45 list.add(sb.toString());
53 46 return list;
  47 + }
  48 +
  49 + public static void main(String[] ages) {
  50 + List<String> addrs = AddressUtil.getAddress("ๅ››ๅท็œๆˆ้ƒฝๅธ‚ๆญฆไพฏๅŒบๅŒๆฅ ่ทฏ23ๅท");
  51 + for (String ad : addrs) {
  52 + System.out.println(ad);
  53 + }
54 54 }
55 55 }
platform-common/src/main/java/com/lyms/platform/common/utils/HttpRequest.java View file @ 5e9494f
... ... @@ -5,7 +5,6 @@
5 5 import java.net.HttpURLConnection;
6 6 import java.net.URL;
7 7 import java.net.URLConnection;
8   -import java.util.HashMap;
9 8 import java.util.Iterator;
10 9 import java.util.List;
11 10 import java.util.Map;
... ... @@ -401,6 +400,8 @@
401 400 }
402 401  
403 402 public static void main(String[] args) {
  403 +
  404 +
404 405 // sendGet("http://localhost:8080/message_develop/sendMMS","id=222222");
405 406 // String str = sendGet("http://data.api.healthbaby.com.cn/v1/messages","hospitalId=1&tagName=,้ซ˜่ก€ๅŽ‹,&page=1&limit=9999");
406 407 // Map<String, String> headers = new HashMap<String, String>();
... ... @@ -415,7 +416,7 @@
415 416 // params,headers);
416 417 // System.out.println(str);
417 418 String json = "[{\"key\":\"6\",\"value\":\"true\"},{\"key\":\"7\",\"value\":\"true\"},{\"key\":\"2\",\"value\":\"false\"},{\"key\":\"3\",\"value\":\"false\"},{\"key\":\"8\",\"value\":\"false\"},{\"key\":\"9\",\"value\":\"false\"},{\"key\":\"10\",\"value\":\"false\"},{\"key\":\"12\",\"value\":\"false\"},{\"key\":\"13\",\"value\":\"false\"},{\"key\":\"15\",\"value\":\"false\"},{\"key\":\"16\",\"value\":\"false\"},{\"key\":\"17\",\"value\":\"false\"},{\"key\":\"19\",\"value\":\"false\"},{\"key\":\"20\",\"value\":\"false\"},{\"key\":\"22\",\"value\":\"false\"},{\"key\":\"23\",\"value\":\"false\"}]";
418   - String result = HttpRequest.sendPut("http://192.168.5.13:8080/v1/serviceConfig/196",json,"YMer2016");
  419 + // String result = HttpRequest.sendPut("http://192.168.5.13:8080/v1/serviceConfig/196",json,"YMer2016");
419 420 }
420 421 }
platform-dal/src/main/java/com/lyms/platform/pojo/AntExChuModel.java View file @ 5e9494f
... ... @@ -4,7 +4,6 @@
4 4 import com.lyms.platform.common.result.BaseModel;
5 5 import org.springframework.data.mongodb.core.mapping.Document;
6 6  
7   -import java.io.Serializable;
8 7 import java.util.Date;
9 8 import java.util.List;
10 9  
... ... @@ -22,6 +21,14 @@
22 21 private String id;
23 22 private String parentId;
24 23 private String pid;
  24 + //ๆ–ฐ็”Ÿๅ„ฟๆญปไบกๅค‡ๆณจ
  25 + private String neoDeathTodo;
  26 + //ๅ‡บ็”Ÿ็ผบ้™ทๅ„ฟๅค‡ๆณจ
  27 + private String birthDefectTodo;
  28 + //ๆ–ฐ็”Ÿๅ„ฟๆญปไบกๅค‡ๆณจ
  29 + private Integer neoDeath;
  30 + //ๅ‡บ็”Ÿ็ผบ้™ทๅ„ฟๅค‡ๆณจ
  31 + private Integer birthDefect;
25 32 //้ข„ไบงๆœŸ
26 33 private Date dueDate;
27 34 //ๆœซๆฌกๆœˆ็ป
... ... @@ -56,10 +63,6 @@
56 63 private Integer stillbirth;
57 64 //ๆญปไบง
58 65 private Integer stillChan ;
59   - //ๆ–ฐ็”Ÿๅ„ฟๆญปไบก
60   - private Integer neoDeath;
61   - //ๅ‡บ็”Ÿ็ผบ้™ท
62   - private Integer birthDefect;
63 66 // ่บซ้ซ˜
64 67 private String height;
65 68 //ไฝ“้‡
66 69  
... ... @@ -102,7 +105,20 @@
102 105 private Integer abortionZR;
103 106 //ไบบๅทฅๆตไบง
104 107 private Integer abortionRG;
  108 + /**
  109 + * ๅ…ถไป–็š„่ฏŠๆ–ญๆ„่ง
  110 + */
  111 + private String diagnosisOther;
105 112  
  113 +
  114 + public String getDiagnosisOther() {
  115 + return diagnosisOther;
  116 + }
  117 +
  118 + public void setDiagnosisOther(String diagnosisOther) {
  119 + this.diagnosisOther = diagnosisOther;
  120 + }
  121 +
106 122 public String getBarCode() {
107 123 return barCode;
108 124 }
... ... @@ -187,6 +203,38 @@
187 203 return heart;
188 204 }
189 205  
  206 + public String getNeoDeathTodo() {
  207 + return neoDeathTodo;
  208 + }
  209 +
  210 + public void setNeoDeathTodo(String neoDeathTodo) {
  211 + this.neoDeathTodo = neoDeathTodo;
  212 + }
  213 +
  214 + public Integer getNeoDeath() {
  215 + return neoDeath;
  216 + }
  217 +
  218 + public void setNeoDeath(Integer neoDeath) {
  219 + this.neoDeath = neoDeath;
  220 + }
  221 +
  222 + public Integer getBirthDefect() {
  223 + return birthDefect;
  224 + }
  225 +
  226 + public void setBirthDefect(Integer birthDefect) {
  227 + this.birthDefect = birthDefect;
  228 + }
  229 +
  230 + public String getBirthDefectTodo() {
  231 + return birthDefectTodo;
  232 + }
  233 +
  234 + public void setBirthDefectTodo(String birthDefectTodo) {
  235 + this.birthDefectTodo = birthDefectTodo;
  236 + }
  237 +
190 238 public void setHeart(String heart) {
191 239 this.heart = heart;
192 240 }
193 241  
194 242  
... ... @@ -665,28 +713,13 @@
665 713 this.baricIndex = baricIndex;
666 714 }
667 715  
668   - public Integer getBirthDefect() {
669   - return birthDefect;
670   - }
671 716  
672   - public void setBirthDefect(Integer birthDefect) {
673   - this.birthDefect = birthDefect;
674   - }
675   -
676 717 public Integer getDelivery() {
677 718 return delivery;
678 719 }
679 720  
680 721 public void setDelivery(Integer delivery) {
681 722 this.delivery = delivery;
682   - }
683   -
684   - public Integer getNeoDeath() {
685   - return neoDeath;
686   - }
687   -
688   - public void setNeoDeath(Integer neoDeath) {
689   - this.neoDeath = neoDeath;
690 723 }
691 724  
692 725 public Integer getPlanedProd() {
platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.java View file @ 5e9494f
... ... @@ -6,7 +6,6 @@
6 6  
7 7 import java.util.Date;
8 8 import java.util.List;
9   -import java.util.Map;
10 9  
11 10 /**
12 11 * ไบงๅ‰ๆฃ€ๆŸฅ
... ... @@ -84,6 +83,10 @@
84 83 private String typeYc;
85 84 //ๅค„็†ๆ„่ง
86 85 private String treatmentOpinion;
  86 + /**
  87 + * ๅ…ถไป–็š„่ฏŠๆ–ญๆ„่ง
  88 + */
  89 + private String diagnosisOther;
87 90 //ๆŒ‡ๅฏผ
88 91 private String guide;
89 92 //ไบงๆฃ€ๅŒป็”Ÿ
... ... @@ -99,6 +102,14 @@
99 102 private String cDueWeek;
100 103 //ๆ“ไฝœไบบ
101 104 private Integer operator;
  105 +
  106 + public String getDiagnosisOther() {
  107 + return diagnosisOther;
  108 + }
  109 +
  110 + public void setDiagnosisOther(String diagnosisOther) {
  111 + this.diagnosisOther = diagnosisOther;
  112 + }
102 113  
103 114 public String getBarCode() {
104 115 return barCode;
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 5e9494f
... ... @@ -1053,7 +1053,7 @@
1053 1053 if (null != queryNo) {
1054 1054 MongoCondition c = MongoCondition.newInstance();
1055 1055 MongoCondition con1 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS);
1056   - MongoCondition con2 = MongoCondition.newInstance("username", queryNo, MongoOper.IS);
  1056 + MongoCondition con2 = MongoCondition.newInstance("username", "^" + queryNo, MongoOper.LIKE);
1057 1057 MongoCondition con3 = MongoCondition.newInstance("cardNo", queryNo, MongoOper.IS);
1058 1058 MongoCondition con4 = MongoCondition.newInstance("fileCode", queryNo, MongoOper.IS);
1059 1059 if(c1!=null) {
platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java View file @ 5e9494f
... ... @@ -201,7 +201,7 @@
201 201 if (StringUtils.isNotBlank(queryNo)) {
202 202 MongoCondition c = MongoCondition.newInstance();
203 203 MongoCondition con1 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS);
204   - MongoCondition con2 = MongoCondition.newInstance("username", queryNo, MongoOper.IS);
  204 + MongoCondition con2 = MongoCondition.newInstance("username", "^"+queryNo, MongoOper.LIKE);
205 205 MongoCondition con3 = MongoCondition.newInstance("vcCardNo", queryNo, MongoOper.IS);
206 206 if(c1!=null) {
207 207 c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria());
platform-operate-api/pom.xml View file @ 5e9494f
... ... @@ -82,6 +82,12 @@
82 82 <version>9.3.8.v20160314</version>
83 83 </dependency>
84 84  
  85 + <dependency>
  86 + <groupId>net.sourceforge.jexcelapi</groupId>
  87 + <artifactId>jxl</artifactId>
  88 + <version>2.6.12</version>
  89 + </dependency>
  90 +
85 91 </dependencies>
86 92 <build>
87 93 <resources>
platform-operate-api/src/main/java/com/lyms/hospitalapi/Nczxyy/NczxyyLisService.java View file @ 5e9494f
... ... @@ -262,6 +262,7 @@
262 262 CheckResponse.setName(nczxyyxq2.getData().getๅง“ๅ());
263 263 CheckResponse.setModified(formatter.parse(nczxyyxq2.getData().getๆŠฅๅ‘Šๆ—ถ้—ด()));
264 264 CheckResponse.setType(1);
  265 + CheckResponse.setDoctor(nczxyyxq2.getData().get็”ณ่ฏทๅŒปๅธˆ());
265 266 CheckResponse.setTitle(nczxyyxq2.getData().get็”ณ่ฏท้กน็›ฎ());
266 267 CheckResponse.setAge(nczxyyxq2.getData().getๅนด้พ„());
267 268 CheckResponse.setApplyDate(formatter.parse(nczxyyxq2.getData().get็”ณ่ฏทๆ—ถ้—ด()));
268 269  
... ... @@ -275,8 +276,9 @@
275 276 item.setName(nczxyyxq2.getData().getLisPatResults().get(j).getๅ็งฐ());
276 277 item.setCode(nczxyyxq2.getData().getLisPatResults().get(j).get้กน็›ฎๅท());
277 278 item.setRefer(nczxyyxq2.getData().getLisPatResults().get(j).getไธด็•Œๅ€ผ());
278   - item.setResult(nczxyyxq2.getData().getLisPatResults().get(j).get็ป“่ฎบ());
  279 + item.setResult(nczxyyxq2.getData().getLisPatResults().get(j).getๆฃ€้ชŒๅ€ผ());
279 280 item.setUnit(nczxyyxq2.getData().getLisPatResults().get(j).getๅ•ไฝ());
  281 + item.setSpecial(nczxyyxq2.getData().getLisPatResults().get(j).get็ป“่ฎบ());
280 282 itemlist.add(item);
281 283 }
282 284 result.add(CheckResponse);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/LisController.java View file @ 5e9494f
... ... @@ -15,6 +15,8 @@
15 15 import com.lyms.platform.permission.model.LisReportModel;
16 16 import com.lyms.platform.permission.service.LisService;
17 17 import org.apache.commons.collections.CollectionUtils;
  18 +import org.slf4j.Logger;
  19 +import org.slf4j.LoggerFactory;
18 20 import org.springframework.beans.factory.annotation.Autowired;
19 21 import org.springframework.stereotype.Controller;
20 22 import org.springframework.web.bind.annotation.*;
... ... @@ -30,6 +32,9 @@
30 32 @Controller
31 33 public class LisController extends BaseController {
32 34  
  35 + //ๆ—ฅๅฟ—่ฐƒๆต‹ๅ™จ
  36 + private static final Logger logger = LoggerFactory.getLogger("lis-sync-log");
  37 +
33 38 @Autowired
34 39 private LisService lisService;
35 40 @Autowired
... ... @@ -87,6 +92,7 @@
87 92 list.add(model);
88 93 }catch (Exception e)
89 94 {
  95 + logger.error("lis id == "+lisRequest.getLisId());
90 96 continue;
91 97 }
92 98  
... ... @@ -199,7 +205,7 @@
199 205 * @param token
200 206 * @return
201 207 */
202   - @RequestMapping(method = RequestMethod.PUT, value = "/updateAppLisStatus")
  208 + @RequestMapping(method = RequestMethod.GET, value = "/updateAppLisStatus")
203 209 @ResponseBody
204 210 public BaseResponse updateAppLisStatus(@RequestParam("ids") String ids,
205 211 @RequestHeader("Authorization") String token) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReportController.java View file @ 5e9494f
... ... @@ -245,7 +245,7 @@
245 245 * @param request
246 246 * @param startDate
247 247 * @param endDate
248   - * @param type 1 = ๅญ•ๆœŸไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ๏ผŒ 2 = ไบงๅŽไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ๏ผŒ 3 = ๅ„ฟ็ซฅไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ
  248 + * @param exportType 1 = ๅญ•ๆœŸไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ๏ผŒ 2 = ไบงๅŽไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ๏ผŒ 3 = ๅ„ฟ็ซฅไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ
249 249 * @param response
250 250 * @param provinceId
251 251 * @param cityId
252 252  
... ... @@ -253,18 +253,16 @@
253 253 * @param hospitalId
254 254 * @param tempId
255 255 * @param couponType
256   - * @param page
257   - * @param limit
258 256 */
259 257 @ResponseBody
260 258 // @TokenRequired
261 259 @RequestMapping(value = "/coupon/info/export", method = RequestMethod.GET)
262   - public void couponInfoExport(HttpServletRequest request, Date startDate, Date endDate, Integer type, HttpServletResponse response,
263   - String provinceId, String cityId, String areaId, String hospitalId, String tempId, String couponType,
264   - Integer page, Integer limit) {
265   - Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate,
266   - "endDate", endDate != null ? DateUtil.addDay(endDate, 1) : endDate, "hospitalId", hospitalId, "provinceId", provinceId, "cityId", cityId, "areaId", areaId, "type", type,
267   - "tempId", tempId, "couponType", CollectionUtils.asList(couponType), "currentPage", page, "pageSize", limit);
  260 + public void couponInfoExport(HttpServletRequest request, HttpServletResponse response, Date startDate, Date endDate, Integer type,
  261 + String provinceId, String cityId, String areaId, String hospitalId, String tempId, String couponType, Integer exportType) {
  262 + Map<String, Object> param = CollectionUtils.createMap("userId", "1000000185", "startDate", startDate,
  263 +// Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate,
  264 + "endDate", endDate != null ? DateUtil.addDay(endDate, 1) : endDate, "hospitalId", CollectionUtils.asList(hospitalId), "provinceId", provinceId, "cityId", cityId, "areaId", areaId, "type", type,
  265 + "tempId", tempId, "couponType",couponType, "exportType", exportType);
268 266 reportService.exportCouponInfo(param, response);
269 267 }
270 268  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ 5e9494f
... ... @@ -236,7 +236,7 @@
236 236 parentIds.add(pa.getId());
237 237 }
238 238 antExRecordQuery.setParentIds(parentIds);
239   - }else{
  239 + }else if(StringUtils.isNotEmpty(antExManagerQueryRequest.getQueryNo())){
240 240 return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("ๆˆๅŠŸ").setPageInfo(antExRecordQuery.getPageInfo());
241 241 }
242 242  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 5e9494f
... ... @@ -238,7 +238,6 @@
238 238  
239 239  
240 240 if (StringUtils.isNotEmpty(antExAddRequest.getId())) {
241   -
242 241 model.setHospitalId(hospitalId);
243 242 model.setOperator(userId);
244 243 antenatalExaminationService.updateOneAnt(model, antExAddRequest.getId());
... ... @@ -266,7 +265,6 @@
266 265 //ๅค่ฏŠ,ไฟฎๆ”นไบงๆฃ€็ฎก็†
267 266 antenatalExaminationService.updateAntExRecord(antExAddRequest.getId(), 2);
268 267 } else {
269   -
270 268 model.setOperator(userId);
271 269 model.setYn(YnEnums.YES.getId());
272 270 model.setHospitalId(hospitalId);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 5e9494f
... ... @@ -1692,7 +1692,14 @@
1692 1692 newBabyManagerQueryModel.setMphone(DefenceUtils.getPhone(babyModel.getMphone()));
1693 1693 newBabyManagerQueryModel.setBirthDays(DateUtil.getDays(babyModel.getBirth(), new Date()));
1694 1694 newBabyManagerQueryModel.setBabyId(babyModel.getId());
1695   - newBabyManagerQueryModel.setDeliverDoctor(usersService.getUsers(Integer.valueOf(maternalDeliverModel.getDeliverDoctor())).getName());
  1695 + String deliverDoctor = "";
  1696 + try {
  1697 + deliverDoctor = usersService.getUsers(Integer.valueOf(maternalDeliverModel.getDeliverDoctor())).getName();
  1698 + } catch (Exception e)
  1699 + {
  1700 + deliverDoctor = maternalDeliverModel.getDeliverDoctor();
  1701 + }
  1702 + newBabyManagerQueryModel.setDeliverDoctor(deliverDoctor);
1696 1703 newBabyManagerQueryModel.setMaternalDeliverId(maternalDeliverModel.getId());
1697 1704 newBabyManagerQueryModel.setPatientId(maternalDeliverModel.getParentId());
1698 1705 newBabyManagerQueryModel.setpId(maternalDeliverModel.getPid());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java View file @ 5e9494f
... ... @@ -21,7 +21,6 @@
21 21 import com.lyms.platform.permission.model.Users;
22 22 import com.lyms.platform.permission.service.OrganizationService;
23 23 import com.lyms.platform.permission.service.UsersService;
24   -import com.lyms.platform.pojo.BasicConfig;
25 24 import com.lyms.platform.pojo.PremaritalCheckup;
26 25 import com.lyms.platform.pojo.ResidentsArchiveModel;
27 26 import com.lyms.platform.pojo.SmsConfigModel;
... ... @@ -494,7 +493,25 @@
494 493 result.setPresentHistory(model.getPresentHistory() == null ? null : JsonUtil.jkstr2Obj(model.getPresentHistory(),Map.class));
495 494  
496 495 result.setVcCardNo(model.getVcCardNo());
497   - result.setBuildDoctor(model.getBuildDoctor());
  496 + if (StringUtils.isNotEmpty( model.getBuildDoctor())){
  497 + Users u = usersService.getUsers(Integer.valueOf(model.getBuildDoctor()));
  498 + if(u!=null){
  499 + Map<String,String> doctInfo = new HashMap<>();
  500 + doctInfo.put("id",String.valueOf(u.getId()));
  501 + doctInfo.put("name",u.getName());
  502 + result.setBuildDoctor(doctInfo);
  503 + }else{
  504 + Map<String,String> doctInfo = new HashMap<>();
  505 + doctInfo.put("id",String.valueOf(u.getId()));
  506 + result.setBuildDoctor(doctInfo);
  507 + }
  508 + }else{
  509 + Map<String,String> doctInfo = new HashMap<>();
  510 + doctInfo.put("id",String.valueOf(model.getBuildDoctor()));
  511 + result.setBuildDoctor(doctInfo);
  512 + }
  513 +
  514 +
498 515 result.setBuildDay(DateUtil.getyyyy_MM_dd(model.getBuildDay()));
499 516  
500 517 result.setCreated(model.getCreated());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 5e9494f
... ... @@ -279,6 +279,9 @@
279 279 /* ๅŸบๆœฌไฟกๆฏ */
280 280 //ๅญ•ๅฆ‡ๅŸบๆœฌไฟกๆฏ
281 281 map.put("id",data.getId());
  282 + map.put("neoDeathTodo",data.getNeoDeathTodo());
  283 + map.put("birthDefectTodo",data.getBirthDefectTodo());
  284 + map.put("diagnosisOther",data.getDiagnosisOther());
282 285 map.put("username",patients.getUsername());
283 286 map.put("birth", DateUtil.getyyyy_MM_dd(patients.getBirth()));
284 287 map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
... ... @@ -637,6 +640,7 @@
637 640 /* ๅŸบๆœฌไฟกๆฏ */
638 641 //ๅญ•ๅฆ‡ๅŸบๆœฌไฟกๆฏ
639 642 map.put("id",data.getId());
  643 + map.put("diagnosisOther",data.getDiagnosisOther());
640 644 map.put("username",patients.getUsername());
641 645 map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth()));
642 646 map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()), UnitConstants.SUI));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java View file @ 5e9494f
... ... @@ -19,6 +19,10 @@
19 19 private String id;
20 20  
21 21 private String barCode;
  22 + /**
  23 + * ๅ…ถไป–็š„่ฏŠๆ–ญๆ„่ง
  24 + */
  25 + private String diagnosisOther;
22 26  
23 27 public String getBarCode() {
24 28 return barCode;
... ... @@ -90,6 +94,14 @@
90 94  
91 95 private Integer couponType;
92 96  
  97 + public String getDiagnosisOther() {
  98 + return diagnosisOther;
  99 + }
  100 +
  101 + public void setDiagnosisOther(String diagnosisOther) {
  102 + this.diagnosisOther = diagnosisOther;
  103 + }
  104 +
93 105 public String getCouponCode() {
94 106 return couponCode;
95 107 }
... ... @@ -138,6 +150,7 @@
138 150 public AntenatalExaminationModel convertToDataModel() {
139 151 AntenatalExaminationModel examinationModel = new AntenatalExaminationModel();
140 152 examinationModel.setId(id);
  153 + examinationModel.setDiagnosisOther(diagnosisOther);
141 154 examinationModel.setBarCode(barCode);
142 155 examinationModel.setParentId(parentId);
143 156 examinationModel.setCurrentDueDate(currentDueDate);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java View file @ 5e9494f
... ... @@ -206,7 +206,39 @@
206 206 private String couponCode;
207 207  
208 208 private Integer couponType;
  209 + /**
  210 + * ๅ…ถไป–็š„่ฏŠๆ–ญๆ„่ง
  211 + */
  212 + private String diagnosisOther;
  213 + //ๆ–ฐ็”Ÿๅ„ฟๆญปไบกๅค‡ๆณจ
  214 + private String neoDeathTodo;
  215 + //ๅ‡บ็”Ÿ็ผบ้™ทๅ„ฟๅค‡ๆณจ
  216 + private String birthDefectTodo;
209 217  
  218 + public String getNeoDeathTodo() {
  219 + return neoDeathTodo;
  220 + }
  221 +
  222 + public void setNeoDeathTodo(String neoDeathTodo) {
  223 + this.neoDeathTodo = neoDeathTodo;
  224 + }
  225 +
  226 + public String getBirthDefectTodo() {
  227 + return birthDefectTodo;
  228 + }
  229 +
  230 + public void setBirthDefectTodo(String birthDefectTodo) {
  231 + this.birthDefectTodo = birthDefectTodo;
  232 + }
  233 +
  234 + public String getDiagnosisOther() {
  235 + return diagnosisOther;
  236 + }
  237 +
  238 + public void setDiagnosisOther(String diagnosisOther) {
  239 + this.diagnosisOther = diagnosisOther;
  240 + }
  241 +
210 242 public String getCouponCode() {
211 243 return couponCode;
212 244 }
... ... @@ -903,6 +935,9 @@
903 935 @Override
904 936 public AntExChuModel convertToDataModel() {
905 937 AntExChuModel antExChuModel=new AntExChuModel();
  938 + antExChuModel.setNeoDeathTodo(neoDeathTodo);
  939 + antExChuModel.setBirthDefectTodo(birthDefectTodo);
  940 + antExChuModel.setDiagnosisOther(diagnosisOther);
906 941 antExChuModel.setBg(bg);
907 942 antExChuModel.setBarCode(barCode);
908 943 antExChuModel.setId(id);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java View file @ 5e9494f
... ... @@ -4,7 +4,6 @@
4 4 import com.lyms.platform.common.utils.JsonUtil;
5 5 import com.lyms.platform.operate.web.request.MatDeliverAddRequest;
6 6 import com.lyms.platform.pojo.AntExChuModel;
7   -import org.apache.commons.lang.StringUtils;
8 7  
9 8 import java.util.List;
10 9 import java.util.Map;
... ... @@ -88,6 +87,10 @@
88 87 private Integer stillbirth;
89 88 //ๆญปไบง
90 89 private Integer stillChan;
  90 + //ๆ–ฐ็”Ÿๅ„ฟๆญปไบกๅค‡ๆณจ
  91 + private String neoDeathTodo;
  92 + //ๅ‡บ็”Ÿ็ผบ้™ทๅค‡ๆณจ
  93 + private String birthDefectTodo;
91 94 //ๆ–ฐ็”Ÿๅ„ฟๆญปไบก
92 95 private Integer neoDeath;
93 96 //ๅ‡บ็”Ÿ็ผบ้™ท
... ... @@ -231,6 +234,22 @@
231 234 return abortionZR;
232 235 }
233 236  
  237 + public Integer getNeoDeath() {
  238 + return neoDeath;
  239 + }
  240 +
  241 + public void setNeoDeath(Integer neoDeath) {
  242 + this.neoDeath = neoDeath;
  243 + }
  244 +
  245 + public Integer getBirthDefect() {
  246 + return birthDefect;
  247 + }
  248 +
  249 + public void setBirthDefect(Integer birthDefect) {
  250 + this.birthDefect = birthDefect;
  251 + }
  252 +
234 253 public void setAbortionZR(Integer abortionZR) {
235 254 this.abortionZR = abortionZR;
236 255 }
237 256  
... ... @@ -603,14 +622,7 @@
603 622 this.abortion = abortion;
604 623 }
605 624  
606   - public Integer getBirthDefect() {
607   - return birthDefect;
608   - }
609 625  
610   - public void setBirthDefect(Integer birthDefect) {
611   - this.birthDefect = birthDefect;
612   - }
613   -
614 626 public Integer getDelivery() {
615 627 return delivery;
616 628 }
617 629  
... ... @@ -619,14 +631,7 @@
619 631 this.delivery = delivery;
620 632 }
621 633  
622   - public Integer getNeoDeath() {
623   - return neoDeath;
624   - }
625 634  
626   - public void setNeoDeath(Integer neoDeath) {
627   - this.neoDeath = neoDeath;
628   - }
629   -
630 635 public Integer getPlanedProd() {
631 636 return planedProd;
632 637 }
... ... @@ -900,6 +905,22 @@
900 905 this.hHealthInfo = hHealthInfo;
901 906 }
902 907  
  908 + public String getNeoDeathTodo() {
  909 + return neoDeathTodo;
  910 + }
  911 +
  912 + public void setNeoDeathTodo(String neoDeathTodo) {
  913 + this.neoDeathTodo = neoDeathTodo;
  914 + }
  915 +
  916 + public String getBirthDefectTodo() {
  917 + return birthDefectTodo;
  918 + }
  919 +
  920 + public void setBirthDefectTodo(String birthDefectTodo) {
  921 + this.birthDefectTodo = birthDefectTodo;
  922 + }
  923 +
903 924 public AntexChuResult convertToResult(AntExChuModel antExChuModel) {
904 925 if (null != antExChuModel) {
905 926 setBarCode(antExChuModel.getBarCode());
... ... @@ -940,6 +961,8 @@
940 961 if(null!=antExChuModel.getBp()){
941 962 setBp(JsonUtil.str2Obj(antExChuModel.getBp(),Map.class));
942 963 }
  964 + setNeoDeathTodo(antExChuModel.getNeoDeathTodo());
  965 + setBirthDefectTodo(antExChuModel.getBirthDefectTodo());
943 966 setHeart(antExChuModel.getHeart());
944 967 setLungs(antExChuModel.getLungs());
945 968 setVulva(antExChuModel.getVulva());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ResidentsArchiveResult.java View file @ 5e9494f
... ... @@ -78,7 +78,7 @@
78 78 //ๅฐฑ่ฏŠๅกๅท
79 79 private String vcCardNo;
80 80 //ๅปบๆกฃไบบ
81   - private String buildDoctor;
  81 + private Map<String,String> buildDoctor;
82 82 //ๅปบๆกฃๆ—ฅๆœŸ
83 83 private String buildDay;
84 84  
85 85  
... ... @@ -347,11 +347,11 @@
347 347 this.vcCardNo = vcCardNo;
348 348 }
349 349  
350   - public String getBuildDoctor() {
  350 + public Map<String,String> getBuildDoctor() {
351 351 return buildDoctor;
352 352 }
353 353  
354   - public void setBuildDoctor(String buildDoctor) {
  354 + public void setBuildDoctor(Map<String,String> buildDoctor) {
355 355 this.buildDoctor = buildDoctor;
356 356 }
357 357  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ 5e9494f
... ... @@ -237,8 +237,59 @@
237 237 }
238 238 }
239 239  
  240 +
240 241 /**
  242 + * ๅŒๆญฅๅ—ๅ……ไธญๅฟƒๅŒป้™ข็š„ๆ•ฐๆฎๅˆฐ็บฟไธŠ
241 243 * ๅฎšๆ—ถไปปๅŠก้…็ฝฎapplicationContext.xml
  244 + */
  245 + public void nczxyySyncDataSSL() {
  246 +
  247 + try{
  248 + String json = HttpClientUtil.doPost("https://area-nc-api.healthbaby.com.cn:12356/findSyncData", new HashMap<String, String>(), "utf-8");
  249 + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(json))
  250 + {
  251 + List<SyncDataModel> list = JsonUtil.toList(json, SyncDataModel.class);
  252 + System.out.println("nczxyy syncdata size = "+ list.size());
  253 + int batchSize = 200;
  254 + int end = 0;
  255 + for (int i = 0; i < list.size(); i += batchSize) {
  256 + end = (end + batchSize);
  257 + if (end > list.size()) {
  258 + end = list.size();
  259 + }
  260 + System.out.println("nczxyy start:" + i + ",end:" + end);
  261 + final List<SyncDataModel> tempList = list.subList(i, end);
  262 + new Thread(new Runnable() {
  263 + @Override
  264 + public void run() {
  265 + if (CollectionUtils.isNotEmpty(tempList))
  266 + {
  267 + StringBuffer ids = new StringBuffer();
  268 + for (SyncDataModel model : tempList) {
  269 + boolean boo = mongoSyncService.syncData(model.getAction(), model.getDataId(), model.getClassName(), model.getJsonData());
  270 + if (boo) {
  271 + ids.append(model.getId());
  272 + ids.append(",");
  273 + }
  274 + }
  275 + if (ids.length() > 0) {
  276 + Map<String,String> params = new HashMap<String, String>();
  277 + params.put("ids", ids.toString());
  278 + String result = HttpClientUtil.doPost("https://area-nc-api.healthbaby.com.cn:12356/updateSyncData", params, "utf-8");
  279 + System.out.println("exc result = "+ result);
  280 + }
  281 + }
  282 + }
  283 + }).start();
  284 + }
  285 + }
  286 + }catch(Exception ex){
  287 + ExceptionUtils.catchException(ex, "nczxyySyncDataSSL Error.");
  288 + }
  289 + }
  290 +
  291 + /**
  292 + * ๅฎšๆ—ถไปปๅŠก้…็ฝฎapplicationContext.xml
242 293 *
243 294 */
244 295 public void syncDataSSL()
... ... @@ -257,6 +308,13 @@
257 308 dzfySyncDataSSL();
258 309 }
259 310 },"dzfy-thread").start();
  311 +
  312 + new Thread(new Runnable() {
  313 + @Override
  314 + public void run() {
  315 + nczxyySyncDataSSL();
  316 + }
  317 + },"nczxyy-thread").start();
260 318  
261 319 }
262 320  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 5e9494f
... ... @@ -754,12 +754,12 @@
754 754 Patients patients = mongoTemplate.findById(babyModel.getParentId(), Patients.class);
755 755 map.put("username", babyModel.getName());
756 756 if(patients != null) {
757   - map.put("phone", patients.getPhone());
  757 + map.put("phone", com.lyms.platform.common.utils.StringUtils.encryPhone(patients.getPhone()));
758 758  
759   - String residenceAddress = findName(patients.getProvinceRegisterId()) + findName(patients.getCityRegisterId()) + findName(patients.getAreaRegisterId());
  759 + String residenceAddress = findName(patients.getProvinceRegisterId()) + findName(patients.getCityRegisterId()) + findName(patients.getAreaRegisterId()) + findName(patients.getStreetRegisterId()) + patients.getAddressRegister();
760 760 map.put("residenceAddress", residenceAddress.replace("null", "")); /** ๅฑ…ไฝๅœฐ */
761 761  
762   - String householdAddress = findName(patients.getProvinceId()) + findName(patients.getCityId()) + findName(patients.getAreaId()) + findName(patients.getStreetId()) + findName(patients.getAddress());
  762 + String householdAddress = findName(patients.getProvinceId()) + findName(patients.getCityId()) + findName(patients.getAreaId()) + findName(patients.getStreetId()) + patients.getAddress();
763 763 map.put("householdAddress", householdAddress.replace("null", "")); /** ๆˆท็ฑๅœฐ */
764 764 }
765 765 }
766 766  
767 767  
... ... @@ -768,13 +768,13 @@
768 768 private void setUserSendInfo(String userId, Map<String, Object> map) {
769 769 Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), Patients.class);
770 770 if(patients != null) {
771   - map.put("phone", patients.getPhone());
  771 + map.put("phone", com.lyms.platform.common.utils.StringUtils.encryPhone(patients.getPhone()));
772 772 map.put("username", patients.getUsername());
773 773  
774   - String residenceAddress = findName(patients.getProvinceRegisterId()) + findName(patients.getCityRegisterId()) + findName(patients.getAreaRegisterId());
  774 + String residenceAddress = findName(patients.getProvinceRegisterId()) + findName(patients.getCityRegisterId()) + findName(patients.getAreaRegisterId()) + findName(patients.getStreetRegisterId()) + patients.getAddressRegister();
775 775 map.put("residenceAddress", residenceAddress.replace("null", "")); /** ๅฑ…ไฝๅœฐ */
776 776  
777   - String householdAddress = findName(patients.getProvinceId()) + findName(patients.getCityId()) + findName(patients.getAreaId()) + findName(patients.getStreetId()) + findName(patients.getAddress());
  777 + String householdAddress = findName(patients.getProvinceId()) + findName(patients.getCityId()) + findName(patients.getAreaId()) + findName(patients.getStreetId()) + patients.getAddress();
778 778 map.put("householdAddress", householdAddress.replace("null", "")); /** ๆˆท็ฑๅœฐ */
779 779 }
780 780 }
781 781  
... ... @@ -795,8 +795,11 @@
795 795 String username = null; /** ๅง“ๅ */
796 796 String week = null; /** ไบงๆฃ€ๅญ•ๅ‘จ = ไบงๆฃ€ๆ—ถ้—ด - ๆœซๆฌกๆœˆ็ป */
797 797 Integer number = null; /** ไบงๆฃ€็ฌฌๆฌก */
798   - String operatorOrgName = null; /** ไบงๆฃ€ๆœบๆž„ */
799 798 String phone = null; /** ่”็ณป็”ต่ฏ */
  799 + if(map.get("used_hospital_id") != null) {
  800 + String operatorOrgName = couponMapper.findHospitalNameById(map.get("used_hospital_id").toString()); /** ไฝฟ็”จๆœบๆž„ */
  801 + map.put("operatorOrgName", operatorOrgName);
  802 + }
800 803 String doctorName = couponMapper.findUserName(operatorUserId); /** ไฝฟ็”จๅŒป็”Ÿ */
801 804 if(type == 1 || type == 3) {
802 805 Patients patients = mongoTemplate.findById(usedId, Patients.class);
... ... @@ -804,7 +807,6 @@
804 807 checkDate = patients.getCreated();
805 808 username = patients.getUsername();
806 809 week = DateUtil.getWeekDesc(patients.getLastMenses(), checkDate);
807   - operatorOrgName = couponMapper.findHospitalNameById(patients.getHospitalId());
808 810 phone = patients.getPhone();
809 811 }
810 812 } else if(type == 2) {
... ... @@ -817,7 +819,6 @@
817 819 username = findUserNameByPid(antexc.getPid());
818 820 week = DateUtil.getWeekDesc(antexc.getLastMenses(), antexc.getCheckTime());
819 821 // number = findNumberByList("checkTime", "pid", antexc.getPid(), antexc, AntExChuModel.class);
820   - operatorOrgName = couponMapper.findHospitalNameById(antexc.getHospitalId());
821 822 phone = findPhoneByPid(antexc.getPid());
822 823  
823 824 id = antexc.getId();/** ๅค„็†ๆŽ’ๅบ */
... ... @@ -854,7 +855,6 @@
854 855 sortTempModels.add(new SortTempModel(antExChuModel.getId(), antExChuModel.getCheckTime()));
855 856 }
856 857 }
857   - operatorOrgName = couponMapper.findHospitalNameById(antenatal.getHospitalId());
858 858 phone = findPhoneByPid(antenatal.getPid());
859 859 }
860 860 }
... ... @@ -876,7 +876,6 @@
876 876 /** ไฝฟ็”จๆ—ถ้—ด - ๅˆ†ๅจฉๆ—ถ้—ด */
877 877 week = DateUtil.getWeekDesc(findLastMensesByPatientId(maternalDeliverModel.getParentId()), useDate);
878 878 username = findUserNameByPid(maternalDeliverModel.getPid());
879   - operatorOrgName = couponMapper.findHospitalNameById(maternalDeliverModel.getHospitalId());
880 879 Patients patients = mongoTemplate.findById(maternalDeliverModel.getParentId(), Patients.class);
881 880 if(patients != null) {
882 881 phone = patients.getPhone();
... ... @@ -889,7 +888,6 @@
889 888 if(patients != null) {
890 889 username = patients.getUsername();
891 890 phone = patients.getPhone();
892   - operatorOrgName = couponMapper.findHospitalNameById(patients.getHospitalId());
893 891 week = "ไบงๅŽ" + DateUtil.getDays(patients.getFmDate(), useDate) + "ๅคฉ";
894 892 }
895 893 }
... ... @@ -898,7 +896,6 @@
898 896 if(postReviewModel != null) {
899 897 username = findUserNameByPid(postReviewModel.getPid());
900 898 phone = findPhoneByPid(postReviewModel.getPid());
901   - operatorOrgName = couponMapper.findHospitalNameById(postReviewModel.getHospitalId());
902 899 Patients patients = mongoTemplate.findById(postReviewModel.getParentId(), Patients.class);
903 900 if(patients != null) {
904 901 week = "ไบงๅŽ" + DateUtil.getDays(patients.getFmDate(), useDate) + "ๅคฉ";
905 902  
... ... @@ -909,13 +906,11 @@
909 906 if(babyModel != null) {
910 907 username = findUserNameByPid(babyModel.getPid());
911 908 phone = findPhoneByPid(babyModel.getPid());
912   - operatorOrgName = couponMapper.findHospitalNameById(babyModel.getHospitalId());
913 909 week = DateUtil.getMonthDesc(babyModel.getBirth(), useDate);
914 910 }
915 911 } else if(type == 8) {
916 912 BabyCheckModel babyCheckModel = mongoTemplate.findById(usedId, BabyCheckModel.class);
917 913 if(babyCheckModel != null) {
918   - operatorOrgName = couponMapper.findHospitalNameById(babyCheckModel.getHospitalId());
919 914 BabyModel babyModel = mongoTemplate.findById(babyCheckModel.getBuildId(), BabyModel.class);
920 915 if(babyModel != null) {
921 916 week = DateUtil.getMonthDesc(babyModel.getBirth(), useDate);
922 917  
... ... @@ -929,9 +924,8 @@
929 924 map.put("username", username);
930 925 map.put("week", week);
931 926 map.put("number", number);
932   - map.put("operatorOrgName", operatorOrgName);
933 927 map.put("doctorName", doctorName);
934   - map.put("phone", phone);
  928 + map.put("phone", com.lyms.platform.common.utils.StringUtils.encryPhone(phone));
935 929 }
936 930  
937 931 public static class SortTempModel {
... ... @@ -972,29 +966,6 @@
972 966 }
973 967 }
974 968  
975   - public static void main(String[] args) {
976   - SortTempModel temp = new SortTempModel();
977   - temp.setId("123");
978   - temp.setDate(DateUtil.parseYMD("2016-04-05"));
979   -
980   - SortTempModel temp2 = new SortTempModel();
981   - temp2.setId("456");
982   - temp2.setDate(DateUtil.parseYMD("2016-05-05"));
983   -
984   - List<SortTempModel> sortTempModels = new ArrayList<>();
985   - sortTempModels.add(temp2);
986   - sortTempModels.add(temp);
987   - System.out.println(sortTempModels);
988   - Collections.sort(sortTempModels, new Comparator<SortTempModel>() {
989   - @Override
990   - public int compare(SortTempModel o1, SortTempModel o2) {
991   - return o1.getDate().after(o2.getDate()) ? 1 : -1;
992   - }
993   -
994   - });
995   - System.out.println(sortTempModels);
996   - }
997   -
998 969 private String findUserNameByPid(String pid) {
999 970 if(StringUtils.isNotEmpty(pid)) {
1000 971 PersonModel personModel = mongoTemplate.findById(pid, PersonModel.class);
1001 972  
1002 973  
1003 974  
1004 975  
1005 976  
1006 977  
... ... @@ -1047,28 +1018,51 @@
1047 1018  
1048 1019 @Override
1049 1020 public void exportCouponInfo(Map<String, Object> param, HttpServletResponse response) {
  1021 + param.put("needPage", false);
  1022 +
1050 1023 BaseObjectResponse resp = couponInfo(param);
1051 1024 PageResult pageResult = (PageResult) resp.getData();
1052 1025 Map<String,Object> map = (Map<String, Object>) pageResult.getGrid();
1053 1026 List<Map<String, Object>> couponInfos = (List<Map<String, Object>>) map.get("couponInfos");
  1027 + List<Map<String, Object>> userSendInfos = (List<Map<String, Object>>) map.get("userSendInfos");
1054 1028  
  1029 + /**
  1030 + * 1 = ๅญ•ๆœŸไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ
  1031 + * 2 = ไบงๅŽไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ
  1032 + * 3 = ๅ„ฟ็ซฅไผ˜ๆƒ ๅˆธไฝฟ็”จ็ปŸ่ฎก่ฏฆๆƒ…ๅฏผๅ‡บ
  1033 + */
  1034 + Integer exportType = (Integer) param.get("exportType");
  1035 +
  1036 +// exportPostpartum(couponInfos, response);
  1037 +
  1038 + /**
  1039 + * 1 = ๅ‘ๆ”พไบบๆ•ฐ 2 = ๅ‘ๆ”พๅˆธๆ•ฐ 3 = ไฝฟ็”จไบบๆ•ฐ 4 = ไฝฟ็”จๅˆธๆ•ฐ
  1040 + */
1055 1041 Integer type = (Integer) param.get("type");
1056   - if(type == 1) { /** ๅญ•ๆœŸ */
1057   - exportPregnancy(couponInfos, response);
1058   - } else if(type == 2 || type == 3) { /** ไบงๅŽๅ’Œๅ„ฟ็ซฅ็ฑปไผผ */
1059   - exportPostpartum(couponInfos, response);
  1042 + if(type == null) type = 4;
  1043 + if(exportType == 1 && type == 1) { /** ๅญ•ๆœŸๅ‘ๆ”พไบบๆ•ฐ */
  1044 + exportPregnancy(couponInfos == null ? userSendInfos : couponInfos, response);
  1045 + } else if(exportType == 1) { /** ๅญ•ๆœŸไฝฟ็”จๅˆธๆ•ฐ */
  1046 + exportPregnancyUsedInfo(couponInfos == null ? userSendInfos : couponInfos, response);
  1047 + } else if(exportType == 2 && type == 1) { /** ไบงๅŽๅ‘ๆ”พ็ปŸ่ฎก */
  1048 + exportPostpartumSendInfo(couponInfos == null ? userSendInfos : couponInfos, response);
  1049 + } else if(exportType == 2) { /** ไบงๅŽไฝฟ็”จ */
  1050 + exportPostpartumUsedInfo(couponInfos == null ? userSendInfos : couponInfos, response);
  1051 + } else if(exportType == 3 && type == 1) {/** ๅ„ฟ็ซฅๅ‘ๆ”พ */
  1052 + exportChildSendInfo(couponInfos == null ? userSendInfos : couponInfos, response);
  1053 + } else if(exportType == 3) {/** ๅ„ฟ็ซฅไฝฟ็”จ */
  1054 + exportChildUsedInfo(couponInfos == null ? userSendInfos : couponInfos, response);
1060 1055 }
1061 1056  
1062 1057 }
1063 1058  
1064   - private void exportPostpartum(List<Map<String, Object>> couponInfos, HttpServletResponse response) {
  1059 + private void exportChildUsedInfo(List<Map<String, Object>> data, HttpServletResponse response) {
1065 1060 Map<String, String> cnames = new LinkedHashMap<>();
1066 1061 cnames.put("id", "#");
1067   - cnames.put("checkDate", "ไบงๆฃ€ๆ—ฅๆœŸ");
  1062 + cnames.put("use_date", "ไฝฟ็”จๆ—ฅๆœŸ");
1068 1063 cnames.put("username", "ๅง“ๅ");
1069   - cnames.put("use_day", "ไฝฟ็”จๆ—ถ้—ด");
1070   - cnames.put("type", "ไบงๆฃ€ๅˆธ็ฑปๅž‹");
1071   - cnames.put("coupon_desc", "ไผ˜ๆƒ ๅˆธ");
  1064 + cnames.put("week", "ไฝฟ็”จๆ—ถ้—ด");
  1065 + cnames.put("type_desc", "ไผ˜ๆƒ ๅˆธ");
1072 1066 cnames.put("sequence_id", "ไผ˜ๆƒ ๅˆธๅท");
1073 1067 cnames.put("operatorOrgName", "ไฝฟ็”จๆœบๆž„");
1074 1068 cnames.put("doctorName", "ไฝฟ็”จๅŒป็”Ÿ");
1075 1069  
1076 1070  
... ... @@ -1077,14 +1071,13 @@
1077 1071  
1078 1072 List<Map<String,Object>> results = new ArrayList<>();
1079 1073 int i = 0;
1080   - for (Map<String, Object> m : couponInfos) {
  1074 + for (Map<String, Object> m : data) {
1081 1075 Map<String, Object> result = new LinkedHashMap<>();
1082 1076 result.put("id", ++i);
1083   - result.put("checkDate", DateUtil.getyyyy_MM_dd((Date) m.get("checkDate")));
  1077 + result.put("use_date", m.get("use_date"));
1084 1078 result.put("username", m.get("username"));
1085   - result.put("use_day", m.get("use_day"));
1086   - result.put("type", couponDescMap.get(m.get("type")));
1087   - result.put("coupon_desc", couponReportMap.get(m.get("type") + "_" + m.get("coupon_order")));
  1079 + result.put("week", m.get("week"));
  1080 + result.put("type_desc", m.get("type_desc"));
1088 1081 result.put("sequence_id", m.get("sequence_id"));
1089 1082 result.put("operatorOrgName", m.get("operatorOrgName"));
1090 1083 result.put("doctorName", m.get("doctorName"));
1091 1084  
1092 1085  
1093 1086  
1094 1087  
1095 1088  
1096 1089  
1097 1090  
... ... @@ -1095,33 +1088,154 @@
1095 1088 ResponseUtil.responseExcel(cnames, results, response);
1096 1089 }
1097 1090  
1098   - private void exportPregnancy(List<Map<String, Object>> couponInfos, HttpServletResponse response) {
  1091 + private void exportChildSendInfo(List<Map<String, Object>> data, HttpServletResponse response) {
1099 1092 Map<String, String> cnames = new LinkedHashMap<>();
1100 1093 cnames.put("id", "#");
1101   - cnames.put("checkDate", "ไบงๆฃ€ๆ—ฅๆœŸ");
  1094 + cnames.put("create_date", "ๅ‘ๆ”พๆ—ฅๆœŸ");
1102 1095 cnames.put("username", "ๅง“ๅ");
1103   - cnames.put("week", "ไบงๆฃ€ๅญ•ๅ‘จ");
  1096 + cnames.put("send_hospital", "ๅ‘ๆ”พๆœบๆž„");
  1097 + cnames.put("doctoer_name", "ๅ‘ๆ”พๅŒป็”Ÿ");
  1098 + cnames.put("residenceAddress", "ๅฑ…ไฝๅœฐ");
  1099 + cnames.put("householdAddress", "ๆˆท็ฑๅœฐ");
  1100 + cnames.put("phone", "่”็ณป็”ต่ฏ");
  1101 +
  1102 + List<Map<String,Object>> results = new ArrayList<>();
  1103 + int i = 0;
  1104 + for (Map<String, Object> m : data) {
  1105 + Map<String, Object> result = new LinkedHashMap<>();
  1106 + result.put("id", ++i);
  1107 + result.put("create_date", m.get("create_date"));
  1108 + result.put("username", m.get("username"));
  1109 + result.put("send_hospital", m.get("send_hospital"));
  1110 + result.put("doctoer_name", m.get("doctoer_name"));
  1111 + result.put("residenceAddress", m.get("residenceAddress"));
  1112 + result.put("householdAddress", m.get("householdAddress"));
  1113 + result.put("phone", m.get("phone"));
  1114 + results.add(result);
  1115 + }
  1116 + ResponseUtil.responseExcel(cnames, results, response);
  1117 + }
  1118 +
  1119 +
  1120 +
  1121 + private void exportPostpartumUsedInfo(List<Map<String, Object>> data, HttpServletResponse response) {
  1122 + Map<String, String> cnames = new LinkedHashMap<>();
  1123 + cnames.put("id", "#");
  1124 + cnames.put("use_date", "ไฝฟ็”จๆ—ฅๆœŸ");
  1125 + cnames.put("username", "ๅง“ๅ");
  1126 + cnames.put("week", "ไฝฟ็”จๆ—ถ้—ด");
  1127 + cnames.put("type_desc", "ไผ˜ๆƒ ๅˆธ");
  1128 + cnames.put("sequence_id", "ไผ˜ๆƒ ๅˆธๅท");
  1129 + cnames.put("operatorOrgName", "ไฝฟ็”จๆœบๆž„");
  1130 + cnames.put("doctorName", "ไฝฟ็”จๅŒป็”Ÿ");
  1131 + cnames.put("send_hospital", "ไผ˜ๆƒ ๅˆธๅ‘ๆ”พๆœบๆž„");
  1132 + cnames.put("phone", "่”็ณป็”ต่ฏ");
  1133 +
  1134 + List<Map<String,Object>> results = new ArrayList<>();
  1135 + int i = 0;
  1136 + for (Map<String, Object> m : data) {
  1137 + Map<String, Object> result = new LinkedHashMap<>();
  1138 + result.put("id", ++i);
  1139 + result.put("phone", m.get("phone"));
  1140 + result.put("use_date", m.get("use_date"));
  1141 + result.put("username", m.get("username"));
  1142 + result.put("week", m.get("week"));
  1143 + result.put("type_desc", m.get("type_desc"));
  1144 + result.put("sequence_id", m.get("sequence_id"));
  1145 + result.put("operatorOrgName", m.get("operatorOrgName"));
  1146 + result.put("doctorName", m.get("doctorName"));
  1147 + result.put("send_hospital", m.get("send_hospital"));
  1148 + result.put("phone", m.get("phone"));
  1149 + results.add(result);
  1150 + }
  1151 + ResponseUtil.responseExcel(cnames, results, response);
  1152 + }
  1153 +
  1154 + private void exportPostpartumSendInfo(List<Map<String, Object>> data, HttpServletResponse response) {
  1155 + Map<String, String> cnames = new LinkedHashMap<>();
  1156 + cnames.put("id", "#");
  1157 + cnames.put("create_date", "ๅ‘ๆ”พๆ—ฅๆœŸ");
  1158 + cnames.put("username", "ๅง“ๅ");
  1159 + cnames.put("send_hospital", "ๅ‘ๆ”พๆœบๆž„");
  1160 + cnames.put("doctoer_name", "ๅ‘ๆ”พๅŒป็”Ÿ");
  1161 + cnames.put("residenceAddress", "ๅฑ…ไฝๅœฐ");
  1162 + cnames.put("householdAddress", "ๆˆท็ฑๅœฐ");
  1163 + cnames.put("phone", "่”็ณป็”ต่ฏ");
  1164 +
  1165 + List<Map<String,Object>> results = new ArrayList<>();
  1166 + int i = 0;
  1167 + for (Map<String, Object> m : data) {
  1168 + Map<String, Object> result = new LinkedHashMap<>();
  1169 + result.put("id", ++i);
  1170 + result.put("create_date", m.get("create_date"));
  1171 + result.put("username", m.get("username"));
  1172 + result.put("send_hospital", m.get("send_hospital"));
  1173 + result.put("doctoer_name", m.get("doctoer_name"));
  1174 + result.put("residenceAddress", m.get("residenceAddress"));
  1175 + result.put("householdAddress", m.get("householdAddress"));
  1176 + result.put("phone", m.get("phone"));
  1177 + results.add(result);
  1178 + }
  1179 + ResponseUtil.responseExcel(cnames, results, response);
  1180 + }
  1181 +
  1182 + private void exportPregnancyUsedInfo(List<Map<String, Object>> data, HttpServletResponse response) {
  1183 + Map<String, String> cnames = new LinkedHashMap<>();
  1184 + cnames.put("id", "#");
  1185 + cnames.put("use_date", "ไฝฟ็”จๆ—ฅๆœŸ");
  1186 + cnames.put("username", "ๅง“ๅ");
  1187 + cnames.put("week", "ไฝฟ็”จๅญ•ๅ‘จ");
1104 1188 cnames.put("number", "ไบงๆฃ€็ฌฌๆฌก");
1105   - cnames.put("type", "ไบงๆฃ€ๅˆธ็ฑปๅž‹");
1106   - cnames.put("sequence_id", "ไบงๆฃ€ๅˆธๅท");
1107   - cnames.put("operatorOrgName", "ไบงๆฃ€ๆœบๆž„");
1108   - cnames.put("doctorName", "ไบงๆฃ€ๅŒป็”Ÿ");
1109   - cnames.put("send_hospital", "ไบงๆฃ€ๅˆธๅ‘ๆ”พๆœบๆž„");
  1189 + cnames.put("type_desc", "ไผ˜ๆƒ ๅˆธ");
  1190 + cnames.put("sequence_id", "ไผ˜ๆƒ ๅˆธๅท");
  1191 + cnames.put("operatorOrgName", "ไฝฟ็”จๆœบๆž„");
  1192 + cnames.put("doctorName", "ไฝฟ็”จๅŒป็”Ÿ");
  1193 + cnames.put("send_hospital", "ไผ˜ๆƒ ๅˆธๅ‘ๆ”พๆœบๆž„");
1110 1194 cnames.put("phone", "่”็ณป็”ต่ฏ");
1111 1195  
1112 1196 List<Map<String,Object>> results = new ArrayList<>();
1113 1197 int i = 0;
1114   - for (Map<String, Object> m : couponInfos) {
  1198 + for (Map<String, Object> m : data) {
1115 1199 Map<String, Object> result = new LinkedHashMap<>();
1116 1200 result.put("id", ++i);
1117   - result.put("checkDate", DateUtil.getyyyy_MM_dd((Date) m.get("checkDate")));
  1201 + result.put("use_date", m.get("use_date"));
1118 1202 result.put("username", m.get("username"));
1119 1203 result.put("week", m.get("week"));
1120 1204 result.put("number", m.get("number"));
  1205 + result.put("type_desc", m.get("type_desc"));
1121 1206 result.put("sequence_id", m.get("sequence_id"));
1122 1207 result.put("operatorOrgName", m.get("operatorOrgName"));
1123 1208 result.put("doctorName", m.get("doctorName"));
1124 1209 result.put("send_hospital", m.get("send_hospital"));
  1210 + result.put("phone", m.get("phone"));
  1211 + results.add(result);
  1212 + }
  1213 + ResponseUtil.responseExcel(cnames, results, response);
  1214 + }
  1215 +
  1216 +
  1217 + private void exportPregnancy(List<Map<String, Object>> userSendInfos, HttpServletResponse response) {
  1218 + Map<String, String> cnames = new LinkedHashMap<>();
  1219 + cnames.put("id", "#");
  1220 + cnames.put("create_date", "ๅ‘ๆ”พๆ—ฅๆœŸ");
  1221 + cnames.put("username", "ๅง“ๅ");
  1222 + cnames.put("send_hospital", "ๅ‘ๆ”พๆœบๆž„");
  1223 + cnames.put("doctoer_name", "ๅ‘ๆ”พๅŒป็”Ÿ");
  1224 + cnames.put("residenceAddress", "ๅฑ…ไฝๅœฐ");
  1225 + cnames.put("householdAddress", "ๆˆท็ฑๅœฐ");
  1226 + cnames.put("phone", "่”็ณป็”ต่ฏ");
  1227 +
  1228 + List<Map<String,Object>> results = new ArrayList<>();
  1229 + int i = 0;
  1230 + for (Map<String, Object> m : userSendInfos) {
  1231 + Map<String, Object> result = new LinkedHashMap<>();
  1232 + result.put("id", ++i);
  1233 + result.put("create_date", m.get("create_date"));
  1234 + result.put("username", m.get("username"));
  1235 + result.put("send_hospital", m.get("send_hospital"));
  1236 + result.put("doctoer_name", m.get("doctoer_name"));
  1237 + result.put("householdAddress", m.get("householdAddress"));
  1238 + result.put("residenceAddress", m.get("residenceAddress"));
1125 1239 result.put("phone", m.get("phone"));
1126 1240 results.add(result);
1127 1241 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/PageUtil.java View file @ 5e9494f
... ... @@ -24,6 +24,10 @@
24 24 //ๆ—ฅๅฟ—่ฐƒๆต‹ๅ™จ
25 25 private static final Logger logger = LoggerFactory.getLogger(PageUtil.class);
26 26 public static void setPageInfo(Map<String,Object> map) {
  27 + if(map.get("needPage") == null) {
  28 + map.put("needPage", true);
  29 + }
  30 +
27 31 Integer pageSize = map.get("pageSize") == null ? 15 : Integer.parseInt(map.get("pageSize").toString());
28 32 Integer currentPage = map.get("currentPage") == null ? 1 : Integer.parseInt(map.get("currentPage").toString());
29 33 if(pageSize < 1) {
platform-sync-data/platform-sync-data.iml View file @ 5e9494f
... ... @@ -9,11 +9,6 @@
9 9 <webroots>
10 10 <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
11 11 </webroots>
12   - <sourceRoots>
13   - <root url="file://$MODULE_DIR$/../platform-resource/resources" />
14   - <root url="file://$MODULE_DIR$/src/main/java" />
15   - <root url="file://$MODULE_DIR$/src/main/resources" />
16   - </sourceRoots>
17 12 </configuration>
18 13 </facet>
19 14 </component>
20 15  
21 16  
... ... @@ -25,29 +20,9 @@
25 20 <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
26 21 <excludeFolder url="file://$MODULE_DIR$/target" />
27 22 </content>
28   - <orderEntry type="inheritedJdk" />
  23 + <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
29 24 <orderEntry type="sourceFolder" forTests="false" />
30   - <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
31   - <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.8" level="project" />
32 25 <orderEntry type="library" name="Maven: com.alibaba:druid:1.0.15" level="project" />
33   - <orderEntry type="module-library">
34   - <library name="Maven: com.alibaba:jconsole:1.8.0">
35   - <CLASSES>
36   - <root url="jar://C:/Program Files (x86)/Java/jdk1.7.0_03/lib/jconsole.jar!/" />
37   - </CLASSES>
38   - <JAVADOC />
39   - <SOURCES />
40   - </library>
41   - </orderEntry>
42   - <orderEntry type="module-library">
43   - <library name="Maven: com.alibaba:tools:1.8.0">
44   - <CLASSES>
45   - <root url="jar://C:/Program Files (x86)/Java/jdk1.7.0_03/lib/tools.jar!/" />
46   - </CLASSES>
47   - <JAVADOC />
48   - <SOURCES />
49   - </library>
50   - </orderEntry>
51 26 <orderEntry type="module" module-name="platform-common" />
52 27 <orderEntry type="module-library">
53 28 <library name="Maven: org.wltea.analyzer:IKAnalyzer:2012_u6">
regional-etl/regional-etl.iml View file @ 5e9494f
... ... @@ -8,7 +8,7 @@
8 8 <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9 9 <excludeFolder url="file://$MODULE_DIR$/target" />
10 10 </content>
11   - <orderEntry type="inheritedJdk" />
  11 + <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
12 12 <orderEntry type="sourceFolder" forTests="false" />
13 13 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.3.RELEASE" level="project" />
14 14 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.3.RELEASE" level="project" />
... ... @@ -57,24 +57,6 @@
57 57 <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.3.8.RELEASE" level="project" />
58 58 <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.41" level="project" />
59 59 <orderEntry type="library" name="Maven: com.alibaba:druid:1.0.31" level="project" />
60   - <orderEntry type="module-library">
61   - <library name="Maven: com.alibaba:jconsole:1.8.0">
62   - <CLASSES>
63   - <root url="jar://C:/Program Files (x86)/Java/jdk1.7.0_03/lib/jconsole.jar!/" />
64   - </CLASSES>
65   - <JAVADOC />
66   - <SOURCES />
67   - </library>
68   - </orderEntry>
69   - <orderEntry type="module-library">
70   - <library name="Maven: com.alibaba:tools:1.8.0">
71   - <CLASSES>
72   - <root url="jar://C:/Program Files (x86)/Java/jdk1.7.0_03/lib/tools.jar!/" />
73   - </CLASSES>
74   - <JAVADOC />
75   - <SOURCES />
76   - </library>
77   - </orderEntry>
78 60 <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:1.5.3.RELEASE" level="project" />
79 61 <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
80 62 <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.11" level="project" />