Commit 2a8318590df79088582031e6a68209146790d370
1 parent
aa0ee39252
Exists in
master
and in
1 other branch
B超+加密接口
Showing 2 changed files with 34 additions and 11 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
2a83185
| ... | ... | @@ -20,10 +20,7 @@ |
| 20 | 20 | import com.lyms.platform.common.enums.YnEnums; |
| 21 | 21 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 22 | 22 | import com.lyms.platform.common.result.BaseResponse; |
| 23 | -import com.lyms.platform.common.utils.CompressEncodeingUtil; | |
| 24 | -import com.lyms.platform.common.utils.DateUtil; | |
| 25 | -import com.lyms.platform.common.utils.ExceptionUtils; | |
| 26 | -import com.lyms.platform.common.utils.JsonUtil; | |
| 23 | +import com.lyms.platform.common.utils.*; | |
| 27 | 24 | import com.lyms.platform.operate.web.facade.*; |
| 28 | 25 | import com.lyms.platform.operate.web.request.AntExListQueryRequest; |
| 29 | 26 | import com.lyms.platform.operate.web.result.HighScoreResult; |
| ... | ... | @@ -3330,7 +3327,7 @@ |
| 3330 | 3327 | * 根据传入的卡的id来计算解密卡号的密码 |
| 3331 | 3328 | * @param kid |
| 3332 | 3329 | * @return |
| 3333 | - */ | |
| 3330 | + | |
| 3334 | 3331 | @RequestMapping(value = "/qhd/getVcCardNoPwd", method = RequestMethod.GET) |
| 3335 | 3332 | @ResponseBody |
| 3336 | 3333 | public String getVcCardNoPwd(@RequestParam(required = true) String kid) |
| 3337 | 3334 | |
| ... | ... | @@ -3345,7 +3342,15 @@ |
| 3345 | 3342 | e.printStackTrace(); |
| 3346 | 3343 | } |
| 3347 | 3344 | return ""; |
| 3345 | + }*/ | |
| 3346 | + @RequestMapping(value = "/qhd/getVcCardNoPwd", method = RequestMethod.GET) | |
| 3347 | + @ResponseBody | |
| 3348 | + public String getVcCardNoPwd(@RequestParam(required = true) String kid) | |
| 3349 | + { | |
| 3350 | + Map<String,String> map = new HashMap<String, String>(); | |
| 3351 | + map.put("kid",kid); | |
| 3352 | + String s = HttpClientUtil.doGet("http://localhost:9090/qhd/getVcCardNoPwd", map, "utf-8", null); | |
| 3353 | + return s; | |
| 3348 | 3354 | } |
| 3349 | - | |
| 3350 | 3355 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
2a83185
| ... | ... | @@ -2229,6 +2229,15 @@ |
| 2229 | 2229 | public static String getDateAfter(Date d,int day){ |
| 2230 | 2230 | Calendar now =Calendar.getInstance(); |
| 2231 | 2231 | now.setTime(d); |
| 2232 | + now.set(Calendar.DATE,now.get(Calendar.DATE)+day); | |
| 2233 | + | |
| 2234 | + String strDateFormat = "yyyy-MM-dd"; | |
| 2235 | + SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat); | |
| 2236 | + return sdf.format(now.getTime()); | |
| 2237 | + } | |
| 2238 | + public static String getDateOther(Date d,int day){ | |
| 2239 | + Calendar now =Calendar.getInstance(); | |
| 2240 | + now.setTime(d); | |
| 2232 | 2241 | now.set(Calendar.DATE,now.get(Calendar.DATE)-day); |
| 2233 | 2242 | |
| 2234 | 2243 | String strDateFormat = "yyyy-MM-dd"; |
| ... | ... | @@ -2252,8 +2261,14 @@ |
| 2252 | 2261 | } |
| 2253 | 2262 | |
| 2254 | 2263 | public void bChaoTimerWork() { |
| 2255 | - String startDate1 = getDateAfter(new Date(), 1); | |
| 2256 | - String endDate1 = DateUtil.getyyyy_MM_dd(new Date()); | |
| 2264 | + /* | |
| 2265 | + 需求: | |
| 2266 | + 初诊B超数据一般在初诊后两天内产生结果,要求将B超结果出来更新初诊B超数据值。 | |
| 2267 | + | |
| 2268 | + 获取当前时间的前两天初诊数据,进行定时处理初诊数据B超信息修改。 | |
| 2269 | + */ | |
| 2270 | + String startDate1 = getDateOther(new Date(), 2);//当前时间的前两天 | |
| 2271 | + String endDate1 = DateUtil.getyyyy_MM_dd(new Date());//当前时间 | |
| 2257 | 2272 | System.out.println("start=" + startDate1 + "end=" + endDate1); |
| 2258 | 2273 | AntExChuSync(startDate1,endDate1,true); |
| 2259 | 2274 | } |
| ... | ... | @@ -2285,7 +2300,9 @@ |
| 2285 | 2300 | continue; |
| 2286 | 2301 | } |
| 2287 | 2302 | Date checkTime = antExChu.get(i).getCheckTime();//产检日期 |
| 2288 | - | |
| 2303 | + if(checkTime.equals(null) || checkTime==null ){ | |
| 2304 | + checkTime = antExChu.get(i).getCreated();//初诊创建时间 | |
| 2305 | + } | |
| 2289 | 2306 | //2 遍历初证数据,获取单个初诊数据的初证日期,根据初证日志调用接口 获取B超检查结果。更新初证B超数据。 |
| 2290 | 2307 | Patients patients = iPatientDao.getPatient(antExChu.get(i).getParentId()); |
| 2291 | 2308 | if (patients == null || patients.getVcCardNo() == null) { |
| ... | ... | @@ -2297,8 +2314,9 @@ |
| 2297 | 2314 | String s = null; |
| 2298 | 2315 | String vcCardNo = patients.getVcCardNo(); |
| 2299 | 2316 | Map<String, String> map = new HashMap<String, String>(); |
| 2300 | - String startDate1 = getDateAfter(checkTime, 1); | |
| 2301 | - String endDate1 = DateUtil.getyyyy_MM_dd(checkTime); | |
| 2317 | + | |
| 2318 | + String startDate1 = DateUtil.getyyyy_MM_dd(checkTime); | |
| 2319 | + String endDate1 = getDateAfter(checkTime, 2); | |
| 2302 | 2320 | map.put("vcCardNo", vcCardNo); |
| 2303 | 2321 | map.put("startDate", startDate1); |
| 2304 | 2322 | map.put("endDate", endDate1); |