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 32461634..aa3896eb 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/delivery/view.html @@ -15,7 +15,20 @@ font-family: "微软雅黑", Arial, sans-serif; /* 统一字体 */ } + body { + font-family: "微软雅黑", Arial, sans-serif; + } + table { + border-collapse: collapse; + width: 100%; + margin-bottom: 20px; + } + + th, td { + border: 1px solid #ccc; + padding: 8px; + } .required-delivery-time { font-size: 20px; @@ -32,57 +45,32 @@
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
-
- -
-
-
-
+ + + + + + + + + + + + + + + +
物流单号: 发货方式: 物流公司:
发货人: 发货时间:
+
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 8c7a699d..139617c3 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/execution/edit.html @@ -359,6 +359,7 @@
+ @@ -765,7 +766,8 @@ function initWarehouseTable(data) { } else { - actions.push('查看详情'); + // actions.push('查看详情'); + actions.push(`查看详情`); } return actions.join(''); } @@ -844,6 +846,7 @@ function initWarehouseTable(data) { $.modal.msgError(res.msg) return } + parent.$('.layui-layer-setwin').css('display', 'none') //设置对应值 $('#outerCode').val(res.data.outerCode) $('#outerTime').val(res.data.createTime) @@ -877,7 +880,7 @@ function initWarehouseTable(data) { btn: ['关闭'], end: function () { parent.$('.layui-layer-btn').css('display', '') - + parent.$('.layui-layer-setwin').css('display', '') // layer.msg('关闭后的回调', {icon:6}); } }); diff --git a/ruoyi-admin/src/main/resources/templates/inventory/execution/generatedOuter.html b/ruoyi-admin/src/main/resources/templates/inventory/execution/generatedOuter.html deleted file mode 100644 index ed0772bd..00000000 --- a/ruoyi-admin/src/main/resources/templates/inventory/execution/generatedOuter.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -
- - -
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
- -
-
- - -
-
-
-
- -
- - - - - \ No newline at end of file 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 53ce6fc0..3704abbd 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/execution/track.html @@ -225,7 +225,7 @@ updateUrl: executionPrefix + "/edit/{id}", removeUrl: prefix + "/remove", exportUrl: prefix + "/export", - modalName: "订单管理", + modalName: "订单执行跟踪", sortName:'outerStatus', sortOrder: 'asc', fixedColumns: true, diff --git a/ruoyi-admin/src/main/resources/templates/inventory/inner/inner.html b/ruoyi-admin/src/main/resources/templates/inventory/inner/inner.html index 32b76837..75f27d85 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/inner/inner.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/inner/inner.html @@ -123,7 +123,7 @@ formatter: function(value, row, index) { var actions = []; actions.push('查看详情 '); - // actions.push('删除'); + actions.push('删除'); return actions.join(''); } }] diff --git a/ruoyi-admin/src/main/resources/templates/inventory/outer/outer.html b/ruoyi-admin/src/main/resources/templates/inventory/outer/outer.html index 0cf6223f..a2556ce1 100644 --- a/ruoyi-admin/src/main/resources/templates/inventory/outer/outer.html +++ b/ruoyi-admin/src/main/resources/templates/inventory/outer/outer.html @@ -57,7 +57,7 @@ updateUrl: prefix + "/edit/{id}", removeUrl: prefix + "/remove", exportUrl: prefix + "/export", - modalName: "出库单", + modalName: "发货管理", columns: [{ title: '序号', formatter: function (value, row, index) { diff --git a/ruoyi-admin/src/main/resources/templates/inventory/outer/viewOuter.html b/ruoyi-admin/src/main/resources/templates/inventory/outer/viewOuter.html new file mode 100644 index 00000000..c9e07251 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/inventory/outer/viewOuter.html @@ -0,0 +1,167 @@ + + + + + + + + +
+
+ 出库详情 +
+
+
+
出库单号:
+ + + + + + + + + + + + + + +
出库单号:出库时间:
产品编码产品型号:制造商: +
+
+
+ 仓库信息 +
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + +
+
+ + + +
+ + + + + + + + \ No newline at end of file diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/InventoryOuterController.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/InventoryOuterController.java index e2b92edb..95cbcce6 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/InventoryOuterController.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/InventoryOuterController.java @@ -15,7 +15,9 @@ import com.ruoyi.sip.domain.ProjectOrderFileLog; import com.ruoyi.sip.dto.inventory.InventoryInfoExcelDto; import com.ruoyi.sip.service.IInventoryAuthService; import com.ruoyi.sip.service.IOmsInventoryInnerService; +import com.ruoyi.sip.vo.ExecutionOrderVo; import com.ruoyi.sip.vo.OuterDeliveryVo; +import com.ruoyi.sip.vo.OuterViewVo; import liquibase.pro.packaged.A; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -129,7 +131,19 @@ public class InventoryOuterController extends BaseController mmap.put("deliveryList", vo.getDeliveryList()); return prefix + "/edit"; } + @GetMapping("/view/{id}") + public String view(@PathVariable("id") Long id, ModelMap mmap) + { + OuterViewVo outerViewVo = inventoryOuterService.viewVo(id); + mmap.put("inventoryOuter", outerViewVo.getInventoryOuter()); + mmap.put("allQuantity", outerViewVo.getAllQuantity()); + mmap.put("commitQuantity", outerViewVo.getCommitQuantity()); + + + + return prefix + "/viewOuter"; + } @GetMapping("/queryInfo/{id}") @ResponseBody public AjaxResult queryInfo(@PathVariable("id") Long id) diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/mapper/InventoryInfoMapper.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/mapper/InventoryInfoMapper.java index 4eb5b8d0..f24f23f8 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/mapper/InventoryInfoMapper.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/mapper/InventoryInfoMapper.java @@ -68,4 +68,6 @@ public interface InventoryInfoMapper void clearOutInfo(List idList); List countBySn(List productSnList); + + void deleteInventoryInfoByInnerIds(String[] idArray); } diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/mapper/OmsInventoryInnerMapper.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/mapper/OmsInventoryInnerMapper.java index 92f96832..afc1aa00 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/mapper/OmsInventoryInnerMapper.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/mapper/OmsInventoryInnerMapper.java @@ -60,4 +60,6 @@ public interface OmsInventoryInnerMapper public int deleteOmsInventoryInnerByIds(String[] ids); int selectMaxOrderCode(String code); + + List checkDelete(String[] ids); } diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryInfoService.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryInfoService.java index c1f8ed53..b605fcf8 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryInfoService.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryInfoService.java @@ -78,4 +78,6 @@ public interface IInventoryInfoService void clearOutInfo(List collect); List checkUnq(List productSnList); + + void deleteInventoryInfoByInnerIds(String[] idArray); } diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryOuterService.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryOuterService.java index 7a4ff0ba..00e9d395 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryOuterService.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IInventoryOuterService.java @@ -3,6 +3,7 @@ package com.ruoyi.sip.service; import java.util.List; import com.ruoyi.sip.domain.InventoryOuter; import com.ruoyi.sip.vo.OuterDeliveryVo; +import com.ruoyi.sip.vo.OuterViewVo; /** * 出库单Service接口 @@ -63,4 +64,6 @@ public interface IInventoryOuterService int statusUpdate(InventoryOuter inventoryOuter); OuterDeliveryVo selectBaseInfoById(Long id); + + OuterViewVo viewVo(Long id); } diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryInfoServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryInfoServiceImpl.java index 74840727..12e4081e 100644 --- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryInfoServiceImpl.java +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/InventoryInfoServiceImpl.java @@ -182,5 +182,10 @@ public class InventoryInfoServiceImpl implements IInventoryInfoService { return Collections.emptyList(); } + @Override + public void deleteInventoryInfoByInnerIds(String[] idArray) { + inventoryInfoMapper.deleteInventoryInfoByInnerIds(idArray); + } + } 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 e8f29b08..258b74e1 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 @@ -20,6 +20,7 @@ import com.ruoyi.sip.service.*; import com.ruoyi.sip.utils.TemplateMailUtil; import com.ruoyi.sip.vo.OuterDeliveryProductVo; import com.ruoyi.sip.vo.OuterDeliveryVo; +import com.ruoyi.sip.vo.OuterViewVo; import com.ruoyi.system.service.ISysUserService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -289,4 +290,25 @@ public class InventoryOuterServiceImpl implements IInventoryOuterService return outerDeliveryVo; } + + @Override + public OuterViewVo viewVo(Long id) { + OuterViewVo outerViewVo = new OuterViewVo(); + //查询基础信息 + InventoryOuter inventoryOuter = this.selectInventoryOuterById(id); + outerViewVo.setInventoryOuter(inventoryOuter); + //查询应出库和已提交数量 + List projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryOuter.getOrderCode())); + long sum = projectProductInfos.stream().filter(item -> item.getProductBomCode().equals(inventoryOuter.getProductCode())) + .mapToLong(ProjectProductInfo::getQuantity).sum(); + outerViewVo.setAllQuantity(sum); + InventoryOuter queryDto = new InventoryOuter(); + queryDto.setOrderCode(inventoryOuter.getOrderCode()); + List inventoryOuters = inventoryOuterMapper.selectInventoryOuterList(queryDto); + long sum2 = inventoryOuters.stream().filter(item -> item.getProductCode().equals(inventoryOuter.getProductCode())) + .mapToLong(InventoryOuter::getQuantity).sum(); + outerViewVo.setCommitQuantity(sum2); + return outerViewVo; + + } } 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 9b3413b1..ca9c22d7 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 @@ -147,7 +147,14 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService { */ @Override public int deleteOmsInventoryInnerByIds(String ids) { - return omsInventoryInnerMapper.deleteOmsInventoryInnerByIds(Convert.toStrArray(ids)); + //查询已发货的innerCode + String[] idArray = Convert.toStrArray(ids); + List innerCodeList = omsInventoryInnerMapper.checkDelete(idArray); + if (CollUtil.isNotEmpty(innerCodeList)){ + throw new ServiceException(StrUtil.format("已发货的入库单[{}]不能删除", String.join(",",innerCodeList))); + } + inventoryInfoService.deleteInventoryInfoByInnerIds(idArray); + return omsInventoryInnerMapper.deleteOmsInventoryInnerByIds(idArray); } /** diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OuterViewVo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OuterViewVo.java new file mode 100644 index 00000000..34fde8d7 --- /dev/null +++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OuterViewVo.java @@ -0,0 +1,25 @@ +package com.ruoyi.sip.vo; + + +import com.ruoyi.sip.domain.InventoryOuter; +import lombok.Data; + +/** + * @author : ch + * @version : 1.0 + * @ClassName : OuterViewVo + * @Description : + * @DATE : Created in 10:02 2025/8/15 + *
       Copyright: Copyright(c) 2025     
+ *
       Company :   	紫光汇智信息技术有限公司		           
+ * Modification History: + * Date Author Version Discription + * -------------------------------------------------------------------------- + * 2025/08/15 ch 1.0 Why & What is modified: <修改原因描述> * + */ +@Data +public class OuterViewVo { + private InventoryOuter inventoryOuter; + private Long allQuantity; + private Long commitQuantity; +} diff --git a/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml b/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml index 4c7a19cb..5251babe 100644 --- a/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml +++ b/ruoyi-sip/src/main/resources/mapper/inventory/InventoryInfoMapper.xml @@ -156,5 +156,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + delete from oms_inventory_info where inner_code in ( + select inner_code from oms_inventory_inner where id in + + #{id} + + ) + \ No newline at end of file diff --git a/ruoyi-sip/src/main/resources/mapper/inventory/OmsInventoryInnerMapper.xml b/ruoyi-sip/src/main/resources/mapper/inventory/OmsInventoryInnerMapper.xml index 6f799867..c9ab96cd 100644 --- a/ruoyi-sip/src/main/resources/mapper/inventory/OmsInventoryInnerMapper.xml +++ b/ruoyi-sip/src/main/resources/mapper/inventory/OmsInventoryInnerMapper.xml @@ -26,6 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_user t3 on t1.create_by = t3.user_id left join product_info t5 on t1.product_code = t5.product_code + + select t1.id, t1.inner_code, t1.product_code, t1.quantity, t1.warehouse_id, t1.create_by, t1.update_by, t1.create_time, t1.update_time ,t1.vendor_code + from oms_inventory_inner t1 + + + + insert into oms_inventory_inner