|
@@ -727,9 +727,9 @@ public class YBJServiceImpl implements YBJService {
|
|
|
@Override
|
|
|
public void insertHistory2() {
|
|
|
// Date date = new Date();
|
|
|
- long lastTime = 1735660800000L;
|
|
|
+ long lastTime = 1734969600000L;
|
|
|
List<String> dateList = new ArrayList<>();
|
|
|
- long startTime = 1721318400000L;
|
|
|
+ long startTime = 1732982400000L;
|
|
|
dateList.add(String.valueOf(startTime));
|
|
|
// 创建一个Calendar实例并设置为给定的时间戳
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
@@ -748,7 +748,7 @@ public class YBJServiceImpl implements YBJService {
|
|
|
YDParam ydParam = new YDParam();
|
|
|
ydParam = YDParam.builder()
|
|
|
.formUuid("FORM-IY966L71PJ8FV10D61M1HBHU6FB320M2765OLM") //获取护理计划
|
|
|
- .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj", dateList)))//护理对象暂停和正常、月度计划创建只查询正常的护理计划
|
|
|
+ .searchFieldJson(JSON.toJSONString(UtilMap.map("dateField_lred6eoj, textField_lo3pmoi0", dateList, "上海市奉贤区海湾镇居家")))//护理对象暂停和正常、月度计划创建只查询正常的护理计划
|
|
|
.build();
|
|
|
List<Map> dataList = ydService.queryFormData_all(ydParam);
|
|
|
List<Plan> planCopies = new ArrayList<>();
|
|
@@ -1115,7 +1115,6 @@ public class YBJServiceImpl implements YBJService {
|
|
|
});
|
|
|
planQuery.eq("is_delete",0);
|
|
|
planQuery.orderByAsc("care_start_time");
|
|
|
-// List<Plan> records = boardQuery(data).getRecords();
|
|
|
List<Plan> records = planMapper.selectList(planQuery);
|
|
|
if (ArrayUtil.isNotEmpty(records)){
|
|
|
log.info("records:{}",records.toString());
|
|
@@ -1164,14 +1163,18 @@ public class YBJServiceImpl implements YBJService {
|
|
|
Map<String,Object> formInstId = (Map<String,Object>) data.get("date_between");
|
|
|
planQuery.ge("care_start_time",formInstId.get("start"));
|
|
|
planQuery.le("care_start_time",formInstId.get("end"));
|
|
|
- }else{
|
|
|
+ } else if (k.equals("is_dep")) {
|
|
|
+
|
|
|
+ } else{
|
|
|
planQuery.eq(k,v);
|
|
|
}
|
|
|
});
|
|
|
planQuery.eq("is_delete",0);
|
|
|
- planQuery.isNotNull("clock_in_date");
|
|
|
- planQuery.isNull("clock_out_date");
|
|
|
- planQuery.orderByAsc("care_start_time");
|
|
|
+ if (data.containsKey("is_dep")){
|
|
|
+ planQuery.isNotNull("clock_in_date");
|
|
|
+ planQuery.isNull("clock_out_date");
|
|
|
+ planQuery.orderByAsc("care_start_time");
|
|
|
+ }
|
|
|
return planMapper.selectPage(planPage, planQuery);
|
|
|
}
|
|
|
|
|
@@ -1189,6 +1192,27 @@ public class YBJServiceImpl implements YBJService {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void updateCareObjectInfo(String formInstId) {
|
|
|
+ long now = new Date().getTime();
|
|
|
+ Plan plan = new Plan();
|
|
|
+ Map formData = ydClient.queryData(YDParam.builder()
|
|
|
+ .appType("APP_ERBDTFS82HOVBPL3NFH0")
|
|
|
+ .systemToken("RRB66F91T97H1WN89QZYC47PKLZO2ZQOUMOQLP")
|
|
|
+ .formInstanceId(formInstId)
|
|
|
+ .build(),
|
|
|
+ YDConf.FORM_QUERY.retrieve_id).getFormData();
|
|
|
+ UpdateWrapper<Plan> updateWrapper = new UpdateWrapper<>();
|
|
|
+ updateWrapper.eq("care_object_card",formData.get("textField_lnyhv5tn"));
|
|
|
+ updateWrapper.ge("care_start_time",now);
|
|
|
+ updateWrapper.eq("task_status","待上报");
|
|
|
+ plan.setCareObjectLevel(formData.get("selectField_lnyhv5tp").toString());
|
|
|
+ plan.setCareObjectAddress(formData.get("textField_lnyhv5tq").toString());
|
|
|
+ plan.setCareObjectLongitude(formData.get("textField_ljghmc0e").toString());
|
|
|
+ plan.setCareObjectLatitude(formData.get("textField_ljghmc0f").toString());
|
|
|
+ planMapper.update(plan,updateWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 定时任务同步数据库到宜搭
|
|
|
*/
|
|
@@ -1402,9 +1426,9 @@ public class YBJServiceImpl implements YBJService {
|
|
|
for (int i = 1; i <= daysInMonth - dayOfMonth; i++) {
|
|
|
//获取当前日期是本月几号
|
|
|
//获取是周几
|
|
|
- String dayOfWeek = currentDate.plusDays(i).getDayOfWeek().getDisplayName(TextStyle.FULL, new Locale("zh", "CN"));
|
|
|
+ String dayOfWeek = now.plusDays(i).getDayOfWeek().getDisplayName(TextStyle.FULL, new Locale("zh", "CN"));
|
|
|
//获取循环每天的日期
|
|
|
- LocalDate nextDay = currentDate.plusDays(i);
|
|
|
+ LocalDate nextDay = LocalDate.from(now.plusDays(i));
|
|
|
List<Map> maps = mapList.stream().filter(item -> item.get("selectField_lo3pmohy").equals(dayOfWeek.replace("星期", "周"))).collect(Collectors.toList());
|
|
|
for (Map map : maps) {
|
|
|
// 创建Statement对象,用于执行SQL语句
|
|
@@ -1566,7 +1590,8 @@ public class YBJServiceImpl implements YBJService {
|
|
|
updateWrapper.eq("id",id);
|
|
|
|
|
|
List<Map<String,Object>> image = (List<Map<String, Object>>) data.get("imageField_lp7obkee");
|
|
|
- String remoteUrl = "https://xvuk8m.aliwork.com" + image.get(0).get("previewUrl");
|
|
|
+// String remoteUrl = "https://xvuk8m.aliwork.com" + image.get(0).get("previewUrl");
|
|
|
+ String remoteUrl = image.get(0).get("previewUrl").toString();
|
|
|
String fileName = image.get(0).get("name").toString();
|
|
|
String downLoad = image.get(0).get("downloadUrl").toString();
|
|
|
// downloadFile(remoteUrl,localUrl+fileName);
|