|
@@ -81,7 +81,7 @@ public class CovidVaccinateAppointmentService {
|
|
|
* */
|
|
|
public ResultVo<List<CovidVaccinateThreshold>> queryChangJiaDuiYingDeYuZhi(Integer code) throws ParseException {
|
|
|
chaRuRiQI(code);
|
|
|
- log.info("查看疫苗产品编码为:{}的",code);
|
|
|
+ log.info("查看疫苗产品编码为:{},开始时间:{},结束时间:{}",code,DateUtil.getOffsetDate(1),DateUtil.getOffsetDate(7));
|
|
|
return ResultVoUtil.success(dao.chaKanQiTianYuZhi(code,DateUtil.getOffsetDate(1),DateUtil.getOffsetDate(7)));
|
|
|
}
|
|
|
|
|
@@ -94,18 +94,19 @@ public class CovidVaccinateAppointmentService {
|
|
|
Date maxDate = dao.changJiaYuZhiDoesItExist(code);
|
|
|
List<Date> dateList = new ArrayList<>();
|
|
|
int value = dao.chaKanChangJiaMoRenYuZhi(code);
|
|
|
- Date date = null;
|
|
|
+ Date date;
|
|
|
for(int i = 1; i<= GET_DATE_SECTION; i++){
|
|
|
date = SDF.parse(DateUtil.getOffsetDate(i));
|
|
|
- dateList.add(date);
|
|
|
+ if (maxDate == null){
|
|
|
+ dateList.add(date);
|
|
|
+ log.info("新冠疫苗插入默认设置阈值=》code:{},插入的日期为:{},阈值数:{}", code,DateUtil.formatDatetime(date,DATE_FORMAT),value);
|
|
|
+ }else if (maxDate.getTime()<date.getTime()){
|
|
|
+ dateList.add(date);
|
|
|
+ log.info("新冠疫苗厂家阈值插入=》code:{},添加日期为:{},阈值数:{}", code,DateUtil.formatDatetime(date,DATE_FORMAT),value);
|
|
|
+ }
|
|
|
}
|
|
|
- if (maxDate == null){
|
|
|
- //厂家在创建的时候是 没有日期的 那么就需要 插入全部的数据
|
|
|
- dao.chaRuMeiYouDeDate(code,dateList,value);
|
|
|
- log.info("第一次插入新冠疫苗厂家阈值插入=》code:{},插入的日期为:{},阈值数量:{}", code,JSON.toJSONStringWithDateFormat(dateList,DATE_FORMAT),value);
|
|
|
- }else if (maxDate.getTime()<date.getTime()){
|
|
|
+ if (dateList.size()>0) {
|
|
|
dao.chaRuMeiYouDeDate(code,dateList,value);
|
|
|
- log.info("新冠疫苗厂家阈值插入=》code:{},插入的日期为:{},阈值数量:{}", code,JSON.toJSONStringWithDateFormat(dateList,DATE_FORMAT),value);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -147,11 +148,11 @@ public class CovidVaccinateAppointmentService {
|
|
|
public IPage<CovidVaccinateAppointment> getQueryPage(CovidVaccinateAppointment param){
|
|
|
IPage<CovidVaccinateAppointment> page = new Page<>(param.getCurrentPage(),param.getPageSize());
|
|
|
QueryWrapper<CovidVaccinateAppointment> qw = new QueryWrapper<>();
|
|
|
- if (param.getName() != null && !"".equals(param.getName())){
|
|
|
+ if (StringUtil.notBlank(param.getName())) {
|
|
|
qw.eq("a.name",param.getName());
|
|
|
}
|
|
|
- if (param.getExecuteDate() != null ){
|
|
|
- qw.eq("execute_date",DateUtil.formatDatetime(param.getExecuteDate(),"yyyy-MM-dd"));
|
|
|
+ if (param.getExecuteDate() != null) {
|
|
|
+ qw.eq("execute_date",param.getExecuteDate());
|
|
|
}
|
|
|
return dao.mybatisPlusQueryXGYM(page,qw);
|
|
|
}
|
|
@@ -217,7 +218,7 @@ public class CovidVaccinateAppointmentService {
|
|
|
* @param param 修改的字段为 name enableFlag bookTip 通过id来修改
|
|
|
* */
|
|
|
public ResultVo<Boolean> xiuGaiYiMiao(ZdCovidVaccinate param){
|
|
|
- log.info("修改疫苗=》操作人:{},数据:{}",TokenUtil.getTokenUserId(),JSON.toJSONString(param));
|
|
|
+ log.info("修改疫苗=》操作人:{},数据:{}",TokenUtil.getTokenUserId(),JSON.toJSONStringWithDateFormat(param,DATE_FORMAT));
|
|
|
dao.xiuGaiYiMiao(param);
|
|
|
return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION,"疫苗修改成功 \(☆o☆)/");
|
|
|
}
|