Commit 79aa82eb authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 1464f6d0 020e1505
......@@ -17,9 +17,7 @@
<profiles>
<profile>
<id>develop</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profiles.active>develop</profiles.active>
<profiles.server.port>17500</profiles.server.port>
......@@ -36,6 +34,9 @@
</profile>
<profile>
<id>test</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profiles.active>test</profiles.active>
<profiles.server.port>17500</profiles.server.port>
......
......@@ -19,6 +19,7 @@ public class ManagerApplication extends BaseWebApplication {
public static void main(String[] args) {
SpringApplication.run(ManagerApplication.class, args);
System.out.println(123465);
}
......
......@@ -218,9 +218,11 @@ public class ArtemisPostTest {
// System.out.println(VechicleDataResult);
String result = callPostApiGetPersonList();
System.out.println(result);
// String result = callPostApiGetPersonList();
// System.out.println(result);
//callPostApiGetPersonList
String result = callPostApiGetDeptList();
System.out.println(result);
}
......
......@@ -58,6 +58,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity1.setDeptName(list.getOrgName());
staffEntity1.setDeptId(Long.valueOf(list.getOrgIndexCode()));
staffEntity1.setDeptName(list.getOrgName());
staffEntity1.setSource(1);
if (list.getBirthday()!=null){
staffEntity1.setBirthday((Date) list.getBirthday());
}
......@@ -74,8 +75,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
if (staffEntity.getRemark().equals(list.getPersonId())) {
//执行修改
staffEntity.setName(list.getPersonName());
staffEntity.setRemark(list.getPersonId());
staffEntity.setPhotoPath(list.getPersonPhoto().getPicUri());
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);
}
for (ListItem item :personHikData.getList()){
......
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.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
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.AttendanceClassDetailQuery;
import com.mortals.xhx.module.attendance.model.AttendanceClassEntity;
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 java.util.Arrays;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
......
......@@ -24,7 +24,8 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements
@Override
public List<DeptEntity> queryAllList() {
return null;
return this.getList(new DeptEntity());
}
}
......@@ -21,4 +21,29 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* */
List<StaffEntity> queryAllList();
/**
* 所有在职员工
* */
int queryInWork();
/**
* 在职
* */
int queryFull();
/**
* 实习
* */
int queryPricate();
/**
* 试用
* */
int queryOnTrial();
/**
* 正式
* */
int queryFormal();
}
......@@ -2,7 +2,6 @@ package com.mortals.xhx.module.staff.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.staff.model.StaffLeaveEntity;
import java.util.List;
/**
* 员工离职信息Dao
* 员工离职信息 DAO接口
......@@ -13,5 +12,8 @@ import java.util.List;
public interface StaffLeaveDao extends ICRUDDao<StaffLeaveEntity,Long>{
/**
* 待离职
* */
int queryResignation();
}
......@@ -19,6 +19,33 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
@Override
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;
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.model.StaffLeaveEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
import org.springframework.stereotype.Repository;
/**
* 员工离职信息DaoImpl DAO接口
*
......@@ -17,5 +15,8 @@ import java.util.List;
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 {
private List <Long> idList;
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;
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.vo.StaffInfoVo;
/**
* StaffService
*
......@@ -12,4 +13,5 @@ import com.mortals.xhx.module.staff.model.StaffEntity;
*/
public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
StaffInfoVo queryAll();
}
\ No newline at end of file
package com.mortals.xhx.module.staff.service.impl;
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.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.vo.StaffInfoVo;
import com.mortals.xhx.module.staff.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* StaffService
* 员工基本信息 service实现
*
* @author zxfei
* @date 2023-04-07
*/
* StaffService
* 员工基本信息 service实现
*
* @author zxfei
* @date 2023-04-07
*/
@Service("staffService")
public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, StaffEntity, Long> implements StaffService {
@Override
protected String getExtKey(StaffEntity data) {
@Autowired
private StaffDaoImpl staffDao;
@Autowired
private StaffLeaveDaoImpl staffLeaveDao;
@Override
protected String getExtKey(StaffEntity data) {
//工号作为redis 扩展key
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;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
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.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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -18,8 +16,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
*
* 员工基本信息
......@@ -33,8 +29,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Autowired
private ParamService paramService;
@Autowired
private JobService jobService;
public StaffController(){
super.setModuleDesc( "员工基本信息");
......@@ -46,7 +40,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
this.addDict(model, "politicalstatus", paramService.getParamBySecondOrganize("Staff","politicalstatus"));
this.addDict(model, "staffType", paramService.getParamBySecondOrganize("Staff","staffType"));
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);
}
......@@ -58,12 +51,10 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Override
protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException {
//
model.put("stat",new StaffVo());
//todo 员工信息统计--员工关系统计
StaffInfoVo staffInfoVo = this.service.queryAll();
System.out.println("ssss"+staffInfoVo);
model.put("staff", staffInfoVo);
return super.doListAfter(query, model, context);
}
......@@ -96,6 +87,4 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
return super.infoAfter(id, model, entity, context);
}
}
\ No newline at end of file
......@@ -1258,4 +1258,7 @@
</trim>
</if>
</sql>
<select id="queryResignation" resultType="integer">
select count(1) resignationStaff from mortals_xhx_staff_leave where auditStatus = 1
</select>
</mapper>
\ No newline at end of file
......@@ -1318,4 +1318,20 @@
</trim>
</if>
</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>
\ 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
Content-Type: application/json
{
"idList": [1,3],
"page":1,
"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