Commit 1c704a11 authored by mengbali153's avatar mengbali153

培训计划导出修改

parent df0c56af
...@@ -149,9 +149,9 @@ public class PlanTrainingController { ...@@ -149,9 +149,9 @@ public class PlanTrainingController {
@ApiOperation("培训计划导出") @ApiOperation("培训计划导出")
@PostMapping("/exportList") @PostMapping("/exportList")
public void exportList(String filename, String objective, HttpServletResponse response) { public void exportList(String filename,HttpServletResponse response) {
try { try {
iplanTrainingService.exportList(filename, objective, response); iplanTrainingService.exportList(filename,response);
} catch (Exception e) { } catch (Exception e) {
log.debug("培训计划导出{}", e); log.debug("培训计划导出{}", e);
} }
......
...@@ -91,6 +91,6 @@ public interface IPlanTrainingService extends IService<PlanTraining> { ...@@ -91,6 +91,6 @@ public interface IPlanTrainingService extends IService<PlanTraining> {
* @param filename 文件名 * @param filename 文件名
* @param response * @param response
*/ */
void exportList(String filename, String objective, HttpServletResponse response); void exportList(String filename,HttpServletResponse response);
} }
...@@ -325,9 +325,9 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla ...@@ -325,9 +325,9 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
} }
@Override @Override
public void exportList(String filename, String objective, HttpServletResponse response) { public void exportList(String filename,HttpServletResponse response) {
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("objective", objective); // params.put("objective", objective);
List<Map<String, Object>> list = planTrainingMapper.exportList(params); List<Map<String, Object>> list = planTrainingMapper.exportList(params);
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
...@@ -351,7 +351,11 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla ...@@ -351,7 +351,11 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
if (j == 0 && obj != null) { if (j == 0 && obj != null) {
obj = obj.split("\\.")[0]; obj = obj.split("\\.")[0];
} }
objects[j] = obj; objects[j] = obj;
if (StringUtils.isEmpty(obj)){
objects[j]= "———";
}
} }
datas.add(objects); datas.add(objects);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment