Commit dc3f3c54 authored by liuzeheng's avatar liuzeheng

dev分支 一期并行5个问题

parent 3197e2d0
......@@ -381,12 +381,24 @@ public class CustomerDO extends BaseDO {
private String creditLevelNameEn;
/**
* 主联系人id
*/
@TableField(exist = false)
private String defaultContactId;
/**
* 主联系人
*/
@TableField(exist = false)
private String defaultContactName;
/**
* 主联系电话
* 不加区号
*/
@TableField(exist = false)
private String contactPhone ;
/**
* 主联系电话
*/
......
......@@ -69,6 +69,8 @@ public class CustomerRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "公海池捞取时间")
private Date catchTime;
@ApiModelProperty(value = "主联系人Id")
private Long defaultContactId ;
@ApiModelProperty(value = "主联系人")
private String defaultContactName;
......@@ -76,6 +78,9 @@ public class CustomerRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "主联系电话")
private String defaultContactPhone;
@ApiModelProperty(value = "主联系电话(不加区号)")
private String contactPhone ;
@ApiModelProperty(value = "主邮箱")
private String defaultEmail;
......
......@@ -19,6 +19,8 @@
from (select a.*,
c.name as default_contact_name,
concat(c.area_code, c.phone_new, '') as default_contact_phone,
c.phone_new as contactPhone,
c.id as defaultContactId,
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
......
......@@ -4,11 +4,14 @@ import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO;
import cn.iocoder.yudao.module.system.enums.permission.MenuIdEnum;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import cn.iocoder.yudao.module.depository.vo.warehouse.*;
import cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseDO;
import org.slf4j.LoggerFactory;
/**
* 仓库 Convert
......@@ -37,4 +40,7 @@ public interface WarehouseConvert {
List<RegionWarehouse> convertList03(List<RegionDO> list);
RegionWarehouse convert01(RegionDO bean);
List<WarehouseTreeRegionVO> convertTreeRegion(List<WarehouseTreeRegionVO> list);
}
......@@ -119,4 +119,18 @@ public interface WarehouseMapper extends BaseMapperX<WarehouseDO> {
"</script>"
})
RegionDO getRegion(Long warehouseId);
@ResultType(List.class)
@Select({
"SELECT w.*, ",
"r1.title_zh as guojiaName,",
"r2.title_zh as shiName ",
"FROM ecw_warehouse w ",
"LEFT JOIN ecw_region r1 ",
"ON w.guojia = r1.id ",
"LEFT JOIN ecw_region r2 ",
"ON w.shi = r2.id ",
"WHERE w.deleted = 0 AND w.`status` =0 AND trade_type =#{tradeType}"
})
List<WarehouseTreeRegionVO> getWarehouseTreeRegionList(@Param("tradeType") Integer tradeType);
}
......@@ -168,4 +168,6 @@ public interface WarehouseService {
List<WarehouseLineDO> getLineInfoList(List<WarehouseLineReq> reqList);
LogisticsInfoDto getStartInfoAndDestInfoByLineId(Long lineId);
List<WarehouseTreeRegionVO> getWarehouseTreeRegionList(Integer tradeType);
}
......@@ -492,4 +492,24 @@ public class WarehouseServiceImpl implements WarehouseService {
public LogisticsInfoDto getStartInfoAndDestInfoByLineId(Long lineId) {
return warehouseLineMapper.getStartInfoAndDestInfoByLineId(lineId);
}
@Override
public List<WarehouseTreeRegionVO> getWarehouseTreeRegionList(Integer tradeType) {
List<WarehouseTreeRegionVO> list =warehouseMapper.getWarehouseTreeRegionList(tradeType);
list.stream().forEach(s->s.getGuojiaName().replaceAll("\t",""));
Map<String,List<WarehouseTreeRegionVO>> map = (HashMap<String, List<WarehouseTreeRegionVO>>) list.stream()
.collect(Collectors.groupingBy(WarehouseTreeRegionVO::getGuojiaName));
List<WarehouseTreeRegionVO> regionVOList = new ArrayList<>() ;
for (Map.Entry<String, List<WarehouseTreeRegionVO>> m:map.entrySet()){
WarehouseTreeRegionVO v = new WarehouseTreeRegionVO();
v.setGuojiaName(m.getKey());
v.setChildren(m.getValue());
v.setGuojia(m.getValue().get(0).getGuojia());
v.setId(m.getValue().get(0).getGuojia());
regionVOList.add(v);
}
return regionVOList;
}
}
package cn.iocoder.yudao.module.depository.vo.warehouse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class WarehouseTreeRegionVO extends WarehouseRespVO{
private String guojiaName ;
private String shiName;
private Long pid ;
@ApiModelProperty(value = "子元素", example = "true")
private List<WarehouseTreeRegionVO> children;
}
//package cn.iocoder.yudao.module.depository.config;
//
//import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import springfox.documentation.spring.web.plugins.Docket;
//
//import javax.annotation.Resource;
//
///**
// * Swagger2 自动配置类
// * @author 捷道源码
// */
//@Configuration
//public class SwaggerDepositoryConfiguration {
// @Bean
// public Docket createDepositoryApi() {
// String title = "仓储信息";
// String author = "仓储信息";
// String basePackage = "cn.iocoder.yudao.module.depository";
// // 创建 Docket 对象
// return autoConfiguration.docket(title, author, basePackage);
// }
//
// @Resource
// private YudaoSwaggerAutoConfiguration autoConfiguration;
//}
package cn.iocoder.yudao.module.depository.config;
import cn.iocoder.yudao.framework.swagger.config.YudaoSwaggerAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.spring.web.plugins.Docket;
import javax.annotation.Resource;
/**
* Swagger2 自动配置类
* @author 捷道源码
*/
@Configuration
public class SwaggerDepositoryConfiguration {
@Bean
public Docket createDepositoryApi() {
String title = "仓储信息";
String author = "仓储信息";
String basePackage = "cn.iocoder.yudao.module.depository";
// 创建 Docket 对象
return autoConfiguration.docket(title, author, basePackage);
}
@Resource
private YudaoSwaggerAutoConfiguration autoConfiguration;
}
......@@ -92,6 +92,14 @@ public class WarehouseController {
return success(WarehouseConvert.INSTANCE.convertList(list));
}
@GetMapping("/getWarehouseTreeRegionList")
@ApiOperation("获得目的国、目的城市、目的仓列表")
@ApiImplicitParam(name = "tradeType", value = "进出口类型,1-进口,2-出口", required = false, example = "1", dataTypeClass = Integer.class)
public CommonResult<List<WarehouseTreeRegionVO>> getWarehouseTreeRegionList(@RequestParam(value = "tradeType", required = false) Integer tradeType){
List<WarehouseTreeRegionVO> list = warehouseService.getWarehouseTreeRegionList(tradeType);
return success(list);
}
@GetMapping("/page")
@ApiOperation("获得仓库分页")
// @PreAuthorize("@ss.hasPermission('ecw:warehouse:query')")
......
......@@ -175,6 +175,8 @@ public class OrderQueryVO {
@ApiModelProperty(value = "调仓始发仓")
private Long adjustToStartWarehouseId;
/**
* 调仓目的仓
*/
......@@ -407,6 +409,14 @@ public class OrderQueryVO {
@ApiModelProperty(value = "目的仓ID")
private Long destWarehouseId;
/**
* 目的国
*/
@ApiModelProperty(value = "目的国id")
private Long destCountryId ;
@ApiModelProperty(value = "发货客户ID")
private Long consignorId;
......@@ -499,7 +509,7 @@ public class OrderQueryVO {
private Integer airShipment;
/**
* 端口 {@link UserTypeEnum}
* 端口 {@link }
*/
@ApiModelProperty(value = "端口(默认管理端)")
private Integer userType = 2;
......
......@@ -897,6 +897,9 @@
<if test="query.objectiveId != null ">
AND ob.`objective_id` = #{query.objectiveId}
</if>
<if test="query.destCountryId != null ">
AND ob.`objective_country_id` = #{query.destCountryId}
</if>
<if test="query.consignorId != null ">
AND nor.`customer_id` = #{query.consignorId}
</if>
......
package cn.iocoder.yudao.module.product.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel("复制价格入参DTO")
@Data
public class CopyProductPriceDto {
@ApiModelProperty("商品价格ids,多个用逗号隔开")
private String productPriceIds;
@ApiModelProperty("商品id")
private String productId ;
}
......@@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseLine
import cn.iocoder.yudao.module.product.dal.dataobject.product.BasePrice;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductPriceStepDO;
import cn.iocoder.yudao.module.product.dto.AirClearancePriceResultDto;
import cn.iocoder.yudao.module.product.dto.CopyProductPriceDto;
import cn.iocoder.yudao.module.product.dto.ProductPriceExcelData;
import cn.iocoder.yudao.module.product.param.PriceParam;
import cn.iocoder.yudao.module.product.vo.productPrice.*;
......@@ -190,4 +191,10 @@ public interface ProductPriceService extends IService<ProductPriceDO> {
void batchAddPriceAir(ProductPriceBatchAddPriceAirVo batchAddPriceReqVo, ProductPriceCheckAO productPriceCheckAO);
void handleOrderException(Long priceId);
/**
* 从商品列表中某一商品进入复制价格
* @param dto
*/
void copyPriceByProductIds(CopyProductPriceDto dto);
}
......@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.product.service.product.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.apollo.core.dto.ChannelClearancePriceDto;
import cn.iocoder.yudao.framework.apollo.core.event.ChannelPriceEvent;
import cn.iocoder.yudao.framework.apollo.core.event.ProductLineUpdateAutoProcessOverWeightExceptionEvent;
......@@ -28,6 +29,7 @@ import cn.iocoder.yudao.module.product.dal.dataobject.productPriceSnapshot.Produ
import cn.iocoder.yudao.module.product.dal.mysql.product.*;
import cn.iocoder.yudao.module.product.dal.mysql.productPriceSnapshot.ProductPriceSnapshotMapper;
import cn.iocoder.yudao.module.product.dto.AirClearancePriceResultDto;
import cn.iocoder.yudao.module.product.dto.CopyProductPriceDto;
import cn.iocoder.yudao.module.product.dto.ProductPriceExcelData;
import cn.iocoder.yudao.module.product.enums.PriceTypeEnum;
import cn.iocoder.yudao.module.product.param.PriceParam;
......@@ -1596,7 +1598,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
for (Map.Entry<Integer, List<ProductPriceStepDO>> entry : priceTypeStepMap.entrySet()) {
Integer priceType = entry.getKey();
List<ProductPriceStepDO> priceTypeStepList = entry.getValue();
priceTypeStepList.sort(Comparator.comparing(ProductPriceStepDO::getRankNum));
priceTypeStepList.sort(Comparator.comparing(ProductPriceStepDO::getRankNum,Comparator.nullsLast(Comparator.naturalOrder())));
if(priceType == PriceTypeEnum.FREIGHT.getPriceType()) {
productPriceRespVO.setFreightPriceStepList(priceTypeStepList);
} else if(priceType == PriceTypeEnum.FULL_PRICE.getPriceType()) {
......@@ -3291,4 +3293,37 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
productPriceIdList.add(priceId);
handleOrderException(productPriceIdList, true);
}
/**
*
* 从商品列表中某一商品进入复制价格
* @param dto
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void copyPriceByProductIds(CopyProductPriceDto dto) {
List<Long> ids = Arrays.stream(dto.getProductPriceIds().split(StrUtil.COMMA)).map(Long::parseLong).collect(Collectors.toList());
//列出要复制的商品价格
List<ProductPriceDO> productPriceDOList = this.productPriceMapper.selectList(new LambdaQueryWrapper<ProductPriceDO>().in(ProductPriceDO::getId, ids));
ProductPriceAirCreateReqVO createReqVO = new ProductPriceAirCreateReqVO() ;
createReqVO.setProductId(Long.parseLong(dto.getProductId()) );
List<LineChannelVo> lineChannelList = createReqVO.getLineChannelList();
ProductDO productDO = checkUpdateStatus(lineChannelList, createReqVO.getProductId());
WarehouseLineSearchVO searchVO = new WarehouseLineSearchVO();
List<WarehouseLineDO> warehouseLineList = warehouseService.openedRouterList(searchVO);
List<ProductDO> productList = Collections.singletonList(productDO);
//商品线路保存在redis。更新成功后移除
//batchSaveKeyInCache(productList, lineChannelList);
createReqVO.setSync(true);
createReqVO.setBatch(false);
//batchUpdateAir(createReqVO, warehouseLineList, productList);
}
}
......@@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.product.convert.product.ProductPriceConvert;
import cn.iocoder.yudao.module.product.convert.productPriceSnapshot.ProductPriceSnapshotConvert;
import cn.iocoder.yudao.module.product.dal.dataobject.product.ProductPriceDO;
import cn.iocoder.yudao.module.product.dal.dataobject.productPriceSnapshot.ProductPriceSnapshotDO;
import cn.iocoder.yudao.module.product.dto.CopyProductPriceDto;
import cn.iocoder.yudao.module.product.dto.ProductPriceExcel;
import cn.iocoder.yudao.module.product.param.PriceParam;
import cn.iocoder.yudao.module.product.service.product.ProductPriceService;
......@@ -266,4 +267,15 @@ public class ProductPriceController {
public void updateOrderException(@RequestParam("priceId") Long priceId) {
productPriceService.handleOrderException(priceId);
}
/**
* 从商品列表中某一商品进入复制价格
* @param dto
*/
@ApiOperation("从商品列表中某一商品进入复制价格")
@PostMapping("/copyPriceByProductIds")
public void copyPriceByProductIds(@RequestBody CopyProductPriceDto dto ){
productPriceService.copyPriceByProductIds(dto);
}
}
......@@ -97,7 +97,7 @@ public interface BoxMergePkgMapper extends AbstractMapper<BoxMergePkgDO> {
BoxMergePkgDO getMergePkgInfoById(@Param("id") Long id);
@Select("<script>" +
"select t.order_id,t.order_no,t.product_record,t.sum_num,t.sum_volume,t.sum_weight,t.sum_quantity,t1.tally_time " +
"select t.order_id,t.order_no,t.product_record,t.sum_num,t.sum_volume,t.sum_weight,t.sum_quantity,t1.tally_time ,t.customs_type " +
"from ecw_box_preload_goods t2 left join ecw_order t on t2.order_id=t.order_id " +
"LEFT JOIN ecw_box_tally t1 on t.order_id=t1.order_id and t1.deleted=0 and t1.shipment_id=#{shipmentId} " +
"where 1=1 and not exists (select 1 from ecw_box_pkg_order a where a.order_id=t.order_id and a.deleted=0) " +
......
......@@ -49,4 +49,7 @@ public class BoxMergePkgWebVO {
@ApiModelProperty("合包箱号")
private String pkgNum;
@ApiModelProperty(value = "单证报关 1 我司全代 2自单代报 3混合报关")
private String customsType;
}
......@@ -46,31 +46,31 @@ spring:
datasource:
master:
name: jiedao
url: jdbc:mysql://110.41.143.128:3306/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
url: jdbc:mysql://159.75.224.138:2299/${spring.datasource.dynamic.datasource.master.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: mysql@2024
password: mysql@2023
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
name: jiedao
url: jdbc:mysql://110.41.143.128:3306/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
url: jdbc:mysql://159.75.224.138:2299/${spring.datasource.dynamic.datasource.slave.name}?useUnicode=true&useSSL=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&rewriteBatchedStatements=TRUE
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: mysql@2024
password: mysql@2023
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis:
host: 110.41.143.128 # 地址
port: 6379 # 端口
host: 159.75.224.138 # 地址
port: 2291 # 端口
database: 0 # 数据库索引
password: 123456
password: redis@2022
timeout: 60s
connect-timeout: 60s
redis-limiter:
redis-host: 110.41.143.128 # redis server IP 默认值:127.0.0.1
redis-port: 6379 # redis service 端口 默认值:6379
redis-host: 159.75.224.138 # redis server IP 默认值:127.0.0.1
redis-port: 2291 # redis service 端口 默认值:6379
redis-db: 4 # redis service 数据库 默认值:6379
redis-password: 123456 # redis 访问密码 默认值:null
redis-password: redis@2022 # redis 访问密码 默认值:null
redis-connection-timeout: 2000 # redis 连接超时时间 默认值:2000
redis-pool-max-idle: 50 # redis 连接池最大空闲连接数 默认值:50
redis-pool-min-idle: 10 # redis 连接池最小空闲连接数 默认值: 10
......
......@@ -33,12 +33,16 @@
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 文件名称 -->
<fileNamePattern>${log.service.output:-service.log}-%d{yyyy-MM-dd}.%i</fileNamePattern>
<!-- 启动服务时,是否清理历史日志,一般不建议清理 -->
<cleanHistoryOnStart>${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-true}</cleanHistoryOnStart>
<!-- 文件大小 -->
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>50MB</maxFileSize>
<maxFileSize>1MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!-- 文件最大保存历史数量 -->
<MaxHistory>10</MaxHistory>
<MaxHistory>1</MaxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment