From 8677432060ea7e7ed1b546b5c27f8e5afc82be7c Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 22 Apr 2024 19:04:49 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E5=94=AE=E5=90=8E=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=87=BA=E8=B4=A7=E8=AE=BE=E5=A4=87=E5=88=97?= =?UTF-8?q?=E8=A1=A8=20=E5=AE=8C=E6=88=90=E6=95=B0=E6=8D=AE=E5=A1=AB?= =?UTF-8?q?=E5=85=85=EF=BC=8C=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AfterSalesShippingDeviceController.java | 151 ++++++ .../domain/AfterSalesShippingDevice.java | 482 ++++++++++++++++++ .../AfterSalesShippingDeviceMapper.java | 77 +++ .../IAfterSalesShippingDeviceService.java | 75 +++ .../AfterSalesShippingDeviceServiceImpl.java | 126 +++++ .../AfterSalesShippingDeviceMapper.xml | 217 ++++++++ .../aftersales/shippingDevice/add.html | 266 ++++++++++ .../aftersales/shippingDevice/edit.html | 267 ++++++++++ .../shippingDevice/shippingDevice.html | 330 ++++++++++++ 9 files changed, 1991 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml create mode 100644 ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/edit.html create mode 100644 ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/shippingDevice.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java new file mode 100644 index 00000000..2545fe95 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AfterSalesShippingDeviceController.java @@ -0,0 +1,151 @@ +package com.ruoyi.aftersales.controller; + +import java.util.List; +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 com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; +import com.ruoyi.aftersales.service.IAfterSalesShippingDeviceService; +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-22 + */ +@Controller +@RequestMapping("/aftersales/shippingDevice") +public class AfterSalesShippingDeviceController extends BaseController +{ + private String prefix = "aftersales/shippingDevice"; + + @Autowired + private IAfterSalesShippingDeviceService afterSalesShippingDeviceService; + + @RequiresPermissions("aftersales:shippingDevice:view") + @GetMapping() + public String shippingDevice() + { + return prefix + "/shippingDevice"; + } + + /** + * 查询出货设备列表 + */ + @RequiresPermissions("aftersales:shippingDevice:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(AfterSalesShippingDevice afterSalesShippingDevice) + { + startPage(); + List list = afterSalesShippingDeviceService.selectAfterSalesShippingDeviceList(afterSalesShippingDevice); + return getDataTable(list); + } + + /** + * 导出出货设备列表 + */ + @RequiresPermissions("aftersales:shippingDevice:export") + @Log(title = "出货设备", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(AfterSalesShippingDevice afterSalesShippingDevice) + { + List list = afterSalesShippingDeviceService.selectAfterSalesShippingDeviceList(afterSalesShippingDevice); + ExcelUtil util = new ExcelUtil(AfterSalesShippingDevice.class); + return util.exportExcel(list, "出货设备数据"); + } + + /** + * 新增出货设备 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存出货设备 + */ + @RequiresPermissions("aftersales:shippingDevice:add") + @Log(title = "出货设备", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(AfterSalesShippingDevice afterSalesShippingDevice) + { + return toAjax(afterSalesShippingDeviceService.insertAfterSalesShippingDevice(afterSalesShippingDevice)); + } + + /** + * 修改出货设备 + */ + @GetMapping("/edit/{shippingDeviceCode}") + public String edit(@PathVariable("shippingDeviceCode") Long shippingDeviceCode, ModelMap mmap) + { + AfterSalesShippingDevice afterSalesShippingDevice = afterSalesShippingDeviceService.selectAfterSalesShippingDeviceById(shippingDeviceCode); + mmap.put("afterSalesShippingDevice", afterSalesShippingDevice); + return prefix + "/edit"; + } + + /** + * 修改保存出货设备 + */ + @RequiresPermissions("aftersales:shippingDevice:edit") + @Log(title = "出货设备", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(AfterSalesShippingDevice afterSalesShippingDevice) + { + return toAjax(afterSalesShippingDeviceService.updateAfterSalesShippingDevice(afterSalesShippingDevice)); + } + + /** + * 删除出货设备 + */ + @RequiresPermissions("aftersales:shippingDevice:remove") + @Log(title = "出货设备", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(afterSalesShippingDeviceService.deleteAfterSalesShippingDeviceByIds(ids)); + } + + /** + * 作废出货设备 + */ + @RequiresPermissions("aftersales:shippingDevice:cancel") + @Log(title = "出货设备", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(afterSalesShippingDeviceService.cancelAfterSalesShippingDeviceById(id)); + } + + /** + * 恢复出货设备 + */ + @RequiresPermissions("aftersales:shippingDevice:restore") + @Log(title = "出货设备", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(afterSalesShippingDeviceService.restoreAfterSalesShippingDeviceById(id)); + } + + +} 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 new file mode 100644 index 00000000..7a25b861 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AfterSalesShippingDevice.java @@ -0,0 +1,482 @@ +package com.ruoyi.aftersales.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 出货设备对象 aftersales_shipping_device + * + * @author 刘晓旭 + * @date 2024-04-22 + */ +public class AfterSalesShippingDevice extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 出货设备编号 */ + private Long shippingDeviceCode; + + /** 出货设备id */ + @Excel(name = "出货设备id") + private String shippingDeviceId; + + /** 关联单号 */ + @Excel(name = "关联单号") + private String makeNo; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料图片 */ + @Excel(name = "物料图片") + private String materialPhotourl; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料类型 */ + @Excel(name = "物料类型") + private String materialType; + + /** 物料类别 */ + @Excel(name = "物料类别") + private String materialClass; + + /** 物料型号 */ + @Excel(name = "物料型号") + private String materialModelCode; + + /** 物料单位 */ + @Excel(name = "物料单位") + private String materialUnit; + + /** 物料品牌 */ + @Excel(name = "物料品牌") + private String materialBrand; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDescribe; + + /** 设备型号 */ + @Excel(name = "设备型号") + private String deviceModelCode; + + /** 设备流水号 */ + @Excel(name = "设备流水号") + private String deviceRunningNumber; + + /** 生产图片 */ + @Excel(name = "生产图片") + private String makePhotourl; + + /** SN号 */ + @Excel(name = "SN号") + private String snCode; + + /** 售后图片地址 */ + @Excel(name = "售后图片地址") + private String aftersalesPhotourl; + + /** 出厂日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date factoryDate; + + /** 保修期 */ + @Excel(name = "保修期") + private String guaranteePeriod; + + /** 是否过保修期 */ + @Excel(name = "是否过保修期") + private String guaranteePeriodFlag; + + /** 锁机时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "锁机时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lockDate; + + /** 是否有锁机时间 */ + @Excel(name = "是否有锁机时间") + private String lockDateFlag; + + /** 损耗品到期时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "损耗品到期时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date wastageExpireDate; + + /** 是否过损耗品到期时间 */ + @Excel(name = "是否过损耗品到期时间") + private String wastageExpireFlag; + + /** 二次维修后部件质保时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "二次维修后部件质保时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date componentGuaranteeDate; + + /** 是否过二次维修后部件质保日期 */ + @Excel(name = "是否过二次维修后部件质保日期") + private String componentGuaranteeFlag; + + /** 工程员姓名 */ + @Excel(name = "工程员姓名") + private String engineerName; + + /** 业务员姓名 */ + @Excel(name = "业务员姓名") + private String salesmanName; + + /** 客户ID */ + @Excel(name = "客户ID") + private String customerId; + + /** 客户名称 */ + @Excel(name = "客户名称") + private String customerName; + + /** 维修单号 */ + @Excel(name = "维修单号") + private String maintainOrderCode; + + /** 维修时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "维修时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date maintainTime; + + public void setShippingDeviceCode(Long shippingDeviceCode) + { + this.shippingDeviceCode = shippingDeviceCode; + } + + public Long getShippingDeviceCode() + { + return shippingDeviceCode; + } + public void setShippingDeviceId(String shippingDeviceId) + { + this.shippingDeviceId = shippingDeviceId; + } + + public String getShippingDeviceId() + { + return shippingDeviceId; + } + public void setMakeNo(String makeNo) + { + this.makeNo = makeNo; + } + + public String getMakeNo() + { + return makeNo; + } + public void setMaterialNo(String materialNo) + { + this.materialNo = materialNo; + } + + public String getMaterialNo() + { + return materialNo; + } + public void setMaterialPhotourl(String materialPhotourl) + { + this.materialPhotourl = materialPhotourl; + } + + public String getMaterialPhotourl() + { + return materialPhotourl; + } + public void setMaterialName(String materialName) + { + this.materialName = materialName; + } + + public String getMaterialName() + { + return materialName; + } + public void setMaterialType(String materialType) + { + this.materialType = materialType; + } + + public String getMaterialType() + { + return materialType; + } + public void setMaterialClass(String materialClass) + { + this.materialClass = materialClass; + } + + public String getMaterialClass() + { + return materialClass; + } + public void setMaterialModelCode(String materialModelCode) + { + this.materialModelCode = materialModelCode; + } + + public String getMaterialModelCode() + { + return materialModelCode; + } + public void setMaterialUnit(String materialUnit) + { + this.materialUnit = materialUnit; + } + + public String getMaterialUnit() + { + return materialUnit; + } + public void setMaterialBrand(String materialBrand) + { + this.materialBrand = materialBrand; + } + + public String getMaterialBrand() + { + return materialBrand; + } + public void setMaterialDescribe(String materialDescribe) + { + this.materialDescribe = materialDescribe; + } + + public String getMaterialDescribe() + { + return materialDescribe; + } + public void setDeviceModelCode(String deviceModelCode) + { + this.deviceModelCode = deviceModelCode; + } + + public String getDeviceModelCode() + { + return deviceModelCode; + } + public void setDeviceRunningNumber(String deviceRunningNumber) + { + this.deviceRunningNumber = deviceRunningNumber; + } + + public String getDeviceRunningNumber() + { + return deviceRunningNumber; + } + public void setMakePhotourl(String makePhotourl) + { + this.makePhotourl = makePhotourl; + } + + public String getMakePhotourl() + { + return makePhotourl; + } + public void setSnCode(String snCode) + { + this.snCode = snCode; + } + + public String getSnCode() + { + return snCode; + } + public void setAftersalesPhotourl(String aftersalesPhotourl) + { + this.aftersalesPhotourl = aftersalesPhotourl; + } + + public String getAftersalesPhotourl() + { + return aftersalesPhotourl; + } + public void setFactoryDate(Date factoryDate) + { + this.factoryDate = factoryDate; + } + + public Date getFactoryDate() + { + return factoryDate; + } + public void setGuaranteePeriod(String guaranteePeriod) + { + this.guaranteePeriod = guaranteePeriod; + } + + public String getGuaranteePeriod() + { + return guaranteePeriod; + } + public void setGuaranteePeriodFlag(String guaranteePeriodFlag) + { + this.guaranteePeriodFlag = guaranteePeriodFlag; + } + + public String getGuaranteePeriodFlag() + { + return guaranteePeriodFlag; + } + public void setLockDate(Date lockDate) + { + this.lockDate = lockDate; + } + + public Date getLockDate() + { + return lockDate; + } + public void setLockDateFlag(String lockDateFlag) + { + this.lockDateFlag = lockDateFlag; + } + + public String getLockDateFlag() + { + return lockDateFlag; + } + public void setWastageExpireDate(Date wastageExpireDate) + { + this.wastageExpireDate = wastageExpireDate; + } + + public Date getWastageExpireDate() + { + return wastageExpireDate; + } + public void setWastageExpireFlag(String wastageExpireFlag) + { + this.wastageExpireFlag = wastageExpireFlag; + } + + public String getWastageExpireFlag() + { + return wastageExpireFlag; + } + public void setComponentGuaranteeDate(Date componentGuaranteeDate) + { + this.componentGuaranteeDate = componentGuaranteeDate; + } + + public Date getComponentGuaranteeDate() + { + return componentGuaranteeDate; + } + public void setComponentGuaranteeFlag(String componentGuaranteeFlag) + { + this.componentGuaranteeFlag = componentGuaranteeFlag; + } + + public String getComponentGuaranteeFlag() + { + return componentGuaranteeFlag; + } + public void setEngineerName(String engineerName) + { + this.engineerName = engineerName; + } + + public String getEngineerName() + { + return engineerName; + } + public void setSalesmanName(String salesmanName) + { + this.salesmanName = salesmanName; + } + + public String getSalesmanName() + { + return salesmanName; + } + public void setCustomerId(String customerId) + { + this.customerId = customerId; + } + + public String getCustomerId() + { + return customerId; + } + public void setCustomerName(String customerName) + { + this.customerName = customerName; + } + + public String getCustomerName() + { + return customerName; + } + public void setMaintainOrderCode(String maintainOrderCode) + { + this.maintainOrderCode = maintainOrderCode; + } + + public String getMaintainOrderCode() + { + return maintainOrderCode; + } + public void setMaintainTime(Date maintainTime) + { + this.maintainTime = maintainTime; + } + + public Date getMaintainTime() + { + return maintainTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("shippingDeviceCode", getShippingDeviceCode()) + .append("shippingDeviceId", getShippingDeviceId()) + .append("makeNo", getMakeNo()) + .append("materialNo", getMaterialNo()) + .append("materialPhotourl", getMaterialPhotourl()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("materialClass", getMaterialClass()) + .append("materialModelCode", getMaterialModelCode()) + .append("materialUnit", getMaterialUnit()) + .append("materialBrand", getMaterialBrand()) + .append("materialDescribe", getMaterialDescribe()) + .append("deviceModelCode", getDeviceModelCode()) + .append("deviceRunningNumber", getDeviceRunningNumber()) + .append("makePhotourl", getMakePhotourl()) + .append("snCode", getSnCode()) + .append("aftersalesPhotourl", getAftersalesPhotourl()) + .append("factoryDate", getFactoryDate()) + .append("guaranteePeriod", getGuaranteePeriod()) + .append("guaranteePeriodFlag", getGuaranteePeriodFlag()) + .append("lockDate", getLockDate()) + .append("lockDateFlag", getLockDateFlag()) + .append("wastageExpireDate", getWastageExpireDate()) + .append("wastageExpireFlag", getWastageExpireFlag()) + .append("componentGuaranteeDate", getComponentGuaranteeDate()) + .append("componentGuaranteeFlag", getComponentGuaranteeFlag()) + .append("engineerName", getEngineerName()) + .append("salesmanName", getSalesmanName()) + .append("customerId", getCustomerId()) + .append("customerName", getCustomerName()) + .append("maintainOrderCode", getMaintainOrderCode()) + .append("maintainTime", getMaintainTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} 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 new file mode 100644 index 00000000..b2d710d2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AfterSalesShippingDeviceMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.aftersales.mapper; + +import java.util.List; +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; + +/** + * 出货设备Mapper接口 + * + * @author 刘晓旭 + * @date 2024-04-22 + */ +public interface AfterSalesShippingDeviceMapper +{ + /** + * 查询出货设备 + * + * @param shippingDeviceCode 出货设备ID + * @return 出货设备 + */ + public AfterSalesShippingDevice selectAfterSalesShippingDeviceById(Long shippingDeviceCode); + + /** + * 查询出货设备列表 + * + * @param afterSalesShippingDevice 出货设备 + * @return 出货设备集合 + */ + public List selectAfterSalesShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice); + + /** + * 新增出货设备 + * + * @param afterSalesShippingDevice 出货设备 + * @return 结果 + */ + public int insertAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice); + + /** + * 修改出货设备 + * + * @param afterSalesShippingDevice 出货设备 + * @return 结果 + */ + public int updateAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice); + + /** + * 删除出货设备 + * + * @param shippingDeviceCode 出货设备ID + * @return 结果 + */ + public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode); + + /** + * 批量删除出货设备 + * + * @param shippingDeviceCodes 需要删除的数据ID + * @return 结果 + */ + public int deleteAfterSalesShippingDeviceByIds(String[] shippingDeviceCodes); + + /** + * 作废出货设备 + * + * @param shippingDeviceCode 出货设备ID + * @return 结果 + */ + public int cancelAfterSalesShippingDeviceById(Long shippingDeviceCode); + + /** + * 恢复出货设备 + * + * @param shippingDeviceCode 出货设备ID + * @return 结果 + */ + public int restoreAfterSalesShippingDeviceById(Long shippingDeviceCode); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java new file mode 100644 index 00000000..12dd1e68 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAfterSalesShippingDeviceService.java @@ -0,0 +1,75 @@ +package com.ruoyi.aftersales.service; + +import java.util.List; +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; + +/** + * 出货设备Service接口 + * + * @author 刘晓旭 + * @date 2024-04-22 + */ +public interface IAfterSalesShippingDeviceService +{ + /** + * 查询出货设备 + * + * @param shippingDeviceCode 出货设备ID + * @return 出货设备 + */ + public AfterSalesShippingDevice selectAfterSalesShippingDeviceById(Long shippingDeviceCode); + + /** + * 查询出货设备列表 + * + * @param afterSalesShippingDevice 出货设备 + * @return 出货设备集合 + */ + public List selectAfterSalesShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice); + + /** + * 新增出货设备 + * + * @param afterSalesShippingDevice 出货设备 + * @return 结果 + */ + public int insertAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice); + + /** + * 修改出货设备 + * + * @param afterSalesShippingDevice 出货设备 + * @return 结果 + */ + public int updateAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice); + + /** + * 批量删除出货设备 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteAfterSalesShippingDeviceByIds(String ids); + + /** + * 删除出货设备信息 + * + * @param shippingDeviceCode 出货设备ID + * @return 结果 + */ + public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode); + + /** + * 作废出货设备 + * @param shippingDeviceCode 出货设备ID + * @return + */ + int cancelAfterSalesShippingDeviceById(Long shippingDeviceCode); + + /** + * 恢复出货设备 + * @param shippingDeviceCode 出货设备ID + * @return + */ + int restoreAfterSalesShippingDeviceById(Long shippingDeviceCode); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java new file mode 100644 index 00000000..b51cbc13 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AfterSalesShippingDeviceServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.aftersales.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper; +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; +import com.ruoyi.aftersales.service.IAfterSalesShippingDeviceService; +import com.ruoyi.common.core.text.Convert; + +/** + * 出货设备Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-04-22 + */ +@Service +public class AfterSalesShippingDeviceServiceImpl implements IAfterSalesShippingDeviceService +{ + @Autowired + private AfterSalesShippingDeviceMapper afterSalesShippingDeviceMapper; + + /** + * 查询出货设备 + * + * @param shippingDeviceCode 出货设备ID + * @return 出货设备 + */ + @Override + public AfterSalesShippingDevice selectAfterSalesShippingDeviceById(Long shippingDeviceCode) + { + return afterSalesShippingDeviceMapper.selectAfterSalesShippingDeviceById(shippingDeviceCode); + } + + /** + * 查询出货设备列表 + * + * @param afterSalesShippingDevice 出货设备 + * @return 出货设备 + */ + @Override + public List selectAfterSalesShippingDeviceList(AfterSalesShippingDevice afterSalesShippingDevice) + { + return afterSalesShippingDeviceMapper.selectAfterSalesShippingDeviceList(afterSalesShippingDevice); + } + + /** + * 新增出货设备 + * + * @param afterSalesShippingDevice 出货设备 + * @return 结果 + */ + @Override + public int insertAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice) + { + String loginName = ShiroUtils.getLoginName(); + afterSalesShippingDevice.setCreateBy(loginName); + afterSalesShippingDevice.setCreateTime(DateUtils.getNowDate()); + return afterSalesShippingDeviceMapper.insertAfterSalesShippingDevice(afterSalesShippingDevice); + } + + /** + * 修改出货设备 + * + * @param afterSalesShippingDevice 出货设备 + * @return 结果 + */ + @Override + public int updateAfterSalesShippingDevice(AfterSalesShippingDevice afterSalesShippingDevice) + { + String loginName = ShiroUtils.getLoginName(); + afterSalesShippingDevice.setUpdateBy(loginName); + afterSalesShippingDevice.setUpdateTime(DateUtils.getNowDate()); + return afterSalesShippingDeviceMapper.updateAfterSalesShippingDevice(afterSalesShippingDevice); + } + + /** + * 删除出货设备对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteAfterSalesShippingDeviceByIds(String ids) + { + return afterSalesShippingDeviceMapper.deleteAfterSalesShippingDeviceByIds(Convert.toStrArray(ids)); + } + + /** + * 删除出货设备信息 + * + * @param shippingDeviceCode 出货设备ID + * @return 结果 + */ + @Override + public int deleteAfterSalesShippingDeviceById(Long shippingDeviceCode) + { + return afterSalesShippingDeviceMapper.deleteAfterSalesShippingDeviceById(shippingDeviceCode); + } + + /** + * 作废出货设备 + * + * @param shippingDeviceCode 出货设备ID + * @return 结果 + */ + @Override + public int cancelAfterSalesShippingDeviceById(Long shippingDeviceCode) + { + return afterSalesShippingDeviceMapper.cancelAfterSalesShippingDeviceById(shippingDeviceCode); + } + + /** + * 恢复出货设备信息 + * + * @param shippingDeviceCode 出货设备ID + * @return 结果 + */ + @Override + public int restoreAfterSalesShippingDeviceById(Long shippingDeviceCode) + { + return afterSalesShippingDeviceMapper.restoreAfterSalesShippingDeviceById(shippingDeviceCode); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml new file mode 100644 index 00000000..b230b1ba --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/aftersales/AfterSalesShippingDeviceMapper.xml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select shipping_device_code, shipping_device_id, make_no, 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, customer_id, customer_name, maintain_order_code, maintain_time, create_by, create_time, update_by, update_time from aftersales_shipping_device + + + + + + + + insert into aftersales_shipping_device + + shipping_device_id, + make_no, + 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, + customer_id, + customer_name, + maintain_order_code, + maintain_time, + create_by, + create_time, + update_by, + update_time, + + + #{shippingDeviceId}, + #{makeNo}, + #{materialNo}, + #{materialPhotourl}, + #{materialName}, + #{materialType}, + #{materialClass}, + #{materialModelCode}, + #{materialUnit}, + #{materialBrand}, + #{materialDescribe}, + #{deviceModelCode}, + #{deviceRunningNumber}, + #{makePhotourl}, + #{snCode}, + #{aftersalesPhotourl}, + #{factoryDate}, + #{guaranteePeriod}, + #{guaranteePeriodFlag}, + #{lockDate}, + #{lockDateFlag}, + #{wastageExpireDate}, + #{wastageExpireFlag}, + #{componentGuaranteeDate}, + #{componentGuaranteeFlag}, + #{engineerName}, + #{salesmanName}, + #{customerId}, + #{customerName}, + #{maintainOrderCode}, + #{maintainTime}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update aftersales_shipping_device + + shipping_device_id = #{shippingDeviceId}, + make_no = #{makeNo}, + material_no = #{materialNo}, + material_photoUrl = #{materialPhotourl}, + material_name = #{materialName}, + material_type = #{materialType}, + material_class = #{materialClass}, + material_model_code = #{materialModelCode}, + material_unit = #{materialUnit}, + material_brand = #{materialBrand}, + material_describe = #{materialDescribe}, + device_model_code = #{deviceModelCode}, + device_running_number = #{deviceRunningNumber}, + make_photoUrl = #{makePhotourl}, + sn_code = #{snCode}, + aftersales_photoUrl = #{aftersalesPhotourl}, + factory_date = #{factoryDate}, + guarantee_period = #{guaranteePeriod}, + guarantee_period_flag = #{guaranteePeriodFlag}, + lock_date = #{lockDate}, + lock_date_flag = #{lockDateFlag}, + wastage_expire_date = #{wastageExpireDate}, + wastage_expire_flag = #{wastageExpireFlag}, + component_guarantee_date = #{componentGuaranteeDate}, + component_guarantee_flag = #{componentGuaranteeFlag}, + engineer_name = #{engineerName}, + salesman_name = #{salesmanName}, + customer_id = #{customerId}, + customer_name = #{customerName}, + maintain_order_code = #{maintainOrderCode}, + maintain_time = #{maintainTime}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where shipping_device_code = #{shippingDeviceCode} + + + + delete from aftersales_shipping_device where shipping_device_code = #{shippingDeviceCode} + + + + delete from aftersales_shipping_device where shipping_device_code in + + #{shippingDeviceCode} + + + + + update aftersales_shipping_device set del_flag = '1' where shipping_device_code = #{shippingDeviceCode} + + + + update aftersales_shipping_device set del_flag = '0' where shipping_device_code = #{shippingDeviceCode} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/add.html b/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/add.html new file mode 100644 index 00000000..9af74e0f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/add.html @@ -0,0 +1,266 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/edit.html b/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/edit.html new file mode 100644 index 00000000..8176474c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/edit.html @@ -0,0 +1,267 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/shippingDevice.html b/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/shippingDevice.html new file mode 100644 index 00000000..83005d8b --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/aftersales/shippingDevice/shippingDevice.html @@ -0,0 +1,330 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • + + + - + +
  • +
  • + + + - + +
  • +
  • + + + - + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + + + + + + + + + + + + + + +
+
+
+
+
+ + + + \ No newline at end of file