|
@@ -10,6 +10,7 @@ import com.kmall.admin.service.GoodsProductService;
|
|
import com.kmall.admin.utils.ShiroUtils;
|
|
import com.kmall.admin.utils.ShiroUtils;
|
|
import com.kmall.admin.utils.data.response.ResponseMessage;
|
|
import com.kmall.admin.utils.data.response.ResponseMessage;
|
|
import com.kmall.admin.utils.oms.OmsSign;
|
|
import com.kmall.admin.utils.oms.OmsSign;
|
|
|
|
+import com.kmall.common.constant.Dict;
|
|
import com.kmall.common.utils.RRException;
|
|
import com.kmall.common.utils.RRException;
|
|
import com.kmall.manager.manager.merch.OmsMerchProperties;
|
|
import com.kmall.manager.manager.merch.OmsMerchProperties;
|
|
import okhttp3.Request;
|
|
import okhttp3.Request;
|
|
@@ -86,6 +87,9 @@ public class GoodsProductServiceImpl implements GoodsProductService {
|
|
if (StringUtils.isEmpty(goodsProductDto.getMerchSn())) {
|
|
if (StringUtils.isEmpty(goodsProductDto.getMerchSn())) {
|
|
throw new RRException("第" + count + "行的商户编号为空!");
|
|
throw new RRException("第" + count + "行的商户编号为空!");
|
|
}
|
|
}
|
|
|
|
+ if (StringUtils.isEmpty(goodsProductDto.getBatchNo())) {
|
|
|
|
+ throw new RRException("第" + count + "行的批次号为空!");
|
|
|
|
+ }
|
|
if (StringUtils.isEmpty(goodsProductDto.getSku())) {
|
|
if (StringUtils.isEmpty(goodsProductDto.getSku())) {
|
|
throw new RRException("第" + count + "行的SKU为空!");
|
|
throw new RRException("第" + count + "行的SKU为空!");
|
|
}
|
|
}
|
|
@@ -181,6 +185,7 @@ public class GoodsProductServiceImpl implements GoodsProductService {
|
|
dto.setGrossWeight(goodsProductEntity.getGrossWeight().toString());
|
|
dto.setGrossWeight(goodsProductEntity.getGrossWeight().toString());
|
|
dto.setDeclPrice(goodsProductEntity.getDeclPrice().toString());
|
|
dto.setDeclPrice(goodsProductEntity.getDeclPrice().toString());
|
|
dto.setOperateFlag(operateFlag);
|
|
dto.setOperateFlag(operateFlag);
|
|
|
|
+ dto.setBatchNo(goodsProductEntity.getBatchNo());
|
|
goodsProductDtoList.add(dto);
|
|
goodsProductDtoList.add(dto);
|
|
}
|
|
}
|
|
boolean isPass = true;
|
|
boolean isPass = true;
|
|
@@ -220,6 +225,7 @@ public class GoodsProductServiceImpl implements GoodsProductService {
|
|
dto.setGrossWeight(goodsProductEntity.getGrossWeight().toString());
|
|
dto.setGrossWeight(goodsProductEntity.getGrossWeight().toString());
|
|
dto.setDeclPrice(goodsProductEntity.getDeclPrice().toString());
|
|
dto.setDeclPrice(goodsProductEntity.getDeclPrice().toString());
|
|
dto.setOperateFlag(operateFlag);
|
|
dto.setOperateFlag(operateFlag);
|
|
|
|
+ dto.setBatchNo(goodsProductEntity.getBatchNo());
|
|
goodsProductDtoList.add(dto);
|
|
goodsProductDtoList.add(dto);
|
|
}
|
|
}
|
|
boolean isPass = true;
|
|
boolean isPass = true;
|
|
@@ -252,17 +258,31 @@ public class GoodsProductServiceImpl implements GoodsProductService {
|
|
@Override
|
|
@Override
|
|
public int updateSendOmsPassStatus(List<String> skuList) {
|
|
public int updateSendOmsPassStatus(List<String> skuList) {
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
- param.put("isSend", 1);
|
|
|
|
|
|
+ param.put("isSend", Dict.goodsProductIsSend.item_1.getItem());
|
|
|
|
+ param.put("sendTime", new Date());
|
|
|
|
+ param.put("omsAuditStatus", Dict.omsAuditStatus.item_0.getItem());
|
|
return goodsProductDao.updateStatusBySkuBatch(skuList, param);
|
|
return goodsProductDao.updateStatusBySkuBatch(skuList, param);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public int updateSendOmsFailStatus(List<String> skuList) {
|
|
public int updateSendOmsFailStatus(List<String> skuList) {
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
- param.put("isSend", 2);
|
|
|
|
|
|
+ param.put("isSend", Dict.goodsProductIsSend.item_2.getItem());
|
|
|
|
+ param.put("sendTime", new Date());
|
|
|
|
+ param.put("omsAuditStatus", Dict.omsAuditStatus.item_0.getItem());
|
|
return goodsProductDao.updateStatusBySkuBatch(skuList, param);
|
|
return goodsProductDao.updateStatusBySkuBatch(skuList, param);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public int updateAuditInfo(String sku, String isAudit, Date auditTime, String auditRemark) {
|
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
|
+ param.put("omsAuditStatus", isAudit);
|
|
|
|
+ param.put("omsAuditRemark", auditRemark);
|
|
|
|
+ param.put("omsCallbackTime", new Date());
|
|
|
|
+ param.put("omsAuditTime", auditTime);
|
|
|
|
+ return goodsProductDao.updateStatusBySkuBatch(Arrays.asList(sku), param);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
private ResponseMessage requestOmsProduct(List<GoodsProductDto> goodsProductDtoList){
|
|
private ResponseMessage requestOmsProduct(List<GoodsProductDto> goodsProductDtoList){
|
|
Map<String, String> sParaTemp = new TreeMap<String, String>();
|
|
Map<String, String> sParaTemp = new TreeMap<String, String>();
|