Browse Source
售后客诉通知 修改客诉通知的添加功能。添加到客诉通知明细表中 新增客诉通知明细表实体类 新增客诉通知明细表Controller 新增客诉通知明细表Mapper 新增客诉通知明细表Mapper.XML 新增客诉通知明细表Service接口 新增客诉通知明细表ServiceImpl实现类 新增物料和客诉通知结合列表VO类 新增与生产订单相关的选择物料信息前端文件 在生产Bom相关表SysMakeorderBomMapper中添加查询方法dev
15 changed files with 1527 additions and 52 deletions
@ -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.AftersalesComplaintNoticeDetail; |
|||
import com.ruoyi.aftersales.service.IAftersalesComplaintNoticeDetailService; |
|||
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-25 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/aftersales/complaintNoticeDetail") |
|||
public class AftersalesComplaintNoticeDetailController extends BaseController |
|||
{ |
|||
private String prefix = "aftersales/complaintNoticeDetail"; |
|||
|
|||
@Autowired |
|||
private IAftersalesComplaintNoticeDetailService aftersalesComplaintNoticeDetailService; |
|||
|
|||
@RequiresPermissions("aftersales:complaintNoticeDetail:view") |
|||
@GetMapping() |
|||
public String complaintNoticeDetail() |
|||
{ |
|||
return prefix + "/complaintNoticeDetail"; |
|||
} |
|||
|
|||
/** |
|||
* 查询售后客诉通知单详情列表 |
|||
*/ |
|||
@RequiresPermissions("aftersales:complaintNoticeDetail:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail) |
|||
{ |
|||
startPage(); |
|||
List<AftersalesComplaintNoticeDetail> list = aftersalesComplaintNoticeDetailService.selectAftersalesComplaintNoticeDetailList(aftersalesComplaintNoticeDetail); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出售后客诉通知单详情列表 |
|||
*/ |
|||
@RequiresPermissions("aftersales:complaintNoticeDetail:export") |
|||
@Log(title = "售后客诉通知单详情", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail) |
|||
{ |
|||
List<AftersalesComplaintNoticeDetail> list = aftersalesComplaintNoticeDetailService.selectAftersalesComplaintNoticeDetailList(aftersalesComplaintNoticeDetail); |
|||
ExcelUtil<AftersalesComplaintNoticeDetail> util = new ExcelUtil<AftersalesComplaintNoticeDetail>(AftersalesComplaintNoticeDetail.class); |
|||
return util.exportExcel(list, "售后客诉通知单详情数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增售后客诉通知单详情 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存售后客诉通知单详情 |
|||
*/ |
|||
@RequiresPermissions("aftersales:complaintNoticeDetail:add") |
|||
@Log(title = "售后客诉通知单详情", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail) |
|||
{ |
|||
return toAjax(aftersalesComplaintNoticeDetailService.insertAftersalesComplaintNoticeDetail(aftersalesComplaintNoticeDetail)); |
|||
} |
|||
|
|||
/** |
|||
* 修改售后客诉通知单详情 |
|||
*/ |
|||
@GetMapping("/edit/{complaintNoticeDetailId}") |
|||
public String edit(@PathVariable("complaintNoticeDetailId") Long complaintNoticeDetailId, ModelMap mmap) |
|||
{ |
|||
AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail = aftersalesComplaintNoticeDetailService.selectAftersalesComplaintNoticeDetailById(complaintNoticeDetailId); |
|||
mmap.put("aftersalesComplaintNoticeDetail", aftersalesComplaintNoticeDetail); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存售后客诉通知单详情 |
|||
*/ |
|||
@RequiresPermissions("aftersales:complaintNoticeDetail:edit") |
|||
@Log(title = "售后客诉通知单详情", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail) |
|||
{ |
|||
return toAjax(aftersalesComplaintNoticeDetailService.updateAftersalesComplaintNoticeDetail(aftersalesComplaintNoticeDetail)); |
|||
} |
|||
|
|||
/** |
|||
* 删除售后客诉通知单详情 |
|||
*/ |
|||
@RequiresPermissions("aftersales:complaintNoticeDetail:remove") |
|||
@Log(title = "售后客诉通知单详情", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(aftersalesComplaintNoticeDetailService.deleteAftersalesComplaintNoticeDetailByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废售后客诉通知单详情 |
|||
*/ |
|||
@RequiresPermissions("aftersales:complaintNoticeDetail:cancel") |
|||
@Log(title = "售后客诉通知单详情", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") Long id){ |
|||
return toAjax(aftersalesComplaintNoticeDetailService.cancelAftersalesComplaintNoticeDetailById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复售后客诉通知单详情 |
|||
*/ |
|||
@RequiresPermissions("aftersales:complaintNoticeDetail:restore") |
|||
@Log(title = "售后客诉通知单详情", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")Long id) |
|||
{ |
|||
return toAjax(aftersalesComplaintNoticeDetailService.restoreAftersalesComplaintNoticeDetailById(id)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,380 @@ |
|||
package com.ruoyi.aftersales.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; |
|||
|
|||
/** |
|||
* 售后客诉通知单详情对象 aftersales_complaint_notice_detail |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-25 |
|||
*/ |
|||
public class AftersalesComplaintNoticeDetail extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 客诉通知详情ID */ |
|||
private Long complaintNoticeDetailId; |
|||
|
|||
/** 客诉通知单号 */ |
|||
private String complaintNoticeCode; |
|||
|
|||
/** 关联生产订单号 */ |
|||
private String makeNo; |
|||
|
|||
/** 用户ID */ |
|||
private Long userId; |
|||
|
|||
/** 交货数量 */ |
|||
private String deliveryGoodsNum; |
|||
|
|||
/** 紧急程度 */ |
|||
@Excel(name = "紧急程度") |
|||
private String emergencyDegree; |
|||
|
|||
/** 客诉问题 */ |
|||
@Excel(name = "客诉问题") |
|||
private String complaintProblem; |
|||
|
|||
/** 是否结案 */ |
|||
private String closingProcedures; |
|||
|
|||
/** 不良报告问题 */ |
|||
@Excel(name = "不良报告问题") |
|||
private String adverseReportUrl; |
|||
|
|||
/** 客户ID */ |
|||
private String customerId; |
|||
|
|||
/** 客户名称 */ |
|||
private String customerName; |
|||
|
|||
/** 设备型号 */ |
|||
private String deviceModelCode; |
|||
|
|||
/** 设备名称 */ |
|||
private String deviceModelName; |
|||
|
|||
/** SN号(产品序列号) */ |
|||
@Excel(name = "SN号", readConverterExp = "产=品序列号") |
|||
private String snCode; |
|||
|
|||
/** 设备流水号 */ |
|||
private String deviceRunningNumber; |
|||
|
|||
/** 料号 */ |
|||
@Excel(name = "料号") |
|||
private String materialNo; |
|||
|
|||
/** 物料名称 */ |
|||
@Excel(name = "物料名称") |
|||
private String materialName; |
|||
|
|||
/** 物料类型 */ |
|||
@Excel(name = "物料类型") |
|||
private String materialType; |
|||
|
|||
/** 物料图片地址 */ |
|||
@Excel(name = "物料图片地址") |
|||
private String materialPhotourl; |
|||
|
|||
/** 物料品牌 */ |
|||
@Excel(name = "物料品牌") |
|||
private String materialBrand; |
|||
|
|||
/** 物料单位 */ |
|||
@Excel(name = "物料单位") |
|||
private String materialUnit; |
|||
|
|||
/** 物料描述 */ |
|||
@Excel(name = "物料描述") |
|||
private String materialDescribe; |
|||
|
|||
/** 物料加工方式 */ |
|||
@Excel(name = "物料加工方式") |
|||
private String materialProcessMethod; |
|||
|
|||
/** 已出库数量 */ |
|||
@Excel(name = "已出库数量") |
|||
private String shippedGoodsSum; |
|||
|
|||
/** 物料数合计 */ |
|||
private String materialSum; |
|||
|
|||
/** 数量合计 */ |
|||
private String enterpriseSum; |
|||
|
|||
public void setComplaintNoticeDetailId(Long complaintNoticeDetailId) |
|||
{ |
|||
this.complaintNoticeDetailId = complaintNoticeDetailId; |
|||
} |
|||
|
|||
public Long getComplaintNoticeDetailId() |
|||
{ |
|||
return complaintNoticeDetailId; |
|||
} |
|||
public void setComplaintNoticeCode(String complaintNoticeCode) |
|||
{ |
|||
this.complaintNoticeCode = complaintNoticeCode; |
|||
} |
|||
|
|||
public String getComplaintNoticeCode() |
|||
{ |
|||
return complaintNoticeCode; |
|||
} |
|||
public void setMakeNo(String makeNo) |
|||
{ |
|||
this.makeNo = makeNo; |
|||
} |
|||
|
|||
public String getMakeNo() |
|||
{ |
|||
return makeNo; |
|||
} |
|||
public void setUserId(Long userId) |
|||
{ |
|||
this.userId = userId; |
|||
} |
|||
|
|||
public Long getUserId() |
|||
{ |
|||
return userId; |
|||
} |
|||
public void setDeliveryGoodsNum(String deliveryGoodsNum) |
|||
{ |
|||
this.deliveryGoodsNum = deliveryGoodsNum; |
|||
} |
|||
|
|||
public String getDeliveryGoodsNum() |
|||
{ |
|||
return deliveryGoodsNum; |
|||
} |
|||
public void setEmergencyDegree(String emergencyDegree) |
|||
{ |
|||
this.emergencyDegree = emergencyDegree; |
|||
} |
|||
|
|||
public String getEmergencyDegree() |
|||
{ |
|||
return emergencyDegree; |
|||
} |
|||
public void setComplaintProblem(String complaintProblem) |
|||
{ |
|||
this.complaintProblem = complaintProblem; |
|||
} |
|||
|
|||
public String getComplaintProblem() |
|||
{ |
|||
return complaintProblem; |
|||
} |
|||
public void setClosingProcedures(String closingProcedures) |
|||
{ |
|||
this.closingProcedures = closingProcedures; |
|||
} |
|||
|
|||
public String getClosingProcedures() |
|||
{ |
|||
return closingProcedures; |
|||
} |
|||
public void setAdverseReportUrl(String adverseReportUrl) |
|||
{ |
|||
this.adverseReportUrl = adverseReportUrl; |
|||
} |
|||
|
|||
public String getAdverseReportUrl() |
|||
{ |
|||
return adverseReportUrl; |
|||
} |
|||
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 setDeviceModelCode(String deviceModelCode) |
|||
{ |
|||
this.deviceModelCode = deviceModelCode; |
|||
} |
|||
|
|||
public String getDeviceModelCode() |
|||
{ |
|||
return deviceModelCode; |
|||
} |
|||
public void setDeviceModelName(String deviceModelName) |
|||
{ |
|||
this.deviceModelName = deviceModelName; |
|||
} |
|||
|
|||
public String getDeviceModelName() |
|||
{ |
|||
return deviceModelName; |
|||
} |
|||
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 setMaterialNo(String materialNo) |
|||
{ |
|||
this.materialNo = materialNo; |
|||
} |
|||
|
|||
public String getMaterialNo() |
|||
{ |
|||
return materialNo; |
|||
} |
|||
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 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(String shippedGoodsSum) |
|||
{ |
|||
this.shippedGoodsSum = shippedGoodsSum; |
|||
} |
|||
|
|||
public String getShippedGoodsSum() |
|||
{ |
|||
return shippedGoodsSum; |
|||
} |
|||
public void setMaterialSum(String materialSum) |
|||
{ |
|||
this.materialSum = materialSum; |
|||
} |
|||
|
|||
public String getMaterialSum() |
|||
{ |
|||
return materialSum; |
|||
} |
|||
public void setEnterpriseSum(String enterpriseSum) |
|||
{ |
|||
this.enterpriseSum = enterpriseSum; |
|||
} |
|||
|
|||
public String getEnterpriseSum() |
|||
{ |
|||
return enterpriseSum; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("complaintNoticeDetailId", getComplaintNoticeDetailId()) |
|||
.append("complaintNoticeCode", getComplaintNoticeCode()) |
|||
.append("makeNo", getMakeNo()) |
|||
.append("userId", getUserId()) |
|||
.append("deliveryGoodsNum", getDeliveryGoodsNum()) |
|||
.append("emergencyDegree", getEmergencyDegree()) |
|||
.append("complaintProblem", getComplaintProblem()) |
|||
.append("closingProcedures", getClosingProcedures()) |
|||
.append("adverseReportUrl", getAdverseReportUrl()) |
|||
.append("customerId", getCustomerId()) |
|||
.append("customerName", getCustomerName()) |
|||
.append("deviceModelCode", getDeviceModelCode()) |
|||
.append("deviceModelName", getDeviceModelName()) |
|||
.append("snCode", getSnCode()) |
|||
.append("deviceRunningNumber", getDeviceRunningNumber()) |
|||
.append("materialNo", getMaterialNo()) |
|||
.append("materialName", getMaterialName()) |
|||
.append("materialType", getMaterialType()) |
|||
.append("materialPhotourl", getMaterialPhotourl()) |
|||
.append("materialBrand", getMaterialBrand()) |
|||
.append("materialUnit", getMaterialUnit()) |
|||
.append("materialDescribe", getMaterialDescribe()) |
|||
.append("materialProcessMethod", getMaterialProcessMethod()) |
|||
.append("shippedGoodsSum", getShippedGoodsSum()) |
|||
.append("materialSum", getMaterialSum()) |
|||
.append("enterpriseSum", getEnterpriseSum()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("remark", getRemark()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,62 @@ |
|||
package com.ruoyi.aftersales.domain.vo; |
|||
|
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AftersalesMaterialVO extends BaseEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 售后数量 */ |
|||
private String deliveryGoodsNum; |
|||
|
|||
/** 紧急程度 */ |
|||
private String emergencyDegree; |
|||
|
|||
/** 售后问题 */ |
|||
private String complaintProblem; |
|||
|
|||
/** 售后报告 */ |
|||
private String adverseReportUrl; |
|||
|
|||
/** SN号(产品序列号) */ |
|||
private String snCode; |
|||
|
|||
/** 料号 */ |
|||
@Excel(name = "料号") |
|||
private String materialNo; |
|||
|
|||
/** 物料名称 */ |
|||
@Excel(name = "物料名称") |
|||
private String materialName; |
|||
|
|||
/** 物料类型 */ |
|||
@Excel(name = "物料类型") |
|||
private String materialType; |
|||
|
|||
/** 物料图片地址 */ |
|||
@Excel(name = "物料图片地址") |
|||
private String materialPhotourl; |
|||
|
|||
/** 物料品牌 */ |
|||
@Excel(name = "物料品牌") |
|||
private String materialBrand; |
|||
|
|||
/** 物料单位 */ |
|||
@Excel(name = "物料单位") |
|||
private String materialUnit; |
|||
|
|||
/** 物料描述 */ |
|||
@Excel(name = "物料描述") |
|||
private String materialDescribe; |
|||
|
|||
/** 物料加工方式 */ |
|||
@Excel(name = "物料加工方式") |
|||
private String materialProcessMethod; |
|||
|
|||
/** 已出库数量 */ |
|||
@Excel(name = "已出库数量") |
|||
private String shippedGoodsSum; |
|||
} |
@ -0,0 +1,88 @@ |
|||
package com.ruoyi.aftersales.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.aftersales.domain.AftersalesComplaintNoticeDetail; |
|||
import io.lettuce.core.dynamic.annotation.Param; |
|||
|
|||
/** |
|||
* 售后客诉通知单详情Mapper接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-25 |
|||
*/ |
|||
public interface AftersalesComplaintNoticeDetailMapper |
|||
{ |
|||
/** |
|||
* 查询售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 售后客诉通知单详情 |
|||
*/ |
|||
public AftersalesComplaintNoticeDetail selectAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId); |
|||
|
|||
/** |
|||
* 查询售后客诉通知单详情列表 |
|||
* |
|||
* @param aftersalesComplaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 售后客诉通知单详情集合 |
|||
*/ |
|||
public List<AftersalesComplaintNoticeDetail> selectAftersalesComplaintNoticeDetailList(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail); |
|||
|
|||
|
|||
|
|||
public List<AftersalesComplaintNoticeDetail> selectComplaintNoticeDetailListByMakeNo(String makeNo); |
|||
|
|||
/** |
|||
* 新增售后客诉通知单详情 |
|||
* |
|||
* @param aftersalesComplaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertAftersalesComplaintNoticeDetail(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail); |
|||
|
|||
/** |
|||
* 修改售后客诉通知单详情 |
|||
* |
|||
* @param aftersalesComplaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateAftersalesComplaintNoticeDetail(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail); |
|||
|
|||
/** |
|||
* 删除售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId); |
|||
|
|||
/** |
|||
* 批量删除售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetailIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteAftersalesComplaintNoticeDetailByIds(String[] complaintNoticeDetailIds); |
|||
|
|||
/** |
|||
* 作废售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId); |
|||
|
|||
/** |
|||
* 恢复售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId); |
|||
|
|||
/** |
|||
* 获取今天已经生成的最大序号 |
|||
* @return 最大序号 |
|||
*/ |
|||
String maxRoundCode(@Param("code") String code); |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.ruoyi.aftersales.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.aftersales.domain.AftersalesComplaintNoticeDetail; |
|||
|
|||
/** |
|||
* 售后客诉通知单详情Service接口 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-25 |
|||
*/ |
|||
public interface IAftersalesComplaintNoticeDetailService |
|||
{ |
|||
/** |
|||
* 查询售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 售后客诉通知单详情 |
|||
*/ |
|||
public AftersalesComplaintNoticeDetail selectAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId); |
|||
|
|||
/** |
|||
* 查询售后客诉通知单详情列表 |
|||
* |
|||
* @param aftersalesComplaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 售后客诉通知单详情集合 |
|||
*/ |
|||
public List<AftersalesComplaintNoticeDetail> selectAftersalesComplaintNoticeDetailList(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail); |
|||
|
|||
/** |
|||
* 新增售后客诉通知单详情 |
|||
* |
|||
* @param aftersalesComplaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertAftersalesComplaintNoticeDetail(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail); |
|||
|
|||
/** |
|||
* 修改售后客诉通知单详情 |
|||
* |
|||
* @param aftersalesComplaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateAftersalesComplaintNoticeDetail(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail); |
|||
|
|||
/** |
|||
* 批量删除售后客诉通知单详情 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteAftersalesComplaintNoticeDetailByIds(String ids); |
|||
|
|||
/** |
|||
* 删除售后客诉通知单详情信息 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId); |
|||
|
|||
/** |
|||
* 作废售后客诉通知单详情 |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return |
|||
*/ |
|||
int cancelAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId); |
|||
|
|||
/** |
|||
* 恢复售后客诉通知单详情 |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return |
|||
*/ |
|||
int restoreAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId); |
|||
} |
@ -0,0 +1,172 @@ |
|||
package com.ruoyi.aftersales.service.impl; |
|||
|
|||
import java.text.DecimalFormat; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import com.ruoyi.common.utils.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.aftersales.mapper.AftersalesComplaintNoticeDetailMapper; |
|||
import com.ruoyi.aftersales.domain.AftersalesComplaintNoticeDetail; |
|||
import com.ruoyi.aftersales.service.IAftersalesComplaintNoticeDetailService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
/** |
|||
* 售后客诉通知单详情Service业务层处理 |
|||
* |
|||
* @author 刘晓旭 |
|||
* @date 2024-04-25 |
|||
*/ |
|||
@Service |
|||
public class AftersalesComplaintNoticeDetailServiceImpl implements IAftersalesComplaintNoticeDetailService |
|||
{ |
|||
@Autowired |
|||
private AftersalesComplaintNoticeDetailMapper aftersalesComplaintNoticeDetailMapper; |
|||
|
|||
/** |
|||
* 查询售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 售后客诉通知单详情 |
|||
*/ |
|||
@Override |
|||
public AftersalesComplaintNoticeDetail selectAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId) |
|||
{ |
|||
return aftersalesComplaintNoticeDetailMapper.selectAftersalesComplaintNoticeDetailById(complaintNoticeDetailId); |
|||
} |
|||
|
|||
/** |
|||
* 查询售后客诉通知单详情列表 |
|||
* |
|||
* @param aftersalesComplaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 售后客诉通知单详情 |
|||
*/ |
|||
@Override |
|||
public List<AftersalesComplaintNoticeDetail> selectAftersalesComplaintNoticeDetailList(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail) |
|||
{ |
|||
return aftersalesComplaintNoticeDetailMapper.selectAftersalesComplaintNoticeDetailList(aftersalesComplaintNoticeDetail); |
|||
} |
|||
|
|||
/** |
|||
* 新增售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 结果 |
|||
*/ |
|||
@Transactional |
|||
@Override |
|||
public int insertAftersalesComplaintNoticeDetail(AftersalesComplaintNoticeDetail complaintNoticeDetail) |
|||
{ |
|||
|
|||
SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd"); |
|||
String code = "KS"+df.format(new Date()); |
|||
//模糊查询当前最大的编码
|
|||
String maxCode = aftersalesComplaintNoticeDetailMapper.maxRoundCode(code); |
|||
String newCode = null; |
|||
if (StringUtils.isEmpty(maxCode)){ |
|||
newCode= code+"001"; |
|||
}else { |
|||
//切割字符串,取查到编号后三位
|
|||
String getMaxCode = maxCode.substring(11, 13); |
|||
newCode = code+getNum(getMaxCode); |
|||
} |
|||
// 生成complaintNoticeCode
|
|||
complaintNoticeDetail.setComplaintNoticeCode(newCode); |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
complaintNoticeDetail.setCreateBy(loginName); |
|||
complaintNoticeDetail.setCreateTime(DateUtils.getNowDate()); |
|||
return aftersalesComplaintNoticeDetailMapper.insertAftersalesComplaintNoticeDetail(complaintNoticeDetail); |
|||
} |
|||
|
|||
/** |
|||
* 修改售后客诉通知单详情 |
|||
* |
|||
* @param aftersalesComplaintNoticeDetail 售后客诉通知单详情 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateAftersalesComplaintNoticeDetail(AftersalesComplaintNoticeDetail aftersalesComplaintNoticeDetail) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
aftersalesComplaintNoticeDetail.setUpdateBy(loginName); |
|||
aftersalesComplaintNoticeDetail.setUpdateTime(DateUtils.getNowDate()); |
|||
return aftersalesComplaintNoticeDetailMapper.updateAftersalesComplaintNoticeDetail(aftersalesComplaintNoticeDetail); |
|||
} |
|||
|
|||
/** |
|||
* 删除售后客诉通知单详情对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteAftersalesComplaintNoticeDetailByIds(String ids) |
|||
{ |
|||
return aftersalesComplaintNoticeDetailMapper.deleteAftersalesComplaintNoticeDetailByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除售后客诉通知单详情信息 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId) |
|||
{ |
|||
return aftersalesComplaintNoticeDetailMapper.deleteAftersalesComplaintNoticeDetailById(complaintNoticeDetailId); |
|||
} |
|||
|
|||
/** |
|||
* 作废售后客诉通知单详情 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId) |
|||
{ |
|||
return aftersalesComplaintNoticeDetailMapper.cancelAftersalesComplaintNoticeDetailById(complaintNoticeDetailId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复售后客诉通知单详情信息 |
|||
* |
|||
* @param complaintNoticeDetailId 售后客诉通知单详情ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreAftersalesComplaintNoticeDetailById(Long complaintNoticeDetailId) |
|||
{ |
|||
return aftersalesComplaintNoticeDetailMapper.restoreAftersalesComplaintNoticeDetailById(complaintNoticeDetailId); |
|||
} |
|||
|
|||
|
|||
/** |
|||
*客诉单号生成规则: |
|||
*系统自动生成,按照特定编码,编码暂用【KS+年月日+001】, |
|||
*自增长,如:KS20231111001,KS20231111002 |
|||
* |
|||
* @param code 当前最大编码 |
|||
*/ |
|||
public static String getNum(String code){ |
|||
String roundCode="001"; |
|||
if (code!=null && !code.isEmpty()){ |
|||
int intCode= Integer.parseInt(code)+1; |
|||
if (intCode <999){ |
|||
roundCode =String.format(String.valueOf(intCode)); |
|||
}else { |
|||
throw new RuntimeException("当日编号达到最大"); |
|||
} |
|||
} |
|||
|
|||
//编号前面补0
|
|||
DecimalFormat df = new DecimalFormat("000"); |
|||
String newCode = df.format(Integer.parseInt(roundCode)); |
|||
return newCode; |
|||
} |
|||
} |
@ -0,0 +1,215 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.aftersales.mapper.AftersalesComplaintNoticeDetailMapper"> |
|||
|
|||
<resultMap type="AftersalesComplaintNoticeDetail" id="AftersalesComplaintNoticeDetailResult"> |
|||
<result property="complaintNoticeDetailId" column="complaint_notice_detail_id" /> |
|||
<result property="complaintNoticeCode" column="complaint_notice_code" /> |
|||
<result property="makeNo" column="make_no" /> |
|||
<result property="userId" column="user_id" /> |
|||
<result property="deliveryGoodsNum" column="delivery_goods_num" /> |
|||
<result property="emergencyDegree" column="emergency_degree" /> |
|||
<result property="complaintProblem" column="complaint_problem" /> |
|||
<result property="closingProcedures" column="closing_procedures" /> |
|||
<result property="adverseReportUrl" column="adverse_report_url" /> |
|||
<result property="customerId" column="customer_id" /> |
|||
<result property="customerName" column="customer_name" /> |
|||
<result property="deviceModelCode" column="device_model_code" /> |
|||
<result property="deviceModelName" column="device_model_name" /> |
|||
<result property="snCode" column="sn_code" /> |
|||
<result property="deviceRunningNumber" column="device_running_number" /> |
|||
<result property="materialNo" column="material_no" /> |
|||
<result property="materialName" column="material_name" /> |
|||
<result property="materialType" column="material_type" /> |
|||
<result property="materialPhotourl" column="material_photoUrl" /> |
|||
<result property="materialBrand" column="material_brand" /> |
|||
<result property="materialUnit" column="material_unit" /> |
|||
<result property="materialDescribe" column="material_describe" /> |
|||
<result property="materialProcessMethod" column="material_process_method" /> |
|||
<result property="shippedGoodsSum" column="shipped_goods_sum" /> |
|||
<result property="materialSum" column="material_sum" /> |
|||
<result property="enterpriseSum" column="enterprise_sum" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="remark" column="remark" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectAftersalesComplaintNoticeDetailVo"> |
|||
select complaint_notice_detail_id, complaint_notice_code, make_no, user_id, delivery_goods_num, emergency_degree, complaint_problem, closing_procedures, adverse_report_url, customer_id, customer_name, device_model_code, device_model_name, sn_code, device_running_number, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, shipped_goods_sum, material_sum, enterprise_sum, create_by, create_time, update_by, update_time, remark from aftersales_complaint_notice_detail |
|||
</sql> |
|||
|
|||
<select id="selectAftersalesComplaintNoticeDetailList" parameterType="AftersalesComplaintNoticeDetail" |
|||
resultMap="AftersalesComplaintNoticeDetailResult"> |
|||
select acnd.complaint_notice_detail_id, |
|||
acnd.complaint_notice_code, |
|||
acnd.make_no, |
|||
acnd.user_id, |
|||
acnd.delivery_goods_num, |
|||
acnd.emergency_degree, |
|||
acnd.complaint_problem, |
|||
acnd.closing_procedures, |
|||
acnd.adverse_report_url, |
|||
acnd.customer_id, |
|||
acnd.customer_name, |
|||
acnd.device_model_code, |
|||
acnd.device_model_name, |
|||
acnd.sn_code, |
|||
acnd.device_running_number, |
|||
acnd.material_no, |
|||
acnd.material_name, |
|||
acnd.material_type, |
|||
acnd.material_photoUrl, |
|||
acnd.material_brand, |
|||
acnd.material_unit, |
|||
acnd.material_describe, |
|||
acnd.material_process_method, |
|||
acnd.shipped_goods_sum, |
|||
acnd.material_sum, |
|||
acnd.enterprise_sum, |
|||
acnd.create_by, |
|||
acnd.create_time, |
|||
acnd.update_by, |
|||
acnd.update_time, |
|||
acnd.remark |
|||
from aftersales_complaint_notice_detail acnd |
|||
left join sys_makeorder_bom smb on smb.make_no = acnd.make_no |
|||
</select> |
|||
|
|||
<select id="selectAftersalesComplaintNoticeDetailById" parameterType="Long" resultMap="AftersalesComplaintNoticeDetailResult"> |
|||
<include refid="selectAftersalesComplaintNoticeDetailVo"/> |
|||
where complaint_notice_detail_id = #{complaintNoticeDetailId} |
|||
</select> |
|||
|
|||
<insert id="insertAftersalesComplaintNoticeDetail" parameterType="AftersalesComplaintNoticeDetail" useGeneratedKeys="true" keyProperty="complaintNoticeDetailId"> |
|||
insert into aftersales_complaint_notice_detail |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="complaintNoticeCode != null">complaint_notice_code,</if> |
|||
<if test="makeNo != null">make_no,</if> |
|||
<if test="userId != null">user_id,</if> |
|||
<if test="deliveryGoodsNum != null">delivery_goods_num,</if> |
|||
<if test="emergencyDegree != null">emergency_degree,</if> |
|||
<if test="complaintProblem != null">complaint_problem,</if> |
|||
<if test="closingProcedures != null">closing_procedures,</if> |
|||
<if test="adverseReportUrl != null">adverse_report_url,</if> |
|||
<if test="customerId != null">customer_id,</if> |
|||
<if test="customerName != null">customer_name,</if> |
|||
<if test="deviceModelCode != null">device_model_code,</if> |
|||
<if test="deviceModelName != null">device_model_name,</if> |
|||
<if test="snCode != null">sn_code,</if> |
|||
<if test="deviceRunningNumber != null">device_running_number,</if> |
|||
<if test="materialNo != null">material_no,</if> |
|||
<if test="materialName != null">material_name,</if> |
|||
<if test="materialType != null">material_type,</if> |
|||
<if test="materialPhotourl != null">material_photoUrl,</if> |
|||
<if test="materialBrand != null">material_brand,</if> |
|||
<if test="materialUnit != null">material_unit,</if> |
|||
<if test="materialDescribe != null">material_describe,</if> |
|||
<if test="materialProcessMethod != null">material_process_method,</if> |
|||
<if test="shippedGoodsSum != null">shipped_goods_sum,</if> |
|||
<if test="materialSum != null">material_sum,</if> |
|||
<if test="enterpriseSum != null">enterprise_sum,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
<if test="remark != null">remark,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="complaintNoticeCode != null">#{complaintNoticeCode},</if> |
|||
<if test="makeNo != null">#{makeNo},</if> |
|||
<if test="userId != null">#{userId},</if> |
|||
<if test="deliveryGoodsNum != null">#{deliveryGoodsNum},</if> |
|||
<if test="emergencyDegree != null">#{emergencyDegree},</if> |
|||
<if test="complaintProblem != null">#{complaintProblem},</if> |
|||
<if test="closingProcedures != null">#{closingProcedures},</if> |
|||
<if test="adverseReportUrl != null">#{adverseReportUrl},</if> |
|||
<if test="customerId != null">#{customerId},</if> |
|||
<if test="customerName != null">#{customerName},</if> |
|||
<if test="deviceModelCode != null">#{deviceModelCode},</if> |
|||
<if test="deviceModelName != null">#{deviceModelName},</if> |
|||
<if test="snCode != null">#{snCode},</if> |
|||
<if test="deviceRunningNumber != null">#{deviceRunningNumber},</if> |
|||
<if test="materialNo != null">#{materialNo},</if> |
|||
<if test="materialName != null">#{materialName},</if> |
|||
<if test="materialType != null">#{materialType},</if> |
|||
<if test="materialPhotourl != null">#{materialPhotourl},</if> |
|||
<if test="materialBrand != null">#{materialBrand},</if> |
|||
<if test="materialUnit != null">#{materialUnit},</if> |
|||
<if test="materialDescribe != null">#{materialDescribe},</if> |
|||
<if test="materialProcessMethod != null">#{materialProcessMethod},</if> |
|||
<if test="shippedGoodsSum != null">#{shippedGoodsSum},</if> |
|||
<if test="materialSum != null">#{materialSum},</if> |
|||
<if test="enterpriseSum != null">#{enterpriseSum},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
<if test="remark != null">#{remark},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateAftersalesComplaintNoticeDetail" parameterType="AftersalesComplaintNoticeDetail"> |
|||
update aftersales_complaint_notice_detail |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="complaintNoticeCode != null">complaint_notice_code = #{complaintNoticeCode},</if> |
|||
<if test="makeNo != null">make_no = #{makeNo},</if> |
|||
<if test="userId != null">user_id = #{userId},</if> |
|||
<if test="deliveryGoodsNum != null">delivery_goods_num = #{deliveryGoodsNum},</if> |
|||
<if test="emergencyDegree != null">emergency_degree = #{emergencyDegree},</if> |
|||
<if test="complaintProblem != null">complaint_problem = #{complaintProblem},</if> |
|||
<if test="closingProcedures != null">closing_procedures = #{closingProcedures},</if> |
|||
<if test="adverseReportUrl != null">adverse_report_url = #{adverseReportUrl},</if> |
|||
<if test="customerId != null">customer_id = #{customerId},</if> |
|||
<if test="customerName != null">customer_name = #{customerName},</if> |
|||
<if test="deviceModelCode != null">device_model_code = #{deviceModelCode},</if> |
|||
<if test="deviceModelName != null">device_model_name = #{deviceModelName},</if> |
|||
<if test="snCode != null">sn_code = #{snCode},</if> |
|||
<if test="deviceRunningNumber != null">device_running_number = #{deviceRunningNumber},</if> |
|||
<if test="materialNo != null">material_no = #{materialNo},</if> |
|||
<if test="materialName != null">material_name = #{materialName},</if> |
|||
<if test="materialType != null">material_type = #{materialType},</if> |
|||
<if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl},</if> |
|||
<if test="materialBrand != null">material_brand = #{materialBrand},</if> |
|||
<if test="materialUnit != null">material_unit = #{materialUnit},</if> |
|||
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if> |
|||
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if> |
|||
<if test="shippedGoodsSum != null">shipped_goods_sum = #{shippedGoodsSum},</if> |
|||
<if test="materialSum != null">material_sum = #{materialSum},</if> |
|||
<if test="enterpriseSum != null">enterprise_sum = #{enterpriseSum},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
</trim> |
|||
where complaint_notice_detail_id = #{complaintNoticeDetailId} |
|||
</update> |
|||
|
|||
<delete id="deleteAftersalesComplaintNoticeDetailById" parameterType="Long"> |
|||
delete from aftersales_complaint_notice_detail where complaint_notice_detail_id = #{complaintNoticeDetailId} |
|||
</delete> |
|||
|
|||
<delete id="deleteAftersalesComplaintNoticeDetailByIds" parameterType="String"> |
|||
delete from aftersales_complaint_notice_detail where complaint_notice_detail_id in |
|||
<foreach item="complaintNoticeDetailId" collection="array" open="(" separator="," close=")"> |
|||
#{complaintNoticeDetailId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelAftersalesComplaintNoticeDetailById" parameterType="Long"> |
|||
update aftersales_complaint_notice_detail set del_flag = '1' where complaint_notice_detail_id = #{complaintNoticeDetailId} |
|||
</update> |
|||
|
|||
<update id="restoreAftersalesComplaintNoticeDetailById" parameterType="Long"> |
|||
update aftersales_complaint_notice_detail set del_flag = '0' where complaint_notice_detail_id = #{complaintNoticeDetailId} |
|||
</update> |
|||
|
|||
<!--获得最大的编码--> |
|||
<select id="maxRoundCode" resultType="String"> |
|||
SELECT max(complaint_notice_code) from aftersales_complaint_notice_detail where complaint_notice_code like concat(#{code},'%') |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,82 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org"> |
|||
<head> |
|||
<th:block th:include="include :: header('选择物料信息列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-materialSelect-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "aftersales/complaintNotice"; |
|||
// 从后端拿到传入的makeNo |
|||
var makeNo = /*[[${makeNo}]]*/ ''; |
|||
$(function() { |
|||
var options = { |
|||
id: 'bootstrap-materialSelect-table', |
|||
clickToSelect: true, // 点击选中行 |
|||
singleSelect: true, // 单选 |
|||
url: prefix + "/getMaterialInfoByMakeNo", |
|||
queryParams:queryParams, |
|||
modalName: "物料信息", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '料号', |
|||
field: 'materialNo', |
|||
}, |
|||
{ |
|||
title: '图片', |
|||
field: 'materialPhotourl', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
title: '类型', |
|||
field: 'materialType', |
|||
}, |
|||
{ |
|||
title: '描述', |
|||
field: 'materialDescribe', |
|||
}, |
|||
{ |
|||
title: '品牌', |
|||
field: 'materialBrand', |
|||
}, |
|||
{ |
|||
title: '单位', |
|||
field: 'materialUnit', |
|||
}, |
|||
{ |
|||
title: '加工方式', |
|||
field: 'materialProcessMethod', |
|||
}, |
|||
|
|||
{ |
|||
title: '出库数量', |
|||
field: 'shippedGoodsSum', |
|||
}, |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
|
|||
}); |
|||
|
|||
function queryParams(params) { |
|||
var curParams = { |
|||
// 现在使用从Thymeleaf传过来的makeNo |
|||
makeNo: makeNo |
|||
}; |
|||
return curParams; |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue