Merge branch 'cc_20240603_wantarea_bigregion' into 'master'
Cc 20240603 wantarea bigregion See merge request hangzhou/java/custom_xfsg!10
This commit is contained in:
@@ -28,6 +28,8 @@ public class CommonConstants {
|
|||||||
//十秒
|
//十秒
|
||||||
public static final int TEN_SECONDS = 10000;
|
public static final int TEN_SECONDS = 10000;
|
||||||
|
|
||||||
|
public static final int ONE_SECONDS = 1000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跟进任务通知缓存时间 1小时
|
* 跟进任务通知缓存时间 1小时
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ public enum ErrorCodeEnum {
|
|||||||
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
|
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
|
||||||
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null),
|
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null),
|
||||||
YLF_ERROR(110001, "云立方接口异常!异常信息:{0}", null),
|
YLF_ERROR(110001, "云立方接口异常!异常信息:{0}", null),
|
||||||
|
YLF_DATA_IS_NULL(110002, "请联系工程维护云立方系统门店信息!", null),
|
||||||
//装修
|
//装修
|
||||||
THREE_ACCEPTANCE(121001,"提交三方验收失败",null),
|
THREE_ACCEPTANCE(121001,"提交三方验收失败",null),
|
||||||
CHECK_ITEM(12002,"插入检查项失败",null),
|
CHECK_ITEM(12002,"插入检查项失败",null),
|
||||||
|
|||||||
@@ -8,4 +8,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
public interface SystemBuildingShopMapper extends tk.mybatis.mapper.common.Mapper<SystemBuildingShopDO> {
|
public interface SystemBuildingShopMapper extends tk.mybatis.mapper.common.Mapper<SystemBuildingShopDO> {
|
||||||
void updateAuditByShopId(@Param("auditId") Long auditId,
|
void updateAuditByShopId(@Param("auditId") Long auditId,
|
||||||
@Param("shopId") Long shopId);
|
@Param("shopId") Long shopId);
|
||||||
|
|
||||||
|
SystemBuildingShopDO selectByShopId(@Param("shopId") Long shopId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,5 +13,10 @@
|
|||||||
set audit_id = #{auditId}
|
set audit_id = #{auditId}
|
||||||
where shop_id = #{shopId}
|
where shop_id = #{shopId}
|
||||||
</update>
|
</update>
|
||||||
|
<select id="selectByShopId" resultType="com.cool.store.entity.SystemBuildingShopDO">
|
||||||
|
select * from xfsg_system_building_shop
|
||||||
|
where shop_id = #{shopId};
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -44,4 +44,7 @@ public class FirstOrderDTO {
|
|||||||
@ApiModelProperty("订货金阶段状态,1500 待上传, 1505 带缴纳,1510 已完成")
|
@ApiModelProperty("订货金阶段状态,1500 待上传, 1505 带缴纳,1510 已完成")
|
||||||
private Integer firstOrderSubStage;
|
private Integer firstOrderSubStage;
|
||||||
|
|
||||||
|
@ApiModelProperty("提交人")
|
||||||
|
private String submiter;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ import java.util.Objects;
|
|||||||
@Data
|
@Data
|
||||||
public class SubmitLicenseResponse {
|
public class SubmitLicenseResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("审批人")
|
||||||
|
private String approver;
|
||||||
|
|
||||||
@ApiModelProperty("主键id")
|
@ApiModelProperty("主键id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,14 @@ public class OpeningOperationPlanVO {
|
|||||||
@ApiModelProperty("审核结果,0待审核,1通过,2拒绝")
|
@ApiModelProperty("审核结果,0待审核,1通过,2拒绝")
|
||||||
private Integer resultType;
|
private Integer resultType;
|
||||||
|
|
||||||
|
@ApiModelProperty("审批人")
|
||||||
|
private String approver;
|
||||||
|
@ApiModelProperty("提交人")
|
||||||
|
private String submiter;
|
||||||
|
|
||||||
|
public OpeningOperationPlanVO() {
|
||||||
|
}
|
||||||
|
|
||||||
public OpeningOperationPlanVO(OpeningOperationPlanDO openingOperationPlanDO) {
|
public OpeningOperationPlanVO(OpeningOperationPlanDO openingOperationPlanDO) {
|
||||||
|
|
||||||
this.resultType = openingOperationPlanDO.getResultType();
|
this.resultType = openingOperationPlanDO.getResultType();
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ public class ShopRentInfoVO {
|
|||||||
@ApiModelProperty("审核信息")
|
@ApiModelProperty("审核信息")
|
||||||
private AuditInfoVO auditInfo;
|
private AuditInfoVO auditInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("审批人")
|
||||||
|
private String approver;
|
||||||
|
|
||||||
public static ShopRentInfoVO build(ShopRentInfoDO shopRentInfo) {
|
public static ShopRentInfoVO build(ShopRentInfoDO shopRentInfo) {
|
||||||
ShopRentInfoVO result = new ShopRentInfoVO();
|
ShopRentInfoVO result = new ShopRentInfoVO();
|
||||||
result.setRentId(shopRentInfo.getId());
|
result.setRentId(shopRentInfo.getId());
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ public interface UserAuthMappingService {
|
|||||||
*/
|
*/
|
||||||
EnterpriseUserDO getUserByRoleEnumAndRegionId(UserRoleEnum userRoleEnum, Long regionId);
|
EnterpriseUserDO getUserByRoleEnumAndRegionId(UserRoleEnum userRoleEnum, Long regionId);
|
||||||
|
|
||||||
|
List<EnterpriseUserDO> getAllUserByRoleEnumAndRegionId(UserRoleEnum userRoleEnum, Long regionId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取有区域权限和职位 所有人
|
* 获取有区域权限和职位 所有人
|
||||||
* @param userRoleEnum
|
* @param userRoleEnum
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ import com.cool.store.request.SubmitLicenseRequest;
|
|||||||
import com.cool.store.response.GetStoreInfoByCodeResponse;
|
import com.cool.store.response.GetStoreInfoByCodeResponse;
|
||||||
import com.cool.store.response.LicenseListResponse;
|
import com.cool.store.response.LicenseListResponse;
|
||||||
import com.cool.store.response.SubmitLicenseResponse;
|
import com.cool.store.response.SubmitLicenseResponse;
|
||||||
import com.cool.store.service.ApplyLicenseService;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.service.CoolStoreStartFlowService;
|
|
||||||
import com.cool.store.service.PreparationService;
|
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
@@ -86,6 +84,15 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
|||||||
@Resource
|
@Resource
|
||||||
RedisUtilPool redisUtilPool;
|
RedisUtilPool redisUtilPool;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SystemBuildingShopMapper systemBuildingShopMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
EnterpriseUserMapper enterpriseUserMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -97,7 +104,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
|||||||
String lockKey = "submitLicense:" + request.getShopId();
|
String lockKey = "submitLicense:" + request.getShopId();
|
||||||
String lockValue = UUID.randomUUID().toString();
|
String lockValue = UUID.randomUUID().toString();
|
||||||
boolean acquired = Boolean.FALSE;
|
boolean acquired = Boolean.FALSE;
|
||||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.ONE_SECONDS);
|
||||||
if (!acquired) {
|
if (!acquired) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
}
|
}
|
||||||
@@ -200,6 +207,21 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
|||||||
return submitLicenseResponse;
|
return submitLicenseResponse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemBuildingShopDO systemBuildingShopDO = systemBuildingShopMapper.selectByShopId(shopId);
|
||||||
|
if (Objects.nonNull(systemBuildingShopDO) && Objects.nonNull(systemBuildingShopDO.getSupervisorId())){
|
||||||
|
EnterpriseUserDO userInfoByJobnumber = enterpriseUserMapper.getUserInfoByJobnumber(systemBuildingShopDO.getSupervisorId());
|
||||||
|
if (Objects.nonNull(userInfoByJobnumber)){
|
||||||
|
submitLicenseResponse.setApprover(userInfoByJobnumber.getName()+"_"+userInfoByJobnumber.getJobnumber());
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
EnterpriseUserDO enterpriseUserDO = userAuthMappingService.hierarchicalSearch(UserRoleEnum.SUPERVISION, shopInfoDO.getRegionId());
|
||||||
|
if (Objects.nonNull(enterpriseUserDO)){
|
||||||
|
submitLicenseResponse.setApprover(enterpriseUserDO.getName()+"_"+enterpriseUserDO.getJobnumber());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//3.既没有提交数据,也没有在鲜丰端查到证照信息,则返回空自由填写
|
//3.既没有提交数据,也没有在鲜丰端查到证照信息,则返回空自由填写
|
||||||
return submitLicenseResponse;
|
return submitLicenseResponse;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,20 +4,15 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dao.FirstOrderDAO;
|
|
||||||
import com.cool.store.dao.LineInfoDAO;
|
|
||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
|
||||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||||
import com.cool.store.entity.FirstOrderDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.LineInfoDO;
|
|
||||||
import com.cool.store.entity.ShopInfoDO;
|
|
||||||
import com.cool.store.entity.ShopStageInfoDO;
|
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.SMSMsgEnum;
|
import com.cool.store.enums.SMSMsgEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.ShopInfoMapper;
|
||||||
import com.cool.store.request.FirstOrderRequest;
|
import com.cool.store.request.FirstOrderRequest;
|
||||||
import com.cool.store.service.CoolStoreStartFlowService;
|
import com.cool.store.service.CoolStoreStartFlowService;
|
||||||
import com.cool.store.service.FirstOrderService;
|
import com.cool.store.service.FirstOrderService;
|
||||||
@@ -63,6 +58,9 @@ public class FirstOrderServiceImp implements FirstOrderService {
|
|||||||
@Resource
|
@Resource
|
||||||
private LineInfoDAO lineInfoDAO;
|
private LineInfoDAO lineInfoDAO;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ShopInfoDAO shopInfoDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer saveOrder(FirstOrderRequest request, LoginUserInfo user) {
|
public Integer saveOrder(FirstOrderRequest request, LoginUserInfo user) {
|
||||||
log.info("save order:{}", JSONObject.toJSONString(request));
|
log.info("save order:{}", JSONObject.toJSONString(request));
|
||||||
@@ -165,6 +163,9 @@ public class FirstOrderServiceImp implements FirstOrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
|
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getSupervisorUserId());
|
||||||
|
order.setSubmiter(Objects.isNull(userInfoById) ? null : userInfoById.getName()+"_"+userInfoById.getJobnumber());
|
||||||
return order;
|
return order;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,15 +9,14 @@ import com.cool.store.dto.Preparation.PreparationDTO;
|
|||||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||||
import com.cool.store.entity.EnterpriseUserDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
|
||||||
import com.cool.store.entity.ShopInfoDO;
|
|
||||||
import com.cool.store.entity.ShopStageInfoDO;
|
|
||||||
import com.cool.store.enums.AuditStatusEnum;
|
import com.cool.store.enums.AuditStatusEnum;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.UserRoleEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.UserAuthMappingMapper;
|
||||||
import com.cool.store.request.OpeningOperationPlanRequest;
|
import com.cool.store.request.OpeningOperationPlanRequest;
|
||||||
import com.cool.store.request.PlanListRequest;
|
import com.cool.store.request.PlanListRequest;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
@@ -64,6 +63,9 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ShopService shopService;
|
private ShopService shopService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long savePlan(OpeningOperationPlanRequest request, LoginUserInfo userInfo) {
|
public Long savePlan(OpeningOperationPlanRequest request, LoginUserInfo userInfo) {
|
||||||
@@ -109,20 +111,37 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
|||||||
log.error(" getPlanByShopId shopId is null");
|
log.error(" getPlanByShopId shopId is null");
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_IS_NULL);
|
throw new ServiceException(ErrorCodeEnum.SHOP_ID_IS_NULL);
|
||||||
}
|
}
|
||||||
|
OpeningOperationPlanVO openingOperationPlanVO = new OpeningOperationPlanVO();
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
OpeningOperationPlanDO openingOperationPlanDO = openingOperationPlanDAO.selectByShopId(shopId);
|
OpeningOperationPlanDO openingOperationPlanDO = openingOperationPlanDAO.selectByShopId(shopId);
|
||||||
|
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getSupervisorUserId());
|
||||||
|
List<EnterpriseUserDO> allUserByRoleEnumAndRegionId = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.OPERATIONS_MANAGER, shopInfo.getRegionId());
|
||||||
|
List<String> collect = new ArrayList<>();
|
||||||
|
if (CollectionUtils.isEmpty(allUserByRoleEnumAndRegionId)){
|
||||||
|
collect = null;
|
||||||
|
}else {
|
||||||
|
collect = allUserByRoleEnumAndRegionId.stream()
|
||||||
|
.filter(user -> user.getName() != null)
|
||||||
|
.map(user -> user.getName() + "_" + user.getJobnumber())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
if (Objects.nonNull(openingOperationPlanDO)) {
|
if (Objects.nonNull(openingOperationPlanDO)) {
|
||||||
OpeningOperationPlanVO openingOperationPlanVO = new OpeningOperationPlanVO(openingOperationPlanDO);
|
openingOperationPlanVO = new OpeningOperationPlanVO(openingOperationPlanDO);
|
||||||
|
openingOperationPlanVO.setSubmiter(Objects.isNull(userInfoById) ? null : userInfoById.getName()+"_"+userInfoById.getJobnumber());
|
||||||
|
openingOperationPlanVO.setApprover(CollectionUtils.isEmpty(collect) ? null : collect.stream().collect(Collectors.joining(",")));
|
||||||
String preparationUserIds = openingOperationPlanDO.getPreparationUserIds();
|
String preparationUserIds = openingOperationPlanDO.getPreparationUserIds();
|
||||||
List<String> stream = Arrays.stream(preparationUserIds.split(CommonConstants.COMMA)).collect(Collectors.toList());
|
List<String> stream = Arrays.stream(preparationUserIds.split(CommonConstants.COMMA)).collect(Collectors.toList());
|
||||||
List<UserNameDTO> nameByUserId = enterpriseUserDAO.getNameByUserId(stream);
|
List<UserNameDTO> nameByUserId = enterpriseUserDAO.getNameByUserId(stream);
|
||||||
String userName = enterpriseUserDAO.getUserName(openingOperationPlanDO.getSubmittedUserId());
|
String userName = enterpriseUserDAO.getUserName(openingOperationPlanDO.getSubmittedUserId());
|
||||||
openingOperationPlanVO.setSubmittedUserName(userName);
|
openingOperationPlanVO.setSubmittedUserName(userName);
|
||||||
openingOperationPlanVO.setPreparationUsers(nameByUserId);
|
openingOperationPlanVO.setPreparationUsers(nameByUserId);
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
|
||||||
openingOperationPlanVO.setShopName(shopInfo.getShopName());
|
openingOperationPlanVO.setShopName(shopInfo.getShopName());
|
||||||
return openingOperationPlanVO;
|
return openingOperationPlanVO;
|
||||||
}
|
}
|
||||||
return null;
|
openingOperationPlanVO.setSubmiter(Objects.isNull(userInfoById) ? null : userInfoById.getName()+"_"+userInfoById.getJobnumber());
|
||||||
|
openingOperationPlanVO.setApprover(CollectionUtils.isEmpty(collect) ? null : collect.stream().collect(Collectors.joining(",")));
|
||||||
|
return openingOperationPlanVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -214,7 +233,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
|||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取鲜丰订货金异常或更新状态失败");
|
log.error("获取鲜丰订货金异常或更新状态失败");
|
||||||
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
|
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -936,6 +936,10 @@ public class PointServiceImpl implements PointService {
|
|||||||
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(shopSubStageInfo.getAuditId());
|
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(shopSubStageInfo.getAuditId());
|
||||||
result.setAuditInfo(AuditInfoVO.convertVO(auditInfo));
|
result.setAuditInfo(AuditInfoVO.convertVO(auditInfo));
|
||||||
}
|
}
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(rentContract.getShopId());
|
||||||
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoById(lineInfo.getDevelopmentManager());
|
||||||
|
result.setApprover(Objects.isNull(enterpriseUserDO) ? null : enterpriseUserDO.getName()+"_"+enterpriseUserDO.getJobnumber());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
if (Objects.isNull(request.getShopId())) {
|
if (Objects.isNull(request.getShopId())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
SignFranchiseDO isExist = signFranchiseMapper.selectByShopId(request.getShopId());
|
||||||
|
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
|
}
|
||||||
String lockKey = "submitSignFranchise:" + request.getShopId();
|
String lockKey = "submitSignFranchise:" + request.getShopId();
|
||||||
//流水
|
//流水
|
||||||
String lockValue = UUID.randomUUID().toString();
|
String lockValue = UUID.randomUUID().toString();
|
||||||
|
|||||||
@@ -95,6 +95,10 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
|
|||||||
if (Objects.isNull(request)) {
|
if (Objects.isNull(request)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
}
|
}
|
||||||
|
SystemBuildingShopDO isExist = systemBuildingShopMapper.selectByShopId(request.getShopId());
|
||||||
|
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
|
}
|
||||||
String lockKey = "submitSysBuildStore:" + request.getShopId();
|
String lockKey = "submitSysBuildStore:" + request.getShopId();
|
||||||
String lockValue = UUID.randomUUID().toString();
|
String lockValue = UUID.randomUUID().toString();
|
||||||
boolean acquired = false;
|
boolean acquired = false;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.LineInfoDAO;
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
@@ -158,7 +159,7 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
|||||||
return leaseBaseInfoDO;
|
return leaseBaseInfoDO;
|
||||||
}
|
}
|
||||||
List<EnterpriseUserDO> userInfoByUserIds = enterpriseUserMapper.getUserInfoByUserIds(userIdsByMappingIds);
|
List<EnterpriseUserDO> userInfoByUserIds = enterpriseUserMapper.getUserInfoByUserIds(userIdsByMappingIds);
|
||||||
String nameList = userInfoByUserIds.stream().map(EnterpriseUserDO::getName).collect(Collectors.toList()).toString();
|
String nameList = userInfoByUserIds.stream().map(EnterpriseUserDO::getName).collect(Collectors.joining(CommonConstants.COMMA));
|
||||||
leaseBaseInfoDO.setStoreManager(nameList);
|
leaseBaseInfoDO.setStoreManager(nameList);
|
||||||
return leaseBaseInfoDO;
|
return leaseBaseInfoDO;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,6 +177,29 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EnterpriseUserDO> getAllUserByRoleEnumAndRegionId(UserRoleEnum userRoleEnum, Long regionId) {
|
||||||
|
// 查找有区域权限的人
|
||||||
|
List<String> authRegionUserIdList = authWarRegionUser(regionId);
|
||||||
|
if (CollectionUtils.isEmpty(authRegionUserIdList)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
Long roleId = userRoleEnum.getCode();
|
||||||
|
List<String> hasRoleUserIdList = sysRoleMapper.getPositionUserIds(Collections.singletonList(String.valueOf(roleId)));
|
||||||
|
if (CollectionUtils.isEmpty(hasRoleUserIdList)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
authRegionUserIdList.retainAll(hasRoleUserIdList);
|
||||||
|
if (CollectionUtils.isEmpty(authRegionUserIdList)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(authRegionUserIdList)) {
|
||||||
|
List<EnterpriseUserDO> userInfoByUserIds = enterpriseUserDAO.getUserInfoByUserIds(authRegionUserIdList);
|
||||||
|
return userInfoByUserIds;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<EnterpriseUserDO> getUserByRoleEnumAndRegionIdList(UserRoleEnum userRoleEnum, Long regionId) {
|
public List<EnterpriseUserDO> getUserByRoleEnumAndRegionIdList(UserRoleEnum userRoleEnum, Long regionId) {
|
||||||
// 查找有区域权限的人
|
// 查找有区域权限的人
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ public class YlfServiceImpl implements YlfService {
|
|||||||
return list.get(0);
|
return list.get(0);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if ("无对应数据!".equals(((ServiceException)e).getErrorMessage())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.YLF_DATA_IS_NULL);
|
||||||
|
}
|
||||||
throw new ServiceException(ErrorCodeEnum.YLF_ERROR,((ServiceException)e).getErrorMessage());
|
throw new ServiceException(ErrorCodeEnum.YLF_ERROR,((ServiceException)e).getErrorMessage());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -95,6 +98,9 @@ public class YlfServiceImpl implements YlfService {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("调用云立方获取项目列表异常,getProjectList error:{}", e);
|
log.info("调用云立方获取项目列表异常,getProjectList error:{}", e);
|
||||||
|
if ("无对应数据!".equals(((ServiceException)e).getErrorMessage())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.YLF_DATA_IS_NULL);
|
||||||
|
}
|
||||||
throw new ServiceException(ErrorCodeEnum.YLF_ERROR,((ServiceException)e).getErrorMessage());
|
throw new ServiceException(ErrorCodeEnum.YLF_ERROR,((ServiceException)e).getErrorMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user