Commit 0307763d authored by daijunxiong's avatar daijunxiong

修改员工统计信息

parent 79aa82eb
......@@ -46,4 +46,9 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* 正式
* */
int queryFormal();
/**
* 兼职
* */
int queryConcurrently();
}
......@@ -48,4 +48,9 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
return this.getSqlSession().selectOne(this.getSqlId("queryFormal"));
}
@Override
public int queryConcurrently() {
return this.getSqlSession().selectOne(this.getSqlId("queryConcurrently"));
}
}
......@@ -17,4 +17,6 @@ public class StaffInfoVo {
private Integer formalStaff;
//待离职
private Integer resignationStaff;
//兼职
private Integer concurrentlyStaff;
}
......@@ -37,12 +37,19 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
@Override
public StaffInfoVo queryAll() {
StaffInfoVo staffInfoVo = new StaffInfoVo();
//在职
staffInfoVo.setInWorkStaff(staffDao.queryInWork());
//全职
staffInfoVo.setFullStaff(staffDao.queryFull());
//有值
//正式
staffInfoVo.setFormalStaff(staffDao.queryFormal());
//兼职
staffInfoVo.setConcurrentlyStaff(staffDao.queryConcurrently());
//试用
staffInfoVo.setOnTrialStaff(staffDao.queryOnTrial());
//实习
staffInfoVo.setPricateStaff(staffDao.queryPricate());
//待离职
staffInfoVo.setResignationStaff(staffLeaveDao.queryResignation());
return staffInfoVo;
}
......
......@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
......@@ -53,7 +52,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException {
//todo 员工信息统计--员工关系统计
StaffInfoVo staffInfoVo = this.service.queryAll();
System.out.println("ssss"+staffInfoVo);
model.put("staff", staffInfoVo);
return super.doListAfter(query, model, context);
}
......@@ -64,12 +62,14 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
//todo 员工统计信息
List<HolidayListVo> holidayListVos = new ArrayList<>();
HolidayListVo vo =new HolidayListVo();
vo.setWorkName("测试");
vo.setWorkStatus("正式");
vo.setWorkDept("技术部门");
StaffEntity staffEntity = this.service.get(id);
vo.setWorkName(staffEntity.getName());
vo.setWorkStatus(String.valueOf(staffEntity.getStatus()));
vo.setWorkDept(staffEntity.getDeptName());
vo.setWorkLimit("1003");
vo.setWorkBeginDay(new Date(2020-03-01));
vo.setWorkFormalDay(new Date(2020-04-31));
vo.setWorkBeginDay(staffEntity.getEntryDate());
vo.setWorkFormalDay(staffEntity.getRegularDate());
vo.setAttendanceCount("22");
vo.setLeaveCount("2");
vo.setLateCount("1");
......
......@@ -1318,20 +1318,23 @@
</trim>
</if>
</sql>
<select id="queryFormal" resultType="integer">
select count(1) formalStaff from mortals_xhx_staff where status = 1
</select>
<select id="queryOnTrial" resultType="integer">
select count(1) onTrialStaff from mortals_xhx_staff where status = 2
</select>
<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="queryConcurrently" resultType="integer">
select count(1) concurrentlyStaff from mortals_xhx_staff where staffType = 2
</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
......@@ -18,6 +18,7 @@ POST {{baseUrl}}/staff/list
Content-Type: application/json
{
"phoneNumber": "%133%",
"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