扫码出场
This commit is contained in:
parent
a110304fd2
commit
241ec43730
|
|
@ -1,21 +1,11 @@
|
||||||
package com.bonus.bmw.controller;
|
package com.bonus.bmw.controller;
|
||||||
|
|
||||||
import com.bonus.bmw.domain.dto.FileBasicMsgDto;
|
|
||||||
import com.bonus.bmw.domain.dto.PmWorkerDto;
|
import com.bonus.bmw.domain.dto.PmWorkerDto;
|
||||||
import com.bonus.bmw.domain.dto.WebFileDto;
|
|
||||||
import com.bonus.bmw.domain.po.BmSubContract;
|
|
||||||
import com.bonus.bmw.domain.po.PmSubCompany;
|
|
||||||
import com.bonus.bmw.domain.vo.BmSubContractVo;
|
|
||||||
import com.bonus.bmw.domain.vo.PmWorker;
|
import com.bonus.bmw.domain.vo.PmWorker;
|
||||||
import com.bonus.bmw.domain.vo.TreeVo;
|
import com.bonus.bmw.domain.vo.TreeVo;
|
||||||
import com.bonus.bmw.service.AppService;
|
import com.bonus.bmw.service.AppService;
|
||||||
import com.bonus.bmw.service.BmSubContractService;
|
|
||||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
|
||||||
import com.bonus.common.core.utils.json.FastJsonHelper;
|
|
||||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.core.web.page.TableDataInfo;
|
|
||||||
import com.bonus.common.log.annotation.SysLog;
|
import com.bonus.common.log.annotation.SysLog;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import com.bonus.common.security.annotation.InnerAuth;
|
import com.bonus.common.security.annotation.InnerAuth;
|
||||||
|
|
@ -28,10 +18,6 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* app部分接口
|
* app部分接口
|
||||||
|
|
@ -136,4 +122,16 @@ public class AppController extends BaseController {
|
||||||
return error("系统异常,请联系管理员");
|
return error("系统异常,请联系管理员");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("worker:ein:edit"))
|
||||||
|
@PostMapping("/appWorkerExitFile")
|
||||||
|
@SysLog(title = "人员出场", businessType = OperaType.UPDATE, logType = 0, module = "施工人员->出入场管理->人员出场", details = "人员出场")
|
||||||
|
public AjaxResult appWorkerExitFile(@Validated @RequestBody PmWorkerDto workerDto) {
|
||||||
|
try {
|
||||||
|
return service.appWorkerExitFile(workerDto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.toString(), e);
|
||||||
|
}
|
||||||
|
return error("系统异常,请联系管理员");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,4 +54,6 @@ public interface AppService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult appWorkerExit(PmWorkerDto workerDto) throws Exception;
|
AjaxResult appWorkerExit(PmWorkerDto workerDto) throws Exception;
|
||||||
|
|
||||||
|
AjaxResult appWorkerExitFile(PmWorkerDto workerDto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ public class AppServiceImpl implements AppService {
|
||||||
String[] split = record.getPhotoIds().split(",");
|
String[] split = record.getPhotoIds().split(",");
|
||||||
for (int x = 0; x < split.length; x++) {
|
for (int x = 0; x < split.length; x++) {
|
||||||
int i = mapper.updateFileMsg(split[x], Constants.FILE_UPLOAD_WORKER_EXIT, record.getId());
|
int i = mapper.updateFileMsg(split[x], Constants.FILE_UPLOAD_WORKER_EXIT, record.getId());
|
||||||
log.error("app更新人员出场:第{}条,{}", x, i > 0 ? "更新成功" : "更新失败");
|
log.error("app人员出场-图片遍历:第{}条,{}", x, i > 0 ? "更新成功" : "更新失败");
|
||||||
}
|
}
|
||||||
isUploadFile = 1;
|
isUploadFile = 1;
|
||||||
}
|
}
|
||||||
|
|
@ -261,6 +261,24 @@ public class AppServiceImpl implements AppService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult appWorkerExitFile(PmWorkerDto record) {
|
||||||
|
//修改在场记录表状态
|
||||||
|
int einStatus = 2;
|
||||||
|
//是否上传文件
|
||||||
|
int isUploadFile = 0;
|
||||||
|
if(!StringUtils.isEmpty(record.getPhotoIds())){
|
||||||
|
String[] split = record.getPhotoIds().split(",");
|
||||||
|
for (int x = 0; x < split.length; x++) {
|
||||||
|
int i = mapper.updateFileMsg(split[x], Constants.FILE_UPLOAD_WORKER_EXIT, record.getId());
|
||||||
|
log.error("app人员出场-补-图片遍历:第{}条,{}", x, i > 0 ? "更新成功" : "更新失败");
|
||||||
|
}
|
||||||
|
isUploadFile = 1;
|
||||||
|
}
|
||||||
|
int k = pmWorkerExitMapper.updateEinProRecordStatus(record.getId(),einStatus,isUploadFile,record.getExitWay(),"");
|
||||||
|
return k>0 ? AjaxResult.success() :AjaxResult.error("离场失败");
|
||||||
|
}
|
||||||
|
|
||||||
static void delUrkUser(PmWorkerDto record, UrkSendService urkSendService) throws Exception {
|
static void delUrkUser(PmWorkerDto record, UrkSendService urkSendService) throws Exception {
|
||||||
int workerId = record.getWorkerId()==null?0:record.getWorkerId();
|
int workerId = record.getWorkerId()==null?0:record.getWorkerId();
|
||||||
int proId = record.getProId()==null?0:record.getProId();
|
int proId = record.getProId()==null?0:record.getProId();
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@
|
||||||
<select id="getWorkerListByPhone" resultMap="BaseResultMap">
|
<select id="getWorkerListByPhone" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
bwepr.id,
|
bwepr.id,
|
||||||
pw.id as workerId,
|
pw.id as worker_id,
|
||||||
pw.`name`,
|
pw.`name`,
|
||||||
pw.id_number,
|
pw.id_number,
|
||||||
bwepr.pro_id,
|
bwepr.pro_id,
|
||||||
|
|
@ -240,7 +240,7 @@
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
bwepr.id,
|
bwepr.id,
|
||||||
pw.id as workerId,
|
pw.id as worker_id,
|
||||||
pw.`name`,
|
pw.`name`,
|
||||||
pw.id_number,
|
pw.id_number,
|
||||||
bwepr.pro_id,
|
bwepr.pro_id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue