bug修改
This commit is contained in:
parent
11bb477ba5
commit
50f1eb2c91
|
|
@ -1,6 +1,7 @@
|
|||
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.WebFileDto;
|
||||
import com.bonus.bmw.domain.po.BmSubContract;
|
||||
import com.bonus.bmw.domain.po.PmSubCompany;
|
||||
|
|
@ -123,4 +124,16 @@ public class AppController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("worker:ein:edit"))
|
||||
@PostMapping("/appWorkerExit")
|
||||
@SysLog(title = "人员出场", businessType = OperaType.UPDATE, logType = 0, module = "施工人员->出入场管理->人员出场", details = "人员出场")
|
||||
public AjaxResult appWorkerExit(@Validated @RequestBody PmWorkerDto workerDto) {
|
||||
try {
|
||||
return service.appWorkerExit(workerDto);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,8 +133,7 @@ public class RepairCardApplyController extends BaseController {
|
|||
fileMsg= Sm4Utils.decrypt(fileMsg);
|
||||
List<WebFileDto> listFile = FastJsonHelper.jsonArrStrToBeanList(fileMsg, WebFileDto.class);
|
||||
RepairCardApplyDto cardApplyDto = FastJsonHelper.jsonStrToBean(params, RepairCardApplyDto.class);
|
||||
AjaxResult ajaxResult = repairCardApplyMapper.saverepairCardApply(cardApplyDto, new FileBasicMsgDto(listFile, files));
|
||||
return ajaxResult;
|
||||
return repairCardApplyMapper.saverepairCardApply(cardApplyDto, new FileBasicMsgDto(listFile, files));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -90,4 +90,9 @@ public class PmWorkerDto {
|
|||
*/
|
||||
private Integer orgId;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String photoIds;
|
||||
|
||||
}
|
||||
|
|
@ -115,11 +115,10 @@ public interface PmWorkerMapper {
|
|||
/**
|
||||
* 根据身份证查询人员手机号
|
||||
*
|
||||
* @param idNumber
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
PmWorker getWorkerByPhone(@Param("phone") String phone,@Param("idNumber") String idNumber);
|
||||
PmWorker getWorkerByPhone(@Param("phone") String phone);
|
||||
|
||||
/**
|
||||
* 更新人员状态
|
||||
|
|
@ -128,4 +127,6 @@ public interface PmWorkerMapper {
|
|||
* @param isActive
|
||||
*/
|
||||
void updateIsActiveById(@Param("id") Integer id, @Param("isActive") int isActive);
|
||||
|
||||
PmWorker getWorkerByPhoneById(@Param("phone") String phone,@Param("id")Integer id);
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.bmw.service;
|
||||
|
||||
import com.bonus.bmw.domain.dto.PmWorkerDto;
|
||||
import com.bonus.bmw.domain.vo.PmWorker;
|
||||
import com.bonus.bmw.domain.vo.TreeVo;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -46,4 +47,11 @@ public interface AppService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult appWorkerEdit(PmWorker pmWorker) throws Exception;
|
||||
|
||||
/**
|
||||
* 人员出场
|
||||
* @param workerDto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult appWorkerExit(PmWorkerDto workerDto) throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Base64;
|
||||
|
||||
import static com.bonus.bmw.utils.BaiduRecognitionUtils.HTTP_CLIENT;
|
||||
|
|
@ -119,12 +121,12 @@ public class AppRecognitionServiceImpl implements AppRecognitionService {
|
|||
// 最多尝试两次,避免无限循环 ,删除无需重复
|
||||
int maxRetries = 1;
|
||||
if(!"delete".equals(bean.getOptMode())){
|
||||
bean.setImg(facePhoto);
|
||||
log.error("进人脸服务器的人脸图片:{}", facePhoto);
|
||||
bean.setImg("data:image/png;base64,"+facePhoto);
|
||||
maxRetries = 2;
|
||||
}else{
|
||||
bean.setImg("data:image/jpeg;base64,fddsdafretrthwuwtrewyewtrweet");
|
||||
bean.setImg("data:image/png;base64,fddsdafretrthwuwtrewyewtrweet");
|
||||
}
|
||||
log.error("进人脸服务器的人脸图片:{}", facePhoto);
|
||||
for (int i = 0; i < maxRetries; i++) {
|
||||
String body = HttpUtil.post(IpAndPathConfig.getFaceRecognitionUrl() + "/updatedb",
|
||||
FastJsonHelper.beanToJsonStr(bean));
|
||||
|
|
@ -186,7 +188,7 @@ public class AppRecognitionServiceImpl implements AppRecognitionService {
|
|||
: AjaxResult.success(sysFile);
|
||||
} catch (Exception e) {
|
||||
log.error("上传文件失败", e);
|
||||
return AjaxResult.error(e.getMessage());
|
||||
return AjaxResult.error("未找到人脸信息");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,10 @@
|
|||
package com.bonus.bmw.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.bonus.bmw.domain.dto.WebFileDto;
|
||||
import com.bonus.bmw.domain.dto.PmWorkerDto;
|
||||
import com.bonus.bmw.domain.po.FaceRecognitionBean;
|
||||
import com.bonus.bmw.domain.vo.BmWorkerContract;
|
||||
import com.bonus.bmw.domain.vo.BmWorkerWageCard;
|
||||
import com.bonus.bmw.domain.vo.PmWorker;
|
||||
import com.bonus.bmw.domain.vo.TreeVo;
|
||||
import com.bonus.bmw.mapper.AppMapper;
|
||||
import com.bonus.bmw.mapper.BmWorkerContractMapper;
|
||||
import com.bonus.bmw.mapper.BmWorkerWageCardMapper;
|
||||
import com.bonus.bmw.mapper.PmWorkerMapper;
|
||||
import com.bonus.bmw.domain.vo.*;
|
||||
import com.bonus.bmw.mapper.*;
|
||||
import com.bonus.bmw.service.AppRecognitionService;
|
||||
import com.bonus.bmw.service.AppService;
|
||||
import com.bonus.bmw.service.BmWorkerWageCardService;
|
||||
|
|
@ -65,6 +59,9 @@ public class AppServiceImpl implements AppService {
|
|||
@Autowired
|
||||
private BmWorkerContractMapper contractMapper;
|
||||
|
||||
@Autowired
|
||||
private PmWorkerExitMapper pmWorkerExitMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult validatePassword(SysUser sysUser) {
|
||||
|
|
@ -122,8 +119,8 @@ public class AppServiceImpl implements AppService {
|
|||
//如果是以前被删除的人员,自动恢复以前的数据
|
||||
PmWorker delWorker = pmWorkerMapper.getWorkerByNumber(record.getIdNumber(), 0);
|
||||
if (delWorker != null && delWorker.getId() != null) {
|
||||
// 添加员工时,判断员工编号是否已存在
|
||||
PmWorker worker3 = pmWorkerMapper.getWorkerByPhone(record.getPhone(), record.getIdNumber());
|
||||
// 添加员工时,判断手机号是否重复
|
||||
PmWorker worker3 = pmWorkerMapper.getWorkerByPhone(record.getPhone());
|
||||
if (worker3 != null && worker3.getName() != null) {
|
||||
return new AjaxResult(500, "注册的手机号已存在,手机号拥有者姓名为" + worker3.getName() + ",请去确认手机号是否有误");
|
||||
}
|
||||
|
|
@ -139,7 +136,7 @@ public class AppServiceImpl implements AppService {
|
|||
return new AjaxResult(500, "施工人员身份证已存在,当前系统姓名为" + worker.getName() + "如果想入场请去修改数据即可");
|
||||
}
|
||||
// 添加员工时,手机号是否重复
|
||||
PmWorker worker3 = pmWorkerMapper.getWorkerByPhone(record.getPhone(), record.getIdNumber());
|
||||
PmWorker worker3 = pmWorkerMapper.getWorkerByPhone(record.getPhone());
|
||||
if (worker3 != null && worker3.getName() != null) {
|
||||
return new AjaxResult(500, "注册的手机号已存在,手机号拥有者姓名为" + worker3.getName() + ",请去确认手机号是否有误");
|
||||
}
|
||||
|
|
@ -152,14 +149,14 @@ public class AppServiceImpl implements AppService {
|
|||
log.error("app更新人员人脸图片信息成功条数:{}", i);
|
||||
//下发人脸到考勤机
|
||||
urkSendService.sendUserToDevice(record.getId(), record.getProId(), "0");
|
||||
// //下发人脸到人脸库
|
||||
// FaceRecognitionBean faceRecognitionBean = new FaceRecognitionBean();
|
||||
// faceRecognitionBean.setUniqueKey(record.getIdNumber());
|
||||
// faceRecognitionBean.setOptMode("add");
|
||||
// List<UploadFileVo> fileList = fileUploadUtils.getFileList(record.getPhotoIds(), "", Constants.FILE_UPLOAD_WORKER, "");
|
||||
// if (!fileList.isEmpty()) {
|
||||
// sb.append(appRecognitionService.uploadFaceRecognition(fileList.get(0).getLsUrl(), faceRecognitionBean));
|
||||
// }
|
||||
//下发人脸到人脸库
|
||||
FaceRecognitionBean faceRecognitionBean = new FaceRecognitionBean();
|
||||
faceRecognitionBean.setUniqueKey(record.getIdNumber());
|
||||
faceRecognitionBean.setOptMode("add");
|
||||
UploadFileVo fileBast64 = fileUploadUtils.getFileBast64(record.getPhotoIds(), "", Constants.FILE_UPLOAD_WORKER, "");
|
||||
if (fileBast64 != null) {
|
||||
sb.append(appRecognitionService.uploadFaceRecognition(fileBast64.getBast64(), faceRecognitionBean));
|
||||
}
|
||||
}
|
||||
//入场相关数据添加
|
||||
addWorkerEinData(record);
|
||||
|
|
@ -177,7 +174,7 @@ public class AppServiceImpl implements AppService {
|
|||
return new AjaxResult(500, worker2.getName()+"施工人员在失信人员名单,无法入场");
|
||||
}
|
||||
// 添加员工时,判断员工编号是否已存在
|
||||
PmWorker worker3 = pmWorkerMapper.getWorkerByPhone(record.getPhone(),record.getIdNumber());
|
||||
PmWorker worker3 = pmWorkerMapper.getWorkerByPhoneById(record.getPhone(),record.getId());
|
||||
if(worker3 != null && worker3.getName() != null){
|
||||
return new AjaxResult(500, "注册的手机号已存在,手机号拥有者姓名为"+worker3.getName()+",请去确认手机号是否有误");
|
||||
}
|
||||
|
|
@ -202,13 +199,13 @@ public class AppServiceImpl implements AppService {
|
|||
urkSendService.sendUserToDevice(record.getId(),record.getProId(),"0");
|
||||
}
|
||||
//下发人脸到人脸库
|
||||
// FaceRecognitionBean faceRecognitionBean = new FaceRecognitionBean();
|
||||
// faceRecognitionBean.setUniqueKey(record.getIdNumber());
|
||||
// faceRecognitionBean.setOptMode("add");
|
||||
// List<UploadFileVo> fileList = fileUploadUtils.getFileList(record.getPhotoIds(), "", Constants.FILE_UPLOAD_WORKER, "");
|
||||
// if (!fileList.isEmpty()) {
|
||||
// sb.append(appRecognitionService.uploadFaceRecognition(fileList.get(0).getLsUrl(), faceRecognitionBean));
|
||||
// }
|
||||
FaceRecognitionBean faceRecognitionBean = new FaceRecognitionBean();
|
||||
faceRecognitionBean.setUniqueKey(record.getIdNumber());
|
||||
faceRecognitionBean.setOptMode("add");
|
||||
UploadFileVo fileBast64 = fileUploadUtils.getFileBast64(record.getPhotoIds(), "", Constants.FILE_UPLOAD_WORKER, "");
|
||||
if (fileBast64 != null) {
|
||||
sb.append(appRecognitionService.uploadFaceRecognition(fileBast64.getBast64(), faceRecognitionBean));
|
||||
}
|
||||
}
|
||||
if(record.getEinStatus() == 1){
|
||||
//已经入过场了
|
||||
|
|
@ -223,6 +220,39 @@ public class AppServiceImpl implements AppService {
|
|||
return AjaxResult.success(sb.append(",基础数据更新成功").toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult appWorkerExit(PmWorkerDto record) throws Exception {
|
||||
//查询合同工资卡是否齐全
|
||||
List<MapBeanVo> list = pmWorkerExitMapper.getContractIdAndWageCard(record.getWorkerId());
|
||||
if(Integer.parseInt(list.get(0).getValue())>0 && Integer.parseInt(list.get(1).getValue())>0){
|
||||
//删除合同
|
||||
int m = contractMapper.deleteByWorkerId(record.getWorkerId());
|
||||
//删除实时在场
|
||||
int n = pmWorkerExitMapper.deleteEinMsgByWorkerId(record.getWorkerId());
|
||||
//修改在场记录表状态
|
||||
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());
|
||||
if(k==1){
|
||||
urkSendService.delUserByDevice(record.getWorkerId(),record.getProId());
|
||||
//删除app人脸
|
||||
// delAppFace(record.getWorkerId());
|
||||
}
|
||||
return k == 1 ? AjaxResult.success() :AjaxResult.error("离场失败");
|
||||
}else {
|
||||
return AjaxResult.error("合同工资卡不全,请去补充后再离场");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础数据添加完毕,在进行入场数据添加
|
||||
*
|
||||
|
|
|
|||
|
|
@ -89,13 +89,6 @@ public class PmAttDeviceServiceImpl implements PmAttDeviceService {
|
|||
|
||||
@Override
|
||||
public int delPmAttDevice(PmAttDevice pmAttDevice) throws Exception {
|
||||
int res = pmAttDeviceMapper.delPmAttDevice(pmAttDevice);
|
||||
PmAttDevice pmAttDeviceOld = pmAttDeviceMapper.getPmAttDeviceByCoode(pmAttDevice);
|
||||
if (StringUtils.isNotNull(pmAttDeviceOld.getProId())){
|
||||
return 0;
|
||||
}
|
||||
//考勤机解绑
|
||||
uakSendService.delDevByProId(pmAttDevice.getDeviceCode(),pmAttDeviceOld.getProId()==null?-1:pmAttDeviceOld.getProId());
|
||||
return res;
|
||||
return pmAttDeviceMapper.delPmAttDevice(pmAttDevice);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
|
|||
|
||||
@Override
|
||||
public AjaxResult updateWorkerExit(PmWorkerDto record, List<WebFileDto> listFile) throws Exception {
|
||||
|
||||
//查询合同工资卡是否齐全
|
||||
List<MapBeanVo> list = mapper.getContractIdAndWageCard(record.getWorkerId());
|
||||
if(Integer.parseInt(list.get(0).getValue())>0 && Integer.parseInt(list.get(1).getValue())>0){
|
||||
|
|
@ -84,7 +83,7 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
|
|||
if(k==1){
|
||||
urkSendService.delUserByDevice(record.getWorkerId(),record.getProId());
|
||||
//删除app人脸
|
||||
delAppFace(record.getWorkerId());
|
||||
// delAppFace(record.getWorkerId());
|
||||
}
|
||||
return k == 1 ? AjaxResult.success() :AjaxResult.error("离场失败");
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
PmWorker delWorker = mapper.getWorkerByNumber(record.getIdNumber(), 0);
|
||||
if(delWorker != null && delWorker.getId() != null){
|
||||
// 添加员工时,判断员工编号是否已存在
|
||||
PmWorker worker3 = mapper.getWorkerByPhone(record.getPhone(),record.getIdNumber());
|
||||
PmWorker worker3 = mapper.getWorkerByPhone(record.getPhone());
|
||||
if(worker3 != null && worker3.getName() != null){
|
||||
return new AjaxResult(500, "注册的手机号已存在,手机号拥有者姓名为"+worker3.getName()+",请去确认手机号是否有误");
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
return new AjaxResult(500, "施工人员身份证已存在,当前系统姓名为"+worker.getName()+"如果想入场请去修改数据即可");
|
||||
}
|
||||
// 添加员工时,判断员工编号是否已存在
|
||||
PmWorker worker3 = mapper.getWorkerByPhone(record.getPhone(),record.getIdNumber());
|
||||
PmWorker worker3 = mapper.getWorkerByPhone(record.getPhone());
|
||||
if(worker3 != null && worker3.getName() != null){
|
||||
return new AjaxResult(500, "注册的手机号已存在,手机号拥有者姓名为"+worker3.getName()+",请去确认手机号是否有误");
|
||||
}
|
||||
|
|
@ -205,7 +205,7 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
return new AjaxResult(500, worker2.getName()+"施工人员在失信人员名单,无法入场");
|
||||
}
|
||||
// 添加员工时,判断员工编号是否已存在
|
||||
PmWorker worker3 = mapper.getWorkerByPhone(record.getPhone(),record.getIdNumber());
|
||||
PmWorker worker3 = mapper.getWorkerByPhoneById(record.getPhone(),record.getId());
|
||||
if(worker3 != null && worker3.getName() != null){
|
||||
return new AjaxResult(500, "注册的手机号已存在,手机号拥有者姓名为"+worker3.getName()+",请去确认手机号是否有误");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.system.api.model.UploadFileVo;
|
||||
import org.apache.catalina.security.SecurityUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -28,6 +30,8 @@ import java.util.Map;
|
|||
@Service
|
||||
public class RepairCardApplyServiceImpl implements RepairCardApplyService {
|
||||
|
||||
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Resource
|
||||
private RepairCardApplyMapper repairCardApplyMapper;
|
||||
@Resource
|
||||
|
|
@ -144,14 +148,14 @@ public class RepairCardApplyServiceImpl implements RepairCardApplyService {
|
|||
//删除合同图片 删除minio文件
|
||||
fileUploadUtils.delFileListById(fileId, cardApplyDto.getId().toString(), Constants.FILE_UPLOAD_REPAIR_CARD_APPLY, "");
|
||||
}
|
||||
//存文件
|
||||
List<WebFileDto> fileMsg = fileBasicMsgDto.getFileMsg();
|
||||
String[] type = new String[fileMsg.size()];
|
||||
for (int i = 0; i < fileMsg.size(); i++) {
|
||||
type[i] = fileMsg.get(i).getType();
|
||||
}
|
||||
List<UploadFileVo> uploadFileVos = fileUploadUtils.uploadFile(fileBasicMsgDto.getFiles(), Constants.FILE_UPLOAD_REPAIR_CARD_APPLY, cardApplyDto.getId().toString(), type, "", "");
|
||||
}
|
||||
//存文件
|
||||
List<WebFileDto> fileMsg = fileBasicMsgDto.getFileMsg();
|
||||
String[] type = new String[fileMsg.size()];
|
||||
for (int i = 0; i < fileMsg.size(); i++) {
|
||||
type[i] = fileMsg.get(i).getType();
|
||||
}
|
||||
List<UploadFileVo> uploadFileVos = fileUploadUtils.uploadFile(fileBasicMsgDto.getFiles(), Constants.FILE_UPLOAD_REPAIR_CARD_APPLY, cardApplyDto.getId().toString(), type, "", "");
|
||||
return AjaxResult.success("提交成功");
|
||||
} else {
|
||||
return AjaxResult.error("提交失败");
|
||||
|
|
@ -193,6 +197,7 @@ public class RepairCardApplyServiceImpl implements RepairCardApplyService {
|
|||
}
|
||||
return AjaxResult.success("审核成功");
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
return AjaxResult.error("审核失败");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,6 +119,14 @@
|
|||
WHERE
|
||||
pp.id = #{proId}
|
||||
AND pp.is_active = 1
|
||||
<if test="subName != null and subName != ''">
|
||||
AND ps.sub_name = #{subName}
|
||||
</if>
|
||||
<if test="teamName != null and teamName != ''">
|
||||
AND pst.team_name = #{teamName}
|
||||
</if>
|
||||
|
||||
|
||||
GROUP BY
|
||||
pst.id
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getSubMsg" resultMap="BaseResultMap">
|
||||
<if test="proName != null or subComName != null or proId != null or subCompanyId != null">
|
||||
<if test="proName != null or subComName != null or proId != null or subComId != null">
|
||||
select * from(
|
||||
</if>
|
||||
SELECT
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
</if>
|
||||
GROUP BY
|
||||
ps.id
|
||||
<if test="proName != null or subComName != null or proId != null or subCompanyId != null">
|
||||
<if test="proName != null or subComName != null or proId != null or subComId != null">
|
||||
) aa
|
||||
</if>
|
||||
<where>
|
||||
|
|
@ -175,8 +175,8 @@
|
|||
<if test="proId != null">
|
||||
AND locate(#{proId},aa.pro_id)
|
||||
</if>
|
||||
<if test="subCompanyId != null">
|
||||
AND locate(#{subCompanyId},aa.sub_company_id)
|
||||
<if test="subComId != null">
|
||||
AND locate(#{subComId},aa.sub_company_id)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -250,18 +250,30 @@
|
|||
SELECT
|
||||
pw.id,
|
||||
pw.`name`,
|
||||
pw.phone
|
||||
pw.phone
|
||||
FROM
|
||||
pm_worker pw
|
||||
WHERE
|
||||
pw.phone = #{phone} and pw.is_active = 1
|
||||
<if test="idNumber != null and idNumber != ''">
|
||||
AND pw.id_number != #{idNumber}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateIsActiveById">
|
||||
update pm_worker set is_active = #{isActive} where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getWorkerByPhoneById" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
pw.id,
|
||||
pw.`name`,
|
||||
pw.phone
|
||||
FROM
|
||||
pm_worker pw
|
||||
WHERE
|
||||
pw.phone = #{phone} and pw.is_active = 1
|
||||
<if test="id != null and id != ''">
|
||||
AND pw.id != #{id}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -426,7 +426,7 @@ public class FileUtilsServiceImpl {
|
|||
* @return
|
||||
*/
|
||||
public UploadFileVo getFileBast64(String id, String sourceId, String sourceTable, String sourceType) {
|
||||
List<UploadFileVo> list=mapper.getFileList(id,sourceId,sourceType,sourceTable);
|
||||
List<UploadFileVo> list=mapper.getFileList(id,sourceId, sourceTable ,sourceType);
|
||||
UploadFileVo vo=list.get(0);
|
||||
String bast64=minioUtils.getMinioBast64(vo.getBucketName(),vo.getFilePath());
|
||||
vo.setBast64(bast64);
|
||||
|
|
|
|||
Loading…
Reference in New Issue