Commit dddd0bca authored by dll's avatar dll
parents 98d7c875 b8c7d98c
...@@ -120,8 +120,7 @@ ...@@ -120,8 +120,7 @@
<groupId>com.hikvision.ga</groupId> <groupId>com.hikvision.ga</groupId>
<artifactId>artemis-http-client</artifactId> <artifactId>artemis-http-client</artifactId>
<version>1.1.8</version> <version>1.1.8</version>
<scope>system</scope> <!--<systemPath>${project.basedir}/src/main/resources/lib/artemis-http-client-1.1.8.jar</systemPath>-->
<systemPath>${project.basedir}/src/main/resources/lib/artemis-http-client-1.1.8.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -46,4 +46,9 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{ ...@@ -46,4 +46,9 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* 正式 * 正式
* */ * */
int queryFormal(); int queryFormal();
/**
* 兼职
* */
int queryConcurrently();
} }
...@@ -48,4 +48,9 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement ...@@ -48,4 +48,9 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
return this.getSqlSession().selectOne(this.getSqlId("queryFormal")); 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 { ...@@ -17,4 +17,6 @@ public class StaffInfoVo {
private Integer formalStaff; private Integer formalStaff;
//待离职 //待离职
private Integer resignationStaff; private Integer resignationStaff;
//兼职
private Integer concurrentlyStaff;
} }
...@@ -37,12 +37,19 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -37,12 +37,19 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
@Override @Override
public StaffInfoVo queryAll() { public StaffInfoVo queryAll() {
StaffInfoVo staffInfoVo = new StaffInfoVo(); StaffInfoVo staffInfoVo = new StaffInfoVo();
//在职
staffInfoVo.setInWorkStaff(staffDao.queryInWork()); staffInfoVo.setInWorkStaff(staffDao.queryInWork());
//全职
staffInfoVo.setFullStaff(staffDao.queryFull()); staffInfoVo.setFullStaff(staffDao.queryFull());
//有值 //正式
staffInfoVo.setFormalStaff(staffDao.queryFormal()); staffInfoVo.setFormalStaff(staffDao.queryFormal());
//兼职
staffInfoVo.setConcurrentlyStaff(staffDao.queryConcurrently());
//试用
staffInfoVo.setOnTrialStaff(staffDao.queryOnTrial()); staffInfoVo.setOnTrialStaff(staffDao.queryOnTrial());
//实习
staffInfoVo.setPricateStaff(staffDao.queryPricate()); staffInfoVo.setPricateStaff(staffDao.queryPricate());
//待离职
staffInfoVo.setResignationStaff(staffLeaveDao.queryResignation()); staffInfoVo.setResignationStaff(staffLeaveDao.queryResignation());
return staffInfoVo; return staffInfoVo;
} }
......
...@@ -4,6 +4,8 @@ import com.mortals.framework.exception.AppException; ...@@ -4,6 +4,8 @@ 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.StaffInfoVo; import com.mortals.xhx.module.staff.model.vo.StaffInfoVo;
...@@ -13,9 +15,10 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,9 +15,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.ArrayList;
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;
/** /**
* *
* 员工基本信息 * 员工基本信息
...@@ -29,6 +32,8 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -29,6 +32,8 @@ 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( "员工基本信息");
...@@ -40,6 +45,7 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -40,6 +45,7 @@ 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);
} }
...@@ -53,7 +59,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -53,7 +59,6 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
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 员工信息统计--员工关系统计 //todo 员工信息统计--员工关系统计
StaffInfoVo staffInfoVo = this.service.queryAll(); StaffInfoVo staffInfoVo = this.service.queryAll();
System.out.println("ssss"+staffInfoVo);
model.put("staff", staffInfoVo); model.put("staff", staffInfoVo);
return super.doListAfter(query, model, context); return super.doListAfter(query, model, context);
} }
...@@ -64,12 +69,14 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -64,12 +69,14 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
//todo 员工统计信息 //todo 员工统计信息
List<HolidayListVo> holidayListVos = new ArrayList<>(); List<HolidayListVo> holidayListVos = new ArrayList<>();
HolidayListVo vo =new HolidayListVo(); HolidayListVo vo =new HolidayListVo();
vo.setWorkName("测试");
vo.setWorkStatus("正式"); StaffEntity staffEntity = this.service.get(id);
vo.setWorkDept("技术部门"); vo.setWorkName(staffEntity.getName());
vo.setWorkStatus(String.valueOf(staffEntity.getStatus()));
vo.setWorkDept(staffEntity.getDeptName());
vo.setWorkLimit("1003"); vo.setWorkLimit("1003");
vo.setWorkBeginDay(new Date(2020-03-01)); vo.setWorkBeginDay(staffEntity.getEntryDate());
vo.setWorkFormalDay(new Date(2020-04-31)); vo.setWorkFormalDay(staffEntity.getRegularDate());
vo.setAttendanceCount("22"); vo.setAttendanceCount("22");
vo.setLeaveCount("2"); vo.setLeaveCount("2");
vo.setLateCount("1"); vo.setLateCount("1");
......
...@@ -1318,20 +1318,23 @@ ...@@ -1318,20 +1318,23 @@
</trim> </trim>
</if> </if>
</sql> </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 id="queryInWork" resultType="integer">
select count(1) inWorkStaff from mortals_xhx_staff where status <![CDATA[<>]]> 3 select count(1) inWorkStaff from mortals_xhx_staff where status <![CDATA[<>]]> 3
</select> </select>
<select id="queryFull" resultType="integer"> <select id="queryFull" resultType="integer">
select count(1) fullStaff from mortals_xhx_staff where staffType = 1 select count(1) fullStaff from mortals_xhx_staff where staffType = 1
</select> </select>
<select id="queryConcurrently" resultType="integer">
select count(1) concurrentlyStaff from mortals_xhx_staff where staffType = 2
</select>
<select id="queryPricate" resultType="integer"> <select id="queryPricate" resultType="integer">
select count(1) pricateStaff from mortals_xhx_staff where staffType = 3 select count(1) pricateStaff from mortals_xhx_staff where staffType = 3
</select> </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
...@@ -18,6 +18,7 @@ POST {{baseUrl}}/staff/list ...@@ -18,6 +18,7 @@ POST {{baseUrl}}/staff/list
Content-Type: application/json Content-Type: application/json
{ {
"phoneNumber": "%133%",
"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