Merge branch 'cc_20250325_select' into 'master'

Cc 20250325 select

See merge request hangzhou/java/custom_zxjp!58
This commit is contained in:
苏竹红
2025-04-17 13:08:54 +00:00
3 changed files with 34 additions and 30 deletions

View File

@@ -117,8 +117,7 @@ public class OrderSysInfoRequest {
} }
public Boolean check(){ public Boolean check(){
if (Objects.equals(this.type, OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())){ if (Objects.equals(this.type, OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())){
//todo if (StringUtils.isAnyBlank(this.xgjRegionId,this.xgjVicePresident,this.declareGoodsDate,this.declareGoodsLogisticsWarehouse,this.declareGoodsType)){
if (StringUtils.isAnyBlank(this.xgjRegionId,this.xgjVicePresident,this.declareGoodsDate,this.declareGoodsLogisticsWarehouse)){
return false; return false;
} }
} }

View File

@@ -90,6 +90,9 @@ public class OperationLogServiceImpl implements OperationLogService {
public List<AuditInfoResponse> getAuditInfo(Long shopId, List<Integer> shopSubStageList) { public List<AuditInfoResponse> getAuditInfo(Long shopId, List<Integer> shopSubStageList) {
List<AuditInfoResponse> responses = new ArrayList<>(); List<AuditInfoResponse> responses = new ArrayList<>();
List<OperationLogDO> logList = operationLogDAO.getByShopSubStage(shopId, shopSubStageList, null); List<OperationLogDO> logList = operationLogDAO.getByShopSubStage(shopId, shopSubStageList, null);
if (CollectionUtils.isEmpty(logList)) {
return null;
}
Map<Date, List<OperationLogDO>> operationLogMap = logList.stream().collect(Collectors.groupingBy(OperationLogDO::getCreateTime)); Map<Date, List<OperationLogDO>> operationLogMap = logList.stream().collect(Collectors.groupingBy(OperationLogDO::getCreateTime));
//根据时间分组 //根据时间分组
for (Date date : operationLogMap.keySet()) { for (Date date : operationLogMap.keySet()) {

View File

@@ -583,31 +583,27 @@ public class ShopServiceImpl implements ShopService {
public ShopResponse getShopNameAndCode(Long shopId, Long lineId) { public ShopResponse getShopNameAndCode(Long shopId, Long lineId) {
boolean flag = false; boolean flag = false;
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId); LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
if (lineInfoDO == null){ if (lineInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
} }
ShopResponse response = new ShopResponse(); ShopResponse response = new ShopResponse();
if (shopId != null) {
MiniShopsResponse shopInfo = shopInfoDAO.currentShopWhetherOpen(shopId, eid);
if (Objects.nonNull(shopInfo) && StringUtils.isNotBlank(shopInfo.getShopCode())) {
ShopNameAndCodeDTO currentShop = new ShopNameAndCodeDTO();
currentShop.setShopName(shopInfo.getShopName());
currentShop.setShopCode(shopInfo.getShopCode());
response.setCurrentShop(currentShop);
flag = true;
}
}
List<ShopNameAndCodeDTO> list = new ArrayList<>(); List<ShopNameAndCodeDTO> list = new ArrayList<>();
if (lineId != null) { List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid, lineId);
List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid, lineId); if (CollectionUtils.isNotEmpty(shopList)) {
if (CollectionUtils.isNotEmpty(shopList)) { for (MiniShopsResponse shopInfoDO : shopList) {
for (MiniShopsResponse shopInfoDO : shopList) { ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO(); dto.setShopName(shopInfoDO.getShopName());
dto.setShopName(shopInfoDO.getShopName()); dto.setShopCode(shopInfoDO.getShopCode());
dto.setShopCode(shopInfoDO.getShopCode()); list.add(dto);
list.add(dto); }
} Map<Long, MiniShopsResponse> shopMap = shopList.stream().collect(Collectors.toMap(MiniShopsResponse::getShopId, Function.identity()));
flag = true; //获取当前门店
if (Objects.nonNull(shopMap.get(shopId))) {
ShopNameAndCodeDTO currentShop = new ShopNameAndCodeDTO();
currentShop.setShopName(shopMap.get(shopId).getShopName());
currentShop.setShopCode(shopMap.get(shopId).getShopCode());
response.setCurrentShop(currentShop);
} }
} }
List<OldShopDO> oldMobile = oldShopDAO.getByMobile(lineInfoDO.getMobile()); List<OldShopDO> oldMobile = oldShopDAO.getByMobile(lineInfoDO.getMobile());
@@ -618,24 +614,30 @@ public class ShopServiceImpl implements ShopService {
dto.setShopCode(oldShopDO.getShopCode()); dto.setShopCode(oldShopDO.getShopCode());
list.add(dto); list.add(dto);
} }
flag = true;
} }
response.setShopList(list); if (CollectionUtils.isEmpty(list)) {
if (flag) {
return response;
} else {
return null; return null;
} }
//去重
List<ShopNameAndCodeDTO> distinctList = new ArrayList<>(list.stream()
.collect(Collectors.toMap(
ShopNameAndCodeDTO::getShopCode,
dto -> dto,
(existing, replacement) -> existing
))
.values());
response.setShopList(distinctList);
return response;
} }
@Override @Override
public String getFranchiseBrandName(Long shopId) { public String getFranchiseBrandName(Long shopId) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId); ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (shopInfo == null){ if (shopInfo == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST); throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
} }
return FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand()); return FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand());
} }