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 deleted file mode 100644 index 0ce07ba2..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesWarehouseOutController.java +++ /dev/null @@ -1,411 +0,0 @@ -package com.ruoyi.aftersales.controller; - -import java.util.List; - -import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO; -import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; -import com.ruoyi.warehouse.domain.WarehouseOutOrder; -import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; -import com.ruoyi.warehouse.service.IWarehouseOutOrderDetailService; -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.*; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.aftersales.service.IAftersalesWarehouseOutService; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 售后维护设备出库Controller - * - * @author 刘晓旭 - * @date 2024-04-23 - */ -@Controller -@RequestMapping("/aftersales/warehouseOutOrder") -public class AftersalesWarehouseOutController extends BaseController -{ - private String prefix = "aftersales/warehouseOutOrder"; - - @Autowired - private IAftersalesWarehouseOutService warehouseOutOrderService; - - @Autowired - private IWarehouseOutOrderDetailService outOrderDetailService; - - - @RequiresPermissions("aftersales:warehouseOutOrder:view") - @GetMapping() - public String warehouseOutOrder() - { - return prefix + "/warehouseOutOrder"; - } - - /** - * 查询售后维护设备出库列表 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:list") - @PostMapping("/list") - @ResponseBody - public TableDataInfo list(WarehouseOutOrder warehouseOutOrder) - { - startPage(); - List list = warehouseOutOrderService.selectAftersalesWarehouseOutOrderList(warehouseOutOrder); - return getDataTable(list); - } - - /** - * 导出售后维护设备出库列表 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:export") - @Log(title = "售后维护设备出库", businessType = BusinessType.EXPORT) - @PostMapping("/export") - @ResponseBody - public AjaxResult export(WarehouseOutOrder warehouseOutOrder) - { - List list = warehouseOutOrderService.selectAftersalesWarehouseOutOrderList(warehouseOutOrder); - ExcelUtil util = new ExcelUtil(WarehouseOutOrder.class); - return util.exportExcel(list, "售后维护设备出库数据"); - } - - /** - * 新增售后维护设备出库 - */ - @GetMapping("/add") - public String add() - { - return prefix + "/add"; - } - - /** - * 新增保存售后维护设备出库 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:add") - @Log(title = "售后维护设备出库", businessType = BusinessType.INSERT) - @PostMapping("/add") - @ResponseBody - public AjaxResult addSave(WarehouseOutOrder warehouseOutOrder) - { - return toAjax(warehouseOutOrderService.insertWarehouseOutOrder(warehouseOutOrder)); - } - - /** - * 修改售后维护设备出库 - */ - @GetMapping("/edit/{outOrderId}") - public String edit(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) - { - WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId); - mmap.put("warehouseOutOrder", warehouseOutOrder); - return prefix + "/edit"; - } - - /** - * 修改保存售后维护设备出库 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:edit") - @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) - @PostMapping("/edit") - @ResponseBody - public AjaxResult editSave(WarehouseOutOrder warehouseOutOrder) - { - return toAjax(warehouseOutOrderService.updateWarehouseOutOrder(warehouseOutOrder)); - } - - /** - * 查看售后维护设备出库详情 - */ - @GetMapping("/detail/{outOrderId}") - public String detail(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) - { - WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId); - mmap.put("warehouseOutOrder", warehouseOutOrder); - return prefix + "/detail"; - } - - /** - * 修改保存售后维护设备出库详情 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:edit") - @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) - @PostMapping("/detail") - @ResponseBody - public AjaxResult detailSave(WarehouseOutOrder warehouseOutOrder) - { - return toAjax(warehouseOutOrderService.updateWarehouseOutOrder(warehouseOutOrder)); - } - - /** - * 物料新增出货设备 - */ - @GetMapping("/addShippingDevices/{quoteId}/{materialCode}") - public String addShippingDevices(@PathVariable("quoteId") String quoteId, - @PathVariable("materialCode") String materialCode, - ModelMap mmap) { - SelectMaterialsVO selectMaterialsVO = warehouseOutOrderService.selectShippingDevicesById(quoteId, materialCode); - // 假设您还需要根据materialCode获取额外信息,可以在这里添加逻辑 - mmap.put("selectMaterialsVO", selectMaterialsVO); - return prefix + "/addShippingDevices"; - } - /** - * 修改保存出货设备 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:addShippingDevices") - @Log(title = "售后维护设备出库", businessType = BusinessType.INSERT) - @PostMapping("/addShippingDevices") - @ResponseBody - public AjaxResult addShippingDevicesSave(WarehouseOutOrder warehouseOutOrder) - { - return toAjax(warehouseOutOrderService.updateWarehouseOutOrder(warehouseOutOrder)); - } - - - /** - * 查询物料信息列表 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:optionMaterials") - @PostMapping("/optionMaterials") - @ResponseBody - public TableDataInfo optionMaterials(WarehouseOutOrder warehouseOutOrder) - { - - startPage(); - List list = warehouseOutOrderService.selectMaterialBySalesOrderCode(warehouseOutOrder); - return getDataTable(list); - } - - /** - * 添加出货设备查询物料信息 - */ - @PostMapping("/addShippingDevicesMaterial") - @ResponseBody - public TableDataInfo optionMaterial(SelectMaterialsVO selectMaterialsVO) - { - - startPage(); - List list = warehouseOutOrderService.selectMaterialByMaterialCode(selectMaterialsVO); - return getDataTable(list); - } - - /** - * 添加出货设备查询出货设备信息 - */ - @PostMapping("/addShippingDevicesOptions") - @ResponseBody - public TableDataInfo addShippingDevicesOptions(SelectMaterialsVO selectMaterialsVO) - { - - startPage(); - List list = warehouseOutOrderService.selectShippingDeviceBySalesOrderCode(selectMaterialsVO); - return getDataTable(list); - } - - /** - * 删除售后维护设备出库 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:remove") - @Log(title = "售后维护设备出库", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) - { - return toAjax(warehouseOutOrderService.deleteWarehouseOutOrderByIds(ids)); - } - - - /** - * 售后第一次维护设备 - */ - @GetMapping("/maintenanceEquipmentOne/{outOrderId}") - public String maintenanceEquipmentOne(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) - { - WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId); - mmap.put("warehouseOutOrder", warehouseOutOrder); - return prefix + "/maintenanceEquipmentOne"; - } - - /** - * 修改保存售后第一次维护设备 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:maintenanceEquipmentOne") - @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) - @PostMapping("/maintenanceEquipmentOne") - @ResponseBody - public AjaxResult maintenanceEquipmentOneSave(@RequestBody WarehouseOutOrder warehouseOutOrder) - { - return toAjax(warehouseOutOrderService.updateMaintenanceEquipmentOne(warehouseOutOrder)); - } - - - /** - * 展示售后第一次维护设备物料信息 - * */ - @PostMapping("/getMaintenanceEquipmentOneMaterials") - @ResponseBody - public TableDataInfo getMaintenanceEquipmentOneMaterials(WarehouseOutOrder warehouseOutOrder) - { - - startPage(); - List list = warehouseOutOrderService.selectOutOrderDetailListByCode(warehouseOutOrder); - return getDataTable(list); - } - - /** - * 展示售后第一次维护设备料号已选择添加出货设备的相关出货设备信息 - */ - @PostMapping("/showAftersalesShippingDeviceListOne") - @ResponseBody - public TableDataInfo showAftersalesShippingDeviceListOne(@RequestParam("materialNo") String materialNo, - @RequestParam("salesOrderCode") String salesOrderCode, - @RequestParam("makeNo") String makeNo) - { - - startPage(); - List list = warehouseOutOrderService.showAftersalesShippingDeviceList(materialNo,salesOrderCode,makeNo); - return getDataTable(list); - } - - - - - /** - * 售后第一次维护设备 添加出货设备信息 - */ - @GetMapping("/addShippingDevicesOne") - public String addShippingDevicesOne(@RequestParam("outOrderDetailId") Long outOrderDetailId, - @RequestParam("salesOrderCode") String salesOrderCode, - @RequestParam("makeNo") String makeNo, - ModelMap mmap) - { - WarehouseOutOrderDetail warehouseOutOrderDetail = outOrderDetailService.selectWarehouseOutOrderDetailById(outOrderDetailId); - mmap.put("salesOrderCode",salesOrderCode); - mmap.put("makeNo",makeNo); - mmap.put("warehouseOutOrderDetail", warehouseOutOrderDetail); - return prefix + "/addShippingDevicesOne"; - } - - /** - * 修改保存售后第一次维护设备 添加出货设备信息 - */ - @ResponseBody - @PostMapping("/addShippingDevicesOne") - public AjaxResult addShippingDevicesOneSave(@RequestBody WarehouseOutOrderDetail warehouseOutOrderDetail) - { - - return toAjax(outOrderDetailService.addShippingDevicesOne(warehouseOutOrderDetail)); - } - - - - /** - * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 - */ - @PostMapping("/getAllMaterialShippingDevices") - @ResponseBody - public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrderDetail warehouseOutOrderDetail) - { - - startPage(); - List list = warehouseOutOrderService.selectAftersalesShippingDeviceList(warehouseOutOrderDetail); - return getDataTable(list); - } - - - - /** - * 第一次维护设备删除物料信息出货设备信息 - */ - @Log(title = "售后维护设备出库", businessType = BusinessType.DELETE) - @PostMapping("/deleteRow") - @ResponseBody - public AjaxResult deleteRow(String shippingDeviceId) - { - return toAjax(warehouseOutOrderService.deleteAftersalesShippingDeviceById(shippingDeviceId)); - } - - - - - /** - * 售后第二次维护设备 - */ - @GetMapping("/maintenanceEquipmentTwo/{outOrderId}") - public String maintenanceEquipmentTwo(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap) - { - WarehouseOutOrder warehouseOutOrder = warehouseOutOrderService.selectWarehouseOutOrderById(outOrderId); - mmap.put("warehouseOutOrder", warehouseOutOrder); - return prefix + "/maintenanceEquipmentTwo"; - } - - /** - * 修改保存售后第二次维护设备 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:maintenanceEquipmentTwo") - @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) - @PostMapping("/maintenanceEquipmentTwo") - @ResponseBody - public AjaxResult maintenanceEquipmentTwoSave(@RequestBody WarehouseOutOrder warehouseOutOrder) - { - return toAjax(warehouseOutOrderService.updateMaintenanceEquipmentTwo(warehouseOutOrder)); - } - - - /** - * 展示售后第二次维护设备物料信息 - * */ - @PostMapping("/getMaintenanceEquipmentTwoMaterials") - @ResponseBody - public TableDataInfo getMaintenanceEquipmentTwoMaterials(WarehouseOutOrder warehouseOutOrder) - { - - startPage(); - List list = warehouseOutOrderService.selectOutOrderDetailListByCode(warehouseOutOrder); - return getDataTable(list); - } - - - /** - * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息 - */ -// @PostMapping("/showAftersalesShippingDeviceListTwo") -// @ResponseBody -// public TableDataInfo showAftersalesShippingDeviceListTwo(@RequestParam("materialNo") String materialNo, -// @RequestParam("salesOrderCode") String salesOrderCode, -// @RequestParam("makeNo") String makeNo) -// { -// -// startPage(); -// List list = warehouseOutOrderService.showAftersalesShippingDeviceListTwo(materialNo,salesOrderCode,makeNo); -// return getDataTable(list); -// } - - - /** - * 确认收货 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:confirmReceivingGoods") - @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) - @GetMapping( "/confirmReceivingGoods/{outOrderId}") - @ResponseBody - public AjaxResult confirmReceivingGoods(@PathVariable("outOrderId") Long outOrderId){ - return toAjax(warehouseOutOrderService.confirmReceivingGoodsById(outOrderId)); - } - - - /** - * 确认验收 - */ - @RequiresPermissions("aftersales:warehouseOutOrder:confirmCheckGoods") - @Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE) - @GetMapping( "/confirmCheckGoods/{outOrderId}") - @ResponseBody - public AjaxResult confirmCheckGoods(@PathVariable("outOrderId") Long outOrderId){ - return toAjax(warehouseOutOrderService.confirmCheckGoodsById(outOrderId)); - } - -} 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 deleted file mode 100644 index cadae6bf..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesWarehouseOutService.java +++ /dev/null @@ -1,158 +0,0 @@ -package com.ruoyi.aftersales.service; - -import java.util.List; - -import com.ruoyi.aftersales.domain.vo.SelectMaterialsVO; -import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; -import com.ruoyi.warehouse.domain.WarehouseOutOrder; -import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; - -/** - * 出库单Service接口 - * - * @author 刘晓旭 - * @date 2024-04-23 - */ -public interface IAftersalesWarehouseOutService -{ - /** - * 查询出库单 - * - * @param outOrderId 出库单ID - * @return 出库单 - */ - public WarehouseOutOrder selectWarehouseOutOrderById(Long outOrderId); - - /** - * 查询出库单列表 - * - * @param warehouseOutOrder 出库单 - * @return 出库单集合 - */ - public List selectAftersalesWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder); - - - /** - * 查询关联销售单的物料列表 - * - * @param salesOrderCode 销售单号 - * @return 出库单集合 - */ - public List selectMaterialBySalesOrderCode(WarehouseOutOrder warehouseOutOrder); - - /** - * 查询添加出货设备的物料列表 - * - * @param salesOrderCode 销售单号 - * @return 出库单集合 - */ - public List selectMaterialByMaterialCode(SelectMaterialsVO selectMaterialsVO); - - /** - * 新增出库单 - * - * @param warehouseOutOrder 出库单 - * @return 结果 - */ - public int insertWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder); - - /** - * 修改出库单 - * - * @param warehouseOutOrder 出库单 - * @return 结果 - */ - public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder); - - /** - * 批量删除出库单 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteWarehouseOutOrderByIds(String ids); - - /** - * 删除出库单信息 - * - * @param outOrderId 出库单ID - * @return 结果 - */ - public int deleteWarehouseOutOrderById(Long outOrderId); - - /** - * 作废出库单 - * @param outOrderId 出库单ID - * @return - */ - int cancelWarehouseOutOrderById(Long outOrderId); - - /** - * 恢复出库单 - * @param outOrderId 出库单ID - * @return - */ - int restoreWarehouseOutOrderById(Long outOrderId); - - SelectMaterialsVO selectShippingDevicesById(String quoteId, String materialCode); - - List selectShippingDeviceBySalesOrderCode(SelectMaterialsVO selectMaterialsVO); - - /* - * 根据设备ID删除出货设备信息 - * */ - int deleteAftersalesShippingDeviceById(String shippingDeviceId); - - - /** - * 展示售后第一次维护设备料号相关出货设备信息 - */ - List selectAftersalesShippingDevicelistByCodeAndNo(WarehouseOutOrder warehouseOutOrder); - - - /** - * 展示售后第一次维护设备物料相关信息 - * */ - List selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder); - - /** - * 展示售后第一次维护设备 添加出货设备 料号相关出货设备信息 (旧版) - * */ - List selectAftersalesShippingDeviceListByMaterialNo(WarehouseOutOrderDetail warehouseOutOrderDetail); - - /** - * 展示售后第一次维护设备料号已选择添加出货设备的相关出货设备信息 - * */ - List showAftersalesShippingDeviceList(String materialNo,String salesOrderCode,String makeNo); - - /** - * 修改保存售后第一次维护设备 - */ - int updateMaintenanceEquipmentOne(WarehouseOutOrder warehouseOutOrder); - - -// /** -// * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息 -// */ -// List showAftersalesShippingDeviceListTwo(WarehouseOutOrder warehouseOutOrder); - - /** - * 修改保存售后第二次维护设备 - */ - int updateMaintenanceEquipmentTwo(WarehouseOutOrder warehouseOutOrder); - - /** - * 确认收货 - */ - int confirmReceivingGoodsById(Long outOrderId); - - /** - * 确认验收 - */ - int confirmCheckGoodsById(Long outOrderId); - - /** - * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 关联物料号、生产单号、销售单号 - * */ - List selectAftersalesShippingDeviceList(WarehouseOutOrderDetail warehouseOutOrderDetail); -} 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 deleted file mode 100644 index 6ef12556..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesWarehouseOutServiceImpl.java +++ /dev/null @@ -1,618 +0,0 @@ -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; -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; -import com.ruoyi.system.domain.SysSalesOrder; -import com.ruoyi.system.domain.SysSalesOrderChild; -import com.ruoyi.system.domain.SysSalesShippingInform; -import com.ruoyi.system.domain.SysSalesShippingInformDetail; -import com.ruoyi.system.mapper.SysSalesOrderChildMapper; -import com.ruoyi.system.mapper.SysSalesOrderMapper; -import com.ruoyi.system.mapper.SysSalesShippingInformMapper; -import com.ruoyi.warehouse.domain.WarehouseOutOrder; -import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; -import com.ruoyi.warehouse.mapper.WarehouseOutOrderDetailMapper; -import com.ruoyi.warehouse.mapper.WarehouseOutOrderMapper; -import lombok.extern.slf4j.Slf4j; -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业务层处理 - * - * @author 刘晓旭 - * @date 2024-04-23 - */ -@Service -@Slf4j -public class AftersalesWarehouseOutServiceImpl implements IAftersalesWarehouseOutService -{ - @Autowired - private WarehouseOutOrderMapper warehouseOutOrderMapper; - - @Autowired - private SysSalesOrderChildMapper sysSalesOrderChildMapper; - - @Autowired - private AfterSalesShippingDeviceMapper shippingDeviceMapper; - - @Autowired - private WarehouseOutOrderDetailMapper outOrderDetailMapper; - - @Autowired - private SysSalesShippingInformMapper shippingInformMapper; - - @Autowired - private SysSalesOrderMapper sysSalesOrderMapper; - - /** - * 查询出库单 - * - * @param outOrderId 出库单ID - * @return 出库单 - */ - @Override - public WarehouseOutOrder selectWarehouseOutOrderById(Long outOrderId) - { - return warehouseOutOrderMapper.selectWarehouseOutOrderById(outOrderId); - } - - /** - * 查询出库单列表 - * - * @param warehouseOutOrder 出库单 - * @return 出库单 - */ - @Override - public List selectAftersalesWarehouseOutOrderList(WarehouseOutOrder warehouseOutOrder) - { - - - return warehouseOutOrderMapper.selectAftersalesWarehouseOutOrderList(warehouseOutOrder); - } - - @Override - public List selectMaterialBySalesOrderCode(WarehouseOutOrder warehouseOutOrder) { - - List selectMaterialsVOs = new ArrayList<>(); - - List sysSalesOrderChildren = sysSalesOrderChildMapper.selectSysSalesOrderChildByQuoteId(warehouseOutOrder.getSalesOrderCode()); - if (!StringUtils.isNotEmpty(sysSalesOrderChildren)){ - // 记录日志 - log.warn("未查找到与销售订单关联的物料数据, 销售订单编码: {}", warehouseOutOrder.getSalesOrderCode()); - throw new RuntimeException("未查找到物料相关数据"); - } - for (SysSalesOrderChild sysSalesOrderChild : sysSalesOrderChildren) { - SelectMaterialsVO selectMaterialsVO = new SelectMaterialsVO(); - selectMaterialsVO.setQuoteId(sysSalesOrderChild.getQuoteId()); - selectMaterialsVO.setMaterialCode(sysSalesOrderChild.getMaterialCode()); - selectMaterialsVO.setMaterialName(sysSalesOrderChild.getMaterialName()); - selectMaterialsVO.setMaterialType(sysSalesOrderChild.getMaterialType()); - selectMaterialsVO.setBrand(sysSalesOrderChild.getBrand()); - selectMaterialsVO.setDescribe(sysSalesOrderChild.getDescribe()); - selectMaterialsVO.setUnit(sysSalesOrderChild.getUnit()); - selectMaterialsVO.setPhotoUrl(sysSalesOrderChild.getPhotoUrl()); - selectMaterialsVO.setProcessMethod(sysSalesOrderChild.getProcessMethod()); - selectMaterialsVOs.add(selectMaterialsVO); - } - return selectMaterialsVOs; - } - - - @Override - public SelectMaterialsVO selectShippingDevicesById(String quoteId, String materialCode) { - SelectMaterialsVO selectMaterialsVO = new SelectMaterialsVO(); - SysSalesOrderChild sysSalesOrderChild = sysSalesOrderChildMapper.selectOneByQuoteIdAndMaterialCode(quoteId, materialCode); - if (StringUtils.isNotNull(sysSalesOrderChild)){ - selectMaterialsVO.setQuoteId(quoteId); - selectMaterialsVO.setMaterialCode(materialCode); - selectMaterialsVO.setMaterialType(sysSalesOrderChild.getMaterialType()); - selectMaterialsVO.setBrand(sysSalesOrderChild.getBrand()); - selectMaterialsVO.setDescribe(sysSalesOrderChild.getDescribe()); - selectMaterialsVO.setUnit(sysSalesOrderChild.getUnit()); - selectMaterialsVO.setPhotoUrl(sysSalesOrderChild.getPhotoUrl()); - selectMaterialsVO.setProcessMethod(sysSalesOrderChild.getProcessMethod()); - } - return selectMaterialsVO; - } - - /*根据销售单号查询出货设备信息*/ - @Override - public List selectShippingDeviceBySalesOrderCode(SelectMaterialsVO selectMaterialsVO) { - - List selectShippingDeviceVOs = new ArrayList<>(); - List afterSalesShippingDevices = shippingDeviceMapper.selectShippingDeviceBySalesOrderCode(selectMaterialsVO.getQuoteId()); - if (!StringUtils.isNotEmpty(afterSalesShippingDevices)) { - // 记录日志 - log.warn("未查找到与销售订单关联的出库设备数据, 销售订单编码: {}", selectMaterialsVO.getQuoteId()); - throw new RuntimeException("未查找到物料相关数据"); - } - for (AfterSalesShippingDevice afterSalesShippingDevice : afterSalesShippingDevices) { - SelectShippingDeviceVO shippingDeviceVO = new SelectShippingDeviceVO(); - shippingDeviceVO.setShippingDeviceId(afterSalesShippingDevice.getShippingDeviceId()); - shippingDeviceVO.setDeviceModelCode(afterSalesShippingDevice.getDeviceModelCode()); - shippingDeviceVO.setDeviceRunningNumber(afterSalesShippingDevice.getDeviceRunningNumber()); - shippingDeviceVO.setMakePhotoUrl(afterSalesShippingDevice.getMakePhotourl()); - shippingDeviceVO.setQuoteId(afterSalesShippingDevice.getSalesOrderCode()); - selectShippingDeviceVOs.add(shippingDeviceVO); - } - return selectShippingDeviceVOs; - } - - /** - * 展示售后第一次维护设备料号相关出货设备信息 - */ - @Override - public List selectAftersalesShippingDevicelistByCodeAndNo(WarehouseOutOrder warehouseOutOrder) { - - List selectShippingDeviceVOs = new ArrayList<>(); - AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); - afterSalesShippingDevice.setSalesOrderCode(warehouseOutOrder.getSalesOrderCode()); - afterSalesShippingDevice.setMaterialNo(warehouseOutOrder.getMaterialNo()); - List afterSalesShippingDevices = shippingDeviceMapper.selectShippingDeviceList(afterSalesShippingDevice); - if (!StringUtils.isNotEmpty(afterSalesShippingDevices)) { - // 记录日志 - log.warn("未查找到与销售订单关联的出库设备数据, 销售订单编码: {}", warehouseOutOrder.getSalesOrderCode()); - throw new BusinessException("未查出库设备数据"); - } - - 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 selectOutOrderDetailListByCode(WarehouseOutOrder warehouseOutOrder) { - - String outOrderCode = warehouseOutOrder.getOutOrderCode(); - if (!StringUtils.isNotEmpty(outOrderCode)) { - // 记录日志 - log.warn("未查找到与出库单号关联的出库单详情数据, 出库单号: {}", outOrderCode); - throw new BusinessException("未查出库单详情数据"); - } - List warehouseOutOrderDetails = outOrderDetailMapper.selectOutOrderDetailListByCode(outOrderCode); - 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,String salesOrderCode,String makeNo) { - - List selectShippingDeviceVOs = new ArrayList<>(); - AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); - afterSalesShippingDevice.setMaterialNo(materialNo); - afterSalesShippingDevice.setSalesOrderCode(salesOrderCode); - afterSalesShippingDevice.setMakeNo(makeNo); - List afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(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); - } - -// /** -// * 展示售后第二次维护设备料号已选择添加出货设备的相关出货设备信息 -// */ -// @Override -// public List showAftersalesShippingDeviceListTwo(String materialNo,String salesOrderCode,String makeNo) { -// -// List selectShippingDeviceVOs = new ArrayList<>(); -// AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); -// afterSalesShippingDevice.setMaterialNo(materialNo); -// afterSalesShippingDevice.setSalesOrderCode(salesOrderCode); -// afterSalesShippingDevice.setMakeNo(makeNo); -// List afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(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()); -// shippingDeviceVO.setSnCode(tempAfterSalesShippingDevice.getSnCode()); -// shippingDeviceVO.setFactoryDate(tempAfterSalesShippingDevice.getFactoryDate()); -// shippingDeviceVO.setGuaranteePeriod(tempAfterSalesShippingDevice.getGuaranteePeriod()); -// shippingDeviceVO.setLockDate(tempAfterSalesShippingDevice.getLockDate()); -// shippingDeviceVO.setLockDateFlag(tempAfterSalesShippingDevice.getLockDateFlag()); -// shippingDeviceVO.setWastageExpireDate(tempAfterSalesShippingDevice.getWastageExpireDate()); -// shippingDeviceVO.setComponentGuaranteeDate(tempAfterSalesShippingDevice.getComponentGuaranteeDate()); -// selectShippingDeviceVOs.add(shippingDeviceVO); -// -// } -// return selectShippingDeviceVOs; -// } - - /** - * 修改保存售后第二次维护设备 - */ - @Transactional(rollbackFor = Exception.class) - @Override - public int updateMaintenanceEquipmentTwo(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.setFactoryDate(selectShippingDeviceVO.getFactoryDate()); - afterSalesShippingDevice.setGuaranteePeriod(selectShippingDeviceVO.getGuaranteePeriod()); - afterSalesShippingDevice.setLockDate(selectShippingDeviceVO.getLockDate()); - afterSalesShippingDevice.setLockDateFlag(selectShippingDeviceVO.getLockDateFlag()); - afterSalesShippingDevice.setWastageExpireDate(selectShippingDeviceVO.getWastageExpireDate()); - afterSalesShippingDevice.setComponentGuaranteeDate(selectShippingDeviceVO.getComponentGuaranteeDate()); - afterSalesShippingDevice.setUpdateBy(loginName); - afterSalesShippingDevice.setUpdateTime(new Date()); - int updateShippingDeviceResult = shippingDeviceMapper.updateAfterSalesShippingDevice(afterSalesShippingDevice); - if (updateShippingDeviceResult <= 0){ - throw new BusinessException("更新出货设备数据失败"); - } - - } - - //设置出库单为待业务确认发货 - warehouseOutOrder.setWarehouseOutStatus("4"); - - //更新销售管理销售出库的出货状态 待业务确认发货 - SysSalesShippingInform sysSalesShippingInform = new SysSalesShippingInform(); - sysSalesShippingInform.setOutOrderCode(warehouseOutOrder.getOutOrderCode()); - sysSalesShippingInform.setWarehouseOutStatus("4"); - 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); - - } - - /** - * 确认收货 - */ - @Transactional(rollbackFor = Exception.class) - @Override - public int confirmReceivingGoodsById(Long outOrderId) { - - String loginName = ShiroUtils.getLoginName(); - WarehouseOutOrder warehouseOutOrder = warehouseOutOrderMapper.selectWarehouseOutOrderById(outOrderId); - if (warehouseOutOrder == null){ - log.warn("出库单Id为空:{}",outOrderId); - } - String outOrderCode = warehouseOutOrder.getOutOrderCode(); - SysSalesShippingInform sysSalesShippingInform = new SysSalesShippingInform(); - sysSalesShippingInform.setOutOrderCode(outOrderCode); - sysSalesShippingInform.setWarehouseOutStatus("10"); - sysSalesShippingInform.setUpdateTime(new Date()); - sysSalesShippingInform.setUpdateBy(loginName); - - int updateSalesShippingInformResult = shippingInformMapper.updateSysSalesShippingInformByOutOrderCode(sysSalesShippingInform); - if (updateSalesShippingInformResult <= 0){ - throw new BusinessException("更新销售出库数据失败"); - } - - String salesOrderCode = warehouseOutOrder.getSalesOrderCode(); - if (StringUtils.isEmpty(salesOrderCode)){ - log.warn("销售订单号为空:{}",salesOrderCode); - } - SysSalesOrder sysSalesOrder = new SysSalesOrder(); - sysSalesOrder.setSalesOrderCode(salesOrderCode); - //设置为全部出货 - sysSalesOrder.setDeliveryStatus("6"); - sysSalesOrder.setUpdateTime(new Date()); - sysSalesOrder.setUpdateBy(loginName); - int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); - if (updateSysSalesOrderResult <= 0){ - throw new BusinessException("更新销售订单数据失败"); - } - warehouseOutOrder.setUpdateTime(new Date()); - warehouseOutOrder.setUpdateBy(loginName); - //设置为待验收 - warehouseOutOrder.setWarehouseOutStatus("10"); - return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); - } - - /** - * 确认验收 - */ - @Transactional(rollbackFor = Exception.class) - @Override - public int confirmCheckGoodsById(Long outOrderId) { - - String loginName = ShiroUtils.getLoginName(); - WarehouseOutOrder warehouseOutOrder = warehouseOutOrderMapper.selectWarehouseOutOrderById(outOrderId); - if (warehouseOutOrder == null){ - log.warn("出库单Id为空:{}",outOrderId); - } - String outOrderCode = warehouseOutOrder.getOutOrderCode(); - SysSalesShippingInform sysSalesShippingInform = new SysSalesShippingInform(); - sysSalesShippingInform.setOutOrderCode(outOrderCode); - sysSalesShippingInform.setWarehouseOutStatus("12"); - sysSalesShippingInform.setUpdateTime(new Date()); - sysSalesShippingInform.setUpdateBy(loginName); - - int updateSalesShippingInformResult = shippingInformMapper.updateSysSalesShippingInformByOutOrderCode(sysSalesShippingInform); - if (updateSalesShippingInformResult <= 0){ - throw new BusinessException("更新销售出库数据失败"); - } - - String salesOrderCode = warehouseOutOrder.getSalesOrderCode(); - if (StringUtils.isEmpty(salesOrderCode)){ - log.warn("销售订单号为空:{}",salesOrderCode); - } - SysSalesOrder sysSalesOrder = new SysSalesOrder(); - sysSalesOrder.setSalesOrderCode(salesOrderCode); - //设置为全部出货 - sysSalesOrder.setDeliveryStatus("8"); - sysSalesOrder.setUpdateTime(new Date()); - sysSalesOrder.setUpdateBy(loginName); - int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); - if (updateSysSalesOrderResult <= 0){ - throw new BusinessException("更新销售订单数据失败"); - } - warehouseOutOrder.setUpdateTime(new Date()); - warehouseOutOrder.setUpdateBy(loginName); - //设置为全部验收 - warehouseOutOrder.setWarehouseOutStatus("12"); - return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); - - } - - /** - * 展示售后第一次维护设备添加出货设备料号相关出货设备信息 关联物料号、生产单号、销售单号 - * */ - @Override - public List selectAftersalesShippingDeviceList(WarehouseOutOrderDetail warehouseOutOrderDetail) { - List selectShippingDeviceVOs = new ArrayList<>(); - AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); - afterSalesShippingDevice.setMaterialNo(warehouseOutOrderDetail.getMaterialNo()); - afterSalesShippingDevice.setMakeNo(warehouseOutOrderDetail.getMakeNo()); - afterSalesShippingDevice.setSalesOrderCode(warehouseOutOrderDetail.getSalesOrderCode()); - List afterSalesShippingDevices = shippingDeviceMapper.selectAfterSalesShippingDeviceByNoAndCode(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; - - } - - /* - * 售后第一次维护设备信息根据设备ID删除出货设备信息 - * */ - @Override - public int deleteAftersalesShippingDeviceById(String shippingDeviceId) { - - return shippingDeviceMapper.deleteAfterSalesShippingDeviceById(shippingDeviceId); - } - - - - @Override - public List selectMaterialByMaterialCode(SelectMaterialsVO selectMaterialsVO) { - List selectMaterialsVOs = new ArrayList<>(); - SysSalesOrderChild sysSalesOrderChild = sysSalesOrderChildMapper.selectOneByQuoteIdAndMaterialCode(selectMaterialsVO.getQuoteId(), selectMaterialsVO.getMaterialCode()); - if (StringUtils.isNotNull(sysSalesOrderChild)){ -// selectMaterialsVO.setQuoteId(selectMaterialsVO.getQuoteId()); -// selectMaterialsVO.setMaterialCode(selectMaterialsVO.getMaterialCode()); - selectMaterialsVO.setMaterialName(sysSalesOrderChild.getMaterialName()); - selectMaterialsVO.setMaterialType(sysSalesOrderChild.getMaterialType()); - selectMaterialsVO.setBrand(sysSalesOrderChild.getBrand()); - selectMaterialsVO.setDescribe(sysSalesOrderChild.getDescribe()); - selectMaterialsVO.setUnit(sysSalesOrderChild.getUnit()); - selectMaterialsVO.setPhotoUrl(sysSalesOrderChild.getPhotoUrl()); - selectMaterialsVO.setProcessMethod(sysSalesOrderChild.getProcessMethod()); - selectMaterialsVOs.add(selectMaterialsVO); - } - return selectMaterialsVOs; - } - - /** - * 新增出库单 - * - * @param warehouseOutOrder 出库单 - * @return 结果 - */ - @Override - public int insertWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder) - { - String loginName = ShiroUtils.getLoginName(); - warehouseOutOrder.setCreateBy(loginName); - warehouseOutOrder.setCreateTime(DateUtils.getNowDate()); - return warehouseOutOrderMapper.insertWarehouseOutOrder(warehouseOutOrder); - } - - /** - * 修改出库单 - * - * @param warehouseOutOrder 出库单 - * @return 结果 - */ - @Override - public int updateWarehouseOutOrder(WarehouseOutOrder warehouseOutOrder) - { - String loginName = ShiroUtils.getLoginName(); - warehouseOutOrder.setUpdateBy(loginName); - warehouseOutOrder.setUpdateTime(DateUtils.getNowDate()); - return warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); - } - - /** - * 删除出库单对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteWarehouseOutOrderByIds(String ids) - { - return warehouseOutOrderMapper.deleteWarehouseOutOrderByIds(Convert.toStrArray(ids)); - } - - /** - * 删除出库单信息 - * - * @param outOrderId 出库单ID - * @return 结果 - */ - @Override - public int deleteWarehouseOutOrderById(Long outOrderId) - { - return warehouseOutOrderMapper.deleteWarehouseOutOrderById(outOrderId); - } - - /** - * 作废出库单 - * - * @param outOrderId 出库单ID - * @return 结果 - */ - @Override - public int cancelWarehouseOutOrderById(Long outOrderId) - { - return warehouseOutOrderMapper.cancelWarehouseOutOrderById(outOrderId); - } - - /** - * 恢复出库单信息 - * - * @param outOrderId 出库单ID - * @return 结果 - */ - @Override - public int restoreWarehouseOutOrderById(Long outOrderId) - { - return warehouseOutOrderMapper.restoreWarehouseOutOrderById(outOrderId); - } - - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java index 23e7f330..4809f805 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesShippingInformController.java @@ -393,32 +393,6 @@ public class SysSalesShippingInformController extends BaseController - /** - * 客户验收 - */ - @GetMapping("/customerCheckGoods/{shippingInformId}") - public String customerCheckGoods(@PathVariable("shippingInformId") Long shippingInformId, ModelMap mmap) - { - SysSalesShippingInform sysSalesShippingInform = sysSalesShippingInformService.selectSysSalesShippingInformById(shippingInformId); - mmap.put("sysSalesShippingInform", sysSalesShippingInform); - return prefix + "/customerCheckGoods"; - } - - /** - * 修改保存客户验收 - */ - @RequiresPermissions("system:salesShippingInform:customerCheckGoods") - @Log(title = "销售取消发货", businessType = BusinessType.UPDATE) - @PostMapping("/customerCheckGoods") - @ResponseBody - public AjaxResult customerCheckGoodsSave(@RequestBody SysSalesShippingInform sysSalesShippingInform) - { - return toAjax(sysSalesShippingInformService.updateCustomerCheckGoods(sysSalesShippingInform)); - } - - - - /** * 详情 */ 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 b4b3215d..6dd84148 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 @@ -96,10 +96,6 @@ public interface ISysSalesShippingInformService */ int updateCancelShipping(SysSalesShippingInform sysSalesShippingInform); - /** - * 客户验收 - * */ - int updateCustomerCheckGoods(SysSalesShippingInform sysSalesShippingInform); /* * 客户验收查询物料相关数据 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 ec3cde83..2beee9e4 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 @@ -586,67 +586,6 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor } - /** - * 客户验收 - */ - - @Transactional(rollbackFor = Exception.class) - @Override - public int updateCustomerCheckGoods(SysSalesShippingInform sysSalesShippingInform) { - - String loginName = ShiroUtils.getLoginName(); - - List shippingInformDetailList = sysSalesShippingInform.getShippingInformDetailList(); - - for (SysSalesShippingInformDetail shippingInformDetail : shippingInformDetailList) { - SysSalesOrderChild sysSalesOrderChild = new SysSalesOrderChild(); - sysSalesOrderChild.setMaterialCode(shippingInformDetail.getMaterialNo()); - sysSalesOrderChild.setQuoteId(sysSalesShippingInform.getSalesOrderCode()); - sysSalesOrderChild.setUpdateBy(loginName); - sysSalesOrderChild.setUpdateTime(new Date()); - sysSalesOrderChild.setHasCheckNum(shippingInformDetail.getThisCheckNum()); - int updateSysSalesOrderChildResult = salesOrderChildMapper.updateSysSalesOrderChildByCodeAndQuoteId(sysSalesOrderChild); - if (updateSysSalesOrderChildResult <= 0){ - throw new BusinessException("更新销售订单子表数据失败"); - } - shippingInformDetail.setUpdateBy(loginName); - shippingInformDetail.setUpdateTime(new Date()); - shippingInformDetail.setHasCheckNum(shippingInformDetail.getThisCheckNum()); - int updateShippingInformDetailResult = shippingInformDetailMapper.updateSysSalesShippingInformDetail(shippingInformDetail); - if (updateShippingInformDetailResult <= 0){ - throw new BusinessException("更新销售出库详情数据失败"); - } - } - //设置出货状态为全部验收 - sysSalesShippingInform.setWarehouseOutStatus("12"); - - //更新出库状态 - WarehouseOutOrder warehouseOutOrder = new WarehouseOutOrder(); - warehouseOutOrder.setOutOrderCode(sysSalesShippingInform.getOutOrderCode()); - warehouseOutOrder.setUpdateTime(new Date()); - warehouseOutOrder.setUpdateBy(loginName); - //设置为全部验收 - warehouseOutOrder.setWarehouseOutStatus("12"); - int updateWarehouseOutOrdeResult = warehouseOutOrderMapper.updateWarehouseOutOrderByCode(warehouseOutOrder); - if (updateWarehouseOutOrdeResult <= 0){ - throw new BusinessException("更新出库单数据失败"); - } - - //更新销售订单状态 - SysSalesOrder sysSalesOrder = new SysSalesOrder(); - sysSalesOrder.setSalesOrderCode(sysSalesShippingInform.getSalesOrderCode()); - //设置为全部验收 - sysSalesOrder.setDeliveryStatus("8"); - sysSalesOrder.setUpdateTime(new Date()); - sysSalesOrder.setUpdateBy(loginName); - int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); - if (updateSysSalesOrderResult <= 0){ - throw new BusinessException("更新销售订单数据失败"); - } - - return sysSalesShippingInformMapper.updateSysSalesShippingInform(sysSalesShippingInform); - } - /* * 客户验收查询物料相关数据 * */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java index cb68dfcd..b7a8bce3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseOutOrderController.java @@ -4,11 +4,8 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; import com.ruoyi.aftersales.domain.vo.SelectShippingDeviceVO; -import com.ruoyi.aftersales.service.IAftersalesWarehouseOutService; import com.ruoyi.warehouse.domain.WarehouseOutOrderDetail; -import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail; import com.ruoyi.warehouse.service.IWarehouseOutOrderDetailService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -43,9 +40,6 @@ public class WarehouseOutOrderController extends BaseController private IWarehouseOutOrderDetailService outOrderDetailService; - @Autowired - private IAftersalesWarehouseOutService aftersalesWarehouseOutService; - @RequiresPermissions("warehouse:warehouseOutOrder:view") @GetMapping() public String warehouseOutOrder() diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/add.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/add.html deleted file mode 100644 index 33895897..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/add.html +++ /dev/null @@ -1,207 +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 deleted file mode 100644 index e69f32f2..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/addShippingDevicesOne.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - -
-
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- - - - - - - - - - - - - - -
- -
- -
-
- - -
- -
- -
-
- - -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- - - - - - -
-
- -
- -
-

出货设备

-
-
-
-
- - -
- - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/detail.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/detail.html deleted file mode 100644 index e7a873fb..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/detail.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-

物料信息

-
-
-
-
- - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/edit.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/edit.html deleted file mode 100644 index eeeec626..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/edit.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - - \ 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 deleted file mode 100644 index ab79c843..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentOne.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-

物料信息

-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentTwo.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentTwo.html deleted file mode 100644 index 6a0cbe54..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/maintenanceEquipmentTwo.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
- -
-
- - -
-
-
- -
- -
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-

物料信息

-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/warehouseOutOrder.html b/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/warehouseOutOrder.html deleted file mode 100644 index ee6687e4..00000000 --- a/ruoyi-admin/src/main/resources/templates/aftersales/warehouseOutOrder/warehouseOutOrder.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - - - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html index 1b5a8362..0e49617a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html @@ -144,7 +144,6 @@ - var salesDeliverGoodsFlag = [[${@permission.hasPermi('system:salesOrder:salesDeliverGoods')}]]; var startAftersalesFlag = [[${@permission.hasPermi('sales:afterSalesNotice:startAftersales')}]]; var salesOrderTypeDatas = [[${@dict.getType('sys_order_type')}]];