|
@@ -272,6 +272,7 @@ public class ShipServiceImpl implements ShipService {
|
|
logisticsBatch.setRemark(note);
|
|
logisticsBatch.setRemark(note);
|
|
// 保存物流批次
|
|
// 保存物流批次
|
|
shipMapper.insertLogisticsBatch(logisticsBatch);
|
|
shipMapper.insertLogisticsBatch(logisticsBatch);
|
|
|
|
+ log.info("【供应商发货】>>>>>>>>>>>>>>>>>>>>>>>>>>新增物流批次(insert[cm_logistics_batch])shopOrderId:" + shopOrder.getShopOrderId() + ",logisticsBatchId:"+logisticsBatch.getId());
|
|
|
|
|
|
/* products:[ // 发货商品信息
|
|
/* products:[ // 发货商品信息
|
|
* {orderProductId:订单商品id,num:此次发货数量},
|
|
* {orderProductId:订单商品id,num:此次发货数量},
|
|
@@ -290,6 +291,7 @@ public class ShipServiceImpl implements ShipService {
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
return ResponseJson.error("订单商品异常,orderProductId:" + orderProductId, null);
|
|
return ResponseJson.error("订单商品异常,orderProductId:" + orderProductId, null);
|
|
}
|
|
}
|
|
|
|
+ shipmentsNum += num;
|
|
LogisticsRecordPo logisticsRecord = new LogisticsRecordPo();
|
|
LogisticsRecordPo logisticsRecord = new LogisticsRecordPo();
|
|
logisticsRecord.setLogisticsBatchId(logisticsBatch.getId());
|
|
logisticsRecord.setLogisticsBatchId(logisticsBatch.getId());
|
|
logisticsRecord.setShopOrderId(orderProduct.getShopOrderId());
|
|
logisticsRecord.setShopOrderId(orderProduct.getShopOrderId());
|
|
@@ -302,6 +304,8 @@ public class ShipServiceImpl implements ShipService {
|
|
logisticsRecord.setImage(orderProduct.getImage());
|
|
logisticsRecord.setImage(orderProduct.getImage());
|
|
// 保存 发货物流记录
|
|
// 保存 发货物流记录
|
|
shipMapper.insertLogisticsRecord(logisticsRecord);
|
|
shipMapper.insertLogisticsRecord(logisticsRecord);
|
|
|
|
+ log.info("【供应商发货】>>>>>>>>>>>>>>>>>>>>>>>>>>新增物流记录(insert[cm_logistics_record])shopOrderId:" + shopOrder.getShopOrderId() + ",logisticsRecordId:"+logisticsRecord.getId());
|
|
|
|
+
|
|
// 保存订单商品未出库数量
|
|
// 保存订单商品未出库数量
|
|
int notOutStore = orderProduct.getNotOutStore() - num;
|
|
int notOutStore = orderProduct.getNotOutStore() - num;
|
|
shipMapper.updateNotOutStore(orderProductId, notOutStore);
|
|
shipMapper.updateNotOutStore(orderProductId, notOutStore);
|
|
@@ -494,6 +498,7 @@ public class ShipServiceImpl implements ShipService {
|
|
*
|
|
*
|
|
* @param logisticsBatchId 发货物流批次Id
|
|
* @param logisticsBatchId 发货物流批次Id
|
|
*/
|
|
*/
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public ResponseJson<Void> cancelDelivery(Integer logisticsBatchId) {
|
|
public ResponseJson<Void> cancelDelivery(Integer logisticsBatchId) {
|
|
// 发货物流批次
|
|
// 发货物流批次
|
|
@@ -566,6 +571,7 @@ public class ShipServiceImpl implements ShipService {
|
|
* ]
|
|
* ]
|
|
* }
|
|
* }
|
|
*/
|
|
*/
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public ResponseJson<Void> addLogisticsInfo(LogisticsBatchDto logisticsBatchDto) {
|
|
public ResponseJson<Void> addLogisticsInfo(LogisticsBatchDto logisticsBatchDto) {
|
|
// 发货物流批次
|
|
// 发货物流批次
|
|
@@ -621,12 +627,13 @@ public class ShipServiceImpl implements ShipService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 扫码添加物流
|
|
* 扫码添加物流
|
|
- *
|
|
|
|
- * @param number 快递单号
|
|
|
|
|
|
+ * @param number 快递单号
|
|
|
|
+ * @param mobile 收/寄件人的电话号码(顺丰必填)
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public ResponseJson<CompanyVo> scanGetLogisticsInfo(String number) {
|
|
|
|
- String result = remoteCallService.getLogisticsByNumber(number, null, null);
|
|
|
|
|
|
+ public ResponseJson<CompanyVo> scanGetLogisticsInfo(String number, String mobile) {
|
|
|
|
+ String result = remoteCallService.getLogisticsByNumber(number, null, mobile);
|
|
|
|
+ String errorMsg = "查询失败!";
|
|
if (StringUtils.isNotEmpty(result)){
|
|
if (StringUtils.isNotEmpty(result)){
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
String comCode = resultJson.getString("com");
|
|
String comCode = resultJson.getString("com");
|
|
@@ -634,8 +641,13 @@ public class ShipServiceImpl implements ShipService {
|
|
List<CompanyVo> companyList = shipMapper.getLogisticsCompany(comCode);
|
|
List<CompanyVo> companyList = shipMapper.getLogisticsCompany(comCode);
|
|
return ResponseJson.success(companyList.get(0));
|
|
return ResponseJson.success(companyList.get(0));
|
|
}
|
|
}
|
|
|
|
+ // 查询失败,返回错误信息
|
|
|
|
+ String msg = resultJson.getString("msg");
|
|
|
|
+ if (StringUtils.isNotEmpty(msg)) {
|
|
|
|
+ errorMsg = msg;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- return ResponseJson.error("查询失败!", null);
|
|
|
|
|
|
+ return ResponseJson.error(errorMsg, null);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -865,6 +877,7 @@ public class ShipServiceImpl implements ShipService {
|
|
* images: ["图片","图片",...]
|
|
* images: ["图片","图片",...]
|
|
* }, {}]
|
|
* }, {}]
|
|
*/
|
|
*/
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public ResponseJson<Void> saveProductQualification(JsonParamsDto jsonParamsDto) {
|
|
public ResponseJson<Void> saveProductQualification(JsonParamsDto jsonParamsDto) {
|
|
try {
|
|
try {
|