| | |
| | | |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Properties; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | |
| | | /* @Authot:zjh |
| | |
| | | String post = HttpClientUtils.sendPost (HIS_URL+"Getlabdetailinfo", map); |
| | | return AjaxResult.success ().put ("data", post); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 192.168.0.123:12005/api/His/Getlabreginfoinfo |
| | | //{ |
| | | // "his_registration_id":"20250107000011", |
| | | // "pationid":"20240618000042", |
| | | // "ksrq":"2025-01-07 00:00:00", |
| | | // "jsrq":"2025-01-08 00:00:00", |
| | | // "pagecount":100, |
| | | // "page":1, |
| | | // "status":"已申请" |
| | | //} |
| | | |
| | | /** |
| | | * 获取His检验条码号 |
| | | * @return |
| | | */ |
| | | public AjaxResult Getlabreginfoinfo(String hisCardId,Boolean isZf,String today){ |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date todayDate = null; |
| | | try { |
| | | todayDate = dateFormat.parse(today); |
| | | } catch (ParseException e) { |
| | | return AjaxResult.error(); |
| | | } |
| | | String now = dateFormat.format(new Date()); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("his_registration_id",hisCardId); |
| | | map.put("ksrq",today); |
| | | map.put("pagecount",100); |
| | | map.put("page",1); |
| | | if (now.equals(today)){ |
| | | Calendar instance = Calendar.getInstance(); |
| | | instance.setTime(todayDate); |
| | | instance.add(Calendar.DAY_OF_MONTH,1); |
| | | String tomorrow = dateFormat.format(instance.getTime()); |
| | | map.put("jsrq",tomorrow); |
| | | }else { |
| | | map.put("jsrq",now); |
| | | } |
| | | if (!isZf) |
| | | map.put("status","已申请"); |
| | | else map.put("status","已作废"); |
| | | String post = HttpClientUtils.sendPost (HIS_URL+"Getlabreginfoinfo", map); |
| | | return AjaxResult.success ().put ("data", post); |
| | | } |
| | | } |