This commit is contained in:
wucongxing8150 2025-07-15 13:05:40 +08:00
parent 9335655f65
commit d619f13664
3 changed files with 41 additions and 10 deletions

View File

@ -41,6 +41,9 @@ public class CaseplatformCaseQueryForm extends PageParam{
@ApiModelProperty(value = "审核时间") @ApiModelProperty(value = "审核时间")
private List<LocalDateTime> examineTime; private List<LocalDateTime> examineTime;
@ApiModelProperty(hidden = true)
private List<String> examineTimeFormatted;
@ApiModelProperty(value = "省份") @ApiModelProperty(value = "省份")
private Long provId; private Long provId;

View File

@ -60,6 +60,7 @@ import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import static net.lab1024.sa.common.common.code.UserErrorCode.NO_AUTH; import static net.lab1024.sa.common.common.code.UserErrorCode.NO_AUTH;
@ -136,10 +137,20 @@ public class CaseplatformCaseService {
// 时间处理 // 时间处理
if (queryForm.getExamineTime() != null && queryForm.getExamineTime().size() == 2) { if (queryForm.getExamineTime() != null && queryForm.getExamineTime().size() == 2) {
LocalDateTime start = queryForm.getExamineTime().get(0).withHour(0).withMinute(0).withSecond(0).withNano(0); LocalDateTime start = queryForm.getExamineTime().get(0)
LocalDateTime end = queryForm.getExamineTime().get(1).withHour(23).withMinute(59).withSecond(59).withNano(999_999_999); .withHour(0).withMinute(0).withSecond(0).withNano(0);
LocalDateTime end = queryForm.getExamineTime().get(1)
.withHour(23).withMinute(59).withSecond(59).withNano(0);
queryForm.getExamineTime().set(0, start); queryForm.getExamineTime().set(0, start);
queryForm.getExamineTime().set(1, end); queryForm.getExamineTime().set(1, end);
// 格式化后的字符串列表
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
List<String> formattedList = new ArrayList<>();
formattedList.add(start.format(formatter));
formattedList.add(end.format(formatter));
queryForm.setExamineTimeFormatted(formattedList);
} }
List<CaseplatformCaseVO> list = caseplatformCaseDao.queryPage(page, queryForm, provList); List<CaseplatformCaseVO> list = caseplatformCaseDao.queryPage(page, queryForm, provList);
@ -157,6 +168,24 @@ public class CaseplatformCaseService {
return null; return null;
} }
} }
if (queryForm.getExamineTime() != null && queryForm.getExamineTime().size() == 2) {
LocalDateTime start = queryForm.getExamineTime().get(0)
.withHour(0).withMinute(0).withSecond(0).withNano(0);
LocalDateTime end = queryForm.getExamineTime().get(1)
.withHour(23).withMinute(59).withSecond(59).withNano(0);
queryForm.getExamineTime().set(0, start);
queryForm.getExamineTime().set(1, end);
// 格式化后的字符串列表
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
List<String> formattedList = new ArrayList<>();
formattedList.add(start.format(formatter));
formattedList.add(end.format(formatter));
queryForm.setExamineTimeFormatted(formattedList);
}
List<CaseplatformCaseVO> list = caseplatformCaseDao.queryPage(null, queryForm, provList); List<CaseplatformCaseVO> list = caseplatformCaseDao.queryPage(null, queryForm, provList);
return list; return list;
} }
@ -423,10 +452,9 @@ public class CaseplatformCaseService {
return ResponseDTO.userErrorParam("该用户未签署协议"); return ResponseDTO.userErrorParam("该用户未签署协议");
} }
CaseplatformCaseEntity caseplatformCaseData = new CaseplatformCaseEntity(); caseplatformCase.setStatus(status);
caseplatformCaseData.setStatus(status); caseplatformCase.setExamineTime(LocalDateTime.now());
caseplatformCaseData.setExamineTime(LocalDateTime.now()); caseplatformCaseDao.updateById(caseplatformCase);
caseplatformCaseDao.examine(case_id, status);
return ResponseDTO.ok(); return ResponseDTO.ok();
} }

View File

@ -56,8 +56,8 @@
AND t_caseplatform_expert.hospital_uuid =#{queryForm.hospitalUuid} AND t_caseplatform_expert.hospital_uuid =#{queryForm.hospitalUuid}
</if> </if>
<!-- 审核时间区间 --> <!-- 审核时间区间 -->
<if test="queryForm.examineTime != null and queryForm.examineTime.size == 2"> <if test="queryForm.examineTimeFormatted != null and queryForm.examineTimeFormatted.size == 2">
AND t_caseplatform_case.examine_time BETWEEN #{queryForm.examineTime[0]} AND #{queryForm.examineTime[1]} AND t_caseplatform_case.examine_time BETWEEN #{queryForm.examineTimeFormatted[0]} AND #{queryForm.examineTimeFormatted[1]}
</if> </if>
</where> </where>
order by t_caseplatform_case.create_time desc order by t_caseplatform_case.create_time desc
@ -178,8 +178,8 @@
AND t_caseplatform_expert.hospital_uuid =#{queryForm.hospitalUuid} AND t_caseplatform_expert.hospital_uuid =#{queryForm.hospitalUuid}
</if> </if>
<!-- 审核时间区间 --> <!-- 审核时间区间 -->
<if test="queryForm.examineTime != null and queryForm.examineTime.size == 2"> <if test="queryForm.examineTimeFormatted != null and queryForm.examineTimeFormatted.size == 2">
AND t_caseplatform_case.examine_time BETWEEN #{queryForm.examineTime[0]} AND #{queryForm.examineTime[1]} AND t_caseplatform_case.examine_time BETWEEN #{queryForm.examineTimeFormatted[0]} AND #{queryForm.examineTimeFormatted[1]}
</if> </if>
</where> </where>
</select> </select>