fix:下推中鼎
This commit is contained in:
@@ -58,7 +58,6 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -372,7 +371,6 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void pushDemand(List<PmDemandDto> pmDemandDtos) {
|
||||
if (CollectionUtils.isEmpty(pmDemandDtos)) {
|
||||
throw new BadRequestException("下推失败,请求数据不能为空");
|
||||
@@ -437,16 +435,21 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
||||
inFinishParams.add(inFinishParam);
|
||||
zdDemand.setWorkOrder(zdDemand.getWorkOrder() + "-" + zdDemand.getPriority());
|
||||
zd.add(zdDemand);
|
||||
wmsToZDWmdService.syncDemandOrder(zd);
|
||||
try {
|
||||
wmsToZDWmdService.syncDemandOrder(zd);
|
||||
iStInventoryService.changeInventory(InventoryChangeType.ADD_INV, addInvParams);
|
||||
iStInventoryService.changeInventory(InventoryChangeType.IN_FINISH, inFinishParams);
|
||||
this.update(new LambdaUpdateWrapper<PmDemand>()
|
||||
.set(PmDemand::getStatus, DemandStatus.SEND.getValue())
|
||||
.eq(PmDemand::getId, zdDemand.getId()));
|
||||
} catch (Exception ex) {
|
||||
if (StringUtils.contains(ex.getMessage(), "已存在")){
|
||||
zdDemand.setStatus(DemandStatus.SEND.getValue());
|
||||
}else {
|
||||
throw ex;
|
||||
}
|
||||
log.error("回传中鼎成功,WMS库存变动失败" + ex.getMessage());
|
||||
}
|
||||
this.update(new LambdaUpdateWrapper<PmDemand>()
|
||||
.set(PmDemand::getStatus, DemandStatus.SEND.getValue())
|
||||
.eq(PmDemand::getId, zdDemand.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user