Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4835c32f48
|
|
@ -37,7 +37,7 @@ public class ExamTaskFirstOrderVo {
|
||||||
private int num;
|
private int num;
|
||||||
/**考试开始时间*/
|
/**考试开始时间*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||||
@Excel(name = "考试开始时间")
|
@Excel(name = "考试开始时间",dateFormat = "yyyy-MM-dd HH:mm")
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
/**考试结束时间*/
|
/**考试结束时间*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||||
|
|
@ -52,7 +52,7 @@ public class ExamTaskFirstOrderVo {
|
||||||
private String createUser;
|
private String createUser;
|
||||||
/**创建时间*/
|
/**创建时间*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
@Excel(name = "创建时间")
|
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,13 @@ public class LearningTaskFirstOrderVo {
|
||||||
/**
|
/**
|
||||||
* 总时长
|
* 总时长
|
||||||
*/
|
*/
|
||||||
@Excel(name = "总时长")
|
//@Excel(name = "总时长")
|
||||||
private float totalTime;
|
private float totalTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总时长
|
||||||
|
* excel导出的时候要和web展示保持一致,这里做一下修改
|
||||||
|
*/
|
||||||
|
@Excel(name = "总时长")
|
||||||
|
private String excelTotalTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,14 @@ public class LearningTaskController extends BaseController {
|
||||||
public void exportSupEntry(HttpServletResponse response, @RequestBody ExamParamDto dto) {
|
public void exportSupEntry(HttpServletResponse response, @RequestBody ExamParamDto dto) {
|
||||||
try{
|
try{
|
||||||
List<LearningTaskFirstOrderVo> list = service.getStudyTasks(dto);
|
List<LearningTaskFirstOrderVo> list = service.getStudyTasks(dto);
|
||||||
|
for (LearningTaskFirstOrderVo learningTaskFirstOrderVo: list) {
|
||||||
|
if (learningTaskFirstOrderVo!=null){
|
||||||
|
double minutes = (double) learningTaskFirstOrderVo.getTotalTime() / 60;
|
||||||
|
// 使用 String.format 方法格式化分钟数,保留两位小数
|
||||||
|
String formattedMinutes = String.format("%.2f", minutes)+"分钟";
|
||||||
|
learningTaskFirstOrderVo.setExcelTotalTime(formattedMinutes);
|
||||||
|
}
|
||||||
|
}
|
||||||
ExcelUtil<LearningTaskFirstOrderVo> util = new ExcelUtil<LearningTaskFirstOrderVo>(LearningTaskFirstOrderVo.class);
|
ExcelUtil<LearningTaskFirstOrderVo> util = new ExcelUtil<LearningTaskFirstOrderVo>(LearningTaskFirstOrderVo.class);
|
||||||
util.exportExcel(response, list, "监理入场");
|
util.exportExcel(response, list, "监理入场");
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
|
||||||
|
|
@ -201,25 +201,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
<select id="getData" resultType="com.bonus.project.domain.AdmissionRequest">
|
<select id="getData" resultType="com.bonus.project.domain.AdmissionRequest">
|
||||||
SELECT
|
SELECT
|
||||||
cons_user_id AS "consUserId",
|
pcp.cons_user_id AS consUserId,
|
||||||
task_id AS "taskId",
|
pcp.task_id AS taskId,
|
||||||
cons_name AS "consName",
|
pcp.cons_name AS consName,
|
||||||
sex AS "sex",
|
pcp.sex AS sex,
|
||||||
age AS "age",
|
pcp.age AS age,
|
||||||
phone AS "phone",
|
pcp.phone AS phone,
|
||||||
native AS "natives",
|
pcp.native AS natives,
|
||||||
id_card AS "idCard",
|
su.id_card AS idCard,
|
||||||
nation AS "nation",
|
pcp.nation AS nation,
|
||||||
home_address AS "homeAddress",
|
pcp.home_address AS homeAddress,
|
||||||
address AS "address",
|
pcp.address AS address,
|
||||||
post AS "post",
|
pcp.post AS post,
|
||||||
IFNULL(work_type, '暂无') AS "workType",
|
IFNULL(work_type, '暂无') AS workType,
|
||||||
face_path AS "facePath",
|
pcp.face_path AS facePath,
|
||||||
person_type AS "personType",
|
pcp.person_type AS personType,
|
||||||
create_time AS "createTime",
|
pcp.create_time AS createTime,
|
||||||
update_time AS "updateTime"
|
pcp.update_time AS updateTime
|
||||||
FROM
|
FROM
|
||||||
pt_cons_person
|
pt_cons_person pcp
|
||||||
|
left join sys_user su on pcp.phone = su.phonenumber
|
||||||
WHERE is_active = '1' and cons_user_id = #{consUserId}
|
WHERE is_active = '1' and cons_user_id = #{consUserId}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue