Browse Source

医保局代码提交
东方新华添加付款时间

zfc 1 year ago
parent
commit
1cbead5294

+ 3 - 1
mjava-dongfangxinhua/src/main/java/com/malk/dongfangxinhua/service/Impl/PayServiceImpl.java

@@ -74,6 +74,7 @@ public class PayServiceImpl implements PayService {
         dataList.forEach(item -> {
             String payState = "";
             String payMsg = "";
+            String payDate = "";
             //formInstanceId
             //获取erpReqNo 和实例ID  循环去获取付款状态
             JSONObject rsp  = _doPosts("BY0003", (Map) UtilMap.map("erpReqNo, billCode, erpBatchNo", null,((Map) item.get("formData")).get("textField_lra9fqfv").toString(),null));
@@ -103,6 +104,7 @@ public class PayServiceImpl implements PayService {
                  */
                 payState = state.getStr("payState");
                 payMsg =  state.getStr("payMsg");
+                payDate = state.getStr("payDate");
                 //获取付款成功的
                 if (payState.equals("00")) {
 
@@ -129,7 +131,7 @@ public class PayServiceImpl implements PayService {
                     // 更新付款申请单状态
                     ydClient.operateData(YDParam.builder()
                             .formInstanceId((String) item.get("formInstanceId"))
-                            .updateFormDataJson(JSON.toJSONString(UtilMap.map("textField_lr08rrpc, textField_lof4wiqt", "付款成功","凭证未生成")))
+                            .updateFormDataJson(JSON.toJSONString(UtilMap.map("textField_lr08rrpc, textField_lof4wiqt, ", "付款成功","凭证未生成",payDate)))
                             .build(), YDConf.FORM_OPERATION.update);
 
 

+ 24 - 13
mjava-yibaoju/src/main/java/com/malk/yibaoju/controller/YBJController.java

@@ -64,21 +64,38 @@ public class YBJController {
         int dayOfMonth = currentDate.getDayOfMonth();
         if ("1".equals(data.get("status"))){
             ybjService.creatInfo(data.get("formInstId").toString());
-            //删除睡眠两秒  在执行创建
             if (dayOfMonth>24){
                 Thread.sleep(2000);
                 ybjService.creatNextInfo(data.get("formInstId").toString());
             }
         }else{
+            //编辑只做删除数据操作。新增在页面保存完之后操作。
             ybjService.updateInfo(data.get("formInstId").toString());
-            if (dayOfMonth>24){
-                Thread.sleep(2000);
-                ybjService.creatNextInfo(data.get("formInstId").toString());
-            }
         }
         return McR.success();
     }
 
+    /**
+     * 编辑后重新创建护理任务
+     * @param data
+     * @return
+     */
+    @SneakyThrows
+    @PostMapping("createPlanInfo")
+    McR createPlanInfo(@RequestBody Map data) {
+        Thread.sleep(5000);
+        LocalDate currentDate = LocalDate.now();
+        //获取当前日期是本月几号
+        int dayOfMonth = currentDate.getDayOfMonth();
+        ybjService.creatInfo(data.get("formInstId").toString());
+        if (dayOfMonth>24){
+            Thread.sleep(2000);
+            ybjService.creatNextInfo(data.get("formInstId").toString());
+        }
+        return McR.success();
+    }
+
+
     /**
      * 通过安排创建本月所有的护理计划
      * @param request
@@ -135,8 +152,6 @@ public class YBJController {
                     Thread.sleep(2000);
                     ybjService.creatNextInfo(map.get("formInstanceId").toString());
                 }
-                Thread.sleep(2000);
-                ybjService.creatNextInfo(map.get("formInstanceId").toString());
             }
         }else{   //编辑护理对象信息
             //先删除
@@ -277,13 +292,9 @@ public class YBJController {
 
     @RequestMapping("test")
     McR test(HttpServletRequest request) {
-        LocalDate currentDate = LocalDate.now();
-        ydClient.operateData(YDParam.builder()
-                .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                .searchCondition(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( currentDate+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( currentDate+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),"310226193107264120","310226193107264120")))
-                .formDataJson(JSON.toJSONString(UtilMap.map("selectField_lo56u5fn","已上报")))
-                .build(), YDConf.FORM_OPERATION.upsert);
+        ybjService.syncUpdatePlanStatus();
         return McR.success();
     }
 
+
 }

+ 111 - 141
mjava-yibaoju/src/main/java/com/malk/yibaoju/service/impl/YBJServiceImpl.java

@@ -123,26 +123,13 @@ public class YBJServiceImpl implements YBJService {
                         try {
                             ydClient.operateData(YDParam.builder()
                                     .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                                    .searchCondition(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( currentDate.with(TemporalAdjusters.lastDayOfMonth())+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formMap.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
+                                    .searchCondition(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( nextDay+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formMap.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
                                     .formDataJson(JSON.toJSONString(hashMap))
                                     .build(), YDConf.FORM_OPERATION.upsert);
                         } catch (Exception e) {
                             log.info("异常数据{}",hashMap);
                         }
 
-
-//                        //通过护理时间  护理对象  护理人员验证数据是否已经存在
-//                        YDParam ydParam1 = YDParam.builder()
-//                                .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-//                                .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( currentDate.with(TemporalAdjusters.lastDayOfMonth())+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formMap.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
-//                                .build();
-//                        List<Map> dataLists = (List<Map>) ydClient.queryData(ydParam1, YDConf.FORM_QUERY.retrieve_search_form).getData();
-//
-//
-//                        if (dataLists.size()<1){
-//
-//
-//                        }
                     }
 
                 }
@@ -200,57 +187,45 @@ public class YBJServiceImpl implements YBJService {
                     List<Map> maps =  mapList.stream().filter(items -> items.get("selectField_lo3pmohy").equals(dayOfWeek.replace("星期","周"))).collect(Collectors.toList());
                     for (Map map : maps) {
                         Map hashMap = new HashMap();
+
+                        hashMap.put("associationFormField_lo3pmohz",JSON.parse(map.get("associationFormField_lo3pmohz_id").toString()));  //护理人员名称
+                        hashMap.put("textField_lo3pmoi0",map.get("textField_lo3pmoi0"));  //护理人员所属机构
+                        hashMap.put("textField_lombve2g",map.get("textField_lomchzi3"));  //护理人员身份证
+                        hashMap.put("textField_lo3pmoi3",map.get("textField_lo3pmoi3"));  //护理人员手机号
+                        hashMap.put("associationFormField_lo3pmohw",JSON.parse(formMap.get("associationFormField_lo3pmohw_id").toString()));  //护理对象姓名
+                        hashMap.put("textField_lnyhv5tn",formMap.get("textField_lnyhv5tn")); //护理对象身份证
+                        hashMap.put("selectField_lnyhv5tp",formMap.get("selectField_lnyhv5tp"));  //护理对象等级
+                        hashMap.put("textField_lnyhv5tr",formMap.get("textField_lnyhv5tr"));  //护理对象住址
+                        hashMap.put("selectField_lo3pmohy",dayOfWeek.replace("星期","周"));  //护理时间  (星期几)
+                        hashMap.put("dateField_lred6eoj", UtilDateTime.parse(String.valueOf(nextDay)+" "+map.get("selectField_lr1uxpu3"),"yyyy-MM-dd HH:mm")); //护理开始时间。 用当前日期+护理计划的  时分    转成时间戳
+                        hashMap.put("dateField_lred6eok", UtilDateTime.parse(String.valueOf(nextDay)+" "+map.get("selectField_lr1uxpu4"),"yyyy-MM-dd HH:mm")); //护理结束时间。 用当前日期+护理计划的  时分    转成时间戳
+                        hashMap.put("selectField_lqcgsbw2","未执行");  //执行情况
+                        hashMap.put("selectField_lo56u5fn","待上报");  //任务状态
+
+                        hashMap.put("textField_lvae7q5n",formMap.get("textField_lvae99fj")); //护理对象经度
+                        hashMap.put("textField_lvae7q5o",formMap.get("textField_lvae99fk"));  //护理对象纬度
+
+                        hashMap.put("textField_lrx0r38x",String.valueOf(nextDay));  //护理日期-文本
+                        hashMap.put("selectField_lr36z6hd","是");  //任务状态
+                        hashMap.put("textField_lo55rupj",formMap.get("textField_lo55rupj"));  //护理对象姓名-文本
+                        hashMap.put("textField_lo3pmoi4",map.get("textField_lo3pmoi4"));  //护理证书类型
+                        hashMap.put("employeeField_lo3pmoi6",JSON.parse(map.get("employeeField_lo3pmoi6_id").toString()));  //护理人员姓名-成员
+                        hashMap.put("textField_lpgi8scj",map.get("textField_lo701pwy"));  //计划明细id
+                        hashMap.put("textField_lq9llmhl",formMap.get("textField_lop4v4qx"));  //护理对象ID
+
                         try {
                             Thread.sleep(200);
                         } catch (InterruptedException e) {
-                            throw new RuntimeException(e);
+                            log.info("睡眠异常");
                         }
-
-                        //通过护理时间  护理对象  护理人员验证数据是否已经存在
-                        YDParam ydParam1 = YDParam.builder()
-                                .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                                .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( nextDay.with(TemporalAdjusters.lastDayOfMonth())+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formMap.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
-                                .build();
-                        List<Map> dataLists = (List<Map>) ydClient.queryData(ydParam1, YDConf.FORM_QUERY.retrieve_search_form).getData();
-                        if (dataLists.size()<1){
-                            hashMap.put("associationFormField_lo3pmohz",JSON.parse(map.get("associationFormField_lo3pmohz_id").toString()));  //护理人员名称
-                            hashMap.put("textField_lo3pmoi0",map.get("textField_lo3pmoi0"));  //护理人员所属机构
-                            hashMap.put("textField_lombve2g",map.get("textField_lomchzi3"));  //护理人员身份证
-                            hashMap.put("textField_lo3pmoi3",map.get("textField_lo3pmoi3"));  //护理人员手机号
-                            hashMap.put("associationFormField_lo3pmohw",JSON.parse(formMap.get("associationFormField_lo3pmohw_id").toString()));  //护理对象姓名
-                            hashMap.put("textField_lnyhv5tn",formMap.get("textField_lnyhv5tn")); //护理对象身份证
-                            hashMap.put("selectField_lnyhv5tp",formMap.get("selectField_lnyhv5tp"));  //护理对象等级
-                            hashMap.put("textField_lnyhv5tr",formMap.get("textField_lnyhv5tr"));  //护理对象住址
-                            hashMap.put("selectField_lo3pmohy",dayOfWeek.replace("星期","周"));  //护理时间  (星期几)
-                            hashMap.put("dateField_lred6eoj", UtilDateTime.parse(String.valueOf(nextDay)+" "+map.get("selectField_lr1uxpu3"),"yyyy-MM-dd HH:mm")); //护理开始时间。 用当前日期+护理计划的  时分    转成时间戳
-                            hashMap.put("dateField_lred6eok", UtilDateTime.parse(String.valueOf(nextDay)+" "+map.get("selectField_lr1uxpu4"),"yyyy-MM-dd HH:mm")); //护理结束时间。 用当前日期+护理计划的  时分    转成时间戳
-                            hashMap.put("selectField_lqcgsbw2","未执行");  //执行情况
-                            hashMap.put("selectField_lo56u5fn","待上报");  //任务状态
-
-                            hashMap.put("textField_lvae7q5n",formMap.get("textField_lvae99fj")); //护理对象经度
-                            hashMap.put("textField_lvae7q5o",formMap.get("textField_lvae99fk"));  //护理对象纬度
-
-                            hashMap.put("textField_lrx0r38x",String.valueOf(nextDay));  //护理日期-文本
-                            hashMap.put("selectField_lr36z6hd","是");  //任务状态
-                            hashMap.put("textField_lo55rupj",formMap.get("textField_lo55rupj"));  //护理对象姓名-文本
-                            hashMap.put("textField_lo3pmoi4",map.get("textField_lo3pmoi4"));  //护理证书类型
-                            hashMap.put("employeeField_lo3pmoi6",JSON.parse(map.get("employeeField_lo3pmoi6_id").toString()));  //护理人员姓名-成员
-                            hashMap.put("textField_lpgi8scj",map.get("textField_lo701pwy"));  //计划明细id
-                            hashMap.put("textField_lq9llmhl",formMap.get("textField_lop4v4qx"));  //护理对象ID
-
-                            try {
-                                Thread.sleep(200);
-                            } catch (InterruptedException e) {
-                                log.info("睡眠异常");
-                            }
-                            try {
-                                ydClient.operateData(YDParam.builder()
-                                        .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                                        .formDataJson(JSON.toJSONString(hashMap))
-                                        .build(), YDConf.FORM_OPERATION.create);
-                            } catch (Exception e) {
-                                log.info("异常数据{}",hashMap);
-                            }
+                        try {
+                            ydClient.operateData(YDParam.builder()
+                                    .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
+                                    .searchCondition(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( nextDay+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formMap.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
+                                    .formDataJson(JSON.toJSONString(hashMap))
+                                    .build(), YDConf.FORM_OPERATION.upsert);
+                        } catch (Exception e) {
+                            log.info("异常数据{}",hashMap);
                         }
                     }
                 }
@@ -332,7 +307,7 @@ public class YBJServiceImpl implements YBJService {
         //获取本月天数
         int daysInMonth = currentDate.lengthOfMonth();
 
-        for (int i = 0; i <daysInMonth-dayOfMonth ; i++) {
+        for (int i = 0; i <=daysInMonth-dayOfMonth ; i++) {
             //获取当前日期是本月几号
             LocalDate currentDay = LocalDate.now();
             //获取是周几
@@ -368,10 +343,11 @@ public class YBJServiceImpl implements YBJService {
                 hashMap.put("textField_lpgi8scj",map.get("textField_lo701pwy"));  //计划明细id
                 hashMap.put("textField_lq9llmhl",formData.get("textField_lop4v4qx"));  //护理对象ID
 
+
                 //通过护理时间  护理对象ID    证数据是否已经存在
                 YDParam ydParam1 = YDParam.builder()
                         .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                        .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( currentDate.with(TemporalAdjusters.lastDayOfMonth())+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formData.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
+                        .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( nextDay+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formData.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
                         .build();
                 List<Map> dataList = (List<Map>) ydClient.queryData(ydParam1, YDConf.FORM_QUERY.retrieve_search_form).getData();
 
@@ -388,6 +364,8 @@ public class YBJServiceImpl implements YBJService {
                 }
             }
         }
+
+
     }
 
 
@@ -450,24 +428,16 @@ public class YBJServiceImpl implements YBJService {
                 hashMap.put("textField_lpgi8scj",map.get("textField_lo701pwy"));  //计划明细id
                 hashMap.put("textField_lq9llmhl",formData.get("textField_lop4v4qx"));  //护理对象ID
 
-                //通过护理时间  护理对象ID    证数据是否已经存在
-                YDParam ydParam1 = YDParam.builder()
-                        .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                        .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( currentDate.with(TemporalAdjusters.lastDayOfMonth())+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formData.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
-                        .build();
-                List<Map> dataList = (List<Map>) ydClient.queryData(ydParam1, YDConf.FORM_QUERY.retrieve_search_form).getData();
 
-                //判断是否存在
-                if (dataList.size()<1){
-                    try {
-                        ydClient.operateData(YDParam.builder()
-                                .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                                .formDataJson(JSON.toJSONString(hashMap))
-                                .build(), YDConf.FORM_OPERATION.create);
-                    } catch (Exception e) {
-                        log.info("定时任务创建计划失败:{}",e);
-                    }
+                try {
+                    ydClient.operateData(YDParam.builder()
+                            .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
+                            .formDataJson(JSON.toJSONString(hashMap))
+                            .build(), YDConf.FORM_OPERATION.create);
+                } catch (Exception e) {
+                    log.info("定时任务创建计划失败:{}",e);
                 }
+
             }
         }
     }
@@ -475,24 +445,20 @@ public class YBJServiceImpl implements YBJService {
 
 
     /**
-     * 编辑护理计划
+     * 编辑功能只做删除操作
      * @param formInstId
      */
     @SneakyThrows
     @Override
     @Async
     public void updateInfo(String formInstId) {
-        Thread.sleep(2000);
         //根据实例ID  查询护理计划
         YDParam ydParam = YDParam.builder()
                 .formInstId(formInstId)
                 .build();
         Map formData = ydClient.queryData(ydParam, YDConf.FORM_QUERY.retrieve_id).getFormData();
 
-        List<Map> mapList = (List<Map>) formData.get("tableField_lo3pmohx");
-
         LocalDate currentDate = LocalDate.now();
-
         //获取下月1号的日期
         LocalDate firstDayOfNextMonth  = currentDate.plusMonths(1).with(TemporalAdjusters.firstDayOfMonth());
         //删除当前时间节点以后得数据
@@ -509,59 +475,68 @@ public class YBJServiceImpl implements YBJService {
                     .formInstanceId(item.get("formInstanceId").toString())
                     .build(), YDConf.FORM_OPERATION.delete);
         });
-        //获取当前日期是本月几号
-        int dayOfMonth = currentDate.getDayOfMonth();
-        //获取本月天数
-        int daysInMonth = currentDate.lengthOfMonth();
-            //重新创建计划任务
-            for (int i = 0; i <daysInMonth-dayOfMonth ; i++) {
-                //获取是周几
-                String dayOfWeek = currentDate.plusDays(i).getDayOfWeek().getDisplayName(TextStyle.FULL, new Locale("zh", "CN"));
-                //获取循环每天的日期
-                LocalDate nextDay = currentDate.plusDays(i);
-                List<Map> maps =  mapList.stream().filter(item -> item.get("selectField_lo3pmohy").equals(dayOfWeek.replace("星期","周"))).collect(Collectors.toList());
-                for (Map map : maps) {
-                    Map hashMap = new HashMap();
-                    hashMap.put("associationFormField_lo3pmohz",JSON.parse(map.get("associationFormField_lo3pmohz_id").toString()));  //护理人员名称
-                    hashMap.put("textField_lo3pmoi0",map.get("textField_lo3pmoi0"));  //护理人员所属机构
-                    hashMap.put("textField_lombve2g",map.get("textField_lomchzi3"));  //护理人员身份证
-                    hashMap.put("textField_lo3pmoi3",map.get("textField_lo3pmoi3"));  //护理人员手机号
-                    hashMap.put("associationFormField_lo3pmohw",JSON.parse(formData.get("associationFormField_lo3pmohw_id").toString()));  //护理对象姓名
-                    hashMap.put("textField_lnyhv5tn",formData.get("textField_lnyhv5tn")); //护理对象身份证
-                    hashMap.put("selectField_lnyhv5tp",formData.get("selectField_lnyhv5tp"));  //护理对象等级
-                    hashMap.put("textField_lnyhv5tr",formData.get("textField_lnyhv5tr"));  //护理对象住址
-                    hashMap.put("selectField_lo3pmohy",dayOfWeek.replace("星期","周"));  //护理时间  (星期几)
-                    hashMap.put("dateField_lred6eoj", UtilDateTime.parse(String.valueOf(nextDay)+" "+map.get("selectField_lr1uxpu3"),"yyyy-MM-dd HH:mm")); //护理开始时间。 用当前日期+护理计划的  时分    转成时间戳
-                    hashMap.put("dateField_lred6eok",UtilDateTime.parse(String.valueOf(nextDay)+" "+map.get("selectField_lr1uxpu4"),"yyyy-MM-dd HH:mm")); //护理结束时间。 用当前日期+护理计划的  时分    转成时间戳
-                    hashMap.put("selectField_lqcgsbw2","未执行");  //执行情况
-                    hashMap.put("selectField_lo56u5fn","待上报");  //任务状态
-
-                    hashMap.put("textField_lvae7q5n",formData.get("textField_lvae99fj")); //护理对象经度
-                    hashMap.put("textField_lvae7q5o",formData.get("textField_lvae99fk"));  //护理对象纬度
-
-                    hashMap.put("textField_lrx0r38x",String.valueOf(nextDay));  //护理日期-文本
-                    hashMap.put("selectField_lr36z6hd","是");  //任务状态
-                    hashMap.put("textField_lo55rupj",formData.get("textField_lo55rupj"));  //护理对象姓名-文本
-                    hashMap.put("textField_lo3pmoi4",map.get("textField_lo3pmoi4"));  //护理证书类型
-                    hashMap.put("employeeField_lo3pmoi6",JSON.parse(map.get("employeeField_lo3pmoi6_id").toString()));  //护理人员姓名-成员
-                    hashMap.put("textField_lpgi8scj",map.get("textField_lo701pwy"));  //计划明细id
-                    hashMap.put("textField_lq9llmhl",formData.get("textField_lop4v4qx"));  //护理对象ID
-
-                    //通过护理时间  护理对象CID  护理人员CID验证数据是否已经存在
-                    YDParam ydParam1 = YDParam.builder()
-                            .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                            .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( currentDate.with(TemporalAdjusters.lastDayOfMonth())+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formData.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
-                            .build();
-                    List<Map> dataList = (List<Map>) ydClient.queryData(ydParam1, YDConf.FORM_QUERY.retrieve_search_form).getData();
 
-                    if (dataList.size()<1){
-                        ydClient.operateData(YDParam.builder()
-                                .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
-                                .formDataJson(JSON.toJSONString(hashMap))
-                                .build(), YDConf.FORM_OPERATION.create);
-                    }
-                }
-            }
+
+//
+//        //获取当前日期是本月几号
+//        int dayOfMonth = currentDate.getDayOfMonth();
+//        //获取本月天数
+//        int daysInMonth = currentDate.lengthOfMonth();
+//            //重新创建计划任务
+//            for (int i = 0; i <=daysInMonth-dayOfMonth ; i++) {
+//                //获取是周几
+//                String dayOfWeek = currentDate.plusDays(i).getDayOfWeek().getDisplayName(TextStyle.FULL, new Locale("zh", "CN"));
+//                //获取循环每天的日期
+//                LocalDate nextDay = currentDate.plusDays(i);
+//                List<Map> maps =  mapList.stream().filter(item -> item.get("selectField_lo3pmohy").equals(dayOfWeek.replace("星期","周"))).collect(Collectors.toList());
+//                for (Map map : maps) {
+//                    Map hashMap = new HashMap();
+//                    hashMap.put("associationFormField_lo3pmohz",JSON.parse(map.get("associationFormField_lo3pmohz_id").toString()));  //护理人员名称
+//                    hashMap.put("textField_lo3pmoi0",map.get("textField_lo3pmoi0"));  //护理人员所属机构
+//                    hashMap.put("textField_lombve2g",map.get("textField_lomchzi3"));  //护理人员身份证
+//                    hashMap.put("textField_lo3pmoi3",map.get("textField_lo3pmoi3"));  //护理人员手机号
+//                    hashMap.put("associationFormField_lo3pmohw",JSON.parse(formData.get("associationFormField_lo3pmohw_id").toString()));  //护理对象姓名
+//                    hashMap.put("textField_lnyhv5tn",formData.get("textField_lnyhv5tn")); //护理对象身份证
+//                    hashMap.put("selectField_lnyhv5tp",formData.get("selectField_lnyhv5tp"));  //护理对象等级
+//                    hashMap.put("textField_lnyhv5tr",formData.get("textField_lnyhv5tr"));  //护理对象住址
+//                    hashMap.put("selectField_lo3pmohy",dayOfWeek.replace("星期","周"));  //护理时间  (星期几)
+//                    hashMap.put("dateField_lred6eoj", UtilDateTime.parse(String.valueOf(nextDay)+" "+map.get("selectField_lr1uxpu3"),"yyyy-MM-dd HH:mm")); //护理开始时间。 用当前日期+护理计划的  时分    转成时间戳
+//                    hashMap.put("dateField_lred6eok",UtilDateTime.parse(String.valueOf(nextDay)+" "+map.get("selectField_lr1uxpu4"),"yyyy-MM-dd HH:mm")); //护理结束时间。 用当前日期+护理计划的  时分    转成时间戳
+//                    hashMap.put("selectField_lqcgsbw2","未执行");  //执行情况
+//                    hashMap.put("selectField_lo56u5fn","待上报");  //任务状态
+//
+//                    hashMap.put("textField_lvae7q5n",formData.get("textField_lvae99fj")); //护理对象经度
+//                    hashMap.put("textField_lvae7q5o",formData.get("textField_lvae99fk"));  //护理对象纬度
+//
+//                    hashMap.put("textField_lrx0r38x",String.valueOf(nextDay));  //护理日期-文本
+//                    hashMap.put("selectField_lr36z6hd","是");  //任务状态
+//                    hashMap.put("textField_lo55rupj",formData.get("textField_lo55rupj"));  //护理对象姓名-文本
+//                    hashMap.put("textField_lo3pmoi4",map.get("textField_lo3pmoi4"));  //护理证书类型
+//                    hashMap.put("employeeField_lo3pmoi6",JSON.parse(map.get("employeeField_lo3pmoi6_id").toString()));  //护理人员姓名-成员
+//                    hashMap.put("textField_lpgi8scj",map.get("textField_lo701pwy"));  //计划明细id
+//                    hashMap.put("textField_lq9llmhl",formData.get("textField_lop4v4qx"));  //护理对象ID
+//
+//
+//                    //通过护理时间  护理对象ID    证数据是否已经存在
+//                    YDParam ydParam1 = YDParam.builder()
+//                            .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
+//                            .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lnyhv5tn, textField_lombve2g",Arrays.asList(UtilDateTime.parse( nextDay+ " 00:00:01","yyyy-MM-dd HH:mm:ss"),UtilDateTime.parse( nextDay+ " 23:59:59","yyyy-MM-dd HH:mm:ss")),formData.get("textField_lnyhv5tn"),map.get("textField_lomchzi3"))))
+//                            .build();
+//                    List<Map> dataList = (List<Map>) ydClient.queryData(ydParam1, YDConf.FORM_QUERY.retrieve_search_form).getData();
+//
+//                    //判断是否存在
+//                    if (dataList.size()<1){
+//                        try {
+//                            ydClient.operateData(YDParam.builder()
+//                                    .formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM")
+//                                    .formDataJson(JSON.toJSONString(hashMap))
+//                                    .build(), YDConf.FORM_OPERATION.create);
+//                        } catch (Exception e) {
+//                            log.info("定时任务创建计划失败:{}",e);
+//                        }
+//                    }
+//                }
+//            }
 
     }
 
@@ -591,9 +566,4 @@ public class YBJServiceImpl implements YBJService {
                     .build(), YDConf.FORM_OPERATION.delete);
         });
     }
-
-
-
-
-
 }