Commit a2123942 authored by mengbali153's avatar mengbali153

能力管理--联调

历史档案--联调
非标产值--联调
parent 072f1fa2
......@@ -20,6 +20,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -116,26 +117,15 @@ public class SysUserController {
}
//待完成接口: 导出
// @ApiOperation("人员详情导出列表")
// @PostMapping("/exportList")
// public void exportList(Integer status,String filename,String name, HttpServletResponse response) {
// try {
// userService.exportList(status, filename,name, response);
// } catch (Exception e) {
// log.debug("人员详情导出列表{}", e);
// }
// }
}
......@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -24,4 +25,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
UserVo getById(Integer id);
// List<Map<String,Object>> exportList(@Param("params") Map<String,Object> params);
}
......@@ -39,12 +39,41 @@
</select>
<!-- <select id="exportList" resultType="java.util.HashMap">-->
<!-- SELECT-->
<!-- su.id as 序号,-->
<!-- su.username as 用户账号,-->
<!-- su.name as 真实姓名,-->
<!-- (-->
<!-- CASE su.sex-->
<!-- WHEN 0 THEN '女'-->
<!-- ELSE '男'-->
<!-- END-->
<!-- )as 性别,-->
<!-- su.group_id as 组别id,-->
<!-- su.post_id as 职务id,-->
<!-- su.wx_id as 微信号,-->
<!-- su.qualifications as 职称,-->
<!-- (-->
<!-- CASE su.status-->
<!-- WHEN 0 THEN '禁用'-->
<!-- ELSE '启用'-->
<!-- END-->
<!-- )as 状态,-->
<!-- su.work_year as 工作年限,-->
<!-- su.phone as 手机号,-->
<!-- su.fax as 传真,-->
<!-- su.major as 专业,-->
<!-- su.email as 邮箱,-->
<!-- su.technology_date as 从事本技术领域日期,-->
<!-- su.technology_year as 从事本技术领域年限,-->
<!-- su.education as 文化程度,-->
<!-- su.create_time as 创建时间,-->
<!-- su.update_time as 修改时间,-->
<!-- su.remark as 备注-->
<!-- FROM sys_user su-->
<!-- <include refid="where" />-->
<!-- ORDER BY su.id ASC-->
<!-- </select>-->
</mapper>
......@@ -9,6 +9,8 @@ import cn.wise.sc.cement.business.model.vo.UserVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 服务类
......@@ -31,7 +33,14 @@ public interface ISysUserService extends IService<SysUser> {
BaseResponse<UserVo> findById(Integer id);
/**
* 人员详情列表导出
* @param status 状态
* @param filename 文件名
* @param name 姓名
* @param response
*/
// void exportList(Integer status,String filename,String name, HttpServletResponse response);
}
......@@ -13,10 +13,12 @@ import cn.wise.sc.cement.business.model.query.UserQuery;
import cn.wise.sc.cement.business.model.vo.ClientVo;
import cn.wise.sc.cement.business.model.vo.UserVo;
import cn.wise.sc.cement.business.service.ISysUserService;
import cn.wise.sc.cement.business.util.ExcelUtil;
import cn.wise.sc.cement.business.util.JwtUtil;
import cn.wise.sc.cement.business.util.RedisUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
......@@ -28,7 +30,9 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -185,19 +189,58 @@ public class UserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impleme
return BaseResponse.okData(userVo);
}
/**
* 人员详情列表导出
* @param status 状态
* @param name 姓名
* @return
*/
// @Override
// public void exportList(Integer status, String filename, String name, HttpServletResponse response) {
// Map<String, Object> params = new HashMap<>();
// params.put("status", status);
// params.put("name", name);
// List<Map<String, Object>> list= userMapper.exportList(params);
//
// if (!CollectionUtils.isEmpty(list)){
// Map<String,Object> map=list.get(0);
// String[] headers=new String[20];
// headers[0] = "序号";
// headers[1] = "用户账号";
// headers[2] = "真实姓名";
// headers[3] = "性别";
// headers[4] = "组别id";
// headers[5] = "职务id";
// headers[6] = "微信号";
// headers[7] = "职称";
// headers[8] = "状态";
// headers[9] = "工作年限";
// headers[10] = "手机号";
// headers[11] = "传真";
// headers[12] = "专业";
// headers[13] = "邮箱";
// headers[14] = "从事本技术领域日期";
// headers[15] = "从事本技术领域年限";
// headers[16] = "文化程度";
// headers[17] = "创建时间";
// headers[18] = "修改时间";
// headers[19] = "备注";
//
// List<Object[]> datas=new ArrayList<>(list.size());
// for (Map<String,Object>m:list){
// Object[] objects=new Object[headers.length];
// for (int j=0;j<headers.length;j++){
// String obj=m.get(headers[j])==null?"":m.get(headers[j]).toString();
// if (j==0 && obj!=null){
// obj=obj.split("\\.")[0];
// }
// objects[j] = obj;
// }
// datas.add(objects);
// }
// ExcelUtil.excelExport(
// filename==null || filename.trim().length() <= 0 ? "人员详情":filename ,headers, datas ,response);
// }
// }
}
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