Compare commits
No commits in common. "241ec43730b25164b9b1ee9c7e53fe41654907f6" and "e807076cfeab4deeeff57f03e400a2f885437fd5" have entirely different histories.
241ec43730
...
e807076cfe
|
|
@ -105,7 +105,7 @@ public class SysPasswordService {
|
||||||
throw new CaptchaException("手机号不能为空");
|
throw new CaptchaException("手机号不能为空");
|
||||||
}
|
}
|
||||||
String code = VerificationCodeUtils.generateVerificationCode(VerificationCodeUtils.CodeType.NUMERIC);
|
String code = VerificationCodeUtils.generateVerificationCode(VerificationCodeUtils.CodeType.NUMERIC);
|
||||||
String str = "您的验证码为" + code + ",尊敬的客户,以上验证码3分钟有效,实名制提醒您:转发可能导致账号被盗,请勿将验证码泄露于他人";
|
String str = "您的验证码为" + code + ",尊敬的客户,以上验证码3分钟有效,微服务平台提醒您:转发可能导致账号被盗,请勿将验证码泄露于他人";
|
||||||
String verifyKey = CacheConstants.VERIFICATION_CODE + phone;
|
String verifyKey = CacheConstants.VERIFICATION_CODE + phone;
|
||||||
String s = SmsUtils.smsToken(phone, str, "");
|
String s = SmsUtils.smsToken(phone, str, "");
|
||||||
if (StringUtils.isNotEmpty(s)) {
|
if (StringUtils.isNotEmpty(s)) {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,21 @@
|
||||||
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;
|
||||||
|
|
@ -18,6 +28,10 @@ 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部分接口
|
||||||
|
|
@ -122,16 +136,4 @@ 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("系统异常,请联系管理员");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -161,24 +161,6 @@ public class PmWorkerExitController extends BaseController {
|
||||||
return getDataTableError(new ArrayList<>());
|
return getDataTableError(new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 手机号扫码出场或补文件
|
|
||||||
* @param o
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth(isUser = false))
|
|
||||||
@GetMapping("/getWorkerListByPhone")
|
|
||||||
@SysLog(title = "扫码出场", businessType = OperaType.QUERY, logType = 0, module = "施工人员->出入场管理->扫码出场", details = "扫码出场")
|
|
||||||
public AjaxResult getWorkerListByPhone(PmWorkerDto o) {
|
|
||||||
try {
|
|
||||||
List<PmWorker> list = service.getWorkerListByPhone(o);
|
|
||||||
return AjaxResult.success(list);
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(e.toString(), e);
|
|
||||||
}
|
|
||||||
return AjaxResult.error("系统异常,请联系管理员");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询工程出场历史列表
|
* 查询工程出场历史列表
|
||||||
* @param o
|
* @param o
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,4 @@ public class PmWorker {
|
||||||
|
|
||||||
private String facePhotoBase64;
|
private String facePhotoBase64;
|
||||||
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,4 @@ public interface PmWorkerExitMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PmWorker> selectWorkListByProId(PmWorkerDto o);
|
List<PmWorker> selectWorkListByProId(PmWorkerDto o);
|
||||||
|
|
||||||
List<PmWorker> getWorkerListByPhone(PmWorkerDto o);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,4 @@ public interface AppService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult appWorkerExit(PmWorkerDto workerDto) throws Exception;
|
AjaxResult appWorkerExit(PmWorkerDto workerDto) throws Exception;
|
||||||
|
|
||||||
AjaxResult appWorkerExitFile(PmWorkerDto workerDto);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,4 @@ public interface PmWorkerExitService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PmWorker> selectWorkListByProId(PmWorkerDto o);
|
List<PmWorker> selectWorkListByProId(PmWorkerDto o);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据手机号查询人员列表
|
|
||||||
*
|
|
||||||
* @param o
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<PmWorker> getWorkerListByPhone(PmWorkerDto o);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,24 +261,6 @@ 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();
|
||||||
|
|
|
||||||
|
|
@ -215,9 +215,4 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
|
||||||
return mapper.selectWorkListByProId(o);
|
return mapper.selectWorkListByProId(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<PmWorker> getWorkerListByPhone(PmWorkerDto o) {
|
|
||||||
return mapper.getWorkerListByPhone(o);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
<result column="is_upload_file" property="isUploadFile" />
|
<result column="is_upload_file" property="isUploadFile" />
|
||||||
<result column="days_since_exit" property="daysSinceExit" />
|
<result column="days_since_exit" property="daysSinceExit" />
|
||||||
<result column="is_shanghai" property="isShanghai"/>
|
<result column="is_shanghai" property="isShanghai"/>
|
||||||
<result column="type" property="type"/>
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectWorkList" resultMap="BaseResultMap">
|
<select id="selectWorkList" resultMap="BaseResultMap">
|
||||||
|
|
@ -210,57 +209,4 @@
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getWorkerListByPhone" resultMap="BaseResultMap">
|
|
||||||
SELECT
|
|
||||||
bwepr.id,
|
|
||||||
pw.id as worker_id,
|
|
||||||
pw.`name`,
|
|
||||||
pw.id_number,
|
|
||||||
bwepr.pro_id,
|
|
||||||
bwepr.pro_name,
|
|
||||||
bwepr.sub_id,
|
|
||||||
bwepr.sub_name,
|
|
||||||
bwepr.team_id,
|
|
||||||
bwepr.team_name,
|
|
||||||
bwepr.post_id,
|
|
||||||
bwepr.post_name,
|
|
||||||
pp.is_shanghai,
|
|
||||||
'1' as type
|
|
||||||
FROM
|
|
||||||
pm_worker pw
|
|
||||||
INNER JOIN bm_worker_ein_pro_record bwepr ON bwepr.worker_id = pw.id
|
|
||||||
INNER JOIN pm_project pp ON pp.id = bwepr.pro_id
|
|
||||||
WHERE
|
|
||||||
pw.is_active = 1
|
|
||||||
AND pw.phone = #{phone}
|
|
||||||
AND bwepr.is_upload_file is null
|
|
||||||
|
|
||||||
UNION
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
bwepr.id,
|
|
||||||
pw.id as worker_id,
|
|
||||||
pw.`name`,
|
|
||||||
pw.id_number,
|
|
||||||
bwepr.pro_id,
|
|
||||||
bwepr.pro_name,
|
|
||||||
bwepr.sub_id,
|
|
||||||
bwepr.sub_name,
|
|
||||||
bwepr.team_id,
|
|
||||||
bwepr.team_name,
|
|
||||||
bwepr.post_id,
|
|
||||||
bwepr.post_name,
|
|
||||||
pp.is_shanghai,
|
|
||||||
'2' as type
|
|
||||||
FROM
|
|
||||||
pm_worker pw
|
|
||||||
INNER JOIN bm_worker_ein_pro_record bwepr ON bwepr.worker_id = pw.id
|
|
||||||
INNER JOIN pm_project pp ON pp.id = bwepr.pro_id
|
|
||||||
WHERE
|
|
||||||
pw.is_active = 1
|
|
||||||
AND pw.phone = #{phone}
|
|
||||||
AND bwepr.is_upload_file = 0 and pp.is_shanghai = 0
|
|
||||||
and if(is_upload_file=0,DATEDIFF(NOW(), exit_time),0) < 31
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -440,6 +440,6 @@
|
||||||
<select id="selectWorkerByPhotoNumber" resultType="int">
|
<select id="selectWorkerByPhotoNumber" resultType="int">
|
||||||
select count(1)
|
select count(1)
|
||||||
from pm_worker
|
from pm_worker
|
||||||
where phone = #{photoNumber} and is_active = 1
|
where phone = #{photoNumber}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue