Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
zhangsiqi 5 months ago
parent
commit
0957af0935
  1. 151
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesComplaintNoticeController.java
  2. 204
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AftersalesComplaintNotice.java
  3. 77
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesComplaintNoticeMapper.java
  4. 75
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesComplaintNoticeService.java
  5. 126
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesComplaintNoticeServiceImpl.java
  6. 135
      ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesComplaintNoticeMapper.xml
  7. 107
      ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/add.html
  8. 167
      ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/complaintNotice.html
  9. 108
      ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/edit.html

151
ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesComplaintNoticeController.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.AftersalesComplaintNotice;
import com.ruoyi.aftersales.service.IAftersalesComplaintNoticeService;
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/complaintNotice")
public class AftersalesComplaintNoticeController extends BaseController
{
private String prefix = "aftersales/complaintNotice";
@Autowired
private IAftersalesComplaintNoticeService aftersalesComplaintNoticeService;
@RequiresPermissions("aftersales:complaintNotice:view")
@GetMapping()
public String complaintNotice()
{
return prefix + "/complaintNotice";
}
/**
* 查询售后客诉通知单列表
*/
@RequiresPermissions("aftersales:complaintNotice:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(AftersalesComplaintNotice aftersalesComplaintNotice)
{
startPage();
List<AftersalesComplaintNotice> list = aftersalesComplaintNoticeService.selectAftersalesComplaintNoticeList(aftersalesComplaintNotice);
return getDataTable(list);
}
/**
* 导出售后客诉通知单列表
*/
@RequiresPermissions("aftersales:complaintNotice:export")
@Log(title = "售后客诉通知单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(AftersalesComplaintNotice aftersalesComplaintNotice)
{
List<AftersalesComplaintNotice> list = aftersalesComplaintNoticeService.selectAftersalesComplaintNoticeList(aftersalesComplaintNotice);
ExcelUtil<AftersalesComplaintNotice> util = new ExcelUtil<AftersalesComplaintNotice>(AftersalesComplaintNotice.class);
return util.exportExcel(list, "售后客诉通知单数据");
}
/**
* 新增售后客诉通知单
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存售后客诉通知单
*/
@RequiresPermissions("aftersales:complaintNotice:add")
@Log(title = "售后客诉通知单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(AftersalesComplaintNotice aftersalesComplaintNotice)
{
return toAjax(aftersalesComplaintNoticeService.insertAftersalesComplaintNotice(aftersalesComplaintNotice));
}
/**
* 修改售后客诉通知单
*/
@GetMapping("/edit/{complaintNoticeId}")
public String edit(@PathVariable("complaintNoticeId") Long complaintNoticeId, ModelMap mmap)
{
AftersalesComplaintNotice aftersalesComplaintNotice = aftersalesComplaintNoticeService.selectAftersalesComplaintNoticeById(complaintNoticeId);
mmap.put("aftersalesComplaintNotice", aftersalesComplaintNotice);
return prefix + "/edit";
}
/**
* 修改保存售后客诉通知单
*/
@RequiresPermissions("aftersales:complaintNotice:edit")
@Log(title = "售后客诉通知单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(AftersalesComplaintNotice aftersalesComplaintNotice)
{
return toAjax(aftersalesComplaintNoticeService.updateAftersalesComplaintNotice(aftersalesComplaintNotice));
}
/**
* 删除售后客诉通知单
*/
@RequiresPermissions("aftersales:complaintNotice:remove")
@Log(title = "售后客诉通知单", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(aftersalesComplaintNoticeService.deleteAftersalesComplaintNoticeByIds(ids));
}
/**
* 作废售后客诉通知单
*/
@RequiresPermissions("aftersales:complaintNotice:cancel")
@Log(title = "售后客诉通知单", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(aftersalesComplaintNoticeService.cancelAftersalesComplaintNoticeById(id));
}
/**
* 恢复售后客诉通知单
*/
@RequiresPermissions("aftersales:complaintNotice:restore")
@Log(title = "售后客诉通知单", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(aftersalesComplaintNoticeService.restoreAftersalesComplaintNoticeById(id));
}
}

204
ruoyi-admin/src/main/java/com/ruoyi/aftersales/domain/AftersalesComplaintNotice.java

@ -0,0 +1,204 @@
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
*
* @author 刘晓旭
* @date 2024-04-25
*/
public class AftersalesComplaintNotice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 客诉通知ID */
private Long complaintNoticeId;
/** 客诉单号 */
@Excel(name = "客诉单号")
private String complaintNoticeCode;
/** 关联生产单号 */
@Excel(name = "关联生产单号")
private String makeNo;
/** 用户ID */
private Long userId;
/** 紧急程度 */
@Excel(name = "紧急程度")
private String emergencyDegree;
/** 是否结案 */
@Excel(name = "是否结案")
private String closingProcedures;
/** 客户ID */
private String customerId;
/** 客户名称 */
private String customerName;
/** 料号 */
private String materialNo;
/** 物料名称 */
private String materialName;
/** 物料合计 */
@Excel(name = "物料合计")
private String materialSum;
/** 数量合计 */
@Excel(name = "数量合计")
private String enterpriseSum;
/** 交货数量 */
private String deliveryGoodsNum;
public void setComplaintNoticeId(Long complaintNoticeId)
{
this.complaintNoticeId = complaintNoticeId;
}
public Long getComplaintNoticeId()
{
return complaintNoticeId;
}
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 setEmergencyDegree(String emergencyDegree)
{
this.emergencyDegree = emergencyDegree;
}
public String getEmergencyDegree()
{
return emergencyDegree;
}
public void setClosingProcedures(String closingProcedures)
{
this.closingProcedures = closingProcedures;
}
public String getClosingProcedures()
{
return closingProcedures;
}
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 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 setMaterialSum(String materialSum)
{
this.materialSum = materialSum;
}
public String getMaterialSum()
{
return materialSum;
}
public void setEnterpriseSum(String enterpriseSum)
{
this.enterpriseSum = enterpriseSum;
}
public String getEnterpriseSum()
{
return enterpriseSum;
}
public void setDeliveryGoodsNum(String deliveryGoodsNum)
{
this.deliveryGoodsNum = deliveryGoodsNum;
}
public String getDeliveryGoodsNum()
{
return deliveryGoodsNum;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("complaintNoticeId", getComplaintNoticeId())
.append("complaintNoticeCode", getComplaintNoticeCode())
.append("makeNo", getMakeNo())
.append("userId", getUserId())
.append("emergencyDegree", getEmergencyDegree())
.append("closingProcedures", getClosingProcedures())
.append("customerId", getCustomerId())
.append("customerName", getCustomerName())
.append("materialNo", getMaterialNo())
.append("materialName", getMaterialName())
.append("materialSum", getMaterialSum())
.append("enterpriseSum", getEnterpriseSum())
.append("deliveryGoodsNum", getDeliveryGoodsNum())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

77
ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesComplaintNoticeMapper.java

@ -0,0 +1,77 @@
package com.ruoyi.aftersales.mapper;
import java.util.List;
import com.ruoyi.aftersales.domain.AftersalesComplaintNotice;
/**
* 售后客诉通知单Mapper接口
*
* @author 刘晓旭
* @date 2024-04-25
*/
public interface AftersalesComplaintNoticeMapper
{
/**
* 查询售后客诉通知单
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 售后客诉通知单
*/
public AftersalesComplaintNotice selectAftersalesComplaintNoticeById(Long complaintNoticeId);
/**
* 查询售后客诉通知单列表
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 售后客诉通知单集合
*/
public List<AftersalesComplaintNotice> selectAftersalesComplaintNoticeList(AftersalesComplaintNotice aftersalesComplaintNotice);
/**
* 新增售后客诉通知单
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 结果
*/
public int insertAftersalesComplaintNotice(AftersalesComplaintNotice aftersalesComplaintNotice);
/**
* 修改售后客诉通知单
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 结果
*/
public int updateAftersalesComplaintNotice(AftersalesComplaintNotice aftersalesComplaintNotice);
/**
* 删除售后客诉通知单
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 结果
*/
public int deleteAftersalesComplaintNoticeById(Long complaintNoticeId);
/**
* 批量删除售后客诉通知单
*
* @param complaintNoticeIds 需要删除的数据ID
* @return 结果
*/
public int deleteAftersalesComplaintNoticeByIds(String[] complaintNoticeIds);
/**
* 作废售后客诉通知单
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 结果
*/
public int cancelAftersalesComplaintNoticeById(Long complaintNoticeId);
/**
* 恢复售后客诉通知单
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 结果
*/
public int restoreAftersalesComplaintNoticeById(Long complaintNoticeId);
}

75
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesComplaintNoticeService.java

@ -0,0 +1,75 @@
package com.ruoyi.aftersales.service;
import java.util.List;
import com.ruoyi.aftersales.domain.AftersalesComplaintNotice;
/**
* 售后客诉通知单Service接口
*
* @author 刘晓旭
* @date 2024-04-25
*/
public interface IAftersalesComplaintNoticeService
{
/**
* 查询售后客诉通知单
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 售后客诉通知单
*/
public AftersalesComplaintNotice selectAftersalesComplaintNoticeById(Long complaintNoticeId);
/**
* 查询售后客诉通知单列表
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 售后客诉通知单集合
*/
public List<AftersalesComplaintNotice> selectAftersalesComplaintNoticeList(AftersalesComplaintNotice aftersalesComplaintNotice);
/**
* 新增售后客诉通知单
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 结果
*/
public int insertAftersalesComplaintNotice(AftersalesComplaintNotice aftersalesComplaintNotice);
/**
* 修改售后客诉通知单
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 结果
*/
public int updateAftersalesComplaintNotice(AftersalesComplaintNotice aftersalesComplaintNotice);
/**
* 批量删除售后客诉通知单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteAftersalesComplaintNoticeByIds(String ids);
/**
* 删除售后客诉通知单信息
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 结果
*/
public int deleteAftersalesComplaintNoticeById(Long complaintNoticeId);
/**
* 作废售后客诉通知单
* @param complaintNoticeId 售后客诉通知单ID
* @return
*/
int cancelAftersalesComplaintNoticeById(Long complaintNoticeId);
/**
* 恢复售后客诉通知单
* @param complaintNoticeId 售后客诉通知单ID
* @return
*/
int restoreAftersalesComplaintNoticeById(Long complaintNoticeId);
}

126
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesComplaintNoticeServiceImpl.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.AftersalesComplaintNoticeMapper;
import com.ruoyi.aftersales.domain.AftersalesComplaintNotice;
import com.ruoyi.aftersales.service.IAftersalesComplaintNoticeService;
import com.ruoyi.common.core.text.Convert;
/**
* 售后客诉通知单Service业务层处理
*
* @author 刘晓旭
* @date 2024-04-25
*/
@Service
public class AftersalesComplaintNoticeServiceImpl implements IAftersalesComplaintNoticeService
{
@Autowired
private AftersalesComplaintNoticeMapper aftersalesComplaintNoticeMapper;
/**
* 查询售后客诉通知单
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 售后客诉通知单
*/
@Override
public AftersalesComplaintNotice selectAftersalesComplaintNoticeById(Long complaintNoticeId)
{
return aftersalesComplaintNoticeMapper.selectAftersalesComplaintNoticeById(complaintNoticeId);
}
/**
* 查询售后客诉通知单列表
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 售后客诉通知单
*/
@Override
public List<AftersalesComplaintNotice> selectAftersalesComplaintNoticeList(AftersalesComplaintNotice aftersalesComplaintNotice)
{
return aftersalesComplaintNoticeMapper.selectAftersalesComplaintNoticeList(aftersalesComplaintNotice);
}
/**
* 新增售后客诉通知单
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 结果
*/
@Override
public int insertAftersalesComplaintNotice(AftersalesComplaintNotice aftersalesComplaintNotice)
{
String loginName = ShiroUtils.getLoginName();
aftersalesComplaintNotice.setCreateBy(loginName);
aftersalesComplaintNotice.setCreateTime(DateUtils.getNowDate());
return aftersalesComplaintNoticeMapper.insertAftersalesComplaintNotice(aftersalesComplaintNotice);
}
/**
* 修改售后客诉通知单
*
* @param aftersalesComplaintNotice 售后客诉通知单
* @return 结果
*/
@Override
public int updateAftersalesComplaintNotice(AftersalesComplaintNotice aftersalesComplaintNotice)
{
String loginName = ShiroUtils.getLoginName();
aftersalesComplaintNotice.setUpdateBy(loginName);
aftersalesComplaintNotice.setUpdateTime(DateUtils.getNowDate());
return aftersalesComplaintNoticeMapper.updateAftersalesComplaintNotice(aftersalesComplaintNotice);
}
/**
* 删除售后客诉通知单对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteAftersalesComplaintNoticeByIds(String ids)
{
return aftersalesComplaintNoticeMapper.deleteAftersalesComplaintNoticeByIds(Convert.toStrArray(ids));
}
/**
* 删除售后客诉通知单信息
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 结果
*/
@Override
public int deleteAftersalesComplaintNoticeById(Long complaintNoticeId)
{
return aftersalesComplaintNoticeMapper.deleteAftersalesComplaintNoticeById(complaintNoticeId);
}
/**
* 作废售后客诉通知单
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 结果
*/
@Override
public int cancelAftersalesComplaintNoticeById(Long complaintNoticeId)
{
return aftersalesComplaintNoticeMapper.cancelAftersalesComplaintNoticeById(complaintNoticeId);
}
/**
* 恢复售后客诉通知单信息
*
* @param complaintNoticeId 售后客诉通知单ID
* @return 结果
*/
@Override
public int restoreAftersalesComplaintNoticeById(Long complaintNoticeId)
{
return aftersalesComplaintNoticeMapper.restoreAftersalesComplaintNoticeById(complaintNoticeId);
}
}

135
ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesComplaintNoticeMapper.xml

@ -0,0 +1,135 @@
<?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.AftersalesComplaintNoticeMapper">
<resultMap type="AftersalesComplaintNotice" id="AftersalesComplaintNoticeResult">
<result property="complaintNoticeId" column="complaint_notice_id" />
<result property="complaintNoticeCode" column="complaint_notice_code" />
<result property="makeNo" column="make_no" />
<result property="userId" column="user_id" />
<result property="emergencyDegree" column="emergency_degree" />
<result property="closingProcedures" column="closing_procedures" />
<result property="customerId" column="customer_id" />
<result property="customerName" column="customer_name" />
<result property="materialNo" column="material_no" />
<result property="materialName" column="material_name" />
<result property="materialSum" column="material_sum" />
<result property="enterpriseSum" column="enterprise_sum" />
<result property="deliveryGoodsNum" column="delivery_goods_num" />
<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="selectAftersalesComplaintNoticeVo">
select complaint_notice_id, complaint_notice_code, make_no, user_id, emergency_degree, closing_procedures, customer_id, customer_name, material_no, material_name, material_sum, enterprise_sum, delivery_goods_num, create_by, create_time, update_by, update_time, remark from aftersales_complaint_notice
</sql>
<select id="selectAftersalesComplaintNoticeList" parameterType="AftersalesComplaintNotice" resultMap="AftersalesComplaintNoticeResult">
<include refid="selectAftersalesComplaintNoticeVo"/>
<where>
<if test="complaintNoticeCode != null and complaintNoticeCode != ''"> and complaint_notice_code = #{complaintNoticeCode}</if>
<if test="makeNo != null and makeNo != ''"> and make_no = #{makeNo}</if>
<if test="emergencyDegree != null and emergencyDegree != ''"> and emergency_degree = #{emergencyDegree}</if>
<if test="closingProcedures != null and closingProcedures != ''"> and closing_procedures = #{closingProcedures}</if>
<if test="materialNo != null and materialNo != ''"> and material_no = #{materialNo}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
<select id="selectAftersalesComplaintNoticeById" parameterType="Long" resultMap="AftersalesComplaintNoticeResult">
<include refid="selectAftersalesComplaintNoticeVo"/>
where complaint_notice_id = #{complaintNoticeId}
</select>
<insert id="insertAftersalesComplaintNotice" parameterType="AftersalesComplaintNotice" useGeneratedKeys="true" keyProperty="complaintNoticeId">
insert into aftersales_complaint_notice
<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="emergencyDegree != null">emergency_degree,</if>
<if test="closingProcedures != null">closing_procedures,</if>
<if test="customerId != null">customer_id,</if>
<if test="customerName != null">customer_name,</if>
<if test="materialNo != null">material_no,</if>
<if test="materialName != null">material_name,</if>
<if test="materialSum != null">material_sum,</if>
<if test="enterpriseSum != null">enterprise_sum,</if>
<if test="deliveryGoodsNum != null">delivery_goods_num,</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="emergencyDegree != null">#{emergencyDegree},</if>
<if test="closingProcedures != null">#{closingProcedures},</if>
<if test="customerId != null">#{customerId},</if>
<if test="customerName != null">#{customerName},</if>
<if test="materialNo != null">#{materialNo},</if>
<if test="materialName != null">#{materialName},</if>
<if test="materialSum != null">#{materialSum},</if>
<if test="enterpriseSum != null">#{enterpriseSum},</if>
<if test="deliveryGoodsNum != null">#{deliveryGoodsNum},</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="updateAftersalesComplaintNotice" parameterType="AftersalesComplaintNotice">
update aftersales_complaint_notice
<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="emergencyDegree != null">emergency_degree = #{emergencyDegree},</if>
<if test="closingProcedures != null">closing_procedures = #{closingProcedures},</if>
<if test="customerId != null">customer_id = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="materialNo != null">material_no = #{materialNo},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialSum != null">material_sum = #{materialSum},</if>
<if test="enterpriseSum != null">enterprise_sum = #{enterpriseSum},</if>
<if test="deliveryGoodsNum != null">delivery_goods_num = #{deliveryGoodsNum},</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_id = #{complaintNoticeId}
</update>
<delete id="deleteAftersalesComplaintNoticeById" parameterType="Long">
delete from aftersales_complaint_notice where complaint_notice_id = #{complaintNoticeId}
</delete>
<delete id="deleteAftersalesComplaintNoticeByIds" parameterType="String">
delete from aftersales_complaint_notice where complaint_notice_id in
<foreach item="complaintNoticeId" collection="array" open="(" separator="," close=")">
#{complaintNoticeId}
</foreach>
</delete>
<update id="cancelAftersalesComplaintNoticeById" parameterType="Long">
update aftersales_complaint_notice set del_flag = '1' where complaint_notice_id = #{complaintNoticeId}
</update>
<update id="restoreAftersalesComplaintNoticeById" parameterType="Long">
update aftersales_complaint_notice set del_flag = '0' where complaint_notice_id = #{complaintNoticeId}
</update>
</mapper>

107
ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/add.html

@ -0,0 +1,107 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增售后客诉通知单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-complaintNotice-add">
<div class="form-group">
<label class="col-sm-3 control-label">客诉单号:</label>
<div class="col-sm-8">
<input name="complaintNoticeCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联生产单号:</label>
<div class="col-sm-8">
<input name="makeNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户ID:</label>
<div class="col-sm-8">
<input name="userId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">紧急程度:</label>
<div class="col-sm-8">
<select name="emergencyDegree" class="form-control m-b" th:with="type=${@dict.getType('aftersales_emergency_degree')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否结案:</label>
<div class="col-sm-8">
<select name="closingProcedures" class="form-control m-b" th:with="type=${@dict.getType('aftersales_closing_procedures')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8">
<input name="materialNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料合计:</label>
<div class="col-sm-8">
<input name="materialSum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">数量合计:</label>
<div class="col-sm-8">
<input name="enterpriseSum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货数量:</label>
<div class="col-sm-8">
<input name="deliveryGoodsNum" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input name="remark" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "aftersales/complaintNotice"
$("#form-complaintNotice-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-complaintNotice-add').serialize());
}
}
</script>
</body>
</html>

167
ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/complaintNotice.html

@ -0,0 +1,167 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('售后客诉通知单列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>客诉单号:</label>
<input type="text" name="complaintNoticeCode"/>
</li>
<li>
<label>是否结案:</label>
<select name="closingProcedures" th:with="type=${@dict.getType('aftersales_closing_procedures')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>紧急程度:</label>
<select name="emergencyDegree" th:with="type=${@dict.getType('aftersales_emergency_degree')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>生产单号:</label>
<input type="text" name="makeNo"/>
</li>
<li>
<label>料号:</label>
<input type="text" name="materialNo"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="aftersales:complaintNotice:add">
<i class="fa fa-plus"></i> 添加客诉通知
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="aftersales:complaintNotice:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('aftersales:complaintNotice:edit')}]];
var removeFlag = [[${@permission.hasPermi('aftersales:complaintNotice:remove')}]];
var cancelFlag = [[${@permission.hasPermi('aftersales:complaintNotice:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('aftersales:complaintNotice:restore')}]];
var emergencyDegreeDatas = [[${@dict.getType('aftersales_emergency_degree')}]];
var closingProceduresDatas = [[${@dict.getType('aftersales_closing_procedures')}]];
var prefix = ctx + "aftersales/complaintNotice";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "售后客诉通知单",
columns: [{
checkbox: true
},
{
title: '客诉通知ID',
field: 'complaintNoticeId',
visible: false
},
{
title: '客诉单号',
field: 'complaintNoticeCode',
},
{
title: '是否结案',
field: 'closingProcedures',
formatter: function(value, row, index) {
return $.table.selectDictLabel(closingProceduresDatas, value);
}
},
{
title: '关联生产单号',
field: 'makeNo',
},
{
title: '紧急程度',
field: 'emergencyDegree',
formatter: function(value, row, index) {
return $.table.selectDictLabel(emergencyDegreeDatas, value);
}
},
{
title: '物料合计',
field: 'materialSum',
},
{
title: '数量合计',
field: 'enterpriseSum',
},
{
title: '录入人',
field: 'createBy',
},
{
title: '录入时间',
field: 'createTime',
},
{
title: '更新人',
field: 'updateBy',
},
{
title: '上次更新时间',
field: 'updateTime',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.complaintNoticeId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.complaintNoticeId + '\')"><i class="fa fa-remove"></i>删除</a> ');
// if(row.delFlag == '0'){
// actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
// }else{
// actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
// }
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

108
ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/edit.html

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改售后客诉通知单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-complaintNotice-edit" th:object="${aftersalesComplaintNotice}">
<input name="complaintNoticeId" th:field="*{complaintNoticeId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">客诉单号:</label>
<div class="col-sm-8">
<input name="complaintNoticeCode" th:field="*{complaintNoticeCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联生产单号:</label>
<div class="col-sm-8">
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户ID:</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">紧急程度:</label>
<div class="col-sm-8">
<select name="emergencyDegree" class="form-control m-b" th:with="type=${@dict.getType('aftersales_emergency_degree')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{emergencyDegree}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否结案:</label>
<div class="col-sm-8">
<select name="closingProcedures" class="form-control m-b" th:with="type=${@dict.getType('aftersales_closing_procedures')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{closingProcedures}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="customerId" th:field="*{customerId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8">
<input name="materialNo" th:field="*{materialNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料合计:</label>
<div class="col-sm-8">
<input name="materialSum" th:field="*{materialSum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">数量合计:</label>
<div class="col-sm-8">
<input name="enterpriseSum" th:field="*{enterpriseSum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交货数量:</label>
<div class="col-sm-8">
<input name="deliveryGoodsNum" th:field="*{deliveryGoodsNum}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注信息:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "aftersales/complaintNotice";
$("#form-complaintNotice-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-complaintNotice-edit').serialize());
}
}
</script>
</body>
</html>
Loading…
Cancel
Save