Browse Source

20220411v1.0

pull/1/head
zhangye 3 years ago
parent
commit
07cae2bb05
  1. 14
      src/main/java/com/ccsens/delivery/bean/dto/StudentDto.java
  2. 70
      src/main/java/com/ccsens/delivery/service/StudentService.java
  3. 2
      src/main/resources/application.yml
  4. 4
      src/main/resources/mapper_dao/StudentDao.xml

14
src/main/java/com/ccsens/delivery/bean/dto/StudentDto.java

@ -1,10 +1,13 @@
package com.ccsens.delivery.bean.dto;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
import java.util.Date;
import java.util.List;
/**
@ -79,11 +82,11 @@ public class StudentDto {
@ApiModelProperty("所在学院Id")
private Long collegeId;
@ApiModelProperty("所在学院名称")
private Long collegeName;
private String collegeName;
@ApiModelProperty("所在宿舍Id")
private Long dormitoryId;
@ApiModelProperty("所在宿舍名称")
private Long dormitoryName;
private String dormitoryName;
@NotBlank(message = "请填写详细地址")
@ApiModelProperty("详细地址")
private String address;
@ -152,5 +155,12 @@ public class StudentDto {
@Min(value = 1)
@Max(value=100)
private int pageSize = 10;
public Long getEndTime() {
if(ObjectUtil.isNotNull(endTime)){
endTime = DateUtil.endOfDay(new Date(endTime)).getTime();
}
return endTime;
}
}
}

70
src/main/java/com/ccsens/delivery/service/StudentService.java

@ -210,20 +210,20 @@ public class StudentService implements IStudentService {
header.add(new PoiUtil.PoiUtilCell("姓名"));
header.add(new PoiUtil.PoiUtilCell("学号"));
header.add(new PoiUtil.PoiUtilCell("手机号"));
header.add(new PoiUtil.PoiUtilCell("身份证号"));
// header.add(new PoiUtil.PoiUtilCell("身份证号"));
header.add(new PoiUtil.PoiUtilCell("所在学院名"));
header.add(new PoiUtil.PoiUtilCell("所在宿舍名"));
header.add(new PoiUtil.PoiUtilCell("详细地址"));
header.add(new PoiUtil.PoiUtilCell("症状描述"));
header.add(new PoiUtil.PoiUtilCell("是否断药"));
header.add(new PoiUtil.PoiUtilCell("备注"));
header.add(new PoiUtil.PoiUtilCell("希望配送时间"));
header.add(new PoiUtil.PoiUtilCell("配送状态"));
header.add(new PoiUtil.PoiUtilCell("实际配送时间"));
// header.add(new PoiUtil.PoiUtilCell("症状描述"));
// header.add(new PoiUtil.PoiUtilCell("是否断药"));
// header.add(new PoiUtil.PoiUtilCell("备注"));
// header.add(new PoiUtil.PoiUtilCell("希望配送时间"));
// header.add(new PoiUtil.PoiUtilCell("配送状态"));
// header.add(new PoiUtil.PoiUtilCell("实际配送时间"));
header.add(new PoiUtil.PoiUtilCell("药品名称"));
header.add(new PoiUtil.PoiUtilCell("药品规格"));
header.add(new PoiUtil.PoiUtilCell("数量"));
header.add(new PoiUtil.PoiUtilCell("订单提交时间"));
// header.add(new PoiUtil.PoiUtilCell("订单提交时间"));
list.add(header);
//时间格式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
@ -241,40 +241,40 @@ public class StudentService implements IStudentService {
order.add(new PoiUtil.PoiUtilCell(studentOrder.getName(), 1, size));
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getStuNum(), 1, size));
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getPhone(), 1, size));
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getIdCard(), 1, size));
// order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getIdCard(), 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getCollegeName(), 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getDormitoryName(), 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getAddress(), 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getSymptom(), 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getBroken() == 0 ? "否" : "是", 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getRemark(), 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getPlanTime() == null || studentOrder.getPlanTime() == 0 ? "" : sdf.format(new Date(studentOrder.getPlanTime())), 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getStatus() == 0 ? "未配送" : (studentOrder.getStatus() == 1 ? "已送达" : "无药 "), 1, size));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getRealTime() == null || studentOrder.getRealTime() == 0 ? "" : sdf.format(new Date(studentOrder.getRealTime())), 1, size));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getSymptom(), 1, size));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getBroken() == 0 ? "否" : "是", 1, size));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getRemark(), 1, size));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getPlanTime() == null || studentOrder.getPlanTime() == 0 ? "" : sdf.format(new Date(studentOrder.getPlanTime())), 1, size));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getStatus() == 0 ? "未配送" : (studentOrder.getStatus() == 1 ? "已送达" : "无药 "), 1, size));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getRealTime() == null || studentOrder.getRealTime() == 0 ? "" : sdf.format(new Date(studentOrder.getRealTime())), 1, size));
} else {
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
// order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
order.add(new PoiUtil.PoiUtilCell());
// order.add(new PoiUtil.PoiUtilCell());
// order.add(new PoiUtil.PoiUtilCell());
// order.add(new PoiUtil.PoiUtilCell());
// order.add(new PoiUtil.PoiUtilCell());
// order.add(new PoiUtil.PoiUtilCell());
// order.add(new PoiUtil.PoiUtilCell());
}
order.add(new PoiUtil.PoiUtilCell(studentOrderItem.getName()));
order.add(new PoiUtil.PoiUtilCell(studentOrderItem.getSpecification()));
order.add(new PoiUtil.PoiUtilCell(studentOrderItem.getNum() + ""));
if (j == 0) {
order.add(new PoiUtil.PoiUtilCell(studentOrder.getSubmitTime() == null || studentOrder.getSubmitTime() == 0 ? "" : sdf.format(new Date(studentOrder.getSubmitTime())), 1, size));
}else {
order.add(new PoiUtil.PoiUtilCell());
}
// if (j == 0) {
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getSubmitTime() == null || studentOrder.getSubmitTime() == 0 ? "" : sdf.format(new Date(studentOrder.getSubmitTime())), 1, size));
// }else {
// order.add(new PoiUtil.PoiUtilCell());
// }
list.add(order);
}
} else {
@ -284,17 +284,17 @@ public class StudentService implements IStudentService {
order.add(new PoiUtil.PoiUtilCell(studentOrder.getName()));
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getStuNum()));
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getPhone()));
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getIdCard()));
// order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getIdCard()));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getCollegeName()));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getDormitoryName()));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getAddress()));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getSymptom()));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getBroken() == 0 ? "否" : "是"));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getRemark()));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getPlanTime() == null || studentOrder.getPlanTime() == 0 ? "" : sdf.format(new Date(studentOrder.getPlanTime()))));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getStatus() == 0 ? "未配送" : (studentOrder.getStatus() == 1 ? "已送达" : "无药 ")));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getRealTime() == null || studentOrder.getRealTime() == 0 ? "" : sdf.format(new Date(studentOrder.getRealTime()))));
order.add(new PoiUtil.PoiUtilCell(studentOrder.getSubmitTime() == null || studentOrder.getSubmitTime() == 0 ? "" : sdf.format(new Date(studentOrder.getSubmitTime()))));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getSymptom()));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getBroken() == 0 ? "否" : "是"));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getRemark()));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getPlanTime() == null || studentOrder.getPlanTime() == 0 ? "" : sdf.format(new Date(studentOrder.getPlanTime()))));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getStatus() == 0 ? "未配送" : (studentOrder.getStatus() == 1 ? "已送达" : "无药 ")));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getRealTime() == null || studentOrder.getRealTime() == 0 ? "" : sdf.format(new Date(studentOrder.getRealTime()))));
// order.add(new PoiUtil.PoiUtilCell(studentOrder.getSubmitTime() == null || studentOrder.getSubmitTime() == 0 ? "" : sdf.format(new Date(studentOrder.getSubmitTime()))));
list.add(order);
}
}

2
src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: test
active: prod
include: common

4
src/main/resources/mapper_dao/StudentDao.xml

@ -225,7 +225,7 @@
</if>
<if test="param.startTime != null and param.endTime != null">
and o.plan_time >= #{param.startTime}
and o.plan_time &lt; #{param.endTime}
and o.plan_time &lt;= #{param.endTime}
</if>
<if test="param.drugName != null and param.drugName != ''">
and i.name like CONCAT('%',#{param.drugName},'%')
@ -311,7 +311,7 @@
</if>
<if test="param.startTime != null and param.endTime != null">
and o.plan_time >= #{param.startTime}
and o.plan_time &lt; #{param.endTime}
and o.plan_time &lt;= #{param.endTime}
</if>
<if test="param.drugName != null and param.drugName != ''">
and i.name like CONCAT('%',#{param.drugName},'%')

Loading…
Cancel
Save