|
@@ -1,5 +1,7 @@
|
|
|
package com.jpsoft.shinestar.modules.business.controller;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUnit;
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import com.github.pagehelper.util.StringUtil;
|
|
|
import com.jpsoft.shinestar.config.OSSConfig;
|
|
@@ -17,6 +19,7 @@ import com.jpsoft.shinestar.modules.sys.service.UserService;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang.time.DateUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.ibatis.mapping.ResultMap;
|
|
|
import com.jpsoft.shinestar.modules.common.utils.PojoUtils;
|
|
@@ -54,11 +57,11 @@ public class YearRequestForLeaveInfoController {
|
|
|
|
|
|
@Autowired
|
|
|
private OSSConfig ossConfig;
|
|
|
-
|
|
|
-
|
|
|
- @ApiOperation(value="创建空记录")
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "创建空记录")
|
|
|
@GetMapping("create")
|
|
|
- public MessageResult<YearRequestForLeaveInfo> create(){
|
|
|
+ public MessageResult<YearRequestForLeaveInfo> create() {
|
|
|
MessageResult<YearRequestForLeaveInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
YearRequestForLeaveInfo yearRequestForLeaveInfo = new YearRequestForLeaveInfo();
|
|
@@ -69,14 +72,14 @@ public class YearRequestForLeaveInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="添加信息")
|
|
|
+ @ApiOperation(value = "添加信息")
|
|
|
@PostMapping("add")
|
|
|
- public MessageResult<YearRequestForLeaveInfo> add(@RequestBody YearRequestForLeaveInfo yearRequestForLeaveInfo,@RequestAttribute String subject){
|
|
|
+ public MessageResult<YearRequestForLeaveInfo> add(@RequestBody YearRequestForLeaveInfo yearRequestForLeaveInfo, @RequestAttribute String subject) {
|
|
|
MessageResult<YearRequestForLeaveInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
yearRequestForLeaveInfo.setId(UUID.randomUUID().toString());
|
|
|
- yearRequestForLeaveInfo.setDelFlag(false);
|
|
|
+ yearRequestForLeaveInfo.setDelFlag(false);
|
|
|
yearRequestForLeaveInfo.setCreateBy(subject);
|
|
|
yearRequestForLeaveInfo.setCreateTime(new Date());
|
|
|
|
|
@@ -89,9 +92,8 @@ public class YearRequestForLeaveInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库添加失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -100,9 +102,9 @@ public class YearRequestForLeaveInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="获取信息")
|
|
|
+ @ApiOperation(value = "获取信息")
|
|
|
@GetMapping("edit/{id}")
|
|
|
- public MessageResult<YearRequestForLeaveInfo> edit(@PathVariable("id") String id){
|
|
|
+ public MessageResult<YearRequestForLeaveInfo> edit(@PathVariable("id") String id) {
|
|
|
MessageResult<YearRequestForLeaveInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
@@ -115,9 +117,8 @@ public class YearRequestForLeaveInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库不存在该记录!");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -126,15 +127,15 @@ public class YearRequestForLeaveInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="更新用户")
|
|
|
+ @ApiOperation(value = "更新用户")
|
|
|
@PostMapping("update")
|
|
|
- public MessageResult<YearRequestForLeaveInfo> update(@RequestBody YearRequestForLeaveInfo yearRequestForLeaveInfo,@RequestAttribute String subject){
|
|
|
+ public MessageResult<YearRequestForLeaveInfo> update(@RequestBody YearRequestForLeaveInfo yearRequestForLeaveInfo, @RequestAttribute String subject) {
|
|
|
MessageResult<YearRequestForLeaveInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
- yearRequestForLeaveInfo.setUpdateBy(subject);
|
|
|
+ yearRequestForLeaveInfo.setUpdateBy(subject);
|
|
|
yearRequestForLeaveInfo.setUpdateTime(new Date());
|
|
|
-
|
|
|
+
|
|
|
int affectCount = yearRequestForLeaveInfoService.update(yearRequestForLeaveInfo);
|
|
|
|
|
|
if (affectCount > 0) {
|
|
@@ -144,9 +145,8 @@ public class YearRequestForLeaveInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库更新失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -155,19 +155,19 @@ public class YearRequestForLeaveInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="删除用户")
|
|
|
+ @ApiOperation(value = "删除用户")
|
|
|
@PostMapping("delete/{id}")
|
|
|
- public MessageResult<YearRequestForLeaveInfo> delete(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
+ public MessageResult<YearRequestForLeaveInfo> delete(@PathVariable("id") String id, @RequestAttribute String subject) {
|
|
|
MessageResult<YearRequestForLeaveInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
-
|
|
|
- YearRequestForLeaveInfo yearRequestForLeaveInfo = yearRequestForLeaveInfoService.get(id);
|
|
|
+
|
|
|
+ YearRequestForLeaveInfo yearRequestForLeaveInfo = yearRequestForLeaveInfoService.get(id);
|
|
|
yearRequestForLeaveInfo.setDelFlag(true);
|
|
|
yearRequestForLeaveInfo.setUpdateBy(subject);
|
|
|
yearRequestForLeaveInfo.setUpdateTime(new Date());
|
|
|
-
|
|
|
- int affectCount = yearRequestForLeaveInfoService.update(yearRequestForLeaveInfo);
|
|
|
+
|
|
|
+ int affectCount = yearRequestForLeaveInfoService.update(yearRequestForLeaveInfo);
|
|
|
|
|
|
if (affectCount > 0) {
|
|
|
msgResult.setResult(true);
|
|
@@ -175,9 +175,8 @@ public class YearRequestForLeaveInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库删除失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -187,9 +186,9 @@ public class YearRequestForLeaveInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="批量删除")
|
|
|
+ @ApiOperation(value = "批量删除")
|
|
|
@PostMapping("batchDelete")
|
|
|
- public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
|
|
|
+ public MessageResult<Integer> batchDelete(@RequestBody List<String> idList, @RequestAttribute String subject) {
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
@@ -211,9 +210,8 @@ public class YearRequestForLeaveInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("删除失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -237,10 +235,10 @@ public class YearRequestForLeaveInfoController {
|
|
|
String name,
|
|
|
String classId,
|
|
|
Integer status,
|
|
|
- @RequestParam(value="companyId",defaultValue="") String companyId,
|
|
|
- @RequestParam(value="subordinate",defaultValue="false") Boolean subordinate,
|
|
|
- @RequestParam(value="hqCompanyId",defaultValue="") String hqCompanyId,
|
|
|
- @RequestParam(value="hqSubordinate",defaultValue="false") Boolean hqSubordinate,
|
|
|
+ @RequestParam(value = "companyId", defaultValue = "") String companyId,
|
|
|
+ @RequestParam(value = "subordinate", defaultValue = "false") Boolean subordinate,
|
|
|
+ @RequestParam(value = "hqCompanyId", defaultValue = "") String hqCompanyId,
|
|
|
+ @RequestParam(value = "hqSubordinate", defaultValue = "false") Boolean hqSubordinate,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date requestStartTime,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date requestEndTime,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date auditStartTime,
|
|
@@ -255,12 +253,14 @@ public class YearRequestForLeaveInfoController {
|
|
|
//当前用户ID
|
|
|
User user = userService.get(subject);
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("create_time", "desc"));
|
|
|
|
|
|
Map<String, Object> searchParams = new HashMap<>();
|
|
|
|
|
|
- if(!userService.hasRole(user.getId(),"SYSADMIN")) {
|
|
|
+ if (!userService.hasRole(user.getId(), "SYSADMIN")) {
|
|
|
//非系统管理员
|
|
|
CompanyInfo companyInfo = companyInfoService.get(user.getCompanyId());
|
|
|
searchParams.put("companyCode", companyInfo.getCode() + "%");
|
|
@@ -274,47 +274,46 @@ public class YearRequestForLeaveInfoController {
|
|
|
searchParams.put("classId", classId);
|
|
|
}
|
|
|
|
|
|
- if (status!=null) {
|
|
|
+ if (status != null) {
|
|
|
searchParams.put("status", status);
|
|
|
}
|
|
|
|
|
|
- if (requestStartTime!=null) {
|
|
|
+ if (requestStartTime != null) {
|
|
|
searchParams.put("requestStartTime", requestStartTime);
|
|
|
}
|
|
|
|
|
|
- if (requestEndTime!=null) {
|
|
|
+ if (requestEndTime != null) {
|
|
|
searchParams.put("requestEndTime", new DateTime(requestEndTime).plusDays(1).plusSeconds(-1).toDate());
|
|
|
}
|
|
|
|
|
|
- if (auditStartTime!=null) {
|
|
|
- searchParams.put("auditStartTime", auditStartTime);
|
|
|
+ if (auditStartTime != null) {
|
|
|
+ Date t = DateUtil.beginOfDay(auditStartTime);
|
|
|
+ searchParams.put("auditStartTime", t);
|
|
|
}
|
|
|
|
|
|
- if (auditEndTime!=null) {
|
|
|
- searchParams.put("auditEndTime", new DateTime(auditEndTime).plusDays(1).plusSeconds(-1).toDate());
|
|
|
+ if (auditEndTime != null) {
|
|
|
+ Date t = DateUtil.endOfDay(auditEndTime);
|
|
|
+ searchParams.put("auditEndTime", t);
|
|
|
}
|
|
|
|
|
|
- if (com.jpsoft.shinestar.modules.common.utils.StringUtils.isNotEmpty(companyId)){
|
|
|
+ if (com.jpsoft.shinestar.modules.common.utils.StringUtils.isNotEmpty(companyId)) {
|
|
|
CompanyInfo companyInfo = companyInfoService.get(companyId);
|
|
|
|
|
|
- if(subordinate){
|
|
|
+ if (subordinate) {
|
|
|
searchParams.put("companyCode", companyInfo.getCode() + "%");
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
searchParams.put("companyCode", companyInfo.getCode());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (com.jpsoft.shinestar.modules.common.utils.StringUtils.isNotEmpty(hqCompanyId)){
|
|
|
- if("hq1".equals(hqCompanyId)){
|
|
|
+ if (com.jpsoft.shinestar.modules.common.utils.StringUtils.isNotEmpty(hqCompanyId)) {
|
|
|
+ if ("hq1".equals(hqCompanyId)) {
|
|
|
//后勤1
|
|
|
searchParams.put("hqStatus", "1");
|
|
|
- }
|
|
|
- else if("hq2".equals(hqCompanyId)){
|
|
|
+ } else if ("hq2".equals(hqCompanyId)) {
|
|
|
//后勤2
|
|
|
searchParams.put("hqStatus", "2");
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
CompanyInfo companyInfo = companyInfoService.get(hqCompanyId);
|
|
|
|
|
|
if (hqSubordinate) {
|
|
@@ -324,7 +323,7 @@ public class YearRequestForLeaveInfoController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- searchParams.put("hqPerson",true);
|
|
|
+ searchParams.put("hqPerson", true);
|
|
|
}
|
|
|
|
|
|
searchParams.put("pageIndex", pageIndex);
|
|
@@ -335,11 +334,11 @@ public class YearRequestForLeaveInfoController {
|
|
|
List<Map> mapList = new ArrayList<>();
|
|
|
|
|
|
for (YearRequestForLeaveInfo target : page) {
|
|
|
- Map<String,Object> map = new HashMap<>();
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
|
map.put("id", target.getId());
|
|
|
|
|
|
- map.put("faceImageUrl",target.getFaceImageUrl());
|
|
|
+ map.put("faceImageUrl", target.getFaceImageUrl());
|
|
|
map.put("name", target.getStudentName());
|
|
|
|
|
|
map.put("statusN", target.getStatusN());
|
|
@@ -359,40 +358,38 @@ public class YearRequestForLeaveInfoController {
|
|
|
|
|
|
String startTimeQuantum = "上午";
|
|
|
|
|
|
- if("1".equals(target.getStartTimeQuantum())){
|
|
|
+ if ("1".equals(target.getStartTimeQuantum())) {
|
|
|
startTimeQuantum = "下午";
|
|
|
}
|
|
|
|
|
|
String endTimeQuantum = "上午";
|
|
|
|
|
|
- if("1".equals(target.getEndTimeQuantum())){
|
|
|
+ if ("1".equals(target.getEndTimeQuantum())) {
|
|
|
endTimeQuantum = "下午";
|
|
|
}
|
|
|
|
|
|
- map.put("startTime",sdf1.format(target.getStartTime()));
|
|
|
- map.put("days",target.getDays());
|
|
|
+ map.put("startTime", sdf1.format(target.getStartTime()));
|
|
|
+ map.put("days", target.getDays());
|
|
|
|
|
|
- int days = differentDaysByMillisecond(target.getStartTime(),target.getEndTime());
|
|
|
+ int days = differentDaysByMillisecond(target.getStartTime(), target.getEndTime());
|
|
|
|
|
|
- if(days < 1) {
|
|
|
- if("0".equals(target.getStartTimeQuantum()) && "1".equals(target.getEndTimeQuantum())){
|
|
|
+ if (days < 1) {
|
|
|
+ if ("0".equals(target.getStartTimeQuantum()) && "1".equals(target.getEndTimeQuantum())) {
|
|
|
//请假一天
|
|
|
map.put("time", String.format("%s年%s", new DateTime(target.getStartTime()).getYear(),
|
|
|
sdf2.format(target.getStartTime())
|
|
|
));
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
//请假半天
|
|
|
map.put("time", String.format("%s年%s", new DateTime(target.getStartTime()).getYear(),
|
|
|
sdf2.format(target.getStartTime()) + startTimeQuantum
|
|
|
));
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
map.put("time", String.format("%s年%s至%s", new DateTime(target.getStartTime()).getYear(),
|
|
|
- sdf2.format(target.getStartTime())+ startTimeQuantum,
|
|
|
- sdf2.format(target.getEndTime())+ endTimeQuantum
|
|
|
+ sdf2.format(target.getStartTime()) + startTimeQuantum,
|
|
|
+ sdf2.format(target.getEndTime()) + endTimeQuantum
|
|
|
));
|
|
|
}
|
|
|
|
|
@@ -409,24 +406,23 @@ public class YearRequestForLeaveInfoController {
|
|
|
map.put("remark", target.getRemark());
|
|
|
|
|
|
//审批时间
|
|
|
- if(target.getUpdateTime()!=null) {
|
|
|
+ if (target.getUpdateTime() != null) {
|
|
|
map.put("updateTime", sdf1.format(target.getUpdateTime()));
|
|
|
}
|
|
|
|
|
|
map.put("approvalExplain", target.getApprovalExplain());
|
|
|
|
|
|
- if(target.getApprovedTime()!=null) {
|
|
|
+ if (target.getApprovedTime() != null) {
|
|
|
map.put("approvedTime", sdf1.format(target.getApprovedTime()));
|
|
|
}
|
|
|
|
|
|
mapList.add(map);
|
|
|
}
|
|
|
|
|
|
- if(exportFlag) {
|
|
|
+ if (exportFlag) {
|
|
|
String filePath = exportXls(mapList);
|
|
|
messageResult.setData(filePath);
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
Map<String, Object> dataMap = PojoUtils.pageWrapper(page);
|
|
|
dataMap.put("data", mapList);
|
|
|
messageResult.setData(dataMap);
|
|
@@ -444,13 +440,13 @@ public class YearRequestForLeaveInfoController {
|
|
|
|
|
|
/**
|
|
|
* 通过时间秒毫秒数判断两个时间的间隔
|
|
|
+ *
|
|
|
* @param date1
|
|
|
* @param date2
|
|
|
* @return
|
|
|
*/
|
|
|
- public int differentDaysByMillisecond(Date date1,Date date2)
|
|
|
- {
|
|
|
- int days = (int) ((date2.getTime() - date1.getTime()) / (1000*3600*24));
|
|
|
+ public int differentDaysByMillisecond(Date date1, Date date2) {
|
|
|
+ int days = (int) ((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24));
|
|
|
return days;
|
|
|
}
|
|
|
|
|
@@ -464,32 +460,32 @@ public class YearRequestForLeaveInfoController {
|
|
|
//表头
|
|
|
Row rowTitle = sheet.createRow(0);
|
|
|
|
|
|
- String[] titles = new String[]{"序号","申请时间","姓名","身份证号","所属单位",
|
|
|
- "审批人","审批状态","年假时间","请假天数","请假事由","审核意见","审核时间"};
|
|
|
+ String[] titles = new String[]{"序号", "申请时间", "姓名", "身份证号", "所属单位",
|
|
|
+ "审批人", "审批状态", "年假时间", "请假天数", "请假事由", "审核意见", "审核时间"};
|
|
|
|
|
|
- for (int i=0;i<titles.length;i++) {
|
|
|
+ for (int i = 0; i < titles.length; i++) {
|
|
|
Cell cell = rowTitle.createCell(i);
|
|
|
cell.setCellValue(titles[i]);
|
|
|
}
|
|
|
|
|
|
- for (int i=0;i<mapList.size();i++){
|
|
|
- Map<String,Object> map = mapList.get(i);
|
|
|
+ for (int i = 0; i < mapList.size(); i++) {
|
|
|
+ Map<String, Object> map = mapList.get(i);
|
|
|
|
|
|
- Row row = sheet.createRow(i+1);
|
|
|
+ Row row = sheet.createRow(i + 1);
|
|
|
|
|
|
int colIndex = 0;
|
|
|
- row.createCell(colIndex++).setCellValue(i+1);
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("createTime"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("name"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("idCard"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("className"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("approvedName"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("statusN"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("time"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("days"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("reason"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("remark"),""));
|
|
|
- row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("updateTime"),""));
|
|
|
+ row.createCell(colIndex++).setCellValue(i + 1);
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("createTime"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("name"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("idCard"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("className"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("approvedName"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("statusN"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("time"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("days"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("reason"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("remark"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("updateTime"), ""));
|
|
|
}
|
|
|
|
|
|
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
|
@@ -500,10 +496,9 @@ public class YearRequestForLeaveInfoController {
|
|
|
byte[] buffer = output.toByteArray();
|
|
|
ByteArrayInputStream input = new ByteArrayInputStream(buffer);
|
|
|
|
|
|
- downloadUrl = OSSUtil.upload(ossConfig,"requestForLeave","请假记录.xls",input);
|
|
|
- }
|
|
|
- catch (Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ downloadUrl = OSSUtil.upload(ossConfig, "requestForLeave", "请假记录.xls", input);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
}
|
|
|
|
|
|
return downloadUrl;
|