33334
This commit is contained in:
parent
9335655f65
commit
d619f13664
@ -41,6 +41,9 @@ public class CaseplatformCaseQueryForm extends PageParam{
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
private List<LocalDateTime> examineTime;
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
private List<String> examineTimeFormatted;
|
||||
|
||||
@ApiModelProperty(value = "省份")
|
||||
private Long provId;
|
||||
|
||||
|
||||
@ -60,6 +60,7 @@ import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
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) {
|
||||
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(999_999_999);
|
||||
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(page, queryForm, provList);
|
||||
@ -157,6 +168,24 @@ public class CaseplatformCaseService {
|
||||
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);
|
||||
return list;
|
||||
}
|
||||
@ -423,10 +452,9 @@ public class CaseplatformCaseService {
|
||||
return ResponseDTO.userErrorParam("该用户未签署协议");
|
||||
}
|
||||
|
||||
CaseplatformCaseEntity caseplatformCaseData = new CaseplatformCaseEntity();
|
||||
caseplatformCaseData.setStatus(status);
|
||||
caseplatformCaseData.setExamineTime(LocalDateTime.now());
|
||||
caseplatformCaseDao.examine(case_id, status);
|
||||
caseplatformCase.setStatus(status);
|
||||
caseplatformCase.setExamineTime(LocalDateTime.now());
|
||||
caseplatformCaseDao.updateById(caseplatformCase);
|
||||
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
@ -56,8 +56,8 @@
|
||||
AND t_caseplatform_expert.hospital_uuid =#{queryForm.hospitalUuid}
|
||||
</if>
|
||||
<!-- 审核时间区间 -->
|
||||
<if test="queryForm.examineTime != null and queryForm.examineTime.size == 2">
|
||||
AND t_caseplatform_case.examine_time BETWEEN #{queryForm.examineTime[0]} AND #{queryForm.examineTime[1]}
|
||||
<if test="queryForm.examineTimeFormatted != null and queryForm.examineTimeFormatted.size == 2">
|
||||
AND t_caseplatform_case.examine_time BETWEEN #{queryForm.examineTimeFormatted[0]} AND #{queryForm.examineTimeFormatted[1]}
|
||||
</if>
|
||||
</where>
|
||||
order by t_caseplatform_case.create_time desc
|
||||
@ -178,8 +178,8 @@
|
||||
AND t_caseplatform_expert.hospital_uuid =#{queryForm.hospitalUuid}
|
||||
</if>
|
||||
<!-- 审核时间区间 -->
|
||||
<if test="queryForm.examineTime != null and queryForm.examineTime.size == 2">
|
||||
AND t_caseplatform_case.examine_time BETWEEN #{queryForm.examineTime[0]} AND #{queryForm.examineTime[1]}
|
||||
<if test="queryForm.examineTimeFormatted != null and queryForm.examineTimeFormatted.size == 2">
|
||||
AND t_caseplatform_case.examine_time BETWEEN #{queryForm.examineTimeFormatted[0]} AND #{queryForm.examineTimeFormatted[1]}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user