|
|
@@ -16,7 +16,9 @@ import com.railway.business.push.service.IBusPushMsgService;
|
|
|
import com.railway.common.utils.StringUtils;
|
|
|
import com.railway.common.utils.poi.EasyExcelUtil;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -217,7 +219,12 @@ public class BusJcbGlkgServiceImpl extends BusJcabServiceImpl implements IBusJcb
|
|
|
list = list.stream().map(this::formatOne).collect(Collectors.toList());
|
|
|
String fileName = "隔离开关检测记录.xls";
|
|
|
String templateFileName = templatePath + "/excel/隔离开关检测记录.xls";
|
|
|
- return new EasyExcelUtil().writeExcel(list, templateFileName, fileName);
|
|
|
+ Map<String, Object> params = new HashMap<>(0);
|
|
|
+ if(!list.isEmpty()) {
|
|
|
+ params.put("confirmUser",list.get(0).getConfirmUser());
|
|
|
+ params.put("checkUser",list.get(0).getCheckUser());
|
|
|
+ }
|
|
|
+ return new EasyExcelUtil().writeExcel(params, list, templateFileName, fileName);
|
|
|
}
|
|
|
|
|
|
private BusJcbGlkg formatOne(BusJcbGlkg busJcbGlkg) {
|