Commit 630d65e991b7f670f41ea57c4c776fa4126ad63f

Authored by liquanyu
1 parent 43845ebae7

孕前优生上传

Showing 2 changed files with 51 additions and 9 deletions

platform-common/src/main/java/com/lyms/platform/common/Test.java View file @ 630d65e
... ... @@ -4,6 +4,8 @@
4 4 import com.lyms.platform.common.utils.DateUtil;
5 5 import com.lyms.platform.common.utils.StringUtils;
6 6  
  7 +import java.io.UnsupportedEncodingException;
  8 +import java.util.Arrays;
7 9 import java.util.Date;
8 10  
9 11 public class Test {
10 12  
11 13  
12 14  
... ... @@ -41,12 +43,31 @@
41 43 }
42 44  
43 45 //504F533838383834 POS88884
44   - public static void main(String[] args) {
  46 + public static void main(String[] args) throws UnsupportedEncodingException {
  47 + String[] xxbfx = new String[9];
  48 + for(String key : xxbfx)
  49 + if (key == null)
  50 + {
  51 + }
45 52  
46   - Test strToHex = new Test();
  53 + Integer[] yigan = new Integer[]{-1,-1,-1,-1,-1};
  54 + for(Integer key : yigan)
  55 + if (key == -1)
  56 + {
  57 + System.out.println(key);
  58 + }
  59 + }
47 60  
48   - System.out.println("ASCII : " + strToHex.convertHexToString("31"));
  61 + public static void print() {
  62 + int start=0;
  63 + byte[] bytes=new byte[s.length()/2];
  64 + int j=0;
  65 + for (int i =0;i<s.length();i+=2){
  66 + bytes[j++]= (byte) Integer.parseInt(s.substring(start,start+2),16);
  67 + }
  68 + System.out.println(Arrays.toString(bytes));
49 69 }
  70 + private static String s="B0F8FB80808080808080F880808080F880F88080F880F8808080F8F88080F880808080F8F880F8F88080F8B0F8FB80808080808080F880808080F880F88080F880F8808080F8F88080F880808080F8F880F8F88080F8";
50 71  
51 72 }
platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/LhxfyService.java View file @ 630d65e
... ... @@ -106,6 +106,26 @@
106 106 return null;
107 107 }
108 108  
  109 + private boolean hasValStrArry(String[] varry)
  110 + {
  111 + for(String key : varry)
  112 + if (key != null)
  113 + {
  114 + return true;
  115 + }
  116 + return false;
  117 + }
  118 +
  119 + private boolean hasValIntArry(Integer[] varry)
  120 + {
  121 + for(Integer key : varry)
  122 + if (key != -1)
  123 + {
  124 + return true;
  125 + }
  126 + return false;
  127 + }
  128 +
109 129 public void autoInLis()
110 130 {
111 131 Query query = new Query();
... ... @@ -471,9 +491,9 @@
471 491 }
472 492 }
473 493 }
474   - wifeClinicalCheck.put("bdjc",bdjc);
475   - wifeClinicalCheck.put("xxbfx",xxbfx);
476   - wifeClinicalCheck.put("yigan",yigan);
  494 + wifeClinicalCheck.put("bdjc",hasValIntArry(bdjc) ? bdjc : wifeClinicalCheck.get("bdjc"));
  495 + wifeClinicalCheck.put("xxbfx",hasValStrArry(xxbfx) ? xxbfx : wifeClinicalCheck.get("xxbfx"));
  496 + wifeClinicalCheck.put("yigan",hasValIntArry(yigan) ? yigan : wifeClinicalCheck.get("yigan"));
477 497 wifeClinicalCheck.put("ncg",ncg);
478 498  
479 499 preEugenicsBaseModel.setWifeClinicalCheck(wifeClinicalCheck);
... ... @@ -625,7 +645,7 @@
625 645 }
626 646 }
627 647 }
628   - husbandClinicalCheck.put("yigan",hyigan);
  648 + husbandClinicalCheck.put("yigan",hasValIntArry(hyigan) ? yigan : husbandClinicalCheck.get("yigan"));
629 649 husbandClinicalCheck.put("ncg",hncg);
630 650 preEugenicsBaseModel.setHusbandClinicalCheck(husbandClinicalCheck);
631 651 }
... ... @@ -955,7 +975,7 @@
955 975 * 孕前优生-上传省平台
956 976 */
957 977 // private static final String URL = "http://39.101.222.193:8088";//测试
958   -// private static final String KEY = "71d794fdb6ca4ef58c416830d31aabd9";//沧州测试key
  978 +// private static final String KEY = "4617b53f3867410c8b2d5fc9da11e6d1";//沧州测试key
959 979 private static final String URL = "http://27.128.184.172:8087";//正式
960 980 private static final String KEY = "04a5ad7515de40d3b1f7a7f1624daf10";//正式key
961 981 public BaseResponse uploadingProvince(List<String> ids){
... ... @@ -1485,6 +1505,7 @@
1485 1505 Date end = DateUtil.parseYMD(endDate);
1486 1506 end = DateUtil.getDayLastSecond(end);
1487 1507  
  1508 + tquery.addCriteria(Criteria.where("husbandCardNo").is("130825199411302419"));
1488 1509 tquery.addCriteria(Criteria.where("hospitalId").is("2100001605"));
1489 1510 tquery.addCriteria(Criteria.where("fillDate").gte(start).lte(end));
1490 1511 List<PreEugenicsBaseModel> modelList = mongoTemplate.find(tquery, PreEugenicsBaseModel.class);