|
@@ -23,6 +23,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -118,7 +120,16 @@ public class DataAnalysisFacade {
|
|
|
|
|
|
private void clickPageSet(GetQcClickVO getQcClickVO) {
|
|
|
//入参验证
|
|
|
- if (DateUtil.after(DateUtil.parseDateTime(getQcClickVO.getStartDate()),DateUtil.parseDateTime(getQcClickVO.getEndDate()))){
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
|
|
+ Date startDate = null;
|
|
|
+ Date endDate = null;
|
|
|
+ try {
|
|
|
+ startDate = simpleDateFormat.parse(getQcClickVO.getStartDate());
|
|
|
+ endDate = simpleDateFormat.parse(getQcClickVO.getEndDate());
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (DateUtil.after(startDate,endDate)){
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "开始时间必须小于结束时间!");
|
|
|
}
|
|
|
getQcClickVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
|
|
@@ -126,7 +137,16 @@ public class DataAnalysisFacade {
|
|
|
|
|
|
private void clickInnerPageSet(GetQcClickInnerPageVO getQcClickInnerPageVO) {
|
|
|
//入参验证
|
|
|
- if (DateUtil.after(DateUtil.parseDateTime(getQcClickInnerPageVO.getStartDate()),DateUtil.parseDateTime(getQcClickInnerPageVO.getEndDate()))){
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
|
|
+ Date startDate = null;
|
|
|
+ Date endDate = null;
|
|
|
+ try {
|
|
|
+ startDate = simpleDateFormat.parse(getQcClickInnerPageVO.getStartDate());
|
|
|
+ endDate = simpleDateFormat.parse(getQcClickInnerPageVO.getEndDate());
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (DateUtil.after(startDate,endDate)){
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "开始时间必须小于结束时间!");
|
|
|
}
|
|
|
getQcClickInnerPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
|
|
@@ -134,7 +154,16 @@ public class DataAnalysisFacade {
|
|
|
|
|
|
private void entryDefectSet(GetEntryDefectImproveVO getEntryDefectImproveVO) {
|
|
|
//入参验证
|
|
|
- if (DateUtil.after(DateUtil.parseDateTime(getEntryDefectImproveVO.getStartDate()),DateUtil.parseDateTime(getEntryDefectImproveVO.getEndDate()))){
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
|
|
+ Date startDate = null;
|
|
|
+ Date endDate = null;
|
|
|
+ try {
|
|
|
+ startDate = simpleDateFormat.parse(getEntryDefectImproveVO.getStartDate());
|
|
|
+ endDate = simpleDateFormat.parse(getEntryDefectImproveVO.getEndDate());
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (DateUtil.after(startDate,endDate)){
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "开始时间必须小于结束时间!");
|
|
|
}
|
|
|
getEntryDefectImproveVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
|