系统bug修改
This commit is contained in:
parent
ab06e5c345
commit
8e21bb3a13
|
|
@ -13,17 +13,17 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
# password: nacos
|
||||
# password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
# server-addr: 192.168.0.14:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
namespace: nxdt
|
||||
config:
|
||||
# 配置中心地址
|
||||
# server-addr: 192.168.0.14:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
namespace: nxdt
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ server:
|
|||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-request-size: 10MB
|
||||
max-file-size: -1
|
||||
max-request-size: -1
|
||||
codec:
|
||||
max-in-memory-size: 1MB
|
||||
application:
|
||||
|
|
@ -19,15 +20,15 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
# password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
@ -54,8 +55,8 @@ spring:
|
|||
rule-type: gw-flow
|
||||
#系统 自动 加解密开关
|
||||
system:
|
||||
jia-enable: true
|
||||
jie-enable: true
|
||||
jia-enable: false
|
||||
jie-enable: false
|
||||
#加密组件
|
||||
jasypt:
|
||||
encryptor:
|
||||
|
|
|
|||
|
|
@ -447,4 +447,11 @@ public interface AppMapper {
|
|||
* @return 是否存在
|
||||
*/
|
||||
int checkIsPreparation(String proId);
|
||||
|
||||
/**
|
||||
* 查询身份证
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
String getIdCardByPhone(SupervisorPerson vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.app.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
import com.bonus.app.domain.*;
|
||||
|
|
@ -24,14 +25,17 @@ import com.bonus.system.api.domain.SysIds;
|
|||
import com.bonus.system.api.domain.SysRole;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.hibernate.validator.internal.util.StringHelper;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.Period;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -830,6 +834,7 @@ public class AppServiceImpl implements AppService {
|
|||
AjaxResult ajaxResult = AjaxResult.success();
|
||||
//查询监理人员详细信息
|
||||
SupervisorPerson bean = appMapper.listSupervisorPersonById(supervisorPerson);
|
||||
setOtherData2(bean);
|
||||
//人脸照片
|
||||
SysFileInfo fileInfo = new SysFileInfo();
|
||||
fileInfo.setFileName("人脸照片.png");
|
||||
|
|
@ -864,9 +869,77 @@ public class AppServiceImpl implements AppService {
|
|||
*/
|
||||
@Override
|
||||
public List<SupervisorPerson> listSupervisorPerson(SupervisorPerson bean) {
|
||||
return appMapper.listSupervisorPerson(bean);
|
||||
List<SupervisorPerson> list= appMapper.listSupervisorPerson(bean);
|
||||
for (SupervisorPerson vo:list){
|
||||
setOtherData(vo);
|
||||
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setOtherData(SupervisorPerson vo){
|
||||
try{
|
||||
String idCard=appMapper.getIdCardByPhone(vo);
|
||||
if(!StringHelper.isNullOrEmptyString(idCard)){
|
||||
vo.setIdCard(idCard);
|
||||
String sex=getSexByIdCar(idCard);
|
||||
if(!StringHelper.isNullOrEmptyString(sex)){
|
||||
vo.setSex(sex);
|
||||
}
|
||||
Integer age= IdcardUtil.getAgeByIdCard(idCard);
|
||||
vo.setAge(age);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getSexByIdCar(String idCard){
|
||||
try{
|
||||
// 解析出生日期
|
||||
String birthDateStr = idCard.substring(6, 14); // 获取出生年月日部分
|
||||
LocalDate birthDate = LocalDate.parse(birthDateStr.replace(birthDateStr.charAt(4) + "", "-") + birthDateStr.substring(4)); // 格式化日期字符串为yyyy-MM-dd
|
||||
// 判断性别
|
||||
char genderCode = idCard.charAt(16); // 获取性别码
|
||||
String gender = (genderCode % 2 == 0) ? "女" : "男"; // 奇数为男,偶数为女
|
||||
return gender;
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public void setOtherData2(SupervisorPerson vo){
|
||||
try{
|
||||
String idCard=appMapper.getIdCardByPhone(vo);
|
||||
if(!StringHelper.isNullOrEmptyString(idCard)){
|
||||
vo.setIdCard(idCard);
|
||||
String sex=getSexByIdCar2(idCard);
|
||||
if(!StringHelper.isNullOrEmptyString(sex)){
|
||||
vo.setSex(sex);
|
||||
}
|
||||
Integer age= IdcardUtil.getAgeByIdCard(idCard);
|
||||
vo.setAge(age);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getSexByIdCar2(String idCard){
|
||||
try{
|
||||
// 解析出生日期
|
||||
String birthDateStr = idCard.substring(6, 14); // 获取出生年月日部分
|
||||
LocalDate birthDate = LocalDate.parse(birthDateStr.replace(birthDateStr.charAt(4) + "", "-") + birthDateStr.substring(4)); // 格式化日期字符串为yyyy-MM-dd
|
||||
// 判断性别
|
||||
char genderCode = idCard.charAt(16); // 获取性别码
|
||||
String gender = (genderCode % 2 == 0) ? "1" : "0"; // 奇数为男,偶数为女
|
||||
return gender;
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
/**
|
||||
* 根据id查询承包商施工人员详细信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -867,4 +867,11 @@
|
|||
where pro_id = #{proId}
|
||||
and pro_status = '2'
|
||||
</select>
|
||||
<select id="getIdCardByPhone" resultType="java.lang.String">
|
||||
select id_card
|
||||
from sys_user
|
||||
where del_flag=0 and user_name=#{phone}
|
||||
limit 1
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@ public class SysFileController
|
|||
* 文件上传请求
|
||||
*/
|
||||
@PostMapping("upload")
|
||||
public R<SysFile> upload(MultipartFile file)
|
||||
{
|
||||
public R<SysFile> upload(MultipartFile file) {
|
||||
try
|
||||
{
|
||||
// 上传并返回访问地址
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -709,8 +709,8 @@
|
|||
<select id="approvalHistoryUser" resultType="com.bonus.flowable.entity.ConfigurationVo">
|
||||
select distinct a.id ,a.task_id as taskId,a.user_id as userId,a.exam_type as examineType,
|
||||
b.audit_status as auditStatus
|
||||
from nxdt_ii.pt_check_person a
|
||||
left join nxdt_ii.pt_check_person_remark b on a.task_id = b.task_id and a.user_id = b.user_id and a.version = b.version
|
||||
from nxdt_ii.pt_check_person a
|
||||
left join nxdt_ii.pt_check_person_remark b on a.task_id = b.task_id and a.user_id = b.user_id and a.version = b.version
|
||||
where a.type= '2' and a.task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
|
|
@ -892,7 +892,7 @@
|
|||
<select id="getTreeList" resultType="com.bonus.flowable.entity.CheckComment">
|
||||
select pcp.user_id userId ,pcp.exam_type examType,pcp.version,pcpr.audit_status auditStatus
|
||||
from nxdt_ii.pt_check_person pcp
|
||||
LEFT JOIN nxdt_ii.pt_check_person_remark pcpr ON pcp.task_id = pcpr.task_id
|
||||
LEFT JOIN nxdt_ii.pt_check_person_remark pcpr ON pcp.task_id = pcpr.task_id
|
||||
AND pcp.user_id = pcpr.user_id
|
||||
AND pcp.version = pcpr.version
|
||||
and pcp.type=pcpr.type
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@
|
|||
<artifactId>json</artifactId>
|
||||
<version>20240303</version>
|
||||
</dependency>
|
||||
|
||||
<!-- bonus Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.bonus</groupId>
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ public class AdmissionRequestController extends BaseController {
|
|||
if (arService.checkUserTypeNameUnique(allRequestParams)){
|
||||
arService.addUserName(allRequestParams);
|
||||
}
|
||||
return toAjax(arService.addMataddAdmissionRequesterial(facePhotoList, medicalExaminationList, elseImgList, specialTypeOfWorkList, otherFilesList, allRequestParams));
|
||||
return arService.addMataddAdmissionRequesterial(facePhotoList, medicalExaminationList, elseImgList, specialTypeOfWorkList, otherFilesList, allRequestParams);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ public class AdmissionRequest extends BaseBean implements Serializable {
|
|||
* 人员id
|
||||
*/
|
||||
private String consPersonId;
|
||||
|
||||
private String outStatus;
|
||||
/**
|
||||
* 分包商uuid
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import lombok.EqualsAndHashCode;
|
|||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ImportArg extends BaseBean {
|
||||
|
||||
private String personType;
|
||||
private String deptId;
|
||||
private String uuid;
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ public interface AdmissionRequestMapper {
|
|||
*/
|
||||
AdmissionRequest checkUserNameUnique(AdmissionRequest bean);
|
||||
|
||||
AdmissionRequest getUserInToPro(AdmissionRequest bean);
|
||||
|
||||
AdmissionRequest checkUserTypeNameUnique(AdmissionRequest bean);
|
||||
|
||||
/**
|
||||
|
|
@ -290,4 +292,11 @@ public interface AdmissionRequestMapper {
|
|||
* @return
|
||||
*/
|
||||
String getLinkStatus(AdmissionRequest bean);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
String getIdCardByPhone(@Param("phone") String phone);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.project.mapper;
|
||||
|
||||
import com.bonus.project.domain.ContractorBean;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -34,4 +35,17 @@ public interface ContractorMapper {
|
|||
* @return 结果
|
||||
*/
|
||||
int deleteContractorById(Long[] addressId);
|
||||
|
||||
/**
|
||||
* 查询用户id
|
||||
* @param aLong
|
||||
* @return
|
||||
*/
|
||||
String getUserIdByContractId(@Param("contId") Long aLong);
|
||||
|
||||
/**
|
||||
* 删除用户id
|
||||
* @param userId
|
||||
*/
|
||||
void deleteUserId(@Param("userId") String userId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.project.mapper;
|
||||
|
||||
import com.bonus.common.entity.SysFileInfo;
|
||||
import com.bonus.project.domain.AdmissionRequest;
|
||||
import com.bonus.project.domain.ImportArg;
|
||||
import com.bonus.project.domain.ImportBean;
|
||||
import com.bonus.project.domain.SubPerson;
|
||||
|
|
@ -73,4 +74,11 @@ public interface ImportMapper {
|
|||
* @return
|
||||
*/
|
||||
int updateSysUserInfo(ImportArg arg);
|
||||
|
||||
/**
|
||||
* 查询人员工程是否已在其他工程入场
|
||||
* @param admissionRequest
|
||||
* @return
|
||||
*/
|
||||
AdmissionRequest getUserInToPro(AdmissionRequest admissionRequest);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,4 +165,6 @@ public interface OutsourcingProMapper {
|
|||
int addAnnotations(SubPerson subPerson);
|
||||
|
||||
List<String> getAnnotationsByTaskIdAndUserId(SubPerson subPerson);
|
||||
|
||||
String getIdCardByPhone(@Param("phone") String phone);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,4 +176,24 @@ public interface SupervisionUnitMapper {
|
|||
Integer getsupUserId(SupervisorPerson supervisorPerson);
|
||||
|
||||
Integer delLkSupPerson(SupervisorPerson supervisorPerson);
|
||||
|
||||
/**
|
||||
* 查询管理里
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
String getLinkStatus(SupervisorPerson bean);
|
||||
|
||||
/**
|
||||
* 查询用户id
|
||||
* @param addressId
|
||||
* @return
|
||||
*/
|
||||
String getUserIdBySupId(@Param("supId") Long addressId);
|
||||
|
||||
/**
|
||||
* 删除用户id
|
||||
* @param userId
|
||||
*/
|
||||
void deleteUserById(@Param("userId") String userId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public interface AdmissionRequestService {
|
|||
* @return 结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
int addMataddAdmissionRequesterial(MultipartFile facePhotoList, MultipartFile[] medicalExaminationList, MultipartFile[] elseImgList, MultipartFile[] specialTypeOfWorkList, MultipartFile[] otherFilesList, Map<String, String> allRequestParams) throws Exception;
|
||||
AjaxResult addMataddAdmissionRequesterial(MultipartFile facePhotoList, MultipartFile[] medicalExaminationList, MultipartFile[] elseImgList, MultipartFile[] specialTypeOfWorkList, MultipartFile[] otherFilesList, Map<String, String> allRequestParams) throws Exception;
|
||||
/**
|
||||
* 获取人员入场申请详情
|
||||
* @param bean 人员入场申请实体
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.project.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import com.bonus.common.core.constant.UserConstants;
|
||||
import com.bonus.common.core.domain.R;
|
||||
import com.bonus.common.core.domain.RequestEntity;
|
||||
|
|
@ -11,10 +12,7 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.common.entity.SysFileInfo;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.project.controller.GenericProcessor;
|
||||
import com.bonus.project.domain.AdmissionRequest;
|
||||
import com.bonus.project.domain.FlowProcess;
|
||||
import com.bonus.project.domain.FlowSaveXml;
|
||||
import com.bonus.project.domain.SupervisoryUnit;
|
||||
import com.bonus.project.domain.*;
|
||||
import com.bonus.project.mapper.AdmissionRequestMapper;
|
||||
import com.bonus.project.mapper.CommonMapper;
|
||||
import com.bonus.project.service.AdmissionRequestService;
|
||||
|
|
@ -128,6 +126,9 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
List<AdmissionRequest> list = arMapper.getContPersonByProIdAndOtherId(bean);
|
||||
list.forEach(data->{
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
@ -181,7 +182,9 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int addMataddAdmissionRequesterial(MultipartFile facePhotoList, MultipartFile[] medicalExaminationList, MultipartFile[] elseImgList, MultipartFile[] specialTypeOfWorkList, MultipartFile[] otherFilesList, Map<String, String> allRequestParams) throws Exception {
|
||||
public AjaxResult addMataddAdmissionRequesterial(MultipartFile facePhotoList, MultipartFile[] medicalExaminationList, MultipartFile[] elseImgList, MultipartFile[] specialTypeOfWorkList, MultipartFile[] otherFilesList, Map<String, String> allRequestParams) throws Exception {
|
||||
AjaxResult ajaxResult=new AjaxResult();
|
||||
|
||||
int code = 0;
|
||||
String fileName = null;
|
||||
String id = null;
|
||||
|
|
@ -199,7 +202,6 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
//把allRequestParams中的参数放入bean中
|
||||
String params = allRequestParams.get("params");
|
||||
JSONObject jsonObject = new JSONObject(params);
|
||||
System.out.printf("jsonObject: %s", jsonObject);
|
||||
bean.setConsName(jsonObject.getString("consName"));
|
||||
bean.setAge(jsonObject.getString("age"));
|
||||
bean.setPhone(jsonObject.getString("phone"));
|
||||
|
|
@ -234,27 +236,43 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
if (StringUtils.isNotEmpty(delFileIds)) {
|
||||
commonMapper.deleteFile(delFileIds);
|
||||
}
|
||||
//查询是否在其他工程 已入场
|
||||
AdmissionRequest proUser = arMapper.getUserInToPro(bean);
|
||||
if(proUser!=null){
|
||||
if(!"3".equals(proUser.getOutStatus())){
|
||||
return new AjaxResult(201,"该人员已在其他工程入场,清先出场后再入场");
|
||||
}
|
||||
}
|
||||
if ("".equals(bean.getConsUserId())) {
|
||||
|
||||
AdmissionRequest admissionRequest = arMapper.checkUserNameUnique(bean);
|
||||
if (admissionRequest != null) {
|
||||
arMapper.delFileById(admissionRequest);
|
||||
id = String.valueOf(admissionRequest.getId());
|
||||
uuid = admissionRequest.getUuid();
|
||||
arMapper.updatePersonStatus(admissionRequest);
|
||||
bean.setConsUserId(String.valueOf(admissionRequest.getId()));
|
||||
code = arMapper.updatePersonEnterInfo(bean);
|
||||
if (code == 0) {
|
||||
throw new Exception("新增人员入场申请失败");
|
||||
}
|
||||
code = arMapper.updateSysUserInfo(bean);
|
||||
if (code == 0){
|
||||
throw new Exception("修改sys_user信息失败!");
|
||||
//已出场的 人员再次入场
|
||||
if("3".equals(admissionRequest.getOutStatus())){
|
||||
arMapper.delFileById(admissionRequest);
|
||||
id = String.valueOf(admissionRequest.getId());
|
||||
uuid = admissionRequest.getUuid();
|
||||
//修改人员入场状态
|
||||
arMapper.updatePersonStatus(admissionRequest);
|
||||
bean.setConsUserId(String.valueOf(admissionRequest.getId()));
|
||||
code = arMapper.updatePersonEnterInfo(bean);
|
||||
if (code == 0) {
|
||||
return new AjaxResult(201,"新增人员入场申请失败");
|
||||
}
|
||||
code = arMapper.updateSysUserInfo(bean);
|
||||
if (code == 0){
|
||||
|
||||
return new AjaxResult(201,"修改sys_user信息失败");
|
||||
}
|
||||
}else{
|
||||
return new AjaxResult(201,"新增失败,人员未离场!");
|
||||
}
|
||||
|
||||
} else {
|
||||
uuid = java.util.UUID.randomUUID().toString().replaceAll("-", "");
|
||||
code = arMapper.insertPersonEnterInfo(bean);
|
||||
if (code == 0) {
|
||||
throw new Exception("新增人员入场申请失败");
|
||||
return new AjaxResult(201,"新增人员入场申请失败");
|
||||
}
|
||||
id = bean.getConsUserId();
|
||||
bean.setUuid(uuid);
|
||||
|
|
@ -333,7 +351,7 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return code;
|
||||
return new AjaxResult(200,"操作成功");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -342,6 +360,7 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
AjaxResult ajaxResult = AjaxResult.success();
|
||||
//查询监理人员详细信息
|
||||
AdmissionRequest admissionRequest = arMapper.getData(bean);
|
||||
setOtherData3(admissionRequest);
|
||||
SysFileInfo fileInfo = new SysFileInfo();
|
||||
if (StringUtils.isNotEmpty(admissionRequest.getFacePath())) {
|
||||
fileInfo.setName("人脸照片.png");
|
||||
|
|
@ -367,7 +386,63 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
ajaxResult.put("data", admissionRequest);
|
||||
return ajaxResult;
|
||||
}
|
||||
public void setOtherData2(AdmissionRequest vo){
|
||||
try{
|
||||
String idCard=arMapper.getIdCardByPhone(vo.getPhone());
|
||||
if(!StringHelper.isNullOrEmptyString(idCard)){
|
||||
vo.setIdCard(idCard);
|
||||
String sex=getSexByIdCar(idCard);
|
||||
if(!StringHelper.isNullOrEmptyString(sex)){
|
||||
vo.setSex(sex);
|
||||
}
|
||||
int age= IdcardUtil.getAgeByIdCard(idCard);
|
||||
String data=IdcardUtil.getProvinceByIdCard(idCard);
|
||||
vo.setNatives(data);
|
||||
vo.setAge(Integer.toString(age));
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOtherData3(AdmissionRequest vo){
|
||||
try{
|
||||
String idCard=arMapper.getIdCardByPhone(vo.getPhone());
|
||||
if(!StringHelper.isNullOrEmptyString(idCard)){
|
||||
vo.setIdCard(idCard);
|
||||
String sex=getSexByIdCar2(idCard);
|
||||
if(!StringHelper.isNullOrEmptyString(sex)){
|
||||
vo.setSex(sex);
|
||||
}
|
||||
int age= IdcardUtil.getAgeByIdCard(idCard);
|
||||
String data=IdcardUtil.getProvinceByIdCard(idCard);
|
||||
vo.setNatives(data);
|
||||
vo.setAge(Integer.toString(age));
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
public String getSexByIdCar(String idCard){
|
||||
try{
|
||||
// 解析出生日期
|
||||
int gender = IdcardUtil.getGenderByIdCard(idCard);
|
||||
return (0 == gender?"女":"男");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
public String getSexByIdCar2(String idCard){
|
||||
try{
|
||||
// 解析出生日期
|
||||
int gender = IdcardUtil.getGenderByIdCard(idCard);
|
||||
return (0 == gender?"1":"0");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
/**
|
||||
* 获取人员信息列表
|
||||
*
|
||||
|
|
@ -410,6 +485,9 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
List<AdmissionRequest> list = arMapper.listEntranceOfPersonnel(bean);
|
||||
list.forEach(data->{
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
@ -539,11 +617,10 @@ public class AdmissionRequestServiceImpl implements AdmissionRequestService {
|
|||
if (idCard == null || idCard.length() != StaticVariableUtils.EIGHTEEN_NUM) {
|
||||
throw new IllegalArgumentException("Invalid ID card number");
|
||||
}
|
||||
|
||||
// 身份证号的第17位表示性别,奇数为男性,偶数为女性
|
||||
int sexIndicator = Integer.parseInt(idCard.substring(16, 17)) % 2;
|
||||
// 1表示男性,0表示女性
|
||||
return sexIndicator == 1 ? 1 : 0;
|
||||
return sexIndicator == 1 ? 0 : 1;
|
||||
}
|
||||
/**
|
||||
* 承包商或分包商入场资质申请提交
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ public class ConsApprovalServiceImpl implements ConsApprovalService {
|
|||
PageUtils.startPage();
|
||||
List<ConsUnit> list = mapper.getConsEntranceList(bean);
|
||||
list.forEach(data->{
|
||||
// if ("2".equals(data.getIntoStatus())) {
|
||||
// data.setIntoStatus("1");
|
||||
// }
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -99,6 +99,9 @@ public class ContEntryExitServiceImpl implements ContEntryExitService {
|
|||
List<ContEntryExit> list = ceMapper.listCommencementApproval(bean);
|
||||
list.forEach(data->{
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
@ -236,6 +239,9 @@ public class ContEntryExitServiceImpl implements ContEntryExitService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.project.service.impl;
|
||||
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.project.domain.ContractorBean;
|
||||
import com.bonus.project.mapper.ContractorMapper;
|
||||
import com.bonus.project.service.ContractorService;
|
||||
|
|
@ -50,6 +51,12 @@ public class ContractorServiceImpl implements ContractorService {
|
|||
*/
|
||||
@Override
|
||||
public int deleteContractorById(Long[] addressId) {
|
||||
for (int i = 0; i < addressId.length; i++) {
|
||||
String userId=cMapper.getUserIdByContractId(addressId[i]);
|
||||
if(StringUtils.isNotEmpty(userId)){
|
||||
cMapper.deleteUserId(userId);
|
||||
}
|
||||
}
|
||||
return cMapper.deleteContractorById(addressId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,6 +103,9 @@ public class EngineeringEquipmentBindServiceImpl implements EngineeringEquipment
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ public class EquipServiceImpl implements EquipService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
@ -214,6 +217,9 @@ public class EquipServiceImpl implements EquipService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.bonus.common.core.utils.StringUtils;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.entity.SysFileInfo;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.project.domain.AdmissionRequest;
|
||||
import com.bonus.project.domain.ImportArg;
|
||||
import com.bonus.project.domain.ImportBean;
|
||||
import com.bonus.project.domain.SubPerson;
|
||||
|
|
@ -71,7 +72,23 @@ public class ImportServiceImpl implements ImportService {
|
|||
System.out.println("重复的手机号: " + duplicatePhoneNumbers);
|
||||
return AjaxResult.success(duplicatePhoneNumbers + "");
|
||||
} else {
|
||||
System.out.println("没有重复的手机号");
|
||||
AdmissionRequest admissionRequest=new AdmissionRequest();
|
||||
admissionRequest.setProId(bean.getProId());
|
||||
//查询 人员是否已存在
|
||||
for (ImportArg agr:bean.getImportArgList()){
|
||||
if("01".equals(bean.getUserType())){
|
||||
admissionRequest.setPhone(agr.getArg5());
|
||||
}else{
|
||||
admissionRequest.setPhone(agr.getArg4());
|
||||
}
|
||||
//查询是否在其他工程 已入场
|
||||
AdmissionRequest proUser = mapper.getUserInToPro(admissionRequest);
|
||||
if(proUser!=null){
|
||||
if(!"3".equals(proUser.getOutStatus())){
|
||||
return new AjaxResult(201,"该人员已在其他工程入场,清先出场后再入场");
|
||||
}
|
||||
}
|
||||
}
|
||||
//先插入person表,查出所以产生的id 塞到
|
||||
code = mapper.insertPerson(bean.getUserType(),bean.getImportArgList());
|
||||
if (code == 0) {
|
||||
|
|
|
|||
|
|
@ -80,6 +80,9 @@ public class MaterialServiceImpl implements MaterialService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.project.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import com.bonus.common.core.utils.StaticVariableUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -8,10 +9,14 @@ import com.bonus.common.security.utils.SecurityUtils;
|
|||
import com.bonus.project.domain.*;
|
||||
import com.bonus.project.mapper.OutsourcingProMapper;
|
||||
import com.bonus.project.service.OutsourcingProService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.hibernate.validator.internal.util.StringHelper;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
|
@ -25,6 +30,7 @@ import java.util.Set;
|
|||
* Description:外委外包工程 逻辑处理层
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class OutsourcingProServiceImpl implements OutsourcingProService {
|
||||
|
||||
@Resource
|
||||
|
|
@ -58,8 +64,73 @@ public class OutsourcingProServiceImpl implements OutsourcingProService {
|
|||
*/
|
||||
@Override
|
||||
public List<SupervisorPerson> listSupervisorPerson(SupervisorPerson bean) {
|
||||
return mapper.listSupervisorPerson(bean);
|
||||
List<SupervisorPerson> list= mapper.listSupervisorPerson(bean);
|
||||
for (SupervisorPerson vo:list){
|
||||
setOtherData(vo);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public void setOtherData(SupervisorPerson vo){
|
||||
try{
|
||||
String idCard=mapper.getIdCardByPhone(vo.getPhone());
|
||||
if(!StringHelper.isNullOrEmptyString(idCard)){
|
||||
vo.setIdCard(idCard);
|
||||
String sex=getSexByIdCar(idCard);
|
||||
if(!StringHelper.isNullOrEmptyString(sex)){
|
||||
vo.setSex(sex);
|
||||
}
|
||||
Integer age= IdcardUtil.getAgeByIdCard(idCard);
|
||||
vo.setAge(age);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOtherData3(SupervisorPerson vo){
|
||||
try{
|
||||
String idCard=mapper.getIdCardByPhone(vo.getPhone());
|
||||
if(!StringHelper.isNullOrEmptyString(idCard)){
|
||||
vo.setIdCard(idCard);
|
||||
String sex=getSexByIdCar1(idCard);
|
||||
if(!StringHelper.isNullOrEmptyString(sex)){
|
||||
vo.setSex(sex);
|
||||
}
|
||||
Integer age= IdcardUtil.getAgeByIdCard(idCard);
|
||||
vo.setAge(age);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
public String getSexByIdCar1(String idCard){
|
||||
try{
|
||||
// 解析出生日期
|
||||
int gender = IdcardUtil.getGenderByIdCard(idCard);
|
||||
return (0 == gender?"1":"0");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
public String getSexByIdCar(String idCard){
|
||||
try{
|
||||
// 解析出生日期
|
||||
int gender = IdcardUtil.getGenderByIdCard(idCard);
|
||||
return (0 == gender?"女":"男");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
int gender = IdcardUtil.getGenderByIdCard("640402200603101215");
|
||||
System.err.println(gender);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据id查询监理人员详细信息
|
||||
* @param supervisorPerson 人员实体
|
||||
|
|
@ -70,6 +141,7 @@ public class OutsourcingProServiceImpl implements OutsourcingProService {
|
|||
AjaxResult ajaxResult = AjaxResult.success();
|
||||
//查询监理人员详细信息
|
||||
SupervisorPerson bean = mapper.listSupervisorPersonById(supervisorPerson);
|
||||
setOtherData3(bean);
|
||||
//人脸照片
|
||||
SysFileInfo fileInfo = new SysFileInfo();
|
||||
if(!StringUtils.isEmpty(bean.getFaceUrl())){
|
||||
|
|
@ -290,6 +362,9 @@ public class OutsourcingProServiceImpl implements OutsourcingProService {
|
|||
subPerson.setUserId(userId);
|
||||
subPerson.setType("1");
|
||||
List<SubPerson> getConsPersonList = mapper.getSubPersonList(subPerson);
|
||||
for (SubPerson vo:getConsPersonList){
|
||||
setOtherData2(vo);
|
||||
}
|
||||
List<String> list = mapper.getAnnotationsByTaskIdAndUserId(subPerson);
|
||||
// 使用哈希表存储注释列表,提高查找效率
|
||||
Set<String> annotationSet = new HashSet<>(list);
|
||||
|
|
@ -304,6 +379,26 @@ public class OutsourcingProServiceImpl implements OutsourcingProService {
|
|||
}
|
||||
return getConsPersonList;
|
||||
}
|
||||
|
||||
public void setOtherData2(SubPerson vo){
|
||||
try{
|
||||
String idCard=mapper.getIdCardByPhone(vo.getPhone());
|
||||
if(!StringHelper.isNullOrEmptyString(idCard)){
|
||||
vo.setIdCard(idCard);
|
||||
String sex=getSexByIdCar(idCard);
|
||||
if(!StringHelper.isNullOrEmptyString(sex)){
|
||||
vo.setSex(sex);
|
||||
}
|
||||
String data=IdcardUtil.getProvinceByIdCard(idCard);
|
||||
vo.setNativePlace(data);
|
||||
int age= IdcardUtil.getAgeByIdCard(idCard);
|
||||
vo.setAge(Integer.toString(age));
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询施工人员详细信息
|
||||
* @param subPerson 人员实体
|
||||
|
|
|
|||
|
|
@ -425,6 +425,9 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && dto.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
@ -535,6 +538,9 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && dto.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
@ -732,6 +738,9 @@ public class SecurityCheckServiceImpl implements SecurityCheckService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && dto.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
flowchart TD
|
||||
A[开始] --> B[获取隐患列表]
|
||||
B --> C{隐患列表为空?}
|
||||
C -->|Yes| F[结束]
|
||||
C -->|No| D[遍历隐患记录]
|
||||
D --> E[获取当前日期]
|
||||
E --> G[获取整改时间和延期时间]
|
||||
G --> H{isProcess为1?}
|
||||
H -->|Yes| I{延期时间不为空且delayCheckState为3?}
|
||||
I -->|Yes| J{当前日期小于延期时间且checkState为3?}
|
||||
J -->|Yes| K[设置状态为4]
|
||||
J -->|No| L{当前日期大于延期时间且checkState为3?}
|
||||
L -->|Yes| M[设置状态为8]
|
||||
L -->|No| N{当前日期小于延期时间且checkState不为3?}
|
||||
N -->|Yes| O[设置状态为7]
|
||||
N -->|No| P[设置状态为3]
|
||||
H -->|No| Q{延期时间不为空且delayCheckState为3?}
|
||||
Q -->|Yes| R{当前日期小于延期时间且isCheck为2?}
|
||||
R -->|Yes| S[设置状态为4]
|
||||
R -->|No| T{当前日期大于延期时间且isCheck为2?}
|
||||
T -->|Yes| U[设置状态为8]
|
||||
T -->|No| V{当前日期小于延期时间且isCheck不为2?}
|
||||
V -->|Yes| W[设置状态为7]
|
||||
V -->|No| X[设置状态为3]
|
||||
H -->|No| Y{当前日期小于整改时间且checkState为3?}
|
||||
Y -->|Yes| Z[设置状态为2]
|
||||
Y -->|No| AA{当前日期大于整改时间且checkState为3?}
|
||||
AA -->|Yes| AB[设置状态为6]
|
||||
AA -->|No| AC{当前日期小于整改时间且checkState不为3?}
|
||||
AC -->|Yes| AD[设置状态为5]
|
||||
AC -->|No| AE[设置状态为1]
|
||||
Q -->|No| AF{当前日期小于整改时间且isCheck为2?}
|
||||
AF -->|Yes| AG[设置状态为2]
|
||||
AF -->|No| AH{当前日期大于整改时间且isCheck为2?}
|
||||
AH -->|Yes| AI[设置状态为6]
|
||||
AH -->|No| AJ{当前日期小于整改时间且isCheck不为2?}
|
||||
AJ -->|Yes| AK[设置状态为5]
|
||||
AJ -->|No| AL[设置状态为1]
|
||||
K --> M --> O --> P --> S --> U --> W --> X --> Z --> AB --> AD --> AE --> AG --> AI --> AK --> AL --> M[更新数据库]
|
||||
M --> F[结束]
|
||||
|
|
@ -68,6 +68,9 @@ public class SubEntryExitServiceImpl implements SubEntryExitService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
@ -125,6 +128,9 @@ public class SubEntryExitServiceImpl implements SubEntryExitService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -181,8 +181,10 @@ public class SubServiceImpl implements SubService {
|
|||
PageUtils.startPage();
|
||||
List<SubPerson> list = mapper.enterPersonList(bean);
|
||||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -150,6 +150,9 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
|
|||
list.forEach(data->{
|
||||
|
||||
if("1".equals(data.getStatus()) && bean.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
@ -333,7 +336,12 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
|
|||
if (StaticVariableUtils.SUBMIT.equals(submitType)) {
|
||||
bean.setStatus("8");
|
||||
} else {
|
||||
bean.setStatus("9");
|
||||
String hisStatus=suMapper.getLinkStatus(bean);
|
||||
if(StringHelper.isNullOrEmptyString(hisStatus)){
|
||||
bean.setStatus("9");
|
||||
}else{
|
||||
bean.setStatus(hisStatus);
|
||||
}
|
||||
}
|
||||
code = suMapper.updateLinkRelation(bean);
|
||||
if (code == 0) {
|
||||
|
|
@ -447,6 +455,10 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
|
|||
}
|
||||
int num = suMapper.delSupervisionUnitUser(addressId);
|
||||
if (num > 0) {
|
||||
for (Long aLong : addressId) {
|
||||
String userId = suMapper.getUserIdBySupId(aLong);
|
||||
suMapper.deleteUserById(userId);
|
||||
}
|
||||
return AjaxResult.success("删除成功");
|
||||
}
|
||||
return AjaxResult.error("删除失败");
|
||||
|
|
|
|||
|
|
@ -171,6 +171,9 @@ public class ViolationManagementServiceImpl implements ViolationManagementServic
|
|||
List<ViolationPunishVo> list = mapper.getViolationPunishApprovalList(dto);
|
||||
list.forEach(data->{
|
||||
if("1".equals(data.getStatus()) && dto.getDataType()==1){
|
||||
if ("2".equals(data.getIntoStatus())) {
|
||||
data.setIntoStatus("1");
|
||||
}
|
||||
data.setFinalCheck(checkMaps.get(data.getProcInsId()));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 18085
|
||||
port: 28085
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
|
|
@ -17,14 +17,14 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM pt_cons_person pcp
|
||||
left join sys_user su on pcp.phone = su.phonenumber
|
||||
WHERE is_active = '1' and cons_user_id = #{consUserId}
|
||||
|
||||
limit 1
|
||||
</select>
|
||||
<select id="getFile" resultType="com.bonus.common.entity.SysFileInfo">
|
||||
SELECT
|
||||
|
|
@ -431,7 +431,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT pcp.cons_name AS consName,
|
||||
pcp.id_card AS idCard,
|
||||
pcp.cons_user_id as id,
|
||||
lcp.uuid
|
||||
lcp.uuid,lcp.out_status outStatus
|
||||
FROM pt_cons_person pcp
|
||||
LEFT JOIN lk_cont_person lcp ON lcp.pro_id = #{proId} AND lcp.cons_persion_id = pcp.cons_user_id
|
||||
WHERE pcp.phone = #{phone} AND pcp.is_active = '1'
|
||||
|
|
@ -440,6 +440,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="getUserInToPro" resultType="com.bonus.project.domain.AdmissionRequest">
|
||||
SELECT pcp.cons_name AS consName,
|
||||
pcp.id_card AS idCard,
|
||||
pcp.cons_user_id as id,
|
||||
lcp.uuid,lcp.out_status outStatus
|
||||
FROM pt_cons_person pcp
|
||||
LEFT JOIN lk_cont_person lcp ON lcp.cons_persion_id = pcp.cons_user_id
|
||||
WHERE pcp.phone = #{phone} AND pcp.is_active = '1' and lcp.pro_id != #{proId}
|
||||
<if test="consUserId != null and consUserId != ''">
|
||||
and pcp.cons_user_id != #{consUserId}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
<select id="checkUserTypeNameUnique" resultType="com.bonus.project.domain.AdmissionRequest">
|
||||
SELECT user_id AS id
|
||||
FROM sys_user
|
||||
|
|
@ -625,7 +639,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from lk_cont_sub
|
||||
where pro_id = #{proId} and cont_uuid = #{consUuid} and sub_uuid = #{subUuid}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getIdCardByPhone" resultType="java.lang.String">
|
||||
select id_card
|
||||
from sys_user
|
||||
where del_flag=0 and user_name=#{phone}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<update id="changeFlowStatus">
|
||||
|
|
@ -696,9 +715,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<update id="updatePersonStatus">
|
||||
update lk_cont_person
|
||||
set into_status = '0',
|
||||
cons_name=#{consName},
|
||||
out_status = '0',
|
||||
admission_date = null,
|
||||
departure_date = null
|
||||
departure_date = null,
|
||||
task_id=null,
|
||||
task_id_out=null
|
||||
where uuid = #{uuid}
|
||||
</update>
|
||||
<update id="updateSysUserInfo">
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{addressId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="deleteUserId">
|
||||
update sys_user set del_flag = '2' where user_id=#{userId}
|
||||
</update>
|
||||
|
||||
<select id="listContractor" resultType="com.bonus.project.domain.ContractorBean">
|
||||
select
|
||||
|
|
@ -40,4 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and pci.cont_name like concat('%',#{consName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getUserIdByContractId" resultType="java.lang.String">
|
||||
select pci.con_usert_id
|
||||
from pt_cont_info pci
|
||||
where cont_id=#{contId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -220,5 +220,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where phonenumber=#{arg4} and del_flag=0
|
||||
</if>
|
||||
</select>
|
||||
<select id="getUserInToPro" resultType="com.bonus.project.domain.AdmissionRequest">
|
||||
SELECT pcp.cons_name AS consName,
|
||||
pcp.id_card AS idCard,
|
||||
pcp.cons_user_id as id,
|
||||
lcp.uuid,lcp.out_status outStatus
|
||||
FROM pt_cons_person pcp
|
||||
LEFT JOIN lk_cont_person lcp ON lcp.cons_persion_id = pcp.cons_user_id
|
||||
WHERE pcp.phone = #{phone} AND pcp.is_active = '1' and lcp.pro_id != #{proId}
|
||||
<if test="consUserId != null and consUserId != ''">
|
||||
and pcp.cons_user_id != #{consUserId}
|
||||
</if>
|
||||
limit 1
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -557,4 +557,10 @@
|
|||
and mark_type = #{type}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getIdCardByPhone" resultType="java.lang.String">
|
||||
select id_card
|
||||
from sys_user
|
||||
where del_flag=0 and user_name=#{phone}
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
set status = #{status}
|
||||
where pro_id = #{proId} and sup_uuid = #{supUuid}
|
||||
</update>
|
||||
<select id="getLinkStatus" resultType="java.lang.String">
|
||||
select status
|
||||
from lk_pro_sup
|
||||
where pro_id = #{proId} and sup_uuid = #{supUuid}
|
||||
</select>
|
||||
<update id="updatePersonEnterInfo">
|
||||
update pt_sup_person
|
||||
<set>
|
||||
|
|
@ -109,6 +114,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<delete id="delLkSupPerson">
|
||||
delete from pt_sup_person where sup_user_id = #{supId} and is_active = 1
|
||||
</delete>
|
||||
<update id="deleteUserById">
|
||||
update sys_user set del_flag = '2' where user_id=#{userId}
|
||||
</update>
|
||||
|
||||
<select id="listSupervisionUnit" resultType="com.bonus.project.domain.SupervisionUnit">
|
||||
select (@rowNum := @rowNum + 1) as exportId,
|
||||
|
|
@ -237,5 +245,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from lk_sup_person
|
||||
where pro_id = #{proId} and sup_uuid = #{supUuid}
|
||||
</select>
|
||||
<select id="getUserIdBySupId" resultType="java.lang.String">
|
||||
select comm_user_id userId
|
||||
from pt_sup_info
|
||||
where sup_id=#{supId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -13,14 +13,14 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: nxdt
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@
|
|||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id,sp.post_name, u.dept_id, u.nick_name, u.user_name,u.user_type, u.parent_uuid, u.email,
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.user_type, u.parent_uuid, u.email,
|
||||
GROUP_CONCAT(sp.post_name,"") post_name,
|
||||
u.avatar, u.phonenumber,u.id_card,
|
||||
u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name,
|
||||
d.leader,
|
||||
|
|
@ -153,6 +154,7 @@
|
|||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
GROUP BY u.user_id
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ import de.codecentric.boot.admin.server.config.EnableAdminServer;
|
|||
@SpringBootApplication
|
||||
public class BonusMonitorApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(BonusMonitorApplication.class, args);
|
||||
System.err.println("(♥◠‿◠)ノ゙ 监控中心启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
|
|
|
|||
Loading…
Reference in New Issue