anderx 4 years ago
parent
commit
a8b0102713

+ 2 - 1
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -599,7 +599,8 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
   </select>
   
   <select id="listPublicDtails" resultType="com.goafanti.weChat.bo.OutPublicDtails">
-  select b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,a.annex_url annexUrl,a.photo_url photoUrl,
+  	select b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,a.annex_url annexUrl,a.photo_url photoUrl,
+		date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,
 	date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds
 	from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
 	where 1=1

+ 6 - 2
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -190,7 +190,7 @@ public class NewExcelUtil<T> {
 				cell.setCellValue(sheetName);
 				CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
 				sheet.addMergedRegion(region);
-				cell.setCellStyle(styles.get("header"));
+				cell.setCellStyle(styles.get("total"));
 				Row row = sheet.createRow(1);
 				int column = 0;
 				// 写入各个字段的列头名称
@@ -341,7 +341,7 @@ public class NewExcelUtil<T> {
 		style.cloneStyleFrom(styles.get("data"));
 		style.setAlignment(HorizontalAlignment.CENTER);
 		style.setVerticalAlignment(VerticalAlignment.CENTER);
-		style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
+		style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
 		style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
 		Font headerFont = wb.createFont();
 		headerFont.setFontName("Arial");
@@ -352,11 +352,15 @@ public class NewExcelUtil<T> {
 		styles.put("header", style);
 
 		style = wb.createCellStyle();
+		style.cloneStyleFrom(styles.get("data"));
 		style.setAlignment(HorizontalAlignment.CENTER);
 		style.setVerticalAlignment(VerticalAlignment.CENTER);
+		style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
+		style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
 		Font totalFont = wb.createFont();
 		totalFont.setFontName("Arial");
 		totalFont.setFontHeightInPoints((short) 10);
+		totalFont.setColor(IndexedColors.WHITE.getIndex());
 		style.setFont(totalFont);
 		styles.put("total", style);
 

+ 10 - 0
src/main/java/com/goafanti/weChat/bo/OutPublicDtails.java

@@ -17,8 +17,18 @@ public class OutPublicDtails {
 	private String releaseStarts;
 	@Excel(name = "公出结束时间")
 	private String releaseEnds;
+	@Excel(name = "打卡时间" )
+	private String clockInTimes;
 	private String annexUrl;
 	private String photoUrl;
+	
+	
+	public String getClockInTimes() {
+		return clockInTimes;
+	}
+	public void setClockInTimes(String clockInTimes) {
+		this.clockInTimes = clockInTimes;
+	}
 	public String getNickname() {
 		return nickname;
 	}