diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesAftersalesNoticeDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesAftersalesNoticeDetail.java new file mode 100644 index 00000000..3814f08a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesAftersalesNoticeDetail.java @@ -0,0 +1,317 @@ +package com.ruoyi.sales.domain; + +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; + +/** + * 售后通知单详情对象 sales_aftersales_notice_detail + * + * @author 刘晓旭 + * @date 2024-07-22 + */ +public class SalesAftersalesNoticeDetail extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 售后通知单详情ID */ + private Long aftersalesNoticeDetailId; + + /** 售后通知单号 */ + @Excel(name = "售后通知单号") + private String aftersalesNoticeCode; + + /** 关联生产订单号 */ + private String makeNo; + + /** 关联销售订单编号 */ + private String salesOrderCode; + + /** 用户ID */ + private Long userId; + + /** 紧急程度(0一般、1紧急) */ + @Excel(name = "紧急程度", readConverterExp = "0=一般、1紧急") + private String emergencyDegree; + + /** 售后问题 */ + @Excel(name = "售后问题") + private String aftersalesProblem; + + /** 报告问题 */ + @Excel(name = "报告问题") + private String aftersalesReportUrl; + + /** 客户ID */ + private String customerId; + + /** 客户名称 */ + private String customerName; + + /** SN号(产品序列号) */ + @Excel(name = "SN号", readConverterExp = "产=品序列号") + private String snCode; + + /** 设备流水号 */ + @Excel(name = "设备流水号") + private String deviceRunningNumber; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料类型 */ + @Excel(name = "物料类型") + private String materialType; + + /** 物料图片地址 */ + @Excel(name = "物料图片地址") + private String materialPhotourl; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** 物料品牌 */ + @Excel(name = "物料品牌") + private String materialBrand; + + /** 物料单位 */ + @Excel(name = "物料单位") + private String materialUnit; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String materialDescribe; + + /** 物料加工方式 */ + @Excel(name = "物料加工方式") + private String materialProcessMethod; + + /** 已出库数量 */ + @Excel(name = "已出库数量") + private Integer shippedGoodsSum; + + public void setAftersalesNoticeDetailId(Long aftersalesNoticeDetailId) + { + this.aftersalesNoticeDetailId = aftersalesNoticeDetailId; + } + + public Long getAftersalesNoticeDetailId() + { + return aftersalesNoticeDetailId; + } + public void setAftersalesNoticeCode(String aftersalesNoticeCode) + { + this.aftersalesNoticeCode = aftersalesNoticeCode; + } + + public String getAftersalesNoticeCode() + { + return aftersalesNoticeCode; + } + public void setMakeNo(String makeNo) + { + this.makeNo = makeNo; + } + + public String getMakeNo() + { + return makeNo; + } + public void setSalesOrderCode(String salesOrderCode) + { + this.salesOrderCode = salesOrderCode; + } + + public String getSalesOrderCode() + { + return salesOrderCode; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + public void setEmergencyDegree(String emergencyDegree) + { + this.emergencyDegree = emergencyDegree; + } + + public String getEmergencyDegree() + { + return emergencyDegree; + } + public void setAftersalesProblem(String aftersalesProblem) + { + this.aftersalesProblem = aftersalesProblem; + } + + public String getAftersalesProblem() + { + return aftersalesProblem; + } + public void setAftersalesReportUrl(String aftersalesReportUrl) + { + this.aftersalesReportUrl = aftersalesReportUrl; + } + + public String getAftersalesReportUrl() + { + return aftersalesReportUrl; + } + 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 setSnCode(String snCode) + { + this.snCode = snCode; + } + + public String getSnCode() + { + return snCode; + } + public void setDeviceRunningNumber(String deviceRunningNumber) + { + this.deviceRunningNumber = deviceRunningNumber; + } + + public String getDeviceRunningNumber() + { + return deviceRunningNumber; + } + 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 setMaterialPhotourl(String materialPhotourl) + { + this.materialPhotourl = materialPhotourl; + } + + public String getMaterialPhotourl() + { + return materialPhotourl; + } + public void setMaterialNo(String materialNo) + { + this.materialNo = materialNo; + } + + public String getMaterialNo() + { + return materialNo; + } + public void setMaterialBrand(String materialBrand) + { + this.materialBrand = materialBrand; + } + + public String getMaterialBrand() + { + return materialBrand; + } + public void setMaterialUnit(String materialUnit) + { + this.materialUnit = materialUnit; + } + + public String getMaterialUnit() + { + return materialUnit; + } + public void setMaterialDescribe(String materialDescribe) + { + this.materialDescribe = materialDescribe; + } + + public String getMaterialDescribe() + { + return materialDescribe; + } + public void setMaterialProcessMethod(String materialProcessMethod) + { + this.materialProcessMethod = materialProcessMethod; + } + + public String getMaterialProcessMethod() + { + return materialProcessMethod; + } + public void setShippedGoodsSum(Integer shippedGoodsSum) + { + this.shippedGoodsSum = shippedGoodsSum; + } + + public Integer getShippedGoodsSum() + { + return shippedGoodsSum; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("aftersalesNoticeDetailId", getAftersalesNoticeDetailId()) + .append("aftersalesNoticeCode", getAftersalesNoticeCode()) + .append("makeNo", getMakeNo()) + .append("salesOrderCode", getSalesOrderCode()) + .append("userId", getUserId()) + .append("emergencyDegree", getEmergencyDegree()) + .append("aftersalesProblem", getAftersalesProblem()) + .append("aftersalesReportUrl", getAftersalesReportUrl()) + .append("customerId", getCustomerId()) + .append("customerName", getCustomerName()) + .append("snCode", getSnCode()) + .append("deviceRunningNumber", getDeviceRunningNumber()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("materialPhotourl", getMaterialPhotourl()) + .append("materialNo", getMaterialNo()) + .append("materialBrand", getMaterialBrand()) + .append("materialUnit", getMaterialUnit()) + .append("materialDescribe", getMaterialDescribe()) + .append("materialProcessMethod", getMaterialProcessMethod()) + .append("shippedGoodsSum", getShippedGoodsSum()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeDetailMapper.java new file mode 100644 index 00000000..70666ae7 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SalesAftersalesNoticeDetailMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.sales.mapper; + +import java.util.List; +import com.ruoyi.sales.domain.SalesAftersalesNoticeDetail; + +/** + * 售后通知单详情Mapper接口 + * + * @author 刘晓旭 + * @date 2024-07-22 + */ +public interface SalesAftersalesNoticeDetailMapper +{ + /** + * 查询售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 售后通知单详情 + */ + public SalesAftersalesNoticeDetail selectSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 查询售后通知单详情列表 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 售后通知单详情集合 + */ + public List selectSalesAftersalesNoticeDetailList(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 新增售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + public int insertSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 修改售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + public int updateSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 删除售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + public int deleteSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 批量删除售后通知单详情 + * + * @param aftersalesNoticeDetailIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSalesAftersalesNoticeDetailByIds(String[] aftersalesNoticeDetailIds); + + /** + * 作废售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + public int cancelSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 恢复售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + public int restoreSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeDetailService.java new file mode 100644 index 00000000..1461517f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeDetailService.java @@ -0,0 +1,75 @@ +package com.ruoyi.sales.service; + +import java.util.List; +import com.ruoyi.sales.domain.SalesAftersalesNoticeDetail; + +/** + * 售后通知单详情Service接口 + * + * @author 刘晓旭 + * @date 2024-07-22 + */ +public interface ISalesAftersalesNoticeDetailService +{ + /** + * 查询售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 售后通知单详情 + */ + public SalesAftersalesNoticeDetail selectSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 查询售后通知单详情列表 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 售后通知单详情集合 + */ + public List selectSalesAftersalesNoticeDetailList(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 新增售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + public int insertSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 修改售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + public int updateSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail); + + /** + * 批量删除售后通知单详情 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSalesAftersalesNoticeDetailByIds(String ids); + + /** + * 删除售后通知单详情信息 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + public int deleteSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 作废售后通知单详情 + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return + */ + int cancelSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); + + /** + * 恢复售后通知单详情 + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return + */ + int restoreSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeDetailServiceImpl.java new file mode 100644 index 00000000..99d987bd --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeDetailServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.sales.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.sales.mapper.SalesAftersalesNoticeDetailMapper; +import com.ruoyi.sales.domain.SalesAftersalesNoticeDetail; +import com.ruoyi.sales.service.ISalesAftersalesNoticeDetailService; +import com.ruoyi.common.core.text.Convert; + +/** + * 售后通知单详情Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-07-22 + */ +@Service +public class SalesAftersalesNoticeDetailServiceImpl implements ISalesAftersalesNoticeDetailService +{ + @Autowired + private SalesAftersalesNoticeDetailMapper salesAftersalesNoticeDetailMapper; + + /** + * 查询售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 售后通知单详情 + */ + @Override + public SalesAftersalesNoticeDetail selectSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId) + { + return salesAftersalesNoticeDetailMapper.selectSalesAftersalesNoticeDetailById(aftersalesNoticeDetailId); + } + + /** + * 查询售后通知单详情列表 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 售后通知单详情 + */ + @Override + public List selectSalesAftersalesNoticeDetailList(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail) + { + return salesAftersalesNoticeDetailMapper.selectSalesAftersalesNoticeDetailList(salesAftersalesNoticeDetail); + } + + /** + * 新增售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + @Override + public int insertSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail) + { + String loginName = ShiroUtils.getLoginName(); + salesAftersalesNoticeDetail.setCreateBy(loginName); + salesAftersalesNoticeDetail.setCreateTime(DateUtils.getNowDate()); + return salesAftersalesNoticeDetailMapper.insertSalesAftersalesNoticeDetail(salesAftersalesNoticeDetail); + } + + /** + * 修改售后通知单详情 + * + * @param salesAftersalesNoticeDetail 售后通知单详情 + * @return 结果 + */ + @Override + public int updateSalesAftersalesNoticeDetail(SalesAftersalesNoticeDetail salesAftersalesNoticeDetail) + { + String loginName = ShiroUtils.getLoginName(); + salesAftersalesNoticeDetail.setUpdateBy(loginName); + salesAftersalesNoticeDetail.setUpdateTime(DateUtils.getNowDate()); + return salesAftersalesNoticeDetailMapper.updateSalesAftersalesNoticeDetail(salesAftersalesNoticeDetail); + } + + /** + * 删除售后通知单详情对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSalesAftersalesNoticeDetailByIds(String ids) + { + return salesAftersalesNoticeDetailMapper.deleteSalesAftersalesNoticeDetailByIds(Convert.toStrArray(ids)); + } + + /** + * 删除售后通知单详情信息 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + @Override + public int deleteSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId) + { + return salesAftersalesNoticeDetailMapper.deleteSalesAftersalesNoticeDetailById(aftersalesNoticeDetailId); + } + + /** + * 作废售后通知单详情 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + @Override + public int cancelSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId) + { + return salesAftersalesNoticeDetailMapper.cancelSalesAftersalesNoticeDetailById(aftersalesNoticeDetailId); + } + + /** + * 恢复售后通知单详情信息 + * + * @param aftersalesNoticeDetailId 售后通知单详情ID + * @return 结果 + */ + @Override + public int restoreSalesAftersalesNoticeDetailById(Long aftersalesNoticeDetailId) + { + return salesAftersalesNoticeDetailMapper.restoreSalesAftersalesNoticeDetailById(aftersalesNoticeDetailId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeDetailMapper.xml new file mode 100644 index 00000000..0411113c --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeDetailMapper.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select aftersales_notice_detail_id, aftersales_notice_code, make_no, sales_order_code, user_id, emergency_degree, aftersales_problem, aftersales_report_url, customer_id, customer_name, sn_code, device_running_number, material_name, material_type, material_photoUrl, material_no, material_brand, material_unit, material_describe, material_process_method, shipped_goods_sum, create_by, create_time, update_by, update_time, remark from sales_aftersales_notice_detail + + + + + + + + insert into sales_aftersales_notice_detail + + aftersales_notice_code, + make_no, + sales_order_code, + user_id, + emergency_degree, + aftersales_problem, + aftersales_report_url, + customer_id, + customer_name, + sn_code, + device_running_number, + material_name, + material_type, + material_photoUrl, + material_no, + material_brand, + material_unit, + material_describe, + material_process_method, + shipped_goods_sum, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{aftersalesNoticeCode}, + #{makeNo}, + #{salesOrderCode}, + #{userId}, + #{emergencyDegree}, + #{aftersalesProblem}, + #{aftersalesReportUrl}, + #{customerId}, + #{customerName}, + #{snCode}, + #{deviceRunningNumber}, + #{materialName}, + #{materialType}, + #{materialPhotourl}, + #{materialNo}, + #{materialBrand}, + #{materialUnit}, + #{materialDescribe}, + #{materialProcessMethod}, + #{shippedGoodsSum}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sales_aftersales_notice_detail + + aftersales_notice_code = #{aftersalesNoticeCode}, + make_no = #{makeNo}, + sales_order_code = #{salesOrderCode}, + user_id = #{userId}, + emergency_degree = #{emergencyDegree}, + aftersales_problem = #{aftersalesProblem}, + aftersales_report_url = #{aftersalesReportUrl}, + customer_id = #{customerId}, + customer_name = #{customerName}, + sn_code = #{snCode}, + device_running_number = #{deviceRunningNumber}, + material_name = #{materialName}, + material_type = #{materialType}, + material_photoUrl = #{materialPhotourl}, + material_no = #{materialNo}, + material_brand = #{materialBrand}, + material_unit = #{materialUnit}, + material_describe = #{materialDescribe}, + material_process_method = #{materialProcessMethod}, + shipped_goods_sum = #{shippedGoodsSum}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where aftersales_notice_detail_id = #{aftersalesNoticeDetailId} + + + + delete from sales_aftersales_notice_detail where aftersales_notice_detail_id = #{aftersalesNoticeDetailId} + + + + delete from sales_aftersales_notice_detail where aftersales_notice_detail_id in + + #{aftersalesNoticeDetailId} + + + + + update sales_aftersales_notice_detail set del_flag = '1' where aftersales_notice_detail_id = #{aftersalesNoticeDetailId} + + + + update sales_aftersales_notice_detail set del_flag = '0' where aftersales_notice_detail_id = #{aftersalesNoticeDetailId} + + + \ No newline at end of file