Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4835c32f48
|
|
@ -37,7 +37,7 @@ public class ExamTaskFirstOrderVo {
|
|||
private int num;
|
||||
/**考试开始时间*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||
@Excel(name = "考试开始时间")
|
||||
@Excel(name = "考试开始时间",dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date startTime;
|
||||
/**考试结束时间*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||
|
|
@ -52,7 +52,7 @@ public class ExamTaskFirstOrderVo {
|
|||
private String createUser;
|
||||
/**创建时间*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "创建时间")
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,13 @@ public class LearningTaskFirstOrderVo {
|
|||
/**
|
||||
* 总时长
|
||||
*/
|
||||
@Excel(name = "总时长")
|
||||
//@Excel(name = "总时长")
|
||||
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) {
|
||||
try{
|
||||
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);
|
||||
util.exportExcel(response, list, "监理入场");
|
||||
}catch (Exception e){
|
||||
|
|
|
|||
|
|
@ -201,25 +201,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
<select id="getData" resultType="com.bonus.project.domain.AdmissionRequest">
|
||||
SELECT
|
||||
cons_user_id AS "consUserId",
|
||||
task_id AS "taskId",
|
||||
cons_name AS "consName",
|
||||
sex AS "sex",
|
||||
age AS "age",
|
||||
phone AS "phone",
|
||||
native AS "natives",
|
||||
id_card AS "idCard",
|
||||
nation AS "nation",
|
||||
home_address AS "homeAddress",
|
||||
address AS "address",
|
||||
post AS "post",
|
||||
IFNULL(work_type, '暂无') AS "workType",
|
||||
face_path AS "facePath",
|
||||
person_type AS "personType",
|
||||
create_time AS "createTime",
|
||||
update_time AS "updateTime"
|
||||
pcp.cons_user_id AS consUserId,
|
||||
pcp.task_id AS taskId,
|
||||
pcp.cons_name AS consName,
|
||||
pcp.sex AS sex,
|
||||
pcp.age AS age,
|
||||
pcp.phone AS phone,
|
||||
pcp.native AS natives,
|
||||
su.id_card AS idCard,
|
||||
pcp.nation AS nation,
|
||||
pcp.home_address AS homeAddress,
|
||||
pcp.address AS address,
|
||||
pcp.post AS post,
|
||||
IFNULL(work_type, '暂无') AS workType,
|
||||
pcp.face_path AS facePath,
|
||||
pcp.person_type AS personType,
|
||||
pcp.create_time AS createTime,
|
||||
pcp.update_time AS updateTime
|
||||
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}
|
||||
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue