|
@@ -25,6 +25,7 @@ public class YpfydlController {
|
|
|
|
|
|
/**
|
|
|
* 查询未发药药品
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@UserLoginToken
|
|
@@ -40,41 +41,42 @@ public class YpfydlController {
|
|
|
Date now = new Date();
|
|
|
Date begin = DateUtil.getFirstSecond(now);
|
|
|
Date end = DateUtil.getLastSecond(now);
|
|
|
- YpMzFytj ypMzFytj= ypMzFytjService.querylastItem(groupNo,begin,end);
|
|
|
+ YpMzFytj ypMzFytj = ypMzFytjService.querylastItem(groupNo, begin, end);
|
|
|
//过号集合
|
|
|
List<String> pastList = new ArrayList();
|
|
|
//待取药集合
|
|
|
List<String> currentList = new ArrayList();
|
|
|
- List<Map<String, Object>> all= mzYpFydlService.queryToMedicine(groupNo,begin,end);
|
|
|
- if(all!=null && all.size()>0){
|
|
|
- for(Map<String, Object> map:all){
|
|
|
- Date priceTime =(Date) map.get("price_time");
|
|
|
- String name = (String)map.get("name");
|
|
|
- if(ypMzFytj!=null && ypMzFytj.getChargeDate()!=null){
|
|
|
- if(priceTime!=null && priceTime.before(ypMzFytj.getChargeDate())){
|
|
|
- if(!pastList.contains(name)){
|
|
|
+ List<Map<String, Object>> all = mzYpFydlService.queryToMedicine(groupNo, begin, end);
|
|
|
+ if (all != null && all.size() > 0) {
|
|
|
+ for (Map<String, Object> map : all) {
|
|
|
+ Date priceTime = (Date) map.get("price_time");
|
|
|
+ String name = (String) map.get("name");
|
|
|
+ if (ypMzFytj != null && ypMzFytj.getChargeDate() != null) {
|
|
|
+ if (priceTime != null && priceTime.before(ypMzFytj.getChargeDate())) {
|
|
|
+ if (!pastList.contains(name)) {
|
|
|
pastList.add(name);
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
- if(!currentList.contains(name)){
|
|
|
+ if (!currentList.contains(name)) {
|
|
|
currentList.add(name);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// pastList = Arrays.asList("过号1","过号2","过号3","过号4","过号5","过号6","过号7","过号8");
|
|
|
-// currentList = Arrays.asList("取药取药","取药2","取药3","取药4","取药5","取药6","取药7","取药8","取药9","取药10","取药11","取药12","取药13","取药14","取药15","取药16","取药17","取药18","取药19","取药20","取药21","取药22","取药23","取药24","取药25","取药26");
|
|
|
+ // currentList = Arrays.asList("取药取药","取药2","取药3","取药4","取药5","取药6","取药7","取药8","取药9","取药10","取药11","取药12","取药13","取药14","取药15","取药16","取药17","取药18","取药19","取药20","取药21","取药22","取药23","取药24","取药25","取药26");
|
|
|
+ currentList = Arrays.asList("取药取药", "取药2", "取药3", "取药4");
|
|
|
resultMap.put("code", 0);
|
|
|
resultMap.put("message", "查询未发药药品成功");
|
|
|
- resultMap.put("pastList",pastList);
|
|
|
- resultMap.put("currentList",currentList);
|
|
|
+ resultMap.put("pastList", pastList);
|
|
|
+ resultMap.put("currentList", currentList);
|
|
|
return resultMap;
|
|
|
- }catch (Exception e){
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
resultMap.put("code", -1);
|
|
|
- resultMap.put("message", "查询未发药药品失败,错误信息:【"+e.getMessage()+"】");
|
|
|
- log.error("查询未发药药品失败,错误信息:[]",e.getMessage());
|
|
|
+ resultMap.put("message", "查询未发药药品失败,错误信息:【" + e.getMessage() + "】");
|
|
|
+ log.error("查询未发药药品失败,错误信息:[]", e.getMessage());
|
|
|
return resultMap;
|
|
|
}
|
|
|
}
|