修改bug
This commit is contained in:
parent
a92e4a19d3
commit
186fc8ddfb
|
|
@ -44,4 +44,11 @@ public interface PmWorkerExitMapper {
|
|||
Boolean getProLocationByProId(Integer proId);
|
||||
|
||||
int getEinProNum(Integer workerId);
|
||||
|
||||
/**
|
||||
* 查询 数据信息
|
||||
* @param record
|
||||
* @return
|
||||
*/
|
||||
PmWorkerDto getPmWorkInfo(PmWorkerDto record);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ public class AppServiceImpl implements AppService {
|
|||
List<MapBeanVo> list = pmWorkerExitMapper.getContractIdAndWageCard(record.getWorkerId());
|
||||
if(Integer.parseInt(list.get(0).getValue())>0 && Integer.parseInt(list.get(1).getValue())>0){
|
||||
//查询是否上海外
|
||||
PmWorkerDto data=pmWorkerExitMapper.getPmWorkInfo(record);
|
||||
Boolean isShangHai = pmWorkerExitMapper.getProLocationByProId(record.getProId());
|
||||
if(isShangHai == null || !isShangHai){
|
||||
int m = contractMapper.deleteByWorkerId(record.getWorkerId());
|
||||
|
|
@ -250,7 +251,7 @@ public class AppServiceImpl implements AppService {
|
|||
}
|
||||
int k = pmWorkerExitMapper.updateEinProRecordStatus(record.getId(),einStatus,isUploadFile,record.getExitWay(),isLast);
|
||||
if(k==1){
|
||||
urkSendService.delUserByDevice(record.getWorkerId(),record.getProId(),record.getSubId(), record.getTeamId());
|
||||
delUrkUser(data, urkSendService);
|
||||
//删除app人脸
|
||||
// delAppFace(record.getWorkerId());
|
||||
}
|
||||
|
|
@ -260,6 +261,14 @@ public class AppServiceImpl implements AppService {
|
|||
}
|
||||
}
|
||||
|
||||
static void delUrkUser(PmWorkerDto record, UrkSendService urkSendService) throws Exception {
|
||||
int workerId = record.getWorkerId()==null?0:record.getWorkerId();
|
||||
int proId = record.getProId()==null?0:record.getProId();
|
||||
int subId = record.getSubId()==null?0:record.getSubId();
|
||||
int teamId = record.getTeamId()==null?0:record.getTeamId();
|
||||
urkSendService.delUserByDevice(workerId,proId,subId,teamId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础数据添加完毕,在进行入场数据添加
|
||||
*
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
|
|||
@Override
|
||||
public AjaxResult updateWorkerExit(PmWorkerDto record, List<WebFileDto> listFile) throws Exception {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
PmWorkerDto data=mapper.getPmWorkInfo(record);
|
||||
//查询合同工资卡是否齐全
|
||||
List<MapBeanVo> list = mapper.getContractIdAndWageCard(record.getWorkerId());
|
||||
if(Integer.parseInt(list.get(0).getValue())>0 && Integer.parseInt(list.get(1).getValue())>0){
|
||||
|
|
@ -66,8 +67,10 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
|
|||
int i = contractService.deleteByWorkerId(record.getWorkerId());
|
||||
}
|
||||
//查询是不是上海内最后一个在场工程(一定要放在删除实时在场前查)
|
||||
|
||||
int number = mapper.getEinProNum(record.getWorkerId());
|
||||
//删除实时在场
|
||||
|
||||
int n = mapper.deleteEinMsgByWorkerId(record.getWorkerId(), record.getProId());
|
||||
//修改在场记录表状态
|
||||
int einStatus = 2;
|
||||
|
|
@ -92,7 +95,8 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
|
|||
int k = mapper.updateEinProRecordStatus(record.getId(),einStatus,isUploadFile,record.getExitWay(),isLast);
|
||||
if(k==1){
|
||||
try {
|
||||
urkSendService.delUserByDevice(record.getWorkerId(),record.getProId(),record.getSubId(),record.getTeamId());
|
||||
|
||||
AppServiceImpl.delUrkUser(data, urkSendService);
|
||||
} catch (Exception e) {
|
||||
log.error("人员下发考勤机失败:",e);
|
||||
sb.append("人员下发考勤机失败--");
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
</select>
|
||||
|
||||
<delete id="deleteEinMsgByWorkerId">
|
||||
DELETE FROM bm_worker_ein_msg WHERE worker_id = #{workerId} and pro_id = #{proId}
|
||||
DELETE FROM bm_worker_ein_msg WHERE worker_id = #{workerId} and pro_id = #{proId}
|
||||
</delete>
|
||||
|
||||
<update id="updateEinProRecordStatus">
|
||||
|
|
@ -169,4 +169,9 @@
|
|||
`bm_worker_ein_msg`
|
||||
where is_active = 1 and worker_id = #{workerId}
|
||||
</select>
|
||||
<select id="getPmWorkInfo" resultType="com.bonus.bmw.domain.dto.PmWorkerDto">
|
||||
select pro_id proId,team_id teamId,sub_id subId,worker_id workerId
|
||||
from bm_worker_ein_msg
|
||||
WHERE worker_id = #{workerId} and pro_id = #{proId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue