记得上下班打卡 | git大法好,push需谨慎

Commit ddf6a58b authored by zhanggb's avatar zhanggb

Merge remote-tracking branch 'origin/dev_erp_gjy' into dev_erp_gjy

parents d593f722 9d0f56e4
......@@ -68,8 +68,8 @@ public class GoblinStoreMgtDigitalGoodsAddParam implements Serializable {
@ApiModelProperty(position = 26, required = true, value = "ERP类型[WANGDIAN-旺店通]")
@Pattern(regexp = "\\b(WANGDIAN)\\b", message = "ERP类型无效")
private String erpType;
@ApiModelProperty(position = 26, required = false, value = "ERP商品编码[藏品品对应在ERP的商品编码,默认为空]")
@Size(max = 40, message = "ERP商品编码长度限制40")
@ApiModelProperty(position = 26, required = false, value = "ERP货品编号[藏品品对应在ERP的商品编码,默认为空]")
@Size(max = 40, message = "ERP货品编号长度限制40")
private String spuErpCode;
/**
......
......@@ -113,8 +113,8 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
@Size(max = 10000, message = "藏品详情内容过长")
private String details;
@ApiModelProperty(position = 30, required = false, value = "ERP规格编码")
@Size(max = 40, message = "ERP规格编码长度限制40")
@ApiModelProperty(position = 30, required = false, value = "ERP商家编码")
@Size(max = 40, message = "ERP商家编码长度限制40")
private String skuErpCode;
@ApiModelProperty(position = 30, value = "ERP托管[0-否|1-是],默认0")
@Pattern(regexp = "\\b(0|1)\\b", message = "ERP托管参数无效")
......
......@@ -99,8 +99,8 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
@ApiModelProperty(position = 26, required = true, value = "ERP类型[WANGDIAN-旺店通]")
@Pattern(regexp = "\\b(WANGDIAN)\\b", message = "ERP类型无效")
private String erpType;
@ApiModelProperty(position = 26, required = false, value = "ERP商品编码[商品对应在ERP的商品编码,默认为空]")
@Size(max = 40, message = "ERP商品编码长度限制40")
@ApiModelProperty(position = 26, required = false, value = "ERP货品编号[商品对应在ERP的商品编码,默认为空]")
@Size(max = 40, message = "ERP货品编号长度限制40")
private String spuErpCode;
/**
......
......@@ -24,8 +24,8 @@ public class GoblinStoreMgtGoodsAddSkuParam implements Serializable {
@ApiModelProperty(position = 10, required = false, value = "单品条码")
@Pattern(regexp = LnsRegex.Valid.ALPHABET_NUMBER_32, message = "单品条码格式或长度有误")
private String skuBarCode;
@ApiModelProperty(position = 10, required = false, value = "ERP规格编码")
@Size(max = 40, message = "ERP规格编码长度限制40")
@ApiModelProperty(position = 10, required = false, value = "ERP商家编码")
@Size(max = 40, message = "ERP商家编码长度限制40")
private String skuErpCode;
@ApiModelProperty(position = 10, value = "ERP托管[0-否|1-是],默认0")
@Pattern(regexp = "\\b(0|1)\\b", message = "ERP托管参数无效")
......
......@@ -34,8 +34,8 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
@ApiModelProperty(position = 12, required = false, value = "单品条码")
@Pattern(regexp = LnsRegex.Valid.ALPHABET_NUMBER_32, message = "单品条码格式或长度有误")
private String skuBarCode;
@ApiModelProperty(position = 12, required = false, value = "ERP规格编码")
@Size(max = 40, message = "ERP规格编码长度限制40")
@ApiModelProperty(position = 12, required = false, value = "ERP商家编码")
@Size(max = 40, message = "ERP商家编码长度限制40")
private String skuErpCode;
@ApiModelProperty(position = 12, value = "ERP托管[0-否|1-是],默认0")
@Pattern(regexp = "\\b(0|1)\\b", message = "ERP托管参数无效")
......
......@@ -26,7 +26,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String spuNo;
@ApiModelProperty(position = 12, value = "商品条码[32]")
private String spuBarCode;
@ApiModelProperty(position = 12, value = "ERP商品编码[64]")
@ApiModelProperty(position = 12, value = "ERP货品编号[64]")
private String spuErpCode;
@ApiModelProperty(position = 12, value = "ERP类型[WANGDIAN-旺店通]")
private String erpType;
......
......@@ -27,7 +27,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String skuNo;
@ApiModelProperty(position = 12, value = "单品条码[32]")
private String skuBarCode;
@ApiModelProperty(position = 12, value = "ERP规格编码[64]")
@ApiModelProperty(position = 12, value = "商家编码[64]")
private String skuErpCode;
@ApiModelProperty(position = 12, value = "ERP类型[WANGDIAN-旺店通]")
private String erpType;
......
......@@ -41,7 +41,7 @@ public class GoblinGoods implements Serializable {
private String spuBarCode;
/**
* ERP商品编码
* ERP货品编号
*/
private String spuErpCode;
......
......@@ -38,7 +38,7 @@ public class GoblinGoodsSku implements Serializable {
private String skuBarCode;
/**
* ERP规格编码
* ERP商家编码
*/
private String skuErpCode;
......
......@@ -226,12 +226,12 @@ public class GoblinNftOrder implements Serializable, Cloneable {
private LocalDateTime updatedAt;
/**
* ERP商品编码
* ERP货品编号
*/
private String spuErpCode;
/**
* ERP规格编码
* ERP商家编码
*/
private String skuErpCode;
......
......@@ -126,12 +126,12 @@ public class GoblinOrderSku implements Serializable,Cloneable {
private BigDecimal cateRate;
/**
* ERP商品编码
* ERP货品编号
*/
private String spuErpCode;
/**
* ERP规格编码
* ERP商家编码
*/
private String skuErpCode;
......
......@@ -1201,7 +1201,7 @@ create table goblin_goods_anticipate_mix
# -- >>------------------------------------------------------------------------------------ |20221110商品导入扫码
alter table goblin_goods modify spu_no varchar(64) not null comment '商品编码';
alter table goblin_goods add spu_bar_code varchar(64) null comment '商品条码' after spu_no;
alter table goblin_goods add spu_erp_code varchar(64) null comment 'ERP商品编码' after spu_bar_code;
alter table goblin_goods add spu_erp_code varchar(64) null comment 'ERP货品编号' after spu_bar_code;
alter table goblin_goods_sku modify sku_no varchar(64) not null comment '单品编码';
alter table goblin_goods_sku add sku_bar_code varchar(64) null comment '单品条码' after sku_no;
......@@ -1215,14 +1215,14 @@ alter table goblin_goods_sku add erp_warehouse_no varchar(64) null comment 'ERP
alter table goblin_order_sku add erp_type varchar(64) null comment 'ERP类型[WANGDIAN-旺店通]' after push_time;
alter table goblin_order_sku add erp_hosting tinyint default 0 comment 'ERP托管[0-否|1-是]默认0' after erp_type;
alter table goblin_order_sku add spu_erp_code varchar(64) null comment 'ERP商品编码' after erp_hosting;
alter table goblin_order_sku add sku_erp_code varchar(64) null comment 'ERP规格编码' after spu_erp_code;
alter table goblin_order_sku add spu_erp_code varchar(64) null comment 'ERP货品编号' after erp_hosting;
alter table goblin_order_sku add sku_erp_code varchar(64) null comment 'ERP商家编码' after spu_erp_code;
alter table goblin_order_sku add erp_warehouse_no varchar(64) null comment 'ERP仓库编号' after sku_erp_code;
alter table goblin_nft_order add erp_type varchar(64) null comment 'ERP类型[WANGDIAN-旺店通]' after mix_code;
alter table goblin_nft_order add erp_hosting tinyint default 0 comment 'ERP托管[0-否|1-是]默认0' after erp_type;
alter table goblin_nft_order add spu_erp_code varchar(64) null comment 'ERP商品编码' after erp_hosting;
alter table goblin_nft_order add sku_erp_code varchar(64) null comment 'ERP规格编码' after spu_erp_code;
alter table goblin_nft_order add spu_erp_code varchar(64) null comment 'ERP货品编号' after erp_hosting;
alter table goblin_nft_order add sku_erp_code varchar(64) null comment 'ERP商家编码' after spu_erp_code;
alter table goblin_nft_order add erp_warehouse_no varchar(64) null comment 'ERP仓库编号' after sku_erp_code;
drop table if exists goblin_store_erp_config;
......
......@@ -108,8 +108,8 @@ public class WdtServiceImpl implements IGoblinErpService {
// for (int i = 0; i < pageCount; i++) {
// param.put("page_no", i + "");
GoblinStoreErpConfigVo storeErpConfigVo = goblinRedisUtils.getStoreErpConfigVoByStoreId(data.getStoreId());
if(storeErpConfigVo==null){
log.error("storeId:{},查询失败",data.getStoreId());
if (storeErpConfigVo == null) {
log.error("storeId:{},查询失败", data.getStoreId());
continue;
}
json = erpWdtClient.execute(ErpEnum.WdtAPI.STOCK_QUERY.getUri(), param, storeErpConfigVo.getAppKey(), storeErpConfigVo.getSid(), storeErpConfigVo.getAppSecret());
......@@ -163,7 +163,7 @@ public class WdtServiceImpl implements IGoblinErpService {
for (SyncStockVo vo : stockMap) {
String skuId = "";
try {
GoblinGoodsSkuInfoVo skuInfoVo = mongoTemplate.findOne(Query.query(Criteria.where("skuErpCode").is(vo.getSpecNo()).and("erpWarehouseNo").is(vo.getWarehouseNo())), GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
GoblinGoodsSkuInfoVo skuInfoVo = mongoTemplate.findOne(Query.query(Criteria.where("skuErpCode").is(vo.getSpecNo()).and("erpWarehouseNo").is(vo.getWarehouseNo()).and("erpHosting").is(1)), GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
int changeStock = vo.getStockErpNum().subtract(BigDecimal.valueOf(skuInfoVo.getSkuStock())).intValue();
skuId = skuInfoVo.getSkuId();
//mongo修改
......@@ -207,9 +207,13 @@ public class WdtServiceImpl implements IGoblinErpService {
String orderId = goblinRedisUtils.erpLeftPop(shopNo);
if (orderId != null) {
list.add(orderId);
} else {
break;
}
}
orderIdList.add(list);
if (list.size() != 0) {
orderIdList.add(list);
}
} else {
List<String> a = CollectionUtil.arrayListString();
a.add(singleId);
......@@ -435,13 +439,10 @@ public class WdtServiceImpl implements IGoblinErpService {
paramAck.put("spec_no", spec_no);
paramAck.put("goods_no", goods_no);
GoblinStoreErpConfigVo storeErpConfigVo = goblinRedisUtils.getStoreErpConfigVoByStoreId(storeId);
String json = erpWdtClient.execute(ErpEnum.WdtAPI.GOODS_QUERY.getUri(), paramAck, storeErpConfigVo.getAppKey(), storeErpConfigVo.getSid(), storeErpConfigVo.getAppSecret());
log.error("json = " + json);
CheckGoodsBaseVo checkGoodsBaseVo = JsonUtils.fromJson(json, CheckGoodsBaseVo.class);
log.error("checkGoodsBaseVo = " + checkGoodsBaseVo);
if (checkGoodsBaseVo.getTotal_count() == 0) {
return ResponseDto.failure("ERP商品编码或ERP规格编码不存在");
return ResponseDto.failure("ERP货品编号或ERP商家编码不存在");
} else {
return ResponseDto.success(true);
}
......
......@@ -163,6 +163,17 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
break;
}
}
if (null == vo.getStoreUcouponId()) {
List<CouponOutLineVo> outLineVos = redisUtils.getOutLineCoupon();
for (CouponOutLineVo outLineVo : outLineVos) {
if (outLineVo.getStoreCouponId().equals(orderVo.getStoreCouponId())) {
vo.setStoreUcouponId(outLineVo.getStoreCouponId());
vo.setStoreUcouponName(outLineVo.getName());
vo.setStoreUcouponPrice(orderVo.getStorePriceCoupon());
break;
}
}
}
} else {
vo.setStoreUcouponId("");
......@@ -565,7 +576,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
// return ResponseDto.failure("无法查看");
// }
GoblinStoreOrderVo orderVo = null;
if (null ==orderCode || "".equals(orderCode)) {
if (null == orderCode || "".equals(orderCode)) {
orderVo = redisUtils.getGoblinOrder(orderId);
} else {
orderVo = mongoUtils.getGoblinStoreOrderVoByCode(orderCode);
......
......@@ -255,7 +255,7 @@ public class GoblinOrderUtils {
for (CouponOutLineVo data : couponList) {
if (data.getStoreCouponId().equals(ucouponId)) {
isOutLine = true;
BigDecimal tempPrice = totalPrice.subtract(totalPrice.multiply(BigDecimal.valueOf(data.getDiscount())).setScale(2, BigDecimal.ROUND_HALF_DOWN));
BigDecimal tempPrice = totalPrice.subtract(totalPrice.multiply(BigDecimal.valueOf(data.getDiscount()).divide(BigDecimal.valueOf(100)).setScale(2, BigDecimal.ROUND_HALF_DOWN)).setScale(2, BigDecimal.ROUND_HALF_DOWN));
returnVo.setSpuIds(CollectionUtil.linkedListString());
returnVo.setValue(tempPrice);
returnVo.setCouType(data.getCouType());
......
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