Browse Source

[feat] 售后管理

新增生产订单添加退拣管理自动生成售后退拣管理方法
新增售后退拣管理后端接口方法
新增根据物料退检编号查询物料退检单后端接口方法
新增条件判断:添加退检管理的时候添加条件判断,如果已经结案不允许上传复检报告
dev
liuxiaoxu 4 months ago
parent
commit
43f4ee563f
  1. 5
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialReturnInspectionMapper.java
  2. 5
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityReturnInspectionServiceImpl.java
  3. 5
      ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialReturnInspectionMapper.xml
  4. 15
      ruoyi-admin/src/main/resources/templates/quality/returnInspection/returnInspectionProcessing.html

5
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialReturnInspectionMapper.java

@ -77,4 +77,9 @@ public interface ErpMaterialReturnInspectionMapper
public int restoreErpMaterialReturnInspectionById(Long id);
List<ErpMaterialReturnInspectionExcelDto> selectExportList(ErpMaterialReturnInspection erpMaterialReturnInspection);
/**
* 根据物料退检编号查询物料退检单
* */
ErpMaterialReturnInspection selectErpMaterialReturnInspectionByNo(String returnInspectionNo);
}

5
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityReturnInspectionServiceImpl.java

@ -181,7 +181,10 @@ public class QualityReturnInspectionServiceImpl implements IQualityReturnInspect
String loginName = ShiroUtils.getLoginName();
erpMaterialReturnInspection.setUpdateBy(loginName);
erpMaterialReturnInspection.setUpdateTime(DateUtils.getNowDate());
if (erpMaterialReturnInspection.getIsClosed().equals("1")){
ErpMaterialReturnInspection tempReturnInspection = erpMaterialReturnInspectionMapper.selectErpMaterialReturnInspectionByNo(returnInspectionNo);
if (tempReturnInspection.getIsClosed().equals("1")){
throw new BusinessException("已经结案,不可以再上传复检");
}
int updateFlag = erpMaterialReturnInspectionMapper.updateErpMaterialReturnInspection(erpMaterialReturnInspection);

5
ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialReturnInspectionMapper.xml

@ -109,6 +109,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectErpMaterialReturnInspectionByNo" parameterType="String" resultMap="ErpMaterialReturnInspectionResult">
<include refid="selectErpMaterialReturnInspectionVo"/>
where a.return_inspection_no = #{returnInspectionNo}
</select>
<insert id="insertErpMaterialReturnInspection" parameterType="ErpMaterialReturnInspection" useGeneratedKeys="true" keyProperty="id">
insert into erp_material_return_inspection
<trim prefix="(" suffix=")" suffixOverrides=",">

15
ruoyi-admin/src/main/resources/templates/quality/returnInspection/returnInspectionProcessing.html

@ -221,6 +221,7 @@
field: 'urgencyLevel',
align: 'center',
title: '紧急程度',
width: 100, // 设置列宽为150像素
formatter: function (value,row,index){
var curIndex = index;
var data = [{ index: curIndex, type: value }];
@ -260,20 +261,24 @@
field: 'dutyUnit',
align: 'center',
title: '责任单位',
formatter: function (value,row,index){
formatter: function (value, row, index) {
var curIndex = index;
return '<input class = "form-control" data-id = "dutyUnit_'+curIndex+'" name="inspectionDetails['+curIndex+'].dutyUnit" value="'+value+'">';
// 如果 value 为空,则设置为空字符串
value = value || "";
return '<input class="form-control" data-id="dutyUnit_' + curIndex + '" name="inspectionDetails[' + curIndex + '].dutyUnit" value="' + value + '">';
}
},
{
field: 'recheckRemark',
align: 'center',
title: '复检备注',
formatter: function (value,row,index){
formatter: function (value, row, index) {
var curIndex = index;
return '<input class = "form-control" data-id = "recheckRemark_'+curIndex+'" name="inspectionDetails['+curIndex+'].recheckRemark" value="'+value+'">';
// 如果 value 为空,则设置为空字符串
value = value || "";
return '<input class="form-control" data-id="recheckRemark_' + curIndex + '" name="inspectionDetails[' + curIndex + '].recheckRemark" value="' + value + '">';
}
},
}
]
};
$.table.init(options);

Loading…
Cancel
Save