|
@@ -231,8 +231,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
|
|
+ } else {
|
|
//插入记录
|
|
//插入记录
|
|
if (StringUtils.isEmpty(warehouseInOutInfo.getId())) {
|
|
if (StringUtils.isEmpty(warehouseInOutInfo.getId())) {
|
|
warehouseInOutInfo.setId(IdGenerator.generateUUID());
|
|
warehouseInOutInfo.setId(IdGenerator.generateUUID());
|
|
@@ -259,12 +258,12 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
SaleOrder saleOrder = saleOrderService.selectOne(new EntityWrapper<SaleOrder>().eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
SaleOrder saleOrder = saleOrderService.selectOne(new EntityWrapper<SaleOrder>().eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
.eq("delete_flag", "0"));
|
|
.eq("delete_flag", "0"));
|
|
//APP线上订单
|
|
//APP线上订单
|
|
- if(purchaseOrder != null || saleOrder != null){
|
|
|
|
|
|
+ if (purchaseOrder != null || saleOrder != null) {
|
|
// 先删除任务
|
|
// 先删除任务
|
|
noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "INOUTTASK-TASK-APPROVE",
|
|
noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "INOUTTASK-TASK-APPROVE",
|
|
warehouseInOutInfo.getId(), null);
|
|
warehouseInOutInfo.getId(), null);
|
|
//APP线上订单入库
|
|
//APP线上订单入库
|
|
- if ( "2".equals(warehouseInOutInfo.getInOutFlag())) {
|
|
|
|
|
|
+ if ("2".equals(warehouseInOutInfo.getInOutFlag())) {
|
|
TranCarInfo tranCarInfo = tranCarInfoService.selectOne(new EntityWrapper<TranCarInfo>()
|
|
TranCarInfo tranCarInfo = tranCarInfoService.selectOne(new EntityWrapper<TranCarInfo>()
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
.eq("car_no", warehouseInOutInfo.getCarNo())
|
|
.eq("car_no", warehouseInOutInfo.getCarNo())
|
|
@@ -292,7 +291,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
}
|
|
}
|
|
// 没有货
|
|
// 没有货
|
|
else {
|
|
else {
|
|
- original=0f;
|
|
|
|
|
|
+ original = 0f;
|
|
WarehousePositionStorageInfo warehousePositionStorageInfo1 = new WarehousePositionStorageInfo();
|
|
WarehousePositionStorageInfo warehousePositionStorageInfo1 = new WarehousePositionStorageInfo();
|
|
warehousePositionStorageInfo1.setId(IdGenerator.generateUUID());
|
|
warehousePositionStorageInfo1.setId(IdGenerator.generateUUID());
|
|
warehousePositionStorageInfo1.setPositionId(warehouseInOutInfo.getPositionId());
|
|
warehousePositionStorageInfo1.setPositionId(warehouseInOutInfo.getPositionId());
|
|
@@ -369,7 +368,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
// 期货采购入库统计
|
|
// 期货采购入库统计
|
|
- if (contractManagementInfo!=null&&"2".equals(contractManagementInfo.getGoodsType())) {
|
|
|
|
|
|
+ if (contractManagementInfo != null && "2".equals(contractManagementInfo.getGoodsType())) {
|
|
PurchaseReceiptReport purchaseReceiptReport = new PurchaseReceiptReport();
|
|
PurchaseReceiptReport purchaseReceiptReport = new PurchaseReceiptReport();
|
|
purchaseReceiptReport.setId(IdGenerator.generateUUID());
|
|
purchaseReceiptReport.setId(IdGenerator.generateUUID());
|
|
purchaseReceiptReport.setCompId(warehouseBaseInfo.getCompId());
|
|
purchaseReceiptReport.setCompId(warehouseBaseInfo.getCompId());
|
|
@@ -513,7 +512,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
//查询期货现货合同
|
|
//查询期货现货合同
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo()));
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo()));
|
|
- if (contractManagementInfo!=null&&"2".equals(contractManagementInfo.getGoodsType())) {
|
|
|
|
|
|
+ if (contractManagementInfo != null && "2".equals(contractManagementInfo.getGoodsType())) {
|
|
//客户生成收货信息
|
|
//客户生成收货信息
|
|
TranCarInfo tranCarInfo = new TranCarInfo();
|
|
TranCarInfo tranCarInfo = new TranCarInfo();
|
|
tranCarInfo.setId(IdGenerator.generateUUID());
|
|
tranCarInfo.setId(IdGenerator.generateUUID());
|
|
@@ -601,15 +600,14 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
- else{
|
|
|
|
|
|
+ } else {
|
|
//常用库入库
|
|
//常用库入库
|
|
if ("2".equals(warehouseInOutInfo.getInOutFlag()) && "1".equals(warehouseBaseInfo.getWarehouseType())) {
|
|
if ("2".equals(warehouseInOutInfo.getInOutFlag()) && "1".equals(warehouseBaseInfo.getWarehouseType())) {
|
|
//常用库采购入库类型
|
|
//常用库采购入库类型
|
|
- if("1".equals(warehouseInOutInfo.getInOutTypeKey())){
|
|
|
|
|
|
+ if ("1".equals(warehouseInOutInfo.getInOutTypeKey())) {
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
- .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("delete_flag","0"));
|
|
|
|
- if(contractManagementInfo == null){
|
|
|
|
|
|
+ .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("delete_flag", "0"));
|
|
|
|
+ if (contractManagementInfo == null) {
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
}
|
|
}
|
|
//现货采购入库报表
|
|
//现货采购入库报表
|
|
@@ -636,25 +634,24 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
stockPurchaseReceiptReportService.insert(stockPurchaseReceiptReport);
|
|
stockPurchaseReceiptReportService.insert(stockPurchaseReceiptReport);
|
|
}
|
|
}
|
|
//常用库移库入库类型
|
|
//常用库移库入库类型
|
|
- else if("3".equals(warehouseInOutInfo.getInOutTypeKey())){
|
|
|
|
|
|
+ else if ("3".equals(warehouseInOutInfo.getInOutTypeKey())) {
|
|
InOutWarehouseTask inOutWarehouseTask = inOutWarehouseTaskService.selectOne(new EntityWrapper<InOutWarehouseTask>()
|
|
InOutWarehouseTask inOutWarehouseTask = inOutWarehouseTaskService.selectOne(new EntityWrapper<InOutWarehouseTask>()
|
|
.eq("move_task_no", warehouseInOutInfo.getContractNo())
|
|
.eq("move_task_no", warehouseInOutInfo.getContractNo())
|
|
- .eq("in_out_flag","1")
|
|
|
|
- .eq("delete_flag","0"));
|
|
|
|
- if(inOutWarehouseTask == null){
|
|
|
|
|
|
+ .eq("in_out_flag", "1")
|
|
|
|
+ .eq("delete_flag", "0"));
|
|
|
|
+ if (inOutWarehouseTask == null) {
|
|
throw new YException(YExceptionEnum.TASK_NO_NOT_EXSITS_ERROR);
|
|
throw new YException(YExceptionEnum.TASK_NO_NOT_EXSITS_ERROR);
|
|
- }
|
|
|
|
- else{
|
|
|
|
|
|
+ } else {
|
|
//若移库的发货库为自动创建的临时库时
|
|
//若移库的发货库为自动创建的临时库时
|
|
WarehouseBaseInfo warehouseBaseInfo1 = warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
|
|
WarehouseBaseInfo warehouseBaseInfo1 = warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
|
|
.eq("warehouse_name", inOutWarehouseTask.getWarehouseName())
|
|
.eq("warehouse_name", inOutWarehouseTask.getWarehouseName())
|
|
- .eq("create_type","1")
|
|
|
|
- .eq("warehouse_type","2")
|
|
|
|
- .eq("delete_flag","0"));
|
|
|
|
- if(warehouseBaseInfo1 != null ){
|
|
|
|
|
|
+ .eq("create_type", "1")
|
|
|
|
+ .eq("warehouse_type", "2")
|
|
|
|
+ .eq("delete_flag", "0"));
|
|
|
|
+ if (warehouseBaseInfo1 != null) {
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
- .eq("contract_no", warehouseBaseInfo1.getWarehouseName()).eq("delete_flag","0"));
|
|
|
|
- if(contractManagementInfo == null){
|
|
|
|
|
|
+ .eq("contract_no", warehouseBaseInfo1.getWarehouseName()).eq("delete_flag", "0"));
|
|
|
|
+ if (contractManagementInfo == null) {
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
}
|
|
}
|
|
//现货采购入库报表
|
|
//现货采购入库报表
|
|
@@ -695,7 +692,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
stockPurchaseReceiptReport.setDeductionWeight(warehouseInOutInfo.getDeductionWeight());
|
|
stockPurchaseReceiptReport.setDeductionWeight(warehouseInOutInfo.getDeductionWeight());
|
|
stockPurchaseReceiptReport.setSettlementWeight(warehouseInOutInfo.getNetWeight());
|
|
stockPurchaseReceiptReport.setSettlementWeight(warehouseInOutInfo.getNetWeight());
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
- .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("delete_flag","0"));
|
|
|
|
|
|
+ .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("delete_flag", "0"));
|
|
stockPurchaseReceiptReport.setAmountIngPayable(warehouseInOutInfo.getNetWeight() *
|
|
stockPurchaseReceiptReport.setAmountIngPayable(warehouseInOutInfo.getNetWeight() *
|
|
(Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())) - Float.valueOf(warehouseInOutInfo.getDeductionAmount())));
|
|
(Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())) - Float.valueOf(warehouseInOutInfo.getDeductionAmount())));
|
|
stockPurchaseReceiptReport.setAmountEdPayable(0.0f);
|
|
stockPurchaseReceiptReport.setAmountEdPayable(0.0f);
|
|
@@ -778,14 +775,26 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
// 修改成本信息表
|
|
// 修改成本信息表
|
|
CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", weightedDetails.getWarehouseId())
|
|
CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", weightedDetails.getWarehouseId())
|
|
.eq("goods_name_key", weightedDetails.getGoodsNameKey()));
|
|
.eq("goods_name_key", weightedDetails.getGoodsNameKey()));
|
|
- List<WeightedDetails> weightedDetailsLists = weightedDetailsService.selectList(new EntityWrapper<WeightedDetails>().eq("warehouse_id", warehouseInOutInfo.getWarehouseName())
|
|
|
|
- .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()).orderBy("update_date", false));
|
|
|
|
|
|
+// List<WeightedDetails> weightedDetailsLists = weightedDetailsService.selectList(new EntityWrapper<WeightedDetails>().eq("warehouse_id", warehouseInOutInfo.getWarehouseName())
|
|
|
|
+// .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()).orderBy("update_date", false));
|
|
Float net = 0f;
|
|
Float net = 0f;
|
|
- for(int i=0;i<weightedDetailsLists.size();i++){
|
|
|
|
- net = net +weightedDetailsLists.get(i).getNetWeight();
|
|
|
|
|
|
+// for (int i = 0; i < weightedDetailsLists.size(); i++) {
|
|
|
|
+// net = net + weightedDetailsLists.get(i).getNetWeight();
|
|
|
|
+// }
|
|
|
|
+ List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
|
+ .eq("base_id", warehouseInOutInfo.getBaseId()));
|
|
|
|
+ if (!CollectionUtils.isEmpty(warehousePositionInfos)) {
|
|
|
|
+ for (int i = 0; i < warehousePositionInfos.size(); i++) {
|
|
|
|
+ List<WarehousePositionStorageInfo> warehousePositionStorageInfos = warehousePositionStorageInfoService.selectList(new EntityWrapper<WarehousePositionStorageInfo>()
|
|
|
|
+ .eq("position_id", warehousePositionInfos.get(i).getId())
|
|
|
|
+ .eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
|
+ for (int j = 0; j < warehousePositionStorageInfos.size(); j++) {
|
|
|
|
+ net = net + warehousePositionStorageInfos.get(j).getStorage();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- if(costManagementInfo ==null){
|
|
|
|
- CostManagementInfo costManagementInfo1= new CostManagementInfo();
|
|
|
|
|
|
+ if (costManagementInfo == null) {
|
|
|
|
+ CostManagementInfo costManagementInfo1 = new CostManagementInfo();
|
|
costManagementInfo1.setCompId(AuthSecurityUtils.getCurrentUserInfo().getCompId());
|
|
costManagementInfo1.setCompId(AuthSecurityUtils.getCurrentUserInfo().getCompId());
|
|
costManagementInfo1.setId(IdGenerator.generateUUID());
|
|
costManagementInfo1.setId(IdGenerator.generateUUID());
|
|
costManagementInfo1.setWarehouseId(weightedDetails.getWarehouseId());
|
|
costManagementInfo1.setWarehouseId(weightedDetails.getWarehouseId());
|
|
@@ -797,8 +806,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
costManagementInfo1.setStorage(net);
|
|
costManagementInfo1.setStorage(net);
|
|
costManagementInfo1.setCost(weightedDetails.getCostAfter());
|
|
costManagementInfo1.setCost(weightedDetails.getCostAfter());
|
|
costManagementInfoService.insert(costManagementInfo1);
|
|
costManagementInfoService.insert(costManagementInfo1);
|
|
- }
|
|
|
|
- else{
|
|
|
|
|
|
+ } else {
|
|
costManagementInfo.setCost(weightedDetails.getCostAfter());
|
|
costManagementInfo.setCost(weightedDetails.getCostAfter());
|
|
costManagementInfo.setStorage(net);
|
|
costManagementInfo.setStorage(net);
|
|
costManagementInfoService.updateById(costManagementInfo);
|
|
costManagementInfoService.updateById(costManagementInfo);
|
|
@@ -842,10 +850,10 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
//常用库出库
|
|
//常用库出库
|
|
else if ("1".equals(warehouseInOutInfo.getInOutFlag()) && "1".equals(warehouseBaseInfo.getWarehouseType())) {
|
|
else if ("1".equals(warehouseInOutInfo.getInOutFlag()) && "1".equals(warehouseBaseInfo.getWarehouseType())) {
|
|
//常用库销售出库类型
|
|
//常用库销售出库类型
|
|
- if("1".equals(warehouseInOutInfo.getInOutTypeKey())){
|
|
|
|
|
|
+ if ("1".equals(warehouseInOutInfo.getInOutTypeKey())) {
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
- .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("delete_flag","0"));
|
|
|
|
- if(contractManagementInfo == null){
|
|
|
|
|
|
+ .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("delete_flag", "0"));
|
|
|
|
+ if (contractManagementInfo == null) {
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
}
|
|
}
|
|
//现货销售出库报表
|
|
//现货销售出库报表
|
|
@@ -872,8 +880,8 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
.eq("car_no", warehouseInOutInfo.getCarNo())
|
|
.eq("car_no", warehouseInOutInfo.getCarNo())
|
|
.eq(TranCarInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0);
|
|
.eq(TranCarInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0);
|
|
- if(warehouseInOutInfo.getTranCarNo() != null && !warehouseInOutInfo.getTranCarNo().isEmpty()){
|
|
|
|
- wrapper.eq("tran_car_no",warehouseInOutInfo.getTranCarNo());
|
|
|
|
|
|
+ if (warehouseInOutInfo.getTranCarNo() != null && !warehouseInOutInfo.getTranCarNo().isEmpty()) {
|
|
|
|
+ wrapper.eq("tran_car_no", warehouseInOutInfo.getTranCarNo());
|
|
}
|
|
}
|
|
TranCarInfo tranCarInfo = tranCarInfoService.selectOne(wrapper);
|
|
TranCarInfo tranCarInfo = tranCarInfoService.selectOne(wrapper);
|
|
if (tranCarInfo != null) {
|
|
if (tranCarInfo != null) {
|
|
@@ -925,7 +933,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
//出库时打入成本
|
|
//出库时打入成本
|
|
CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
|
|
CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
|
|
.eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
.eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
- if (costManagementInfo!=null){
|
|
|
|
|
|
+ if (costManagementInfo != null) {
|
|
warehouseInOutInfo.setWeightedCost(costManagementInfo.getCost());
|
|
warehouseInOutInfo.setWeightedCost(costManagementInfo.getCost());
|
|
warehouseInOutInfoService.updateById(warehouseInOutInfo);
|
|
warehouseInOutInfoService.updateById(warehouseInOutInfo);
|
|
}
|
|
}
|
|
@@ -938,10 +946,10 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
//临时库出库
|
|
//临时库出库
|
|
else if ("1".equals(warehouseInOutInfo.getInOutFlag()) && "2".equals(warehouseBaseInfo.getWarehouseType())) {
|
|
else if ("1".equals(warehouseInOutInfo.getInOutFlag()) && "2".equals(warehouseBaseInfo.getWarehouseType())) {
|
|
//临时库销售出库类型 且为自动创建的临时库时(采购报表进数据,销售报表也进数据)
|
|
//临时库销售出库类型 且为自动创建的临时库时(采购报表进数据,销售报表也进数据)
|
|
- if("1".equals(warehouseInOutInfo.getInOutTypeKey())&&"1".equals(warehouseBaseInfo.getCreateType())){
|
|
|
|
|
|
+ if ("1".equals(warehouseInOutInfo.getInOutTypeKey()) && "1".equals(warehouseBaseInfo.getCreateType())) {
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
- .eq("contract_no", warehouseBaseInfo.getWarehouseName()).eq("delete_flag","0"));
|
|
|
|
- if(contractManagementInfo == null){
|
|
|
|
|
|
+ .eq("contract_no", warehouseBaseInfo.getWarehouseName()).eq("delete_flag", "0"));
|
|
|
|
+ if (contractManagementInfo == null) {
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
}
|
|
}
|
|
//现货采购入库报表
|
|
//现货采购入库报表
|
|
@@ -964,8 +972,8 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
stockPurchaseReceiptReport.setStatus(StatusEnum.FORM_REVIEWED.getName());
|
|
stockPurchaseReceiptReport.setStatus(StatusEnum.FORM_REVIEWED.getName());
|
|
stockPurchaseReceiptReportService.insert(stockPurchaseReceiptReport);
|
|
stockPurchaseReceiptReportService.insert(stockPurchaseReceiptReport);
|
|
ContractManagementInfo contractManagementInfo1 = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
ContractManagementInfo contractManagementInfo1 = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
- .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("delete_flag","0"));
|
|
|
|
- if(contractManagementInfo1 == null){
|
|
|
|
|
|
+ .eq("contract_no", warehouseInOutInfo.getContractNo()).eq("delete_flag", "0"));
|
|
|
|
+ if (contractManagementInfo1 == null) {
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_NOT_EXSITS_ERROR);
|
|
}
|
|
}
|
|
//现货销售出库报表
|
|
//现货销售出库报表
|
|
@@ -993,8 +1001,8 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
.eq("contract_no", warehouseInOutInfo.getContractNo())
|
|
.eq("car_no", warehouseInOutInfo.getCarNo())
|
|
.eq("car_no", warehouseInOutInfo.getCarNo())
|
|
.eq(TranCarInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0);
|
|
.eq(TranCarInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0);
|
|
- if(warehouseInOutInfo.getTranCarNo() != null && !warehouseInOutInfo.getTranCarNo().isEmpty()){
|
|
|
|
- wrapper.eq("tran_car_no",warehouseInOutInfo.getTranCarNo());
|
|
|
|
|
|
+ if (warehouseInOutInfo.getTranCarNo() != null && !warehouseInOutInfo.getTranCarNo().isEmpty()) {
|
|
|
|
+ wrapper.eq("tran_car_no", warehouseInOutInfo.getTranCarNo());
|
|
}
|
|
}
|
|
TranCarInfo tranCarInfo = tranCarInfoService.selectOne(wrapper);
|
|
TranCarInfo tranCarInfo = tranCarInfoService.selectOne(wrapper);
|
|
if (tranCarInfo != null) {
|
|
if (tranCarInfo != null) {
|
|
@@ -1016,7 +1024,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
//出库时打入成本
|
|
//出库时打入成本
|
|
CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
|
|
CostManagementInfo costManagementInfo = costManagementInfoService.selectOne(new EntityWrapper<CostManagementInfo>().eq("warehouse_id", warehouseInOutInfo.getBaseId())
|
|
.eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
.eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
- if (costManagementInfo!=null){
|
|
|
|
|
|
+ if (costManagementInfo != null) {
|
|
warehouseInOutInfo.setWeightedCost(costManagementInfo.getCost());
|
|
warehouseInOutInfo.setWeightedCost(costManagementInfo.getCost());
|
|
warehouseInOutInfoService.updateById(warehouseInOutInfo);
|
|
warehouseInOutInfoService.updateById(warehouseInOutInfo);
|
|
}
|
|
}
|