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

修改用户同步逻辑

parent 1239f3fd
......@@ -165,7 +165,6 @@ export default {
width: 100,
formatter: row => {
return (
<div>
<el-switch
value={row.status+""}
active-color="#13ce66"
......@@ -177,7 +176,6 @@ export default {
}}
>
</el-switch>
</div>
);
}
......
......@@ -30,8 +30,8 @@ import java.util.Map;
* @author: zxfei
* @date: 2022/4/20 9:24
*/
@Aspect
@Component
//@Aspect
//@Component
@Slf4j
@Order(1)
@Profile({"default", "develop", "test1"})
......
......@@ -138,7 +138,7 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService {
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();
......
......@@ -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.service.JobService;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -54,8 +55,8 @@ public class JobController extends BaseCRUDJsonBodyMappingController<JobService,
@Override
protected int infoAfter(Long id, Map<String, Object> model, JobEntity entity, Context context) throws AppException {
List<StaffEntity> staffEntity = staffService.queryJob(id);
entity.setStaffEntities(staffEntity);
List<StaffEntity> staffEntityList = this.staffService.find(new StaffQuery().positionId(id));
entity.setStaffEntities(staffEntityList);
return super.infoAfter(id, model, entity, context);
}
}
......@@ -58,8 +58,5 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* */
StaffEntity queryHik(String remarkId);
/**
* 查询拥有职位的员工
* */
List<StaffEntity> queryJob(Long positionId);
}
......@@ -59,10 +59,5 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
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> {
StaffInfoVo queryAll();
//统计所有在职员工
int queryAllPerson();
//查询员工数据
List<StaffEntity> queryJob(Long positionId);
}
\ No newline at end of file
......@@ -62,10 +62,4 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
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