Commit 8cdf50c4 authored by 赵啸非's avatar 赵啸非

修改用户同步逻辑

parent 1239f3fd
...@@ -165,7 +165,6 @@ export default { ...@@ -165,7 +165,6 @@ export default {
width: 100, width: 100,
formatter: row => { formatter: row => {
return ( return (
<div>
<el-switch <el-switch
value={row.status+""} value={row.status+""}
active-color="#13ce66" active-color="#13ce66"
...@@ -177,7 +176,6 @@ export default { ...@@ -177,7 +176,6 @@ export default {
}} }}
> >
</el-switch> </el-switch>
</div>
); );
} }
......
...@@ -30,8 +30,8 @@ import java.util.Map; ...@@ -30,8 +30,8 @@ import java.util.Map;
* @author: zxfei * @author: zxfei
* @date: 2022/4/20 9:24 * @date: 2022/4/20 9:24
*/ */
@Aspect //@Aspect
@Component //@Component
@Slf4j @Slf4j
@Order(1) @Order(1)
@Profile({"default", "develop", "test1"}) @Profile({"default", "develop", "test1"})
......
...@@ -138,7 +138,7 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService { ...@@ -138,7 +138,7 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService {
log.info("attRecords size:{}", attRecords.size()); log.info("attRecords size:{}", attRecords.size());
List<String> eventIds = attRecords.parallelStream().map(i -> i.getRemark()).collect(Collectors.toList()); List<String> eventIds = attRecords.parallelStream().filter(f->!ObjectUtils.isEmpty(f)&&!ObjectUtils.isEmpty(f.getRemark())).map(i -> i.getRemark()).collect(Collectors.toList());
//查询当天考勤记录是否有重复的 有的 则不添加 //查询当天考勤记录是否有重复的 有的 则不添加
AttendanceRecordHikQuery recordHikQuery = new AttendanceRecordHikQuery(); AttendanceRecordHikQuery recordHikQuery = new AttendanceRecordHikQuery();
......
...@@ -8,6 +8,7 @@ import com.mortals.xhx.module.job.model.JobEntity; ...@@ -8,6 +8,7 @@ import com.mortals.xhx.module.job.model.JobEntity;
import com.mortals.xhx.module.job.model.JobQuery; import com.mortals.xhx.module.job.model.JobQuery;
import com.mortals.xhx.module.job.service.JobService; 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.StaffQuery;
import com.mortals.xhx.module.staff.service.impl.StaffServiceImpl; import com.mortals.xhx.module.staff.service.impl.StaffServiceImpl;
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;
...@@ -54,8 +55,8 @@ public class JobController extends BaseCRUDJsonBodyMappingController<JobService, ...@@ -54,8 +55,8 @@ public class JobController extends BaseCRUDJsonBodyMappingController<JobService,
@Override @Override
protected int infoAfter(Long id, Map<String, Object> model, JobEntity entity, Context context) throws AppException { protected int infoAfter(Long id, Map<String, Object> model, JobEntity entity, Context context) throws AppException {
List<StaffEntity> staffEntity = staffService.queryJob(id); List<StaffEntity> staffEntityList = this.staffService.find(new StaffQuery().positionId(id));
entity.setStaffEntities(staffEntity); entity.setStaffEntities(staffEntityList);
return super.infoAfter(id, model, entity, context); return super.infoAfter(id, model, entity, context);
} }
} }
...@@ -58,8 +58,5 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{ ...@@ -58,8 +58,5 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* */ * */
StaffEntity queryHik(String remarkId); StaffEntity queryHik(String remarkId);
/**
* 查询拥有职位的员工
* */
List<StaffEntity> queryJob(Long positionId);
} }
...@@ -59,10 +59,5 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement ...@@ -59,10 +59,5 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
return this.getSqlSession().selectOne(this.getSqlId("queryHik"),remarkId); return this.getSqlSession().selectOne(this.getSqlId("queryHik"),remarkId);
} }
@Override
public List<StaffEntity> queryJob(Long positionId){
return getSqlSession().selectList(this.getSqlId("queryJob"),positionId);
}
} }
...@@ -20,6 +20,4 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> { ...@@ -20,6 +20,4 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
StaffInfoVo queryAll(); StaffInfoVo queryAll();
//统计所有在职员工 //统计所有在职员工
int queryAllPerson(); int queryAllPerson();
//查询员工数据
List<StaffEntity> queryJob(Long positionId);
} }
\ No newline at end of file
...@@ -62,10 +62,4 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -62,10 +62,4 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
return staffDao.queryInWork(); return staffDao.queryInWork();
} }
@Override
public List<StaffEntity> queryJob(Long positionId) {
return dao.queryJob(positionId);
}
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.staff.dao.ibatis.StaffDaoImpl">
<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="queryHik" resultType="com.mortals.xhx.module.staff.model.StaffEntity">
select * from mortals_xhx_staff where remarkId = #{remarkId}
</select>
<select id="queryJob" resultType="com.mortals.xhx.module.staff.model.StaffEntity">
select * from mortals_xhx_staff where positionId = #{positionId}
</select>
</mapper>
\ No newline at end of file
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