|
|
@@ -62,6 +62,35 @@ public class STKServiceImpl implements STKService {
|
|
|
return Result.success(map);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Result getEmployeeList(ProductPageDTO productPageDTO) {
|
|
|
+ int pageNum = 1;
|
|
|
+ int pageSize = 20;
|
|
|
+ if (productPageDTO !=null){
|
|
|
+ pageNum = Integer.valueOf(productPageDTO.getPageNum());
|
|
|
+ pageSize = Integer.valueOf(productPageDTO.getPageSize());
|
|
|
+ }else{
|
|
|
+ return Result.error("参数错误!");
|
|
|
+ }
|
|
|
+ int start = ((pageNum - 1) * pageSize + 1);
|
|
|
+ int end = pageNum * pageSize;
|
|
|
+
|
|
|
+ List<EmployeeDTO> employeeDTOS = baseDao.query("select em_code,em_name,em_sex,em_depart,em_defaultorname,em_position,em_cscode,em_cop,em_class,em_status,em_type,em_mobile,em_id,em_indate,em_recorder,em_departmentcode,em_defaultorcode,em_qywx,em_password from employee where em_class<>'离职' and em_statuscode='AUDITED' order by em_id desc) AA ) where rn>="+start+" and rn<="+end , EmployeeDTO.class);
|
|
|
+
|
|
|
+ if (employeeDTOS.size() == 0 ){
|
|
|
+ return Result.error("员工资料无数据!");
|
|
|
+ }
|
|
|
+ int count = baseDao.getCount("select count(1) from employee where em_class<>'离职' and em_statuscode='AUDITED'");
|
|
|
+
|
|
|
+ List<EmployeeResp> employeeResps = EmployeeConvertor.toEmployeeRespListByEmployeeDTOS(employeeDTOS);
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
+ map.put("pageNum", pageNum);
|
|
|
+ map.put("pageSize", pageSize);
|
|
|
+ map.put("size", count);
|
|
|
+ map.put("list", employeeResps);
|
|
|
+ return Result.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Result getProduct(HttpServletRequest request, ProductReq req) {
|
|
|
String code = req.getCode();
|