Merge branch 'cc_20250325_select' into 'master'
Cc 20250325 select See merge request hangzhou/java/custom_zxjp!58
This commit is contained in:
@@ -117,8 +117,7 @@ public class OrderSysInfoRequest {
|
||||
}
|
||||
public Boolean check(){
|
||||
if (Objects.equals(this.type, OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())){
|
||||
//todo
|
||||
if (StringUtils.isAnyBlank(this.xgjRegionId,this.xgjVicePresident,this.declareGoodsDate,this.declareGoodsLogisticsWarehouse)){
|
||||
if (StringUtils.isAnyBlank(this.xgjRegionId,this.xgjVicePresident,this.declareGoodsDate,this.declareGoodsLogisticsWarehouse,this.declareGoodsType)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,9 @@ public class OperationLogServiceImpl implements OperationLogService {
|
||||
public List<AuditInfoResponse> getAuditInfo(Long shopId, List<Integer> shopSubStageList) {
|
||||
List<AuditInfoResponse> responses = new ArrayList<>();
|
||||
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));
|
||||
//根据时间分组
|
||||
for (Date date : operationLogMap.keySet()) {
|
||||
|
||||
@@ -583,31 +583,27 @@ public class ShopServiceImpl implements ShopService {
|
||||
public ShopResponse getShopNameAndCode(Long shopId, Long lineId) {
|
||||
boolean flag = false;
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
|
||||
if (lineInfoDO == null){
|
||||
if (lineInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
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<>();
|
||||
if (lineId != null) {
|
||||
List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid, lineId);
|
||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||
for (MiniShopsResponse shopInfoDO : shopList) {
|
||||
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
|
||||
dto.setShopName(shopInfoDO.getShopName());
|
||||
dto.setShopCode(shopInfoDO.getShopCode());
|
||||
list.add(dto);
|
||||
}
|
||||
flag = true;
|
||||
List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid, lineId);
|
||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||
for (MiniShopsResponse shopInfoDO : shopList) {
|
||||
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
|
||||
dto.setShopName(shopInfoDO.getShopName());
|
||||
dto.setShopCode(shopInfoDO.getShopCode());
|
||||
list.add(dto);
|
||||
}
|
||||
Map<Long, MiniShopsResponse> shopMap = shopList.stream().collect(Collectors.toMap(MiniShopsResponse::getShopId, Function.identity()));
|
||||
//获取当前门店
|
||||
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());
|
||||
@@ -618,24 +614,30 @@ public class ShopServiceImpl implements ShopService {
|
||||
dto.setShopCode(oldShopDO.getShopCode());
|
||||
list.add(dto);
|
||||
}
|
||||
flag = true;
|
||||
}
|
||||
response.setShopList(list);
|
||||
if (flag) {
|
||||
return response;
|
||||
} else {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
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
|
||||
public String getFranchiseBrandName(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (shopInfo == null){
|
||||
if (shopInfo == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
return FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand());
|
||||
return FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user