|
@@ -69,8 +69,10 @@ import com.fjhx.supply.service.supplier.SupplierInfoService;
|
|
import com.fjhx.tenant.utils.DictUtils;
|
|
import com.fjhx.tenant.utils.DictUtils;
|
|
import com.fjhx.wms.entity.PurchaseDetailPo;
|
|
import com.fjhx.wms.entity.PurchaseDetailPo;
|
|
import com.fjhx.wms.entity.stock.po.Stock;
|
|
import com.fjhx.wms.entity.stock.po.Stock;
|
|
|
|
+import com.fjhx.wms.entity.stock.po.StockWait;
|
|
import com.fjhx.wms.entity.warehouse.po.Warehouse;
|
|
import com.fjhx.wms.entity.warehouse.po.Warehouse;
|
|
import com.fjhx.wms.service.stock.StockService;
|
|
import com.fjhx.wms.service.stock.StockService;
|
|
|
|
+import com.fjhx.wms.service.stock.StockWaitService;
|
|
import com.fjhx.wms.service.warehouse.WarehouseService;
|
|
import com.fjhx.wms.service.warehouse.WarehouseService;
|
|
import com.obs.services.internal.ServiceException;
|
|
import com.obs.services.internal.ServiceException;
|
|
import com.ruoyi.common.core.domain.BasePo;
|
|
import com.ruoyi.common.core.domain.BasePo;
|
|
@@ -156,6 +158,8 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
|
|
private WdlyService wdlyService;
|
|
private WdlyService wdlyService;
|
|
@Autowired
|
|
@Autowired
|
|
private FlowExampleService flowExampleService;
|
|
private FlowExampleService flowExampleService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private StockWaitService stockWaitService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 列表
|
|
* 列表
|
|
@@ -250,7 +254,7 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
|
|
//是否在途过滤
|
|
//是否在途过滤
|
|
if (ObjectUtil.isNotEmpty(dto.getIsTransit())) {
|
|
if (ObjectUtil.isNotEmpty(dto.getIsTransit())) {
|
|
// wrapper.having("isTransit = {0}", dto.getIsTransit());
|
|
// wrapper.having("isTransit = {0}", dto.getIsTransit());
|
|
- wrapper.eq("IFNULL( t1.isTransit, 0 )",dto.getIsTransit());
|
|
|
|
|
|
+ wrapper.eq("IFNULL( t1.isTransit, 0 )", dto.getIsTransit());
|
|
}
|
|
}
|
|
|
|
|
|
//添加权限过滤
|
|
//添加权限过滤
|
|
@@ -964,7 +968,21 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
|
|
.set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
.set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
.setSql("victoriatourist_json = JSON_SET(victoriatourist_json,'$.contractCode','" + dto.getContractCode() + "')")
|
|
.setSql("victoriatourist_json = JSON_SET(victoriatourist_json,'$.contractCode','" + dto.getContractCode() + "')")
|
|
);
|
|
);
|
|
- wdlyService.editContractCode(dto.getId(),dto.getContractCode());
|
|
|
|
|
|
+
|
|
|
|
+ //更新物流数据冗余的单号
|
|
|
|
+ wdlyService.editContractCode(dto.getId(), dto.getContractCode());
|
|
|
|
+
|
|
|
|
+ //更新待入库冗余的单号
|
|
|
|
+ stockWaitService.update(q -> q
|
|
|
|
+ .and(q1 -> q1
|
|
|
|
+ .eq(StockWait::getPurchaseId, dto.getId())
|
|
|
|
+ .or().eq(StockWait::getBusinessId, dto.getId())
|
|
|
|
+ )
|
|
|
|
+ .eq(StockWait::getBusinessType, 3)
|
|
|
|
+ .set(StockWait::getBusinessCode, dto.getContractCode())
|
|
|
|
+ .set(BasePo::getUpdateTime, new Date())
|
|
|
|
+ .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -1035,7 +1053,7 @@ public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void updateAttachment(PurchaseDto dto){
|
|
|
|
- ObsFileUtil.editFile(dto.getFileList(),dto.getId());
|
|
|
|
|
|
+ public void updateAttachment(PurchaseDto dto) {
|
|
|
|
+ ObsFileUtil.editFile(dto.getFileList(), dto.getId());
|
|
}
|
|
}
|
|
}
|
|
}
|