diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java index 96723c52..230b3b2b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java @@ -11,11 +11,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.aftersales.service.IAftersalesWarehouseOutService; @@ -245,9 +241,9 @@ public class AftersalesWarehouseOutController extends BaseController @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) @PostMapping("/maintenanceEquipmentOne") @ResponseBody - public AjaxResult maintenanceEquipmentOneSave(WarehouseOutOrder warehouseOutOrder) + public AjaxResult maintenanceEquipmentOneSave(@RequestBody WarehouseOutOrder warehouseOutOrder) { - return toAjax(warehouseOutOrderService.updateWarehouseOutOrder(warehouseOutOrder)); + return toAjax(warehouseOutOrderService.updateMaintenanceEquipmentOne(warehouseOutOrder)); } @@ -263,19 +259,64 @@ public class AftersalesWarehouseOutController extends BaseController List list = warehouseOutOrderService.selectOutOrderDetailListByCode(warehouseOutOrder); return getDataTable(list); } + + /** + * 展示售后第一次维护设备料号已选择添加出货设备的相关出货设备信息 + */ + @PostMapping("/showAftersalesShippingDeviceList") + @ResponseBody + public TableDataInfo showAftersalesShippingDeviceList(@RequestParam("materialNo") String materialNo) + { + + startPage(); + List list = warehouseOutOrderService.showAftersalesShippingDeviceList(materialNo); + return getDataTable(list); + } + + + + + /** + * 售后第一次维护设备 添加出货设备信息 + */ + @GetMapping("/addShippingDevicesOne/{outOrderDetailId}") + public String addShippingDevicesOne(@PathVariable("outOrderDetailId") Long outOrderDetailId, ModelMap mmap) + { + WarehouseOutOrderDetail warehouseOutOrderDetail = outOrderDetailService.selectWarehouseOutOrderDetailById(outOrderDetailId); + mmap.put("warehouseOutOrderDetail", warehouseOutOrderDetail); + return prefix + "/addShippingDevicesOne"; + } + + + + /** + * 修改保存售后第一次维护设备 添加出货设备信息 + */ + @ResponseBody + @PostMapping("/addShippingDevicesOne") + public AjaxResult addShippingDevicesOne(@RequestBody WarehouseOutOrderDetail warehouseOutOrderDetail) + { + + return toAjax(outOrderDetailService.addShippingDevicesOne(warehouseOutOrderDetail)); + } + + + /** - * 展示售后第一次维护设备料号相关出货设备信息 + * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 */ - @PostMapping("/showAftersalesShippingDevicelist") + @PostMapping("/getEquipMaterialDetailByMaterialNo") @ResponseBody - public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrder warehouseOutOrder) + public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrderDetail warehouseOutOrderDetail) { startPage(); - List list = warehouseOutOrderService.selectAftersalesShippingDevicelistByCodeAndNo(warehouseOutOrder); + List list = warehouseOutOrderService.selectAftersalesShippingDeviceListByMaterialNo(warehouseOutOrderDetail); return getDataTable(list); } + + /** * 第一次维护设备删除物料信息出货设备信息 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java index 1bdffb92..6bf4cece 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java @@ -158,7 +158,8 @@ public class AfterSalesShippingDevice extends BaseEntity @Excel(name = "维修时间", width = 30, dateFormat = "yyyy-MM-dd") private Date maintainTime; - + /** 是否添加出货设备(0代表是 1代表否) */ + private String addShippingDeviceFlag; public void setShippingDeviceCode(Long shippingDeviceCode) { this.shippingDeviceCode = shippingDeviceCode; @@ -464,6 +465,14 @@ public class AfterSalesShippingDevice extends BaseEntity this.maintainTime = maintainTime; } + public String getAddShippingDeviceFlag() { + return addShippingDeviceFlag; + } + + public void setAddShippingDeviceFlag(String addShippingDeviceFlag) { + this.addShippingDeviceFlag = addShippingDeviceFlag; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -505,6 +514,7 @@ public class AfterSalesShippingDevice extends BaseEntity .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) + .append("addShippingDeviceFlag",getAddShippingDeviceFlag()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/vo/SelectShippingDeviceVO.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/vo/SelectShippingDeviceVO.java index 0fbae240..f6a0ec33 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/vo/SelectShippingDeviceVO.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/vo/SelectShippingDeviceVO.java @@ -18,5 +18,7 @@ public class SelectShippingDeviceVO { private String makePhotoUrl; + private String snCode; + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java index 2e1a3a3b..afe3d0d0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java @@ -14,12 +14,20 @@ public interface AfterSalesShippingDeviceMapper /** * 查询出货设备 * - * @param shippingDeviceCode 出货设备ID + * @param shippingDeviceCode 出货设备Code * @return 出货设备 */ public AfterSalesShippingDevice selectAfterSalesShippingDeviceById(Long shippingDeviceCode); + /** + * 查询出货设备 + * + * @param shippingDeviceId 出货设备ID + * @return 出货设备 + */ + public AfterSalesShippingDevice selectAfterSalesShippingDeviceByShippingDeviceId(String shippingDeviceId); + /** * 查询选择设备 * @@ -64,7 +72,7 @@ public interface AfterSalesShippingDeviceMapper /** * 删除出货设备 * - * @param shippingDeviceCode 出货设备ID + * @param shippingDeviceId 出货设备ID * @return 结果 */ public int deleteAfterSalesShippingDeviceById(String shippingDeviceId); @@ -102,4 +110,9 @@ public interface AfterSalesShippingDeviceMapper * 根据生产单号和关联销售单号查询出货设备履历信息 * */ List selectAfterSalesShippingDeviceByNoAndCode(AfterSalesShippingDevice afterSalesShippingDevice); + + /* + * 根据物料号查询出货设备信息列表 + * */ + List selectShippingDeviceListByMaterialNo(AfterSalesShippingDevice afterSalesShippingDevice); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java index 77a7c7d0..b091fc29 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java @@ -114,4 +114,19 @@ public interface IAftersalesWarehouseOutService * 展示售后第一次维护设备物料相关信息 * */ List selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder); + + /** + * 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息 + * */ + List selectAftersalesShippingDeviceListByMaterialNo(WarehouseOutOrderDetail warehouseOutOrderDetail); + + /** + * 展示售后第一次维护设备料号已选择添加出货设备的相关出货设备信息 + * */ + List showAftersalesShippingDeviceList(String materialNo); + + /** + * 修改保存售后第一次维护设备 + */ + int updateMaintenanceEquipmentOne(WarehouseOutOrder warehouseOutOrder); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java index 5b4614a2..e176bfef 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java @@ -1,7 +1,9 @@ package com.ruoyi.aftersales.service.impl; import java.util.ArrayList; +import java.util.Date; import java.util.List; +import java.util.stream.Collectors; import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO; @@ -12,7 +14,9 @@ import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.SysSalesOrderChild; +import com.ruoyi.system.domain.SysSalesShippingInform; import com.ruoyi.system.mapper.SysSalesOrderChildMapper; +import com.ruoyi.system.mapper.SysSalesShippingInformMapper; import com.ruoyi.warehouse.domain.WarehouseOutOrder; import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; import com.ruoyi.warehouse.mapper.WarehouseOutOrderDetailMapper; @@ -22,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.aftersales.service.IAftersalesWarehouseOutService; import com.ruoyi.common.core.text.Convert; +import org.springframework.transaction.annotation.Transactional; /** * 出库单Service业务层处理 @@ -45,6 +50,9 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu @Autowired private WarehouseOutOrderDetailMapper outOrderDetailMapper; + @Autowired + private SysSalesShippingInformMapper shippingInformMapper; + /** * 查询出库单 * @@ -184,6 +192,104 @@ public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOu return warehouseOutOrderDetails; } + /** + * 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息 + * */ + @Override + public List selectAftersalesShippingDeviceListByMaterialNo(WarehouseOutOrderDetail warehouseOutOrderDetail) { + + List selectShippingDeviceVOs = new ArrayList<>(); + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setMaterialNo(warehouseOutOrderDetail.getMaterialNo()); + List afterSalesShippingDevices = shippingDeviceMapper.selectShippingDeviceListByMaterialNo(afterSalesShippingDevice); + if (!StringUtils.isNotEmpty(afterSalesShippingDevices)) { + // 记录日志 + log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",warehouseOutOrderDetail.getMaterialNo()); + } + + for (AfterSalesShippingDevice tempAfterSalesShippingDevice : afterSalesShippingDevices) { + SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO(); + shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId()); + shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode()); + shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber()); + shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl()); + shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode()); + selectShippingDeviceVOs.add(shippingDeviceVO); + } + return selectShippingDeviceVOs; + } + + /** + * 展示售后第一次维护设备料号已选择添加出货设备的相关出货设备信息 + * */ + @Override + public List showAftersalesShippingDeviceList(String materialNo) { + + List selectShippingDeviceVOs = new ArrayList<>(); + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setMaterialNo(materialNo); + List afterSalesShippingDevices = shippingDeviceMapper.selectShippingDeviceListByMaterialNo(afterSalesShippingDevice); + List filterAfterSalesShippingDevices = afterSalesShippingDevices.stream().filter(shippingDevice -> "0".equals(shippingDevice.getAddShippingDeviceFlag())).collect(Collectors.toList()); + if (!StringUtils.isNotEmpty(filterAfterSalesShippingDevices)) { + // 记录日志 + log.warn("未查找到与物料号关联的出库设备数据, 物料号: {}",materialNo); + } + + for (AfterSalesShippingDevice tempAfterSalesShippingDevice : filterAfterSalesShippingDevices) { + SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO(); + shippingDeviceVO.setShippingDeviceId(tempAfterSalesShippingDevice.getShippingDeviceId()); + shippingDeviceVO.setDeviceModelCode(tempAfterSalesShippingDevice.getDeviceModelCode()); + shippingDeviceVO.setDeviceRunningNumber(tempAfterSalesShippingDevice.getDeviceRunningNumber()); + shippingDeviceVO.setMakePhotoUrl(tempAfterSalesShippingDevice.getMakePhotourl()); + shippingDeviceVO.setQuoteId(tempAfterSalesShippingDevice.getSalesOrderCode()); + selectShippingDeviceVOs.add(shippingDeviceVO); + } + return selectShippingDeviceVOs; + } + + /** + * 修改保存售后第一次维护设备 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int updateMaintenanceEquipmentOne(WarehouseOutOrder warehouseOutOrder) { + + String loginName = ShiroUtils.getLoginName(); + + List selectShippingDeviceVOList = warehouseOutOrder.getSelectShippingDeviceVOList(); + for (SelectShippingDeviceVO selectShippingDeviceVO : selectShippingDeviceVOList) { + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setShippingDeviceId(selectShippingDeviceVO.getShippingDeviceId()); + afterSalesShippingDevice.setSnCode(selectShippingDeviceVO.getSnCode()); + afterSalesShippingDevice.setUpdateBy(loginName); + afterSalesShippingDevice.setUpdateTime(new Date()); + int updateShippingDeviceResult = shippingDeviceMapper.updateAfterSalesShippingDevice(afterSalesShippingDevice); + if (updateShippingDeviceResult <= 0){ + throw new BusinessException("更新出货设备数据失败"); + } + + } + + //设置出库单为待业务确认发货 + warehouseOutOrder.setWarehouseOutStatus("2"); + + //更新销售管理销售出库的出货状态 待业务确认发货 + SysSalesShippingInform sysSalesShippingInform = new SysSalesShippingInform(); + sysSalesShippingInform.setOutOrderCode(warehouseOutOrder.getOutOrderCode()); + sysSalesShippingInform.setWarehouseOutStatus("2"); + sysSalesShippingInform.setUpdateBy(loginName); + sysSalesShippingInform.setUpdateTime(new Date()); + int updateShippingInformResult = shippingInformMapper.updateSysSalesShippingInformByOutOrderCode(sysSalesShippingInform); + if (updateShippingInformResult <= 0){ + log.warn("出库单号为空:{}",warehouseOutOrder.getOutOrderCode()); + throw new BusinessException("更新销售出库单数据失败"); + } + + + + return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); + } + /* * 售后第一次维护设备信息根据设备ID删除出货设备信息 * */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java index e227446b..444e367f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java @@ -257,6 +257,7 @@ public class SysMakeOrderController extends BaseController AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); afterSalesShippingDevice.setMakeNo(makeNo); afterSalesShippingDevice.setSalesOrderCode(salesOrderCode); + afterSalesShippingDevice.setMaterialNo(equipMaterialDto.getMaterialCode()); List equipDetailDtos = salesShippingDeviceService.selectAfterSalesShippingDeviceByNoAndCode(afterSalesShippingDevice); return getDataTable(equipDetailDtos); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java index 3caf45fe..45a0289d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java @@ -28,6 +28,8 @@ import com.ruoyi.system.domain.exportDto.SysSalesFinishDto; import com.ruoyi.system.domain.exportDto.SysSalesOrderDto; import com.ruoyi.system.mapper.SysSalesOrderMapper; import com.ruoyi.system.service.*; +import com.ruoyi.warehouse.domain.WarehouseStorageOrder; +import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.runtime.ProcessInstance; @@ -88,12 +90,11 @@ public class SysSalesOrderController extends BaseController @Autowired private ISysMakeOrderService sysMakeOrderService; - @Autowired - private SysSalesOrderMapper sysSalesOrderMapper; - @Autowired private IFinancialReceivablesService financialReceivablesService; + @Autowired + private ISysSalesOrderChildService sysSalesOrderChildService; @RequiresPermissions("system:salesOrder:view") @GetMapping() @@ -522,4 +523,40 @@ public class SysSalesOrderController extends BaseController List list = sysUserService.selectRoleToUserList("ywyRole,ywjlRole,ywzgRole,zozjRole,admin"); return getDataTable(list); } + + /** + * 发起出货 + */ + @GetMapping("/salesDeliverGoods/{salesOrderId}") + public String salesDeliverGoods(@PathVariable("salesOrderId") Long salesOrderId, ModelMap mmap) + { + SysSalesOrder sysSalesOrder = sysSalesOrderService.selectSysSalesOrderById(salesOrderId); + mmap.put("sysSalesOrder", sysSalesOrder); + return prefix + "/salesDeliverGoods"; + } + + /** + * 修改保存发起出货 + */ + @RequiresPermissions("system:salesOrder:salesDeliverGoods") + @Log(title = "销售出货通知", businessType = BusinessType.UPDATE) + @PostMapping("/salesDeliverGoods") + @ResponseBody + public AjaxResult salesDeliverGoodsSave(@RequestBody SysSalesOrder sysSalesOrder) + { + return toAjax(sysSalesOrderService.updateSalesDeliverGoods(sysSalesOrder)); + } + + + /** + * 发起出货 物料详情列表 + */ + @ResponseBody + @RequestMapping("/salesDeliverGoodsDetailList") + public TableDataInfo storageMakeDetailList(SysSalesOrder sysSalesOrder){ + startPage(); + String salesOrderCode = sysSalesOrder.getSalesOrderCode(); + List list = sysSalesOrderChildService.selectOrderChildListBySalesOrderCode(salesOrderCode); + return getDataTable(list) ; + } } \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderChild.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderChild.java index 67a69414..a21abd31 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderChild.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderChild.java @@ -137,6 +137,15 @@ public class SysSalesOrderChild extends BaseEntity { @Excel(name = "未出库数量") private Integer unBoundQuantity; + //已完成数 + private Integer finishNum; + + //申请出货数 + private Integer applyShippingNum; + + //已申请出货数 + private Integer hasApplyShippingNum; + private String bomId; public Long getId() { @@ -436,7 +445,29 @@ public class SysSalesOrderChild extends BaseEntity { this.bomId = bomId; } + public Integer getFinishNum() { + return finishNum; + } + public void setFinishNum(Integer finishNum) { + this.finishNum = finishNum; + } + + public Integer getApplyShippingNum() { + return applyShippingNum; + } + + public void setApplyShippingNum(Integer applyShippingNum) { + this.applyShippingNum = applyShippingNum; + } + + public Integer getHasApplyShippingNum() { + return hasApplyShippingNum; + } + + public void setHasApplyShippingNum(Integer hasApplyShippingNum) { + this.hasApplyShippingNum = hasApplyShippingNum; + } @Override public String toString() { @@ -477,6 +508,9 @@ public class SysSalesOrderChild extends BaseEntity { .add("taxRate", taxRate) .add("outBoundQuantity", outBoundQuantity) .add("unBoundQuantity", unBoundQuantity) + .add("finishNum", finishNum) + .add("applyShippingNum", applyShippingNum) + .add("hasApplyShippingNum", hasApplyShippingNum) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderChildMapper.java index 8cdb9959..b1db1139 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderChildMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesOrderChildMapper.java @@ -27,4 +27,14 @@ public interface SysSalesOrderChildMapper { * 根据物料号和销售订单号查询销售订单子表数据 * */ SysSalesOrderChild selectSalesOrderChildByCodeAndNo(SysSalesOrderChild sysSalesOrderChild); + + /* + * 通过销售订单号查询销售订单子表 + * */ + List selectOrderChildListBySalesOrderCode(String salesOrderCode); + + /* + * 根据销售单号和物料号更新销售单子表数据 + * */ + int updateSysSalesOrderChildByCodeAndQuoteId(SysSalesOrderChild sysSalesOrderChild); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformMapper.java index 3aae2e63..1118c835 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSalesShippingInformMapper.java @@ -43,6 +43,16 @@ public interface SysSalesShippingInformMapper */ public int updateSysSalesShippingInform(SysSalesShippingInform sysSalesShippingInform); + + /** + * 修改销售出货通知 + * + * @param sysSalesShippingInform 销售出货通知 + * @return 结果 + */ + public int updateSysSalesShippingInformByOutOrderCode(SysSalesShippingInform sysSalesShippingInform); + + /** * 删除销售出货通知 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderChildService.java index ff4fcaf0..f87f3d25 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderChildService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderChildService.java @@ -23,4 +23,8 @@ public interface ISysSalesOrderChildService { SysSalesOrderChild selectOneByQuoteIdAndMaterialCode(String quoteId,String materialCode); + /* + * 通过销售订单号查询销售订单子表 + * */ + List selectOrderChildListBySalesOrderCode(String salesOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java index 40877029..91657cc7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesOrderService.java @@ -87,4 +87,9 @@ public interface ISysSalesOrderService * 根据销售单号更新销售订单 * */ int updateSysSalesOrderBySalesOrderCode(SysSalesOrder sysSalesOrder); + + /** + * 修改保存发起出货 + */ + int updateSalesDeliverGoods(SysSalesOrder sysSalesOrder); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java index 3cd18bc3..2290f0b9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysSalesShippingInformService.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service; import java.util.List; + +import com.ruoyi.system.domain.SysSalesOrder; import com.ruoyi.system.domain.SysSalesShippingInform; /** @@ -72,4 +74,9 @@ public interface ISysSalesShippingInformService * @return */ int restoreSysSalesShippingInformById(Long shippingInformId); + + /** + * 通过销售发起出货生成销售出货通知单列表 + * */ + int generateShippingInformBySalesOrder(SysSalesOrder sysSalesOrder, String outOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderChildServiceImpl.java index 255ed536..6a693507 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderChildServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderChildServiceImpl.java @@ -51,4 +51,13 @@ public class SysSalesOrderChildServiceImpl implements ISysSalesOrderChildService public SysSalesOrderChild selectOneByQuoteIdAndMaterialCode(String quoteId, String materialCode) { return sysCustomerQuoteChildMapper.selectOneByQuoteIdAndMaterialCode(quoteId,materialCode); } + + /* + * 通过销售订单号查询销售订单子表 + * */ + @Override + public List selectOrderChildListBySalesOrderCode(String salesOrderCode) { + + return sysCustomerQuoteChildMapper.selectOrderChildListBySalesOrderCode(salesOrderCode); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java index cbaa4013..60a24051 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesOrderServiceImpl.java @@ -6,6 +6,7 @@ import com.ruoyi.common.core.page.PageDomain; import com.ruoyi.common.core.page.TableSupport; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.service.ICommonService; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; @@ -13,9 +14,11 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.system.domain.*; +import com.ruoyi.system.mapper.SysSalesOrderChildMapper; import com.ruoyi.system.mapper.SysSalesOrderMapper; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.service.*; +import com.ruoyi.warehouse.service.IWarehouseOutOrderService; import org.activiti.engine.TaskService; import org.activiti.engine.impl.persistence.entity.TaskEntityImpl; import org.activiti.engine.runtime.ProcessInstance; @@ -70,6 +73,15 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService @Autowired private ISysSalesOrderChildService sysSalesOrderChildService; + @Autowired + private SysSalesOrderChildMapper salesOrderChildMapper; + + @Autowired + private ISysSalesShippingInformService sysSalesShippingInformService; + + @Autowired + private IWarehouseOutOrderService warehouseOutOrderService; + /** * 查询销售订单 * @@ -352,6 +364,42 @@ public class SysSalesOrderServiceImpl implements ISysSalesOrderService return sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); } + /** + * 修改保存发起出货 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int updateSalesDeliverGoods(SysSalesOrder sysSalesOrder) { + + String loginName = ShiroUtils.getLoginName(); + + sysSalesOrder.setUpdateBy(loginName); + sysSalesOrder.setUpdateTime(new Date()); + + for (SysSalesOrderChild sysSalesOrderChild : sysSalesOrder.getSysSalesOrderChildList()) { + + sysSalesOrderChild.setUpdateTime(new Date()); + sysSalesOrderChild.setUpdateBy(loginName); + sysSalesOrderChild.setQuoteId(sysSalesOrder.getSalesOrderCode()); + sysSalesOrderChild.setHasApplyShippingNum(sysSalesOrderChild.getApplyShippingNum()); + int updateSysSalesOrderChildResult = salesOrderChildMapper.updateSysSalesOrderChildByCodeAndQuoteId(sysSalesOrderChild); + if (updateSysSalesOrderChildResult <= 0){ + throw new BusinessException("更新销售订单子表数据失败"); + } + } + + + //两个表生成同一个出库单号 + String outOrderCode = redisCache.generateBillNo("CK"); + //通过销售发起出货生成仓库出库单 + int insertWarehouseOutOrderResult = warehouseOutOrderService.generateWarehouseOutOrderBySalesOrder(sysSalesOrder,outOrderCode); + + //通过销售发起出货生成销售出货通知单列表 + int insertShippingInformResult = sysSalesShippingInformService.generateShippingInformBySalesOrder(sysSalesOrder,outOrderCode); + + return sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); + } + private ProcessInstance startProcessInstance(String applyTitle,String instanceType,SysSalesOrder sysSalesOrder, SysUser user) { Long nessKey = sysSalesOrder.getSalesOrderId(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java index 44056899..a8e5460b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java @@ -1,8 +1,18 @@ package com.ruoyi.system.service.impl; +import java.math.BigDecimal; +import java.util.Date; import java.util.List; + +import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.system.domain.SysSalesOrder; +import com.ruoyi.system.domain.SysSalesOrderVo; +import com.ruoyi.system.mapper.SysSalesOrderMapper; +import com.ruoyi.warehouse.domain.WarehouseOutOrder; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.SysSalesShippingInformMapper; @@ -16,12 +26,19 @@ import com.ruoyi.common.core.text.Convert; * @author 刘晓旭 * @date 2024-07-09 */ +@Slf4j @Service public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInformService { @Autowired private SysSalesShippingInformMapper sysSalesShippingInformMapper; + @Autowired + private SysSalesOrderMapper sysSalesOrderMapper; + + @Autowired + private RedisCache redisCache; + /** * 查询销售出货通知 * @@ -123,4 +140,38 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor { return sysSalesShippingInformMapper.restoreSysSalesShippingInformById(shippingInformId); } + + /** + * 通过销售发起出货生成销售出货通知单列表 + * */ + @Override + public int generateShippingInformBySalesOrder(SysSalesOrder sysSalesOrder,String outOrderCode) { + + SysSalesShippingInform sysSalesShippingInform = new SysSalesShippingInform(); + String salesOrderCode = sysSalesOrder.getSalesOrderCode(); + if (StringUtils.isEmpty(salesOrderCode)){ + log.warn("销售订单编号为空:{}",salesOrderCode); + } + //从数据库查询的数据 + SysSalesOrderVo sysSalesOrderVo = sysSalesOrderMapper.selectSysSalesOrderBySalesOrderCode(salesOrderCode); + + sysSalesShippingInform.setOutOrderCode(outOrderCode); + //出库状态为 待仓库准备物料 + sysSalesShippingInform.setWarehouseOutStatus("0"); + sysSalesShippingInform.setSalesOrderCode(salesOrderCode); + //订单类型设置为 销售订单 + sysSalesShippingInform.setWarehouseOrderType("0"); + //出库类型设置为 销售出库 + sysSalesShippingInform.setWarehouseOutType("0"); + sysSalesShippingInform.setCustomerId(sysSalesOrderVo.getEnterpriseCode()); + sysSalesShippingInform.setCustomerName(sysSalesOrderVo.getEnterpriseName()); + sysSalesShippingInform.setDeliveryCondition(sysSalesOrderVo.getDeliveryConditions()); + sysSalesShippingInform.setCreateTime(new Date()); + sysSalesShippingInform.setCreateBy(ShiroUtils.getLoginName()); + sysSalesShippingInform.setAllPriceExcludingTaxDollar(BigDecimal.valueOf(sysSalesOrderVo.getNoUsdSum())); + sysSalesShippingInform.setAllPriceExcludingTaxRmb(BigDecimal.valueOf(sysSalesOrderVo.getNoRmbSum())); + sysSalesShippingInform.setAllPriceIncludesTax(BigDecimal.valueOf(sysSalesOrderVo.getRmbTaxSum())); + + return sysSalesShippingInformMapper.insertSysSalesShippingInform(sysSalesShippingInform); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java index ca862021..3304d077 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrder.java @@ -4,6 +4,7 @@ import java.util.Date; import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -130,6 +131,11 @@ public class WarehouseOutOrder extends BaseEntity /** 仓库出库单详情*/ private List warehouseOutOrderDetailList; + /** 添加出货设备列表*/ + + private List selectShippingDeviceVOList; + + public void setOutOrderId(Long outOrderId) { this.outOrderId = outOrderId; @@ -428,6 +434,14 @@ public class WarehouseOutOrder extends BaseEntity this.warehouseOutOrderDetailList = warehouseOutOrderDetailList; } + public List getSelectShippingDeviceVOList() { + return selectShippingDeviceVOList; + } + + public void setSelectShippingDeviceVOList(List selectShippingDeviceVOList) { + this.selectShippingDeviceVOList = selectShippingDeviceVOList; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -469,6 +483,7 @@ public class WarehouseOutOrder extends BaseEntity .append("updateTime", getUpdateTime()) .append("remark", getRemark()) .append("warehouseOutOrderDetailList",getWarehouseOutOrderDetailList()) + .append("selectShippingDeviceVOList",getSelectShippingDeviceVOList()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrderDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrderDetail.java index 777e0796..57f887ad 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrderDetail.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseOutOrderDetail.java @@ -1,7 +1,10 @@ package com.ruoyi.warehouse.domain; import java.util.Date; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -199,6 +202,10 @@ public class WarehouseOutOrderDetail extends BaseEntity @Excel(name = "收货电话") private String deliveryNumber; + /** 添加出货设备列表*/ + private List SelectShippingDeviceVOList; + + public void setOutOrderDetailId(Long outOrderDetailId) { this.outOrderDetailId = outOrderDetailId; @@ -605,6 +612,14 @@ public class WarehouseOutOrderDetail extends BaseEntity return deliveryNumber; } + public List getSelectShippingDeviceVOList() { + return SelectShippingDeviceVOList; + } + + public void setSelectShippingDeviceVOList(List selectShippingDeviceVOList) { + SelectShippingDeviceVOList = selectShippingDeviceVOList; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -658,6 +673,7 @@ public class WarehouseOutOrderDetail extends BaseEntity .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) + .append("selectShippingDeviceVOList",getSelectShippingDeviceVOList()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java index 0739d3d2..ed3624bb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderDetailService.java @@ -91,4 +91,9 @@ public interface IWarehouseOutOrderDetailService * 退换货-出库 供应商物料详情列表 */ List selectWarehouseOutOrderDetailListByCode(String outOrderCode); + + /** + * 修改保存售后第一次维护设备 添加出货设备信息 + */ + int addShippingDevicesOne(WarehouseOutOrderDetail warehouseOutOrderDetail); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java index 8aea63fe..38c02b65 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseOutOrderService.java @@ -3,6 +3,7 @@ package com.ruoyi.warehouse.service; import java.util.List; import com.ruoyi.system.domain.SysMakeorderPickVo; +import com.ruoyi.system.domain.SysSalesOrder; import com.ruoyi.warehouse.domain.WarehouseOutOrder; /** @@ -100,4 +101,9 @@ public interface IWarehouseOutOrderService * 生产单-出库 * */ int updateMakeOutWarehouse(WarehouseOutOrder warehouseOutOrder); + + /** + * 通过销售发起出货生成仓库出库单 + * */ + int generateWarehouseOutOrderBySalesOrder(SysSalesOrder sysSalesOrder, String outOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java index 9b70eca2..c4dcb061 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderDetailServiceImpl.java @@ -3,7 +3,9 @@ package com.ruoyi.warehouse.service.impl; import java.util.List; import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; +import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper; +import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; @@ -16,6 +18,7 @@ import com.ruoyi.warehouse.mapper.WarehouseOutOrderDetailMapper; import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; import com.ruoyi.warehouse.service.IWarehouseOutOrderDetailService; import com.ruoyi.common.core.text.Convert; +import org.springframework.transaction.annotation.Transactional; /** * 出库单详情Service业务层处理 @@ -165,4 +168,25 @@ public class WarehouseOutOrderDetailServiceImpl implements IWarehouseOutOrderDet return warehouseOutOrderDetailMapper.selectOutOrderDetailListByCode(outOrderCode); } + + /** + * 修改保存售后第一次维护设备 添加出货设备信息 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int addShippingDevicesOne(WarehouseOutOrderDetail warehouseOutOrderDetail) { + List selectShippingDeviceVOList = warehouseOutOrderDetail.getSelectShippingDeviceVOList(); + int updateShippingDeviceResult = 0; + for (SelectShippingDeviceVO selectShippingDeviceVO : selectShippingDeviceVOList) { + AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); + afterSalesShippingDevice.setShippingDeviceId(selectShippingDeviceVO.getShippingDeviceId()); + //设置为已经添加出货设备 + afterSalesShippingDevice.setAddShippingDeviceFlag("0"); + updateShippingDeviceResult += afterSalesShippingDeviceMapper.updateAfterSalesShippingDevice(afterSalesShippingDevice); + if (updateShippingDeviceResult <= 0){ + throw new BusinessException("更新出货设备信息失败"); + } + } + return updateShippingDeviceResult; + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java index eb5431d5..a189925d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java @@ -8,15 +8,10 @@ import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.SysMakeOrder; -import com.ruoyi.system.domain.SysMakeorderPickDetail; -import com.ruoyi.system.domain.SysMakeorderPickVo; -import com.ruoyi.system.domain.SysSalesOrder; -import com.ruoyi.system.mapper.SysMakeOrderMapper; -import com.ruoyi.system.mapper.SysMakeorderPickDetailMapper; -import com.ruoyi.system.mapper.SysMakeorderPickMapper; -import com.ruoyi.system.mapper.SysSalesOrderMapper; +import com.ruoyi.system.domain.*; +import com.ruoyi.system.mapper.*; import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; +import com.ruoyi.warehouse.domain.WarehouseStorageOrder; import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail; import com.ruoyi.warehouse.mapper.WarehouseOutOrderDetailMapper; import lombok.extern.slf4j.Slf4j; @@ -60,6 +55,10 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService @Autowired private RedisCache redisCache; + @Autowired + private SysSalesShippingInformMapper shippingInformMapper; + + /** * 查询仓库出库单 * @@ -172,20 +171,39 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService String loginName = ShiroUtils.getLoginName(); warehouseOutOrder.setUpdateBy(loginName); warehouseOutOrder.setUpdateTime(new Date()); - warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); + + //更改出库状态为 第一次维护设备信息 + warehouseOutOrder.setWarehouseOutStatus("1"); List warehouseOutOrderDetailList = warehouseOutOrder.getWarehouseOutOrderDetailList(); if (StringUtils.isEmpty(warehouseOutOrderDetailList)){ log.warn("保存销售单-准备物料,物料列表信息为空:{}",warehouseOutOrder); } - int updateRows = 0; for (WarehouseOutOrderDetail warehouseOutOrderDetail : warehouseOutOrderDetailList) { warehouseOutOrderDetail.setUpdateBy(loginName); warehouseOutOrderDetail.setUpdateTime(new Date()); warehouseOutOrderDetail.setRemark(warehouseOutOrder.getRemark()); //更新数据库记录 - updateRows += outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail); + int updateOutOrderDetail = outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail); + if (updateOutOrderDetail <= 0){ + throw new BusinessException("更新出库单详情数据失败"); + } } - return updateRows; + + + SysSalesShippingInform sysSalesShippingInform = new SysSalesShippingInform(); + sysSalesShippingInform.setOutOrderCode(warehouseOutOrder.getOutOrderCode()); + //更新销售管理销售出库的出货状态 待售后维护设备1 + sysSalesShippingInform.setWarehouseOutStatus("1"); + sysSalesShippingInform.setUpdateBy(loginName); + sysSalesShippingInform.setUpdateTime(new Date()); + int updateShippingInformResult = shippingInformMapper.updateSysSalesShippingInformByOutOrderCode(sysSalesShippingInform); + if (updateShippingInformResult <= 0){ + log.warn("出库单号为空:{}",warehouseOutOrder.getOutOrderCode()); + throw new BusinessException("更新销售出库单数据失败"); + } + + int updateWarehouseOutOrderResult = warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); + return updateWarehouseOutOrderResult; } @@ -513,4 +531,67 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService } return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); } + + /** + * 通过销售发起出货生成仓库出库单 + * */ + @Override + public int generateWarehouseOutOrderBySalesOrder(SysSalesOrder sysSalesOrder,String outOrderCode) { + + String salesOrderCode = sysSalesOrder.getSalesOrderCode(); + if (StringUtils.isEmpty(salesOrderCode)){ + log.warn("销售订单编号为空:{}",salesOrderCode); + } + //从数据库查询的数据 + SysSalesOrderVo sysSalesOrderVo = sysSalesOrderMapper.selectSysSalesOrderBySalesOrderCode(salesOrderCode); + + WarehouseOutOrder warehouseOutOrder = new WarehouseOutOrder(); + warehouseOutOrder.setOutOrderCode(outOrderCode); + //出库状态为 待仓库准备物料 + warehouseOutOrder.setWarehouseOutStatus("0"); + warehouseOutOrder.setRelatedOrderCode(salesOrderCode); + warehouseOutOrder.setSalesOrderCode(salesOrderCode); + //订单类型设置为 销售订单 + warehouseOutOrder.setWarehouseOrderType("0"); + //出库类型设置为 销售出库 + warehouseOutOrder.setWarehouseOutType("0"); + warehouseOutOrder.setBusinessName(sysSalesOrderVo.getBusinessMembers()); + warehouseOutOrder.setCustomerId(sysSalesOrderVo.getEnterpriseCode()); + warehouseOutOrder.setCustomerName(sysSalesOrderVo.getEnterpriseName()); + warehouseOutOrder.setApplyName(sysSalesOrderVo.getApplyUserName()); + warehouseOutOrder.setDeliveryCondition(sysSalesOrderVo.getDeliveryConditions()); + warehouseOutOrder.setCreateTime(new Date()); + warehouseOutOrder.setCreateBy(ShiroUtils.getLoginName()); + //新增出库单明细 + CreateOutOrderDetailBySalesOrderChildList(sysSalesOrder, salesOrderCode, sysSalesOrderVo, outOrderCode); + + return warehouseOutOrderMapper.insertWarehouseOutOrder(warehouseOutOrder); + } + //新增出库单明细 + private void CreateOutOrderDetailBySalesOrderChildList(SysSalesOrder sysSalesOrder, String salesOrderCode, SysSalesOrderVo sysSalesOrderVo, String outOrderCode) { + List sysSalesOrderChildList = sysSalesOrder.getSysSalesOrderChildList(); + for (SysSalesOrderChild sysSalesOrderChild : sysSalesOrderChildList) { + WarehouseOutOrderDetail warehouseOutOrderDetail = new WarehouseOutOrderDetail(); + warehouseOutOrderDetail.setOutOrderCode(outOrderCode); + warehouseOutOrderDetail.setRelatedOrderCode(salesOrderCode); + warehouseOutOrderDetail.setMaterialNo(sysSalesOrderChild.getMaterialCode()); + warehouseOutOrderDetail.setMaterialName(sysSalesOrderChild.getMaterialName()); + warehouseOutOrderDetail.setMaterialType(sysSalesOrderChild.getMaterialType()); + warehouseOutOrderDetail.setMaterialBrand(sysSalesOrderChild.getBrand()); + warehouseOutOrderDetail.setMaterialUnit(sysSalesOrderChild.getUnit()); + warehouseOutOrderDetail.setMaterialDescribe(sysSalesOrderChild.getDescribe()); + warehouseOutOrderDetail.setMaterialProcessMethod(sysSalesOrderChild.getProcessMethod()); + warehouseOutOrderDetail.setMakeNum(sysSalesOrderChild.getMaterialNum()); + warehouseOutOrderDetail.setApplyOutOrderSum(sysSalesOrderChild.getApplyShippingNum()); + warehouseOutOrderDetail.setCustomerId(sysSalesOrderVo.getEnterpriseCode()); + warehouseOutOrderDetail.setCustomerName(sysSalesOrderVo.getEnterpriseName()); + warehouseOutOrderDetail.setDeliveryCondition(sysSalesOrderVo.getDeliveryConditions()); + warehouseOutOrderDetail.setCreateTime(new Date()); + warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName()); + int insertOutOrderDetailResult = outOrderDetailMapper.insertWarehouseOutOrderDetail(warehouseOutOrderDetail); + if (insertOutOrderDetailResult <= 0){ + throw new BusinessException("新增出库单明细数据失败"); + } + } + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java index 3e4b3320..9804fe0a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java @@ -20,7 +20,9 @@ import com.ruoyi.quality.mapper.QualityOrderReportUnqualifiedMapper; import com.ruoyi.quality.service.IQualityOrderService; import com.ruoyi.system.domain.SysMakeOrder; import com.ruoyi.system.domain.SysSalesOrder; +import com.ruoyi.system.domain.SysSalesOrderChild; import com.ruoyi.system.mapper.SysMakeOrderMapper; +import com.ruoyi.system.mapper.SysSalesOrderChildMapper; import com.ruoyi.system.mapper.SysSalesOrderMapper; import com.ruoyi.system.service.ISysMakeOrderService; import com.ruoyi.system.service.ISysSalesOrderService; @@ -69,6 +71,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS @Autowired private SysMakeOrderMapper sysMakeOrderMapper; + @Autowired + private SysSalesOrderChildMapper salesOrderChildMapper; @Autowired private RedisCache redisCache; @@ -790,6 +794,7 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS throw new BusinessException("更新生产订单数据失败"); } + //更新销售订单数据 SysSalesOrder sysSalesOrder = salesOrderMapper.selectSysSalesOrderBySalesOrderCode(tempSysMakeOrder.getSaleNo()); //设置为全部完成 @@ -801,6 +806,20 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS throw new BusinessException("更新销售订单数据失败"); } + //更新销售订单子表的数据 + for (WarehouseStorageOrderDetail warehouseStorageOrderDetail : warehouseStorageOrderDetailList) { + SysSalesOrderChild sysSalesOrderChild = new SysSalesOrderChild(); + sysSalesOrderChild.setQuoteId(tempSysMakeOrder.getSaleNo()); + sysSalesOrderChild.setMaterialCode(warehouseStorageOrderDetail.getMaterialNo()); + sysSalesOrderChild.setFinishNum(warehouseStorageOrderDetail.getStorageNum()); + sysSalesOrderChild.setUpdateBy(loginName); + sysSalesOrderChild.setUpdateTime(new Date()); + int updateSalesOrderChildResult = salesOrderChildMapper.updateSysSalesOrderChildByCodeAndQuoteId(sysSalesOrderChild); + if (updateSalesOrderChildResult <= 0){ + throw new BusinessException("更新销售订单子表数据失败"); + } + } + // //更新生产单数据 // int updateMakeOrderResult = sysMakeOrderService.updateSysMakeOrderByWarehouseStorageOrder(warehouseStorageOrder, warehouseStorageOrderDetailList); diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml index 33997e27..c4468920 100644 --- a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml @@ -43,10 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select shipping_device_code, shipping_device_id, make_no,sales_order_code, material_no, material_photoUrl, material_name, material_type, material_class, material_model_code, material_unit, material_brand, material_describe, device_model_code, device_running_number, make_photoUrl, sn_code, aftersales_photoUrl, factory_date, guarantee_period, guarantee_period_flag, lock_date, lock_date_flag, wastage_expire_date, wastage_expire_flag, component_guarantee_date, component_guarantee_flag, engineer_name, salesman_name, make_name,customer_id, customer_name, maintain_order_code, maintain_time, create_by, create_time, update_by, update_time from aftersales_shipping_device + select shipping_device_code, shipping_device_id, make_no,sales_order_code, material_no, material_photoUrl, material_name, material_type, material_class, material_model_code, material_unit, material_brand, material_describe, device_model_code, device_running_number, make_photoUrl, sn_code, aftersales_photoUrl, factory_date, guarantee_period, guarantee_period_flag, lock_date, lock_date_flag, wastage_expire_date, wastage_expire_flag, component_guarantee_date, component_guarantee_flag, engineer_name, salesman_name, make_name,customer_id, customer_name, maintain_order_code, maintain_time, create_by, create_time, update_by, update_time, add_shipping_device_flag from aftersales_shipping_device + + + + + + + + @@ -141,6 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time, update_by, update_time, + add_shipping_device_flag, #{shippingDeviceId}, @@ -179,6 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{createTime}, #{updateBy}, #{updateTime}, + #{addShippingDeviceFlag} @@ -221,6 +240,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, + add_shipping_device_flag = #{addShippingDeviceFlag}, where shipping_device_id= #{shippingDeviceId} diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml index 862af4b3..616bc64a 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml @@ -32,6 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -84,6 +87,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and materialCode = #{materialCode} + + insert into sys_sales_order_child @@ -115,6 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" expiry_day, out_bound_quantity, un_bound_quantity, + finish_num, + apply_shipping_num, + has_apply_shipping_num, create_by, create_time, remark, @@ -151,6 +164,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{expiryDay}, #{outBoundQuantity}, #{unBoundQuantity}, + #{finishNum}, + #{applyShippingNum} + #{hasApplyShippingNum}, #{createBy}, #{createTime}, #{remark}, @@ -191,6 +207,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" expiry_day = #{expiryDay}, out_bound_quantity = #{outBoundQuantity}, un_bound_quantity = #{unBoundQuantity}, + finish_num = #{finishNum}, + apply_shipping_num = #{applyShippingNum}, + has_apply_shipping_num = #{hasApplyShippingNum}, update_by = #{updateBy}, remark = #{remark}, audit_status = #{auditStatus}, @@ -202,6 +221,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} + + + update sys_sales_order_child + + quoteId = #{quoteId}, + materialId = #{materialId}, + materialCode = #{materialCode}, + materialName = #{materialName}, + materialType = #{materialType}, + processMethod = #{processMethod}, + brand = #{brand}, + photoUrl = #{photoUrl}, + unit = #{unit}, + `describe` = #{describe}, + warehouseDept = #{warehouseDept}, + countTax = #{countTax}, + usdTax = #{usdTax}, + materialNum = #{materialNum}, + materialSole = #{materialSole}, + materialRmb = #{materialRmb}, + materialNoRmb = #{materialNoRmb}, + materialNoUsd = #{materialNoUsd}, + materialUsd = #{materialUsd}, + materialUsdSum = #{materialUsdSum}, + materialNoUsdSum = #{materialNoUsdSum}, + materialNoRmbSum = #{materialNoRmbSum}, + materialRmbSum = #{materialRmbSum}, + delivery_time = #{deliveryTime}, + expiry_day = #{expiryDay}, + out_bound_quantity = #{outBoundQuantity}, + un_bound_quantity = #{unBoundQuantity}, + finish_num = #{finishNum}, + apply_shipping_num = #{applyShippingNum}, + has_apply_shipping_num = #{hasApplyShippingNum}, + update_by = #{updateBy}, + remark = #{remark}, + audit_status = #{auditStatus}, + use_status = #{useStatus}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where quoteId = #{quoteId} + and materialCode = #{materialCode} + + + + delete from sys_sales_order_child where id = #{id} diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysSalesShippingInformMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysSalesShippingInformMapper.xml index 05686663..745b4aca 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysSalesShippingInformMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysSalesShippingInformMapper.xml @@ -151,6 +151,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where shipping_inform_id = #{shippingInformId} + + update sys_sales_shipping_inform + + out_order_code = #{outOrderCode}, + warehouse_out_status = #{warehouseOutStatus}, + sales_order_code = #{salesOrderCode}, + warehouse_out_type = #{warehouseOutType}, + warehouse_order_type = #{warehouseOrderType}, + customer_id = #{customerId}, + customer_name = #{customerName}, + business_members = #{businessMembers}, + sales_order_number = #{salesOrderNumber}, + material_sum = #{materialSum}, + enterprise_sum = #{enterpriseSum}, + customer_contact = #{customerContact}, + contact_number = #{contactNumber}, + customer_contact_address = #{customerContactAddress}, + create_time = #{createTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + all_price_excluding_tax_rmb = #{allPriceExcludingTaxRmb}, + all_price_excluding_tax_dollar = #{allPriceExcludingTaxDollar}, + all_price_includes_tax = #{allPriceIncludesTax}, + planned_delivery_time = #{plannedDeliveryTime}, + acceptance_time = #{acceptanceTime}, + payment_condition = #{paymentCondition}, + delivery_condition = #{deliveryCondition}, + deliver_time = #{deliverTime}, + + where out_order_code = #{outOrderCode} + + + + delete from sys_sales_shipping_inform where shipping_inform_id = #{shippingInformId} diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevices.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevices.html deleted file mode 100644 index 316a5184..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevices.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - -
-
- - -
-

物料信息

-
-
-
-

出货设备

-
-
-
-
- - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html new file mode 100644 index 00000000..3df5aba7 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html @@ -0,0 +1,308 @@ + + + + + + + +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + + + + + +
+
+ +
+ +
+

出货设备

+
+
+
+
+ + +
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html index d35431fa..d075be63 100644 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html +++ b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html @@ -6,7 +6,7 @@
-
+
@@ -85,16 +85,53 @@ var prefix = ctx + "aftersales/warehouseOutOrder"; var warehouseOutOrder = [[${warehouseOutOrder}]]; - $("#form-warehouseOutOrder-edit").validate({ + $("#form-maintenanceEquipmentOne-edit").validate({ focusCleanup: true }); + // function submitHandler() { + // if ($.validate.form()) { + // $.operate.save(prefix + "/maintenanceEquipmentOne", $('#form-maintenanceEquipmentOne-edit').serialize()); + // } + // } + + function submitHandler() { - if ($.validate.form()) { - $.operate.save(prefix + "/edit", $('#form-warehouseOutOrder-edit').serialize()); - } + // 获取表单数据 + const shippingDevicesData = $("#form-maintenanceEquipmentOne-edit").serializeArray().reduce((obj, item) => { + obj[item.name] = item.value; + return obj; + }, {}); + + // 在需要收集所有子表数据的地方调用此函数 + var allSubData = getAllSubTablesData(); + + // 将表数据转换成与complaintNoticeData格式一致的数组 + var equipDetailDataList = allSubData.map(function(item) { + // 根据实际字段名调整 + return { + "shippingDeviceId": item.shippingDeviceId, + "deviceModelCode": item.deviceModelCode, + "deviceRunningNumber": item.deviceRunningNumber, + "makePhotoUrl": item.makePhotoUrl, + "snCode": item.snCode + // ...其他字段 + }; + }); + + // 合并表单数据和表格数据 + const combinedData = Object.assign({}, shippingDevicesData, { selectShippingDeviceVOList: equipDetailDataList }); + + console.log(combinedData) + // 使用 JSON.stringify() 序列化数据 + const jsonData = JSON.stringify(combinedData); + // 发送 AJAX 请求到后端接口 + $.operate.saveJson(prefix + "/maintenanceEquipmentOne", jsonData); } + + + $("input[name='outOrderTime']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", @@ -107,8 +144,10 @@ autoclose: true }); + $(function() { var options = { + id:'bootstrap-table', url: prefix + "/getMaintenanceEquipmentOneMaterials", modalName: "物料信息", showColumns: false, @@ -124,13 +163,20 @@ columns: [{ checkbox: true }, + { title:'销售订单号', field:'quoteId', visible: false }, + { + title:'出库单详情Id', + field:'outOrderDetailId', + visible: false + + }, { title: '料号', - field: 'materialCode', + field: 'materialNo', }, { title: '图片', @@ -156,19 +202,34 @@ title: '描述', field: 'describe', }, + { + title: '订单数量', + field: 'makeNum', + }, + { + title: '已出库数', + field: 'hasOutOrderSum', + }, + { + title: '申请出库数', + field: 'applyOutOrderSum', + }, + { + title: '准备出库数', + field: 'prepareOutOrderSum', + }, { title: '操作', align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('添加出货设备'); + actions.push('添加出货设备'); return actions.join(''); } } ] }; $.table.init(options); - }) @@ -177,12 +238,12 @@ var childTableId = 'child_table_'+index; $detail.html('
'); $('#'+childTableId).bootstrapTable({ - url: prefix + "/showAftersalesShippingDevicelist", + url: prefix + "/showAftersalesShippingDeviceList", method: 'post', sidePagination: "server", contentType: "application/x-www-form-urlencoded", queryParams : { - salesOrderCode: warehouseOutOrder.salesOrderCode, + // salesOrderCode: warehouseOutOrder.salesOrderCode, materialNo: parentRow.materialNo }, columns: [ @@ -214,6 +275,7 @@ }); }; + function queryParams(params) { var curParams = { // 传递参数查询参数 @@ -223,6 +285,21 @@ } + // 获取所有子表数据的函数 + // 获取所有子表数据的函数 + function getAllSubTablesData() { + var allSubData = []; + // 获取所有被展开的行 + var parentLength = $("#bootstrap-table").bootstrapTable("getData").length; + for (let i = 0; i < parentLength; i++) { + var sonData = $('#'+"child_table_" + i).bootstrapTable("getData"); + //循环获取子表中存在的行数据,每个行数据转换添加到allSubData数组中 + allSubData = allSubData.concat(sonData); + } + return allSubData; + } + + function deleteRow(shippingDeviceId) { // 弹出确认框询问用户是否确定删除 if (confirm("确定要删除这条记录吗?")) { @@ -255,12 +332,18 @@ /*添加出货设备*/ - function addShippingDevices(quoteId, materialCode) { - // 确保URL编码,特别是如果materialCode中可能含有特殊字符 - var url = ctx + 'aftersales/warehouseOutOrder/addShippingDevices/' + encodeURIComponent(quoteId) + '/' + encodeURIComponent(materialCode); + // function addShippingDevicesOne(quoteId, materialCode) { + // // 确保URL编码,特别是如果materialCode中可能含有特殊字符 + // var url = ctx + 'aftersales/warehouseOutOrder/addShippingDevicesOne/' + encodeURIComponent(quoteId) + '/' + encodeURIComponent(materialCode); + // $.modal.open("添加出货设备", url); + // } + + function addShippingDevicesOne(outOrderDetailId) { + var url = prefix + '/addShippingDevicesOne/' + outOrderDetailId $.modal.open("添加出货设备", url); } + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/addEquipmentResume.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/addEquipmentResume.html index 6756d2b3..b00778cf 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/addEquipmentResume.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/addEquipmentResume.html @@ -207,7 +207,8 @@ var curParams = { // 传递参数查询参数 makeNo: equipMaterial.makeNo, - quoteId: equipMaterial.quoteId + quoteId: equipMaterial.quoteId, + materialCode: equipMaterial.materialCode }; return curParams; } diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html new file mode 100644 index 00000000..073fe82e --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html @@ -0,0 +1,231 @@ + + + + + + + +
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + + + + + + + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html index 5b0bc67b..367571f2 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html @@ -117,7 +117,17 @@ "outOrderDetailId":item.outOrderDetailId, "outOrderCode":item.outOrderCode, "materialNo": item.materialNo, // 假设id对应materialId - "prepareOutOrderSum":item.prepareOutOrderSum, + "materialName": item.materialName, + "materialType": item.materialType, + "materialPhotourl": item.materialPhotourl, + "materialDescribe": item.materialDescribe, + "materialBrand": item.materialBrand, + "materialUnit": item.materialUnit, + "materialProcessMethod": item.materialProcessMethod, + "makeNum": item.makeNum, + "hasOutOrderSum": item.hasOutOrderSum, + "applyOutOrderSum": item.applyOutOrderSum, + "prepareOutOrderSum": item.prepareOutOrderSum, // ...其他字段 }; });