diff --git a/ruoyi-admin/src/main/resources/templates/flowable/todo/complete.html b/ruoyi-admin/src/main/resources/templates/flowable/todo/complete.html
index 288cdda0..e3d5e972 100644
--- a/ruoyi-admin/src/main/resources/templates/flowable/todo/complete.html
+++ b/ruoyi-admin/src/main/resources/templates/flowable/todo/complete.html
@@ -48,6 +48,10 @@
+ -
+
+
+
-
@@ -162,6 +166,11 @@
width:100,
visible: false
},
+ {
+ field: 'projectCode',
+ title: '项目编号',
+ width:100
+ },
{
field: 'businessKey',
title: '业务号',
diff --git a/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html b/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html
index 4ae93b76..5ad77f7a 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html
@@ -67,7 +67,9 @@
| 发货人: |
|
发货时间: |
- |
+ |
+ 备注 |
+ |
diff --git a/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html b/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html
index b202dbe7..f1b5ef5a 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html
@@ -692,7 +692,7 @@ function initWarehouseTable(data) {
$("#warehouse-table input[name$='quantity']").each(function () {
let val = $(this).val();
if (val && !isNaN(val)) {
- if (Number(val) <= 0) {
+ if (Number(val) < 0) {
errFlag = true;
}
totalConfirmQuantity += Number(val);
diff --git a/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html b/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html
index 1bbf160a..8ed7f233 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html
@@ -118,7 +118,7 @@
-
+
diff --git a/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html b/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html
index 14785e37..eb352083 100644
--- a/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/inventory/outer/edit.html
@@ -281,7 +281,8 @@
let data = JSON.parse(res.currentTarget.response)
if (data.code === 0) {
$.modal.msgSuccess('上传成功');
- productSnData = data.data;
+ productSnData = data.data.productSnDataList;
+ $('[name="warehouseId"]').val(data.data.warehouseId)
$.table.refreshOptions($.extend(productSnOptions, {
url: '',
data: productSnData,
@@ -434,7 +435,7 @@
formatter: function (value, row, index) {
var actions = [];
let disabled = Number(row.quantity) <= Number(row.deliveryGenerateQuantity) + Number(row.deliveryConfirmQuantity)
- actions.push(`发货`);
+ actions.push(`发货`);
return actions.join('');
}
}]
@@ -442,7 +443,7 @@
$.table.init(options);
}
- function checkDelivery(quantity,deliveryGenerateQuantity,deliveryConfirmQuantity, warehouseId, productCode) {
+ function checkDelivery(quantity,deliveryGenerateQuantity,deliveryConfirmQuantity, warehouseId, productCode,detailId) {
initModal()
// $.table.set('bootstrap-table')
let width = 1000, height = 700
@@ -499,13 +500,14 @@
logisticsCode: $('#logisticsCode').val(),
productCode: productCode,
quantity: productSnData.length <= 0 ? arrays.length : productSnData.length,
- warehouseId: warehouseId,
+ warehouseId: $('[name="warehouseId"]').val(),
logisticsCompany: $('#logisticsCompany').val(),
deliveryType: $('#deliveryType').val(),
deliveryTime: $('#deliveryTime').val(),
deliveryTimeType: $('#deliveryTimeType').val(),
outerCode: $('[name="outerCode"]').val(),
remark: $('[name="remark"]').val(),
+ detailId: detailId,
productSnDataList: productSnData,
}
var config = {
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/InventoryDelivery.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/InventoryDelivery.java
index 6821611d..9546605a 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/InventoryDelivery.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/InventoryDelivery.java
@@ -77,7 +77,7 @@ public class InventoryDelivery extends BaseEntity
-
+ private Long detailId;
private String createByName;
private String remark;
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/flowable/domain/Todo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/flowable/domain/Todo.java
index c4c48ea7..b248aa45 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/flowable/domain/Todo.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/flowable/domain/Todo.java
@@ -100,4 +100,5 @@ public class Todo extends BaseEntity
private Long businessId;
private String businessName;
+ private String projectCode;
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/flowable/service/impl/TodoServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/flowable/service/impl/TodoServiceImpl.java
index 1e99d4c2..b757227b 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/flowable/service/impl/TodoServiceImpl.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/flowable/service/impl/TodoServiceImpl.java
@@ -169,6 +169,7 @@ public class TodoServiceImpl implements TodoService {
return;
}
item.setBusinessId(projectOrderInfo.getId());
+ item.setProjectCode(projectOrderInfo.getProjectCode());
item.setBusinessName(projectOrderInfo.getProjectName());
});
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IOmsInventoryInnerService.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IOmsInventoryInnerService.java
index 23fc5bbf..a1c503d3 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IOmsInventoryInnerService.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IOmsInventoryInnerService.java
@@ -1,6 +1,7 @@
package com.ruoyi.sip.service;
import java.util.List;
+import java.util.Map;
import com.ruoyi.sip.domain.InventoryInfo;
import com.ruoyi.sip.domain.OmsInventoryInner;
@@ -64,5 +65,5 @@ public interface IOmsInventoryInnerService
void importByOuter(List inventoryInfoList,String productCode);
- List getInventoryInfoList(List inventoryInfoExcelDtoList, String productCode);
+ Map getInventoryInfoList(List inventoryInfoExcelDtoList, String productCode);
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java
index 03139f1e..8ca70a0c 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryDeliveryServiceImpl.java
@@ -12,6 +12,7 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.sip.domain.*;
import com.ruoyi.sip.dto.ApiDataQueryDto;
import com.ruoyi.sip.dto.inventory.InventoryDeliveryDetailExcelDto;
+import com.ruoyi.sip.mapper.InventoryOuterDetailMapper;
import com.ruoyi.sip.mapper.InventoryOuterMapper;
import com.ruoyi.sip.service.*;
import com.ruoyi.sip.vo.DeliveryInfoVo;
@@ -41,6 +42,8 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
private IOmsInventoryInnerService omsInventoryInnerService;
@Resource
private InventoryOuterMapper inventoryOuterMapper;
+ @Resource
+ private InventoryOuterDetailMapper inventoryOuterDetailMapper;
@Autowired
private IProjectProductInfoService projectProductInfoService;
@Autowired
@@ -129,6 +132,10 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
}
omsInventoryInnerService.importByOuter(productSnDataList,inventoryDelivery.getProductCode());
}
+ InventoryOuterDetail inventoryOuterDetail = new InventoryOuterDetail();
+ inventoryOuterDetail.setId(inventoryDelivery.getDetailId());
+ inventoryOuterDetail.setWarehouseId(inventoryDelivery.getWarehouseId());
+ inventoryOuterDetailMapper.updateInventoryOuterDetail(inventoryOuterDetail);
int i = inventoryDeliveryMapper.insertInventoryDelivery(inventoryDelivery);
if (CollUtil.isNotEmpty(detailList)){
for (OmsInventoryDeliveryDetail detail : detailList) {
@@ -303,6 +310,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
.map(OmsInventoryDeliveryDetail::getProductSn).collect(Collectors.toList()));
}
queryParams.setOuterCode(dbData.getOuterCode());
+ queryParams.setWarehouseId(dbData.getWarehouseId());
List inventoryInfos = inventoryInfoService.selectInventoryInfoList(queryParams);
return inventoryInfos.stream().map(item->{
InventoryDeliveryDetailExcelDto detailExcelDto = new InventoryDeliveryDetailExcelDto();
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryOuterServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryOuterServiceImpl.java
index 1868fdc6..155d4677 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryOuterServiceImpl.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryOuterServiceImpl.java
@@ -268,6 +268,7 @@ public class InventoryOuterServiceImpl implements IInventoryOuterService
List detailList = detailService.selectInventoryOuterDetailList(inventoryOuterDetail);
List productVoList = detailList.stream().map(item -> {
OuterDeliveryProductVo vo = new OuterDeliveryProductVo();
+ vo.setId(item.getId());
vo.setProductCode(item.getProductCode());
vo.setModel(item.getModel());
vo.setQuantity(item.getQuantity());
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OmsInventoryInnerServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OmsInventoryInnerServiceImpl.java
index 8522e831..d47caeb0 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OmsInventoryInnerServiceImpl.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OmsInventoryInnerServiceImpl.java
@@ -1,7 +1,5 @@
package com.ruoyi.sip.service.impl;
-import java.math.BigDecimal;
-import java.math.RoundingMode;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -210,7 +208,7 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
}
@Override
- public List getInventoryInfoList(List inventoryInfoExcelDtoList, String productCode) {
+ public Map getInventoryInfoList(List inventoryInfoExcelDtoList, String productCode) {
long count = inventoryInfoExcelDtoList.stream().filter(item -> !item.getProductCode().equals(productCode)).count();
if (count > 0){
throw new ServiceException("导入清单的产品与出库单不符");
@@ -224,6 +222,9 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
throw new ServiceException("产品编码对应产品未找到");
}
List warehouseInfoList = warehouseInfoService.listByNameList(warehouseNameList);
+ if (CollUtil.isEmpty(warehouseInfoList)) {
+ throw new ServiceException("仓库未找到,导入失败");
+ }
Map warehouseInfoMap = warehouseInfoList.stream().collect(Collectors.toMap(OmsWarehouseInfo::getWarehouseName, Function.identity(), (v1, v2) -> v1));
List inventoryInfoList = inventoryInfoExcelDtoList.stream().map(item -> {
InventoryInfo info = new InventoryInfo();
@@ -234,9 +235,6 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
info.setProductDesc(productInfos.get(0).getDescription());
info.setInnerPrice(item.getInnerPrice());
OmsWarehouseInfo omsWarehouseInfo = warehouseInfoMap.get(item.getWarehouseName());
- if (omsWarehouseInfo == null){
- throw new ServiceException("仓库未找到,导入失败");
- }
info.setWarehouseId(omsWarehouseInfo.getId());
info.setWarehouseName(omsWarehouseInfo.getWarehouseName());
@@ -246,7 +244,10 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
if (CollUtil.isNotEmpty(repeatSnList)) {
throw new ServiceException(StrUtil.format("SN码[{}]已存在,导入失败", repeatSnList));
}
- return inventoryInfoList;
+ Map result=new HashMap<>();
+ result.put("warehouseId",warehouseInfoList.get(0).getId());
+ result.put("productSnDataList",inventoryInfoList);
+ return result;
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OuterDeliveryProductVo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OuterDeliveryProductVo.java
index b723ac51..5942fb15 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OuterDeliveryProductVo.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OuterDeliveryProductVo.java
@@ -18,6 +18,7 @@ import lombok.Data;
*/
@Data
public class OuterDeliveryProductVo {
+ private Long id;
private String productCode;
private String model;
private Long quantity;
diff --git a/ruoyi-sip/src/main/resources/mapper/flow/TodoMapper.xml b/ruoyi-sip/src/main/resources/mapper/flow/TodoMapper.xml
index d4819ec3..98b3571b 100644
--- a/ruoyi-sip/src/main/resources/mapper/flow/TodoMapper.xml
+++ b/ruoyi-sip/src/main/resources/mapper/flow/TodoMapper.xml
@@ -67,6 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
'%')
and task_name like concat('%', #{taskName}, '%')
+ and business_key in (
+ select order_code from project_info t1 inner join project_order_info t2 on t1.id=t2.project_id where t1.project_code like concat('%', #{projectCode}, '%')
+ )
and approve_user_name = #{approveUserName}
and apply_user_name like concat('%',
diff --git a/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml b/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml
index 5c65ec40..a3757aec 100644
--- a/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml
+++ b/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml
@@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"