|
@@ -24,11 +24,8 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.time.format.DateTimeFormatter;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
@Component
|
|
|
public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
@@ -288,41 +285,42 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
return RespDTO.onError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
- public RespDTO updatePlacefile(String endDate){
|
|
|
- try {
|
|
|
- //验证数据是否存在
|
|
|
- if(StringUtil.isBlank(endDate)){
|
|
|
- return RespDTO.onError("请输入截止时间!");
|
|
|
- }else{
|
|
|
-
|
|
|
- LocalDateTime endDateTime = LocalDateTime.parse(endDate + "T23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"));
|
|
|
- QueryWrapper<BehospitalInfo> queryWrapper = new QueryWrapper();
|
|
|
- queryWrapper.eq("hospital_id", "5")
|
|
|
- .eq("is_deleted", IsDeleteEnum.N)
|
|
|
- .lt("leave_hospital_date", endDateTime);
|
|
|
-
|
|
|
- // 查询符合条件的数据,并提取 behospital_code 字段
|
|
|
- List<BehospitalInfo> behospitalInfoList = behospitalInfoMapper.selectList(queryWrapper);
|
|
|
- List<String> isPlaceFileInfoList = behospitalInfoList.stream()
|
|
|
- .map(BehospitalInfo::getBehospitalCode) // 提取 behospital_code
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (isPlaceFileInfoList.isEmpty()) {
|
|
|
- return RespDTO.onError("未找到病历!");
|
|
|
- }
|
|
|
- UpdateWrapper<BehospitalInfo> updateWrapper=new UpdateWrapper<>();
|
|
|
- updateWrapper.eq("hospital_id", "5")
|
|
|
- .eq("is_deleted",IsDeleteEnum.N)
|
|
|
- .in("behospital_code", isPlaceFileInfoList)
|
|
|
- .set("is_placefile","1")
|
|
|
- .set("gmt_modified", DateUtil.now());
|
|
|
-
|
|
|
- Boolean flag=update(new BehospitalInfo(),updateWrapper);
|
|
|
- return RespDTO.onSuc(flag);
|
|
|
- }
|
|
|
- }catch (Exception e){
|
|
|
- return RespDTO.onError(e.getMessage());
|
|
|
- }
|
|
|
- }
|
|
|
+ //暂时停用
|
|
|
+// public RespDTO updatePlacefile(String endDate){
|
|
|
+// try {
|
|
|
+// //验证数据是否存在
|
|
|
+// if(StringUtil.isBlank(endDate)){
|
|
|
+// return RespDTO.onError("请输入截止时间!");
|
|
|
+// }else{
|
|
|
+//
|
|
|
+// LocalDateTime endDateTime = LocalDateTime.parse(endDate + "T23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"));
|
|
|
+// QueryWrapper<BehospitalInfo> queryWrapper = new QueryWrapper();
|
|
|
+// queryWrapper.eq("hospital_id", "5")
|
|
|
+// .eq("is_deleted", IsDeleteEnum.N)
|
|
|
+// .lt("leave_hospital_date", endDateTime);
|
|
|
+//
|
|
|
+// // 查询符合条件的数据,并提取 behospital_code 字段
|
|
|
+// List<BehospitalInfo> behospitalInfoList = behospitalInfoMapper.selectList(queryWrapper);
|
|
|
+// List<String> isPlaceFileInfoList = behospitalInfoList.stream()
|
|
|
+// .map(BehospitalInfo::getBehospitalCode) // 提取 behospital_code
|
|
|
+// .collect(Collectors.toList());
|
|
|
+// if (isPlaceFileInfoList.isEmpty()) {
|
|
|
+// return RespDTO.onError("未找到病历!");
|
|
|
+// }
|
|
|
+// UpdateWrapper<BehospitalInfo> updateWrapper=new UpdateWrapper<>();
|
|
|
+// updateWrapper.eq("hospital_id", "5")
|
|
|
+// .eq("is_deleted",IsDeleteEnum.N)
|
|
|
+// .in("behospital_code", isPlaceFileInfoList)
|
|
|
+// .set("is_placefile","1")
|
|
|
+// .set("gmt_modified", DateUtil.now());
|
|
|
+//
|
|
|
+// Boolean flag=update(new BehospitalInfo(),updateWrapper);
|
|
|
+// return RespDTO.onSuc(flag);
|
|
|
+// }
|
|
|
+// }catch (Exception e){
|
|
|
+// return RespDTO.onError(e.getMessage());
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
public RespDTO sendDateInfo(String startDate, String endDate, String isLeave){
|
|
|
try {
|