Commit 020e1505 authored by daijunxiong's avatar daijunxiong

员工假期统计--个人花名册--假期 员工信息统计 --- 在职/离职

parent c16365fd
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
<profiles> <profiles>
<profile> <profile>
<id>develop</id> <id>develop</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties> <properties>
<profiles.active>develop</profiles.active> <profiles.active>develop</profiles.active>
<profiles.server.port>17500</profiles.server.port> <profiles.server.port>17500</profiles.server.port>
...@@ -36,6 +34,9 @@ ...@@ -36,6 +34,9 @@
</profile> </profile>
<profile> <profile>
<id>test</id> <id>test</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties> <properties>
<profiles.active>test</profiles.active> <profiles.active>test</profiles.active>
<profiles.server.port>17500</profiles.server.port> <profiles.server.port>17500</profiles.server.port>
......
...@@ -19,6 +19,7 @@ public class ManagerApplication extends BaseWebApplication { ...@@ -19,6 +19,7 @@ public class ManagerApplication extends BaseWebApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(ManagerApplication.class, args); SpringApplication.run(ManagerApplication.class, args);
System.out.println(123465);
} }
......
...@@ -218,9 +218,11 @@ public class ArtemisPostTest { ...@@ -218,9 +218,11 @@ public class ArtemisPostTest {
// System.out.println(VechicleDataResult); // System.out.println(VechicleDataResult);
String result = callPostApiGetPersonList(); // String result = callPostApiGetPersonList();
System.out.println(result); // System.out.println(result);
//callPostApiGetPersonList //callPostApiGetPersonList
String result = callPostApiGetDeptList();
System.out.println(result);
} }
......
...@@ -58,6 +58,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -58,6 +58,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity1.setDeptName(list.getOrgName()); staffEntity1.setDeptName(list.getOrgName());
staffEntity1.setDeptId(Long.valueOf(list.getOrgIndexCode())); staffEntity1.setDeptId(Long.valueOf(list.getOrgIndexCode()));
staffEntity1.setDeptName(list.getOrgName()); staffEntity1.setDeptName(list.getOrgName());
staffEntity1.setSource(1);
if (list.getBirthday()!=null){ if (list.getBirthday()!=null){
staffEntity1.setBirthday((Date) list.getBirthday()); staffEntity1.setBirthday((Date) list.getBirthday());
} }
...@@ -74,8 +75,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -74,8 +75,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
if (staffEntity.getRemark().equals(list.getPersonId())) { if (staffEntity.getRemark().equals(list.getPersonId())) {
//执行修改 //执行修改
staffEntity.setName(list.getPersonName()); staffEntity.setName(list.getPersonName());
staffEntity.setRemark(list.getPersonId());
staffEntity.setPhotoPath(list.getPersonPhoto().getPicUri()); staffEntity.setPhotoPath(list.getPersonPhoto().getPicUri());
staffEntity.setDeptName(list.getOrgName()); staffEntity.setDeptName(list.getOrgName());
staffEntity.setDeptId(Long.valueOf(list.getOrgIndexCode()));
staffEntity.setDeptName(list.getOrgName());
staffEntity.setSource(1);
if (list.getBirthday()==null && staffEntity.getBirthday()!=null){
staffEntity.setBirthday(staffEntity.getBirthday());
}
if (list.getPhoneNo()!=null && staffEntity.getPhoneNumber()!=null){
staffEntity1.setPhoneNumber(staffEntity.getPhoneNumber());
}
staffDao.update(staffEntity); staffDao.update(staffEntity);
} }
for (ListItem item :personHikData.getList()){ for (ListItem item :personHikData.getList()){
......
package com.mortals.xhx.module.attendance.service.impl; package com.mortals.xhx.module.attendance.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.attendance.dao.AttendanceClassDao; import com.mortals.xhx.module.attendance.dao.AttendanceClassDao;
import com.mortals.xhx.module.attendance.model.AttendanceClassEntity;
import com.mortals.xhx.module.attendance.service.AttendanceClassService;
import org.springframework.beans.factory.annotation.Autowired;
import com.mortals.xhx.module.attendance.model.AttendanceClassDetailEntity; import com.mortals.xhx.module.attendance.model.AttendanceClassDetailEntity;
import com.mortals.xhx.module.attendance.model.AttendanceClassDetailQuery; import com.mortals.xhx.module.attendance.model.AttendanceClassDetailQuery;
import com.mortals.xhx.module.attendance.model.AttendanceClassEntity;
import com.mortals.xhx.module.attendance.service.AttendanceClassDetailService; import com.mortals.xhx.module.attendance.service.AttendanceClassDetailService;
import com.mortals.xhx.module.attendance.service.AttendanceClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
......
...@@ -24,7 +24,8 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements ...@@ -24,7 +24,8 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements
@Override @Override
public List<DeptEntity> queryAllList() { public List<DeptEntity> queryAllList() {
return null;
return this.getList(new DeptEntity());
} }
} }
...@@ -21,4 +21,29 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{ ...@@ -21,4 +21,29 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* */ * */
List<StaffEntity> queryAllList(); List<StaffEntity> queryAllList();
/**
* 所有在职员工
* */
int queryInWork();
/**
* 在职
* */
int queryFull();
/**
* 实习
* */
int queryPricate();
/**
* 试用
* */
int queryOnTrial();
/**
* 正式
* */
int queryFormal();
} }
...@@ -2,7 +2,6 @@ package com.mortals.xhx.module.staff.dao; ...@@ -2,7 +2,6 @@ package com.mortals.xhx.module.staff.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.staff.model.StaffLeaveEntity; import com.mortals.xhx.module.staff.model.StaffLeaveEntity;
import java.util.List;
/** /**
* 员工离职信息Dao * 员工离职信息Dao
* 员工离职信息 DAO接口 * 员工离职信息 DAO接口
...@@ -13,5 +12,8 @@ import java.util.List; ...@@ -13,5 +12,8 @@ import java.util.List;
public interface StaffLeaveDao extends ICRUDDao<StaffLeaveEntity,Long>{ public interface StaffLeaveDao extends ICRUDDao<StaffLeaveEntity,Long>{
/**
* 待离职
* */
int queryResignation();
} }
...@@ -19,6 +19,33 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement ...@@ -19,6 +19,33 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
@Override @Override
public List<StaffEntity> queryAllList() { public List<StaffEntity> queryAllList() {
return null; return this.getList(new StaffEntity());
} }
@Override
public int queryInWork() {
return this.getSqlSession().selectOne(this.getSqlId("queryInWork"));
}
@Override
public int queryFull() {
return this.getSqlSession().selectOne(this.getSqlId("queryFull"));
}
@Override
public int queryPricate() {
return this.getSqlSession().selectOne(this.getSqlId("queryPricate"));
}
@Override
public int queryOnTrial() {
return this.getSqlSession().selectOne(this.getSqlId("queryOnTrial"));
}
@Override
public int queryFormal() {
return this.getSqlSession().selectOne(this.getSqlId("queryFormal"));
}
} }
package com.mortals.xhx.module.staff.dao.ibatis; package com.mortals.xhx.module.staff.dao.ibatis;
import org.springframework.stereotype.Repository; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.module.staff.dao.StaffLeaveDao; import com.mortals.xhx.module.staff.dao.StaffLeaveDao;
import com.mortals.xhx.module.staff.model.StaffLeaveEntity; import com.mortals.xhx.module.staff.model.StaffLeaveEntity;
import java.util.Date; import org.springframework.stereotype.Repository;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/** /**
* 员工离职信息DaoImpl DAO接口 * 员工离职信息DaoImpl DAO接口
* *
...@@ -17,5 +15,8 @@ import java.util.List; ...@@ -17,5 +15,8 @@ import java.util.List;
public class StaffLeaveDaoImpl extends BaseCRUDDaoMybatis<StaffLeaveEntity,Long> implements StaffLeaveDao { public class StaffLeaveDaoImpl extends BaseCRUDDaoMybatis<StaffLeaveEntity,Long> implements StaffLeaveDao {
@Override
public int queryResignation() {
return this.getSqlSession().selectOne(this.getSqlId("queryResignation"));
}
} }
package com.mortals.xhx.module.staff.model.vo;
import lombok.Data;
@Data
public class StaffInfoVo {
//在职员工
private Integer inWorkStaff;
//全职
private Integer fullStaff;
//实习
private Integer pricateStaff;
//试用
private Integer onTrialStaff;
//正式
private Integer formalStaff;
//待离职
private Integer resignationStaff;
}
...@@ -15,4 +15,6 @@ public class StaffVo extends BaseEntityLong { ...@@ -15,4 +15,6 @@ public class StaffVo extends BaseEntityLong {
private List <Long> idList; private List <Long> idList;
private List<HolidayListVo> holidayLists; private List<HolidayListVo> holidayLists;
private List<StaffInfoVo>staffInfoVos;
} }
\ No newline at end of file
package com.mortals.xhx.module.staff.model.vo;
import lombok.Data;
@Data
public class holidayInfoVo {
//调休
//private Integer
}
package com.mortals.xhx.module.staff.service; package com.mortals.xhx.module.staff.service;
import com.mortals.framework.service.ICRUDCacheService; import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
/** /**
* StaffService * StaffService
* *
...@@ -12,4 +13,5 @@ import com.mortals.xhx.module.staff.model.StaffEntity; ...@@ -12,4 +13,5 @@ import com.mortals.xhx.module.staff.model.StaffEntity;
*/ */
public interface StaffService extends ICRUDCacheService<StaffEntity,Long> { public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
StaffInfoVo queryAll();
} }
\ No newline at end of file
package com.mortals.xhx.module.staff.service.impl; package com.mortals.xhx.module.staff.service.impl;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.staff.dao.StaffDao; import com.mortals.xhx.module.staff.dao.StaffDao;
import com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl;
import com.mortals.xhx.module.staff.dao.ibatis.StaffLeaveDaoImpl;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/** /**
* StaffService * StaffService
* 员工基本信息 service实现 * 员工基本信息 service实现
* *
* @author zxfei * @author zxfei
* @date 2023-04-07 * @date 2023-04-07
*/ */
@Service("staffService") @Service("staffService")
public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, StaffEntity, Long> implements StaffService { public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, StaffEntity, Long> implements StaffService {
@Override @Autowired
protected String getExtKey(StaffEntity data) { private StaffDaoImpl staffDao;
@Autowired
private StaffLeaveDaoImpl staffLeaveDao;
@Override
protected String getExtKey(StaffEntity data) {
//工号作为redis 扩展key //工号作为redis 扩展key
return data.getWorkNum(); return data.getWorkNum();
} }
@Override
public StaffInfoVo queryAll() {
StaffInfoVo staffInfoVo = new StaffInfoVo();
staffInfoVo.setInWorkStaff(staffDao.queryInWork());
staffInfoVo.setFullStaff(staffDao.queryFull());
//有值
staffInfoVo.setFormalStaff(staffDao.queryFormal());
staffInfoVo.setOnTrialStaff(staffDao.queryOnTrial());
staffInfoVo.setPricateStaff(staffDao.queryPricate());
staffInfoVo.setResignationStaff(staffLeaveDao.queryResignation());
return staffInfoVo;
}
} }
\ No newline at end of file
...@@ -4,11 +4,9 @@ import com.mortals.framework.exception.AppException; ...@@ -4,11 +4,9 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.job.model.JobQuery;
import com.mortals.xhx.module.job.service.JobService;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.vo.HolidayListVo; import com.mortals.xhx.module.staff.model.vo.HolidayListVo;
import com.mortals.xhx.module.staff.model.vo.StaffVo; import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -18,8 +16,6 @@ import java.util.ArrayList; ...@@ -18,8 +16,6 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* *
* 员工基本信息 * 员工基本信息
...@@ -33,8 +29,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -33,8 +29,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private JobService jobService;
public StaffController(){ public StaffController(){
super.setModuleDesc( "员工基本信息"); super.setModuleDesc( "员工基本信息");
...@@ -46,7 +40,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -46,7 +40,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
this.addDict(model, "politicalstatus", paramService.getParamBySecondOrganize("Staff","politicalstatus")); this.addDict(model, "politicalstatus", paramService.getParamBySecondOrganize("Staff","politicalstatus"));
this.addDict(model, "staffType", paramService.getParamBySecondOrganize("Staff","staffType")); this.addDict(model, "staffType", paramService.getParamBySecondOrganize("Staff","staffType"));
this.addDict(model, "status", paramService.getParamBySecondOrganize("Staff","status")); this.addDict(model, "status", paramService.getParamBySecondOrganize("Staff","status"));
this.addDict(model, "positionId", jobService.find(new JobQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(),y->y.getJobName(),(o,n)->n)));
super.init(model, context); super.init(model, context);
} }
...@@ -58,12 +51,10 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -58,12 +51,10 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Override @Override
protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException { protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException {
//todo 员工信息统计--员工关系统计
// StaffInfoVo staffInfoVo = this.service.queryAll();
model.put("stat",new StaffVo()); System.out.println("ssss"+staffInfoVo);
model.put("staff", staffInfoVo);
return super.doListAfter(query, model, context); return super.doListAfter(query, model, context);
} }
...@@ -96,6 +87,4 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -96,6 +87,4 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
return super.infoAfter(id, model, entity, context); return super.infoAfter(id, model, entity, context);
} }
} }
\ No newline at end of file
...@@ -1258,4 +1258,7 @@ ...@@ -1258,4 +1258,7 @@
</trim> </trim>
</if> </if>
</sql> </sql>
<select id="queryResignation" resultType="integer">
select count(1) resignationStaff from mortals_xhx_staff_leave where auditStatus = 1
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -1318,4 +1318,20 @@ ...@@ -1318,4 +1318,20 @@
</trim> </trim>
</if> </if>
</sql> </sql>
<select id="queryInWork" resultType="integer">
select count(1) inWorkStaff from mortals_xhx_staff where status <![CDATA[<>]]> 3
</select>
<select id="queryFull" resultType="integer">
select count(1) fullStaff from mortals_xhx_staff where staffType = 1
</select>
<select id="queryPricate" resultType="integer">
select count(1) pricateStaff from mortals_xhx_staff where staffType = 3
</select>
<select id="queryOnTrial" resultType="integer">
select count(1) onTrialStaff from mortals_xhx_staff where status = 2
</select>
<select id="queryFormal" resultType="integer">
select count(1) formalStaff from mortals_xhx_staff where status = 1
</select>
</mapper> </mapper>
\ No newline at end of file
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###职位信息列表
POST {{baseUrl}}/job/list
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
###职位信息更新与保存
POST {{baseUrl}}/job/save
Authorization: {{authToken}}
Content-Type: application/json
{
"groupId":243,
"groupName":"2g2sug",
"jobCode":"p0m3o4",
"jobName":"3dnfdt",
"remark":"brj4yu",
}
> {%
client.global.set("Job_id", JSON.parse(response.body).data.id);
%}
###职位信息查看
GET {{baseUrl}}/job/info?id={{Job_id}}
Authorization: {{authToken}}
Accept: application/json
###职位信息编辑
GET {{baseUrl}}/job/edit?id={{Job_id}}
Authorization: {{authToken}}
Accept: application/json
###职位信息删除
GET {{baseUrl}}/job/delete?id={{Job_id}}
Authorization: {{authToken}}
Accept: application/json
...@@ -18,7 +18,6 @@ POST {{baseUrl}}/staff/list ...@@ -18,7 +18,6 @@ POST {{baseUrl}}/staff/list
Content-Type: application/json Content-Type: application/json
{ {
"idList": [1,3],
"page":1, "page":1,
"size":10 "size":10
} }
......
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