|
@@ -47,8 +47,10 @@ import org.springframework.util.StringUtils;
|
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.sql.*;
|
|
import java.sql.*;
|
|
|
|
+import java.util.Date;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -293,6 +295,8 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public String editUserInfo(CommonUser commonUser) throws ServiceException {
|
|
public String editUserInfo(CommonUser commonUser) throws ServiceException {
|
|
|
|
+ //获取当前年月日
|
|
|
|
+ SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
|
|
//货主
|
|
//货主
|
|
if ("1".equals(commonUser.getIdentityFlag())) {
|
|
if ("1".equals(commonUser.getIdentityFlag())) {
|
|
//查询货主信息
|
|
//查询货主信息
|
|
@@ -309,18 +313,24 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
hyCargoOwnerInfo.setAuthenticationStatus(StatusEnum.IDENTITY_COMPLETED_NO.getName());
|
|
hyCargoOwnerInfo.setAuthenticationStatus(StatusEnum.IDENTITY_COMPLETED_NO.getName());
|
|
hyCargoOwnerInfo.setBackStageStatus(StatusEnum.IDENTITY_COMPLETED_NO.getName());
|
|
hyCargoOwnerInfo.setBackStageStatus(StatusEnum.IDENTITY_COMPLETED_NO.getName());
|
|
hyCargoOwnerInfo.setBackStageStatusKey(StatusEnum.IDENTITY_COMPLETED_NO.getFlag());
|
|
hyCargoOwnerInfo.setBackStageStatusKey(StatusEnum.IDENTITY_COMPLETED_NO.getFlag());
|
|
|
|
+ //计算解禁日期
|
|
|
|
+ Calendar calendar1 = Calendar.getInstance();
|
|
|
|
+ calendar1.add(Calendar.DATE, commonUser.getDisabledDays());
|
|
|
|
+ String date = f.format(calendar1.getTime());
|
|
|
|
+ hyCargoOwnerInfo.setLiftingDate(date);
|
|
commonUser.setStatus(0);
|
|
commonUser.setStatus(0);
|
|
}
|
|
}
|
|
//启用
|
|
//启用
|
|
else {
|
|
else {
|
|
hyCargoOwnerInfo.setAuthenticationStatusKey(hyCargoOwnerInfo.getDisablingStatusKey());
|
|
hyCargoOwnerInfo.setAuthenticationStatusKey(hyCargoOwnerInfo.getDisablingStatusKey());
|
|
hyCargoOwnerInfo.setAuthenticationStatus(hyCargoOwnerInfo.getDisablingStatus());
|
|
hyCargoOwnerInfo.setAuthenticationStatus(hyCargoOwnerInfo.getDisablingStatus());
|
|
- hyCargoOwnerInfo.setBackStageStatus(hyCargoOwnerInfo.getDisablingBackStatusKey());
|
|
|
|
- hyCargoOwnerInfo.setBackStageStatusKey(hyCargoOwnerInfo.getDisablingBackStatus());
|
|
|
|
- hyCargoOwnerInfo.setDisablingStatusKey(null);
|
|
|
|
- hyCargoOwnerInfo.setDisablingStatus(null);
|
|
|
|
- hyCargoOwnerInfo.setDisablingBackStatusKey(null);
|
|
|
|
- hyCargoOwnerInfo.setDisablingBackStatus(null);
|
|
|
|
|
|
+ hyCargoOwnerInfo.setBackStageStatus(hyCargoOwnerInfo.getDisablingBackStatus());
|
|
|
|
+ hyCargoOwnerInfo.setBackStageStatusKey(hyCargoOwnerInfo.getDisablingBackStatusKey());
|
|
|
|
+ hyCargoOwnerInfo.setDisablingStatusKey("");
|
|
|
|
+ hyCargoOwnerInfo.setDisablingStatus("");
|
|
|
|
+ hyCargoOwnerInfo.setDisablingBackStatusKey("");
|
|
|
|
+ hyCargoOwnerInfo.setDisablingBackStatus("");
|
|
|
|
+ hyCargoOwnerInfo.setLiftingDate("");
|
|
commonUser.setStatus(1);
|
|
commonUser.setStatus(1);
|
|
}
|
|
}
|
|
cargoOwnerInfoService.updateById(hyCargoOwnerInfo);
|
|
cargoOwnerInfoService.updateById(hyCargoOwnerInfo);
|
|
@@ -342,18 +352,24 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
hyDriverInfo.setAuthenticationStatus(StatusEnum.IDENTITY_COMPLETED_NO.getName());
|
|
hyDriverInfo.setAuthenticationStatus(StatusEnum.IDENTITY_COMPLETED_NO.getName());
|
|
hyDriverInfo.setBackStageStatus(StatusEnum.IDENTITY_COMPLETED_NO.getName());
|
|
hyDriverInfo.setBackStageStatus(StatusEnum.IDENTITY_COMPLETED_NO.getName());
|
|
hyDriverInfo.setBackStageStatusKey(StatusEnum.IDENTITY_COMPLETED_NO.getFlag());
|
|
hyDriverInfo.setBackStageStatusKey(StatusEnum.IDENTITY_COMPLETED_NO.getFlag());
|
|
|
|
+ //计算解禁日期
|
|
|
|
+ Calendar calendar1 = Calendar.getInstance();
|
|
|
|
+ calendar1.add(Calendar.DATE, commonUser.getDisabledDays());
|
|
|
|
+ String date = f.format(calendar1.getTime());
|
|
|
|
+ hyDriverInfo.setLiftingDate(date);
|
|
commonUser.setStatus(0);
|
|
commonUser.setStatus(0);
|
|
}
|
|
}
|
|
//启用
|
|
//启用
|
|
else {
|
|
else {
|
|
hyDriverInfo.setAuthenticationStatusKey(hyDriverInfo.getDisablingStatusKey());
|
|
hyDriverInfo.setAuthenticationStatusKey(hyDriverInfo.getDisablingStatusKey());
|
|
hyDriverInfo.setAuthenticationStatus(hyDriverInfo.getDisablingStatus());
|
|
hyDriverInfo.setAuthenticationStatus(hyDriverInfo.getDisablingStatus());
|
|
- hyDriverInfo.setBackStageStatus(hyDriverInfo.getDisablingBackStatusKey());
|
|
|
|
- hyDriverInfo.setBackStageStatusKey(hyDriverInfo.getDisablingBackStatus());
|
|
|
|
- hyDriverInfo.setDisablingStatusKey(null);
|
|
|
|
- hyDriverInfo.setDisablingStatus(null);
|
|
|
|
- hyDriverInfo.setDisablingBackStatusKey(null);
|
|
|
|
- hyDriverInfo.setDisablingBackStatus(null);
|
|
|
|
|
|
+ hyDriverInfo.setBackStageStatus(hyDriverInfo.getDisablingBackStatus());
|
|
|
|
+ hyDriverInfo.setBackStageStatusKey(hyDriverInfo.getDisablingBackStatusKey());
|
|
|
|
+ hyDriverInfo.setDisablingStatusKey("");
|
|
|
|
+ hyDriverInfo.setDisablingStatus("");
|
|
|
|
+ hyDriverInfo.setDisablingBackStatusKey("");
|
|
|
|
+ hyDriverInfo.setDisablingBackStatus("");
|
|
|
|
+ hyDriverInfo.setLiftingDate("");
|
|
commonUser.setStatus(1);
|
|
commonUser.setStatus(1);
|
|
}
|
|
}
|
|
driverInfoService.updateById(hyDriverInfo);
|
|
driverInfoService.updateById(hyDriverInfo);
|