Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
155913e9fb
|
|
@ -83,7 +83,7 @@ public class PmWorkerExitController extends BaseController {
|
|||
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth)
|
||||
@PostMapping("/exit/batchExit")
|
||||
@SysLog(title = "人员出场管理", businessType = OperaType.UPDATE, logType = 0, module = "施工人员->出入场管理->人员出场管理", details = "批量人员出场")
|
||||
public AjaxResult batchExit(List<PmWorkerDto> list) {
|
||||
public AjaxResult batchExit(@RequestBody List<PmWorkerDto> list) {
|
||||
try {
|
||||
return toAjax(service.updateWorkerBatchExit(list));
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -132,20 +132,20 @@ public class PmWorker {
|
|||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String proId;
|
||||
private Integer proId;
|
||||
/**
|
||||
* 分包名称
|
||||
*/
|
||||
private String subId;
|
||||
private Integer subId;
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
private String teamId;
|
||||
private Integer teamId;
|
||||
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
private String postId;
|
||||
private Integer postId;
|
||||
|
||||
/**
|
||||
* 入场时间
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.bonus.common.core.constant.Constants;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.system.api.model.UploadFileVo;
|
||||
import lombok.val;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -112,9 +113,12 @@ public class BmWorkerContractServiceImpl implements BmWorkerContractService{
|
|||
|
||||
@Override
|
||||
public List<BmWorkerContract> selectContractListById(BmWorkerContract o) {
|
||||
List<UploadFileVo> contractFile = fileUploadUtils.getFileList("", o.getId().toString(), Constants.FILE_UPLOAD_CONTRACT, "");
|
||||
List<BmWorkerContract> bmWorkerContracts = mapper.selectContractListById(o);
|
||||
if (!bmWorkerContracts.isEmpty()) {
|
||||
List<UploadFileVo> contractFile = fileUploadUtils.getFileList("", o.getId().toString(), Constants.FILE_UPLOAD_CONTRACT, "");
|
||||
bmWorkerContracts.get(0).setFiles(contractFile);
|
||||
}
|
||||
|
||||
return bmWorkerContracts;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,11 @@ import com.bonus.bmw.domain.vo.BmWorkerWageCard;
|
|||
import com.bonus.bmw.service.BmWorkerContractService;
|
||||
import com.bonus.bmw.service.BmWorkerWageCardService;
|
||||
import com.bonus.common.core.constant.Constants;
|
||||
import com.bonus.common.core.constant.SecurityConstants;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.system.api.RemoteUakUtilsService;
|
||||
import com.bonus.system.api.model.UploadFileVo;
|
||||
import com.github.pagehelper.util.StringUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -24,6 +26,7 @@ import com.bonus.bmw.service.PmWorkerService;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -42,6 +45,9 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
@Autowired
|
||||
private FileUploadUtils fileUploadUtils;
|
||||
|
||||
@Resource
|
||||
private RemoteUakUtilsService remoteUakUtilsService;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return mapper.deleteByPrimaryKey(id);
|
||||
|
|
@ -70,6 +76,8 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
List<UploadFileVo> uploadFileVos = fileUploadUtils.uploadFile(workerFiles, Constants.FILE_UPLOAD_WORKER, record.getId().toString(), type,"", "");
|
||||
//入场相关数据添加
|
||||
addWorkerEinData(record,fileMsg);
|
||||
//下发人脸到考勤机
|
||||
remoteUakUtilsService.sendUserToDevice(record.getId(),record.getProId(),"0", SecurityConstants.INNER);
|
||||
}
|
||||
return new AjaxResult(200, "添加成功");
|
||||
}
|
||||
|
|
@ -156,6 +164,14 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
}
|
||||
//人脸的数据添加
|
||||
List<UploadFileVo> uploadFileVos = fileUploadUtils.uploadFile(workerFiles, Constants.FILE_UPLOAD_WORKER, record.getId().toString(), type,"", "");
|
||||
//下发人脸到考勤机
|
||||
if(record.getEinStatus() == 1){
|
||||
//没换工程换人脸
|
||||
remoteUakUtilsService.sendUserToDevice(record.getId(),record.getProId(),"1", SecurityConstants.INNER);
|
||||
}else{
|
||||
//换工程换人脸
|
||||
remoteUakUtilsService.sendUserToDevice(record.getId(),record.getProId(),"0", SecurityConstants.INNER);
|
||||
}
|
||||
}
|
||||
//更新入场记录最新记录标识 再入场,清除最新标识
|
||||
mapper.updateEinRecordLast(record.getId());
|
||||
|
|
@ -163,6 +179,8 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
if(record.getEinStatus() == 1){
|
||||
addWorkerWageCardDataAndContract(record,fileMsg);
|
||||
}else {
|
||||
//换工程没换人脸
|
||||
remoteUakUtilsService.sendUserToDevice(record.getId(),record.getProId(),"0", SecurityConstants.INNER);
|
||||
addWorkerEinData(record,fileMsg);
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
<update id="updateEinProRecordStatus">
|
||||
UPDATE bm_worker_ein_pro_record SET is_upload_file = #{isUploadFile}
|
||||
<if test='einStatus != 0 '>
|
||||
<if test='einStatus != 0'>
|
||||
, ein_status = #{einStatus}
|
||||
</if>
|
||||
WHERE worker_id = #{workerId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue