Browse Source

[feat]

品质管理 入库前退换货
新增入库前品质报告详情页面controller接口;
新增入库前品质报告不合格数信息列表controller接口;
修改保存入库前退换货单-确认供应商-已有退换货controller接口;
新增退换货mapper、service根据退换货单号查找入库前详情方法;
新增退换货mapper、service根据退换货单号和料号查找入库前详情方法;
dev
王晓迪 3 months ago
parent
commit
6009d3a7d6
  1. 48
      ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java
  2. 8
      ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesOrderMapper.java
  3. 6
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesOrderService.java
  4. 11
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesOrderServiceImpl.java
  5. 11
      ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesOrderMapper.xml

48
ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java

@ -11,7 +11,9 @@ import com.ruoyi.erp.domain.ErpMaterialVo;
import com.ruoyi.erp.service.IErpMaterialService;
import com.ruoyi.quality.domain.*;
import com.ruoyi.quality.domain.VO.CheckoutMaterialVO;
import com.ruoyi.quality.mapper.QualityRefundsExchangesOrderMapper;
import com.ruoyi.quality.service.IQualityRefundsExchangesDetailService;
import com.ruoyi.quality.service.IQualityRefundsExchangesOrderService;
import com.ruoyi.quality.service.IQualityRefundsExchangesUnqualifiedService;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
@ -53,6 +55,8 @@ public class QualityRefundsExchangesController extends BaseController
@Autowired
private IQualityRefundsExchangesDetailService refundsExchangesDetailService;
@Autowired
private IQualityRefundsExchangesOrderService refundsExchangesOrderService;
@RequiresPermissions("quality:refundsExchanges:view")
@GetMapping()
public String refundsExchanges()
@ -306,6 +310,31 @@ public class QualityRefundsExchangesController extends BaseController
return prefix + "/afterQualityReportDetail";
}
/**
* 入库前品质报告详情页面
*/
@GetMapping("/beforeQualityReportDetail")
public String beforeQualityReportDetail( @RequestParam("materialNo") String materialNo,
@RequestParam("refundsExchangesCode") String refundsExchangesCode, ModelMap mmap)
{
if (StringUtils.isEmpty(materialNo)){
log.warn("物料号为空:{}",materialNo);
}
if (StringUtils.isEmpty(refundsExchangesCode)){
log.warn("退换货号为空:{}",refundsExchangesCode);
}
QualityRefundsExchangesOrder refundsExchangesOrder = new QualityRefundsExchangesOrder();
refundsExchangesOrder.setRefundsExchangesCode(refundsExchangesCode);
refundsExchangesOrder.setMaterialNo(materialNo);
QualityRefundsExchangesOrder qualityRefundsExchangesOrder = refundsExchangesOrderService.selectQualityRefundsExchangesOrderByCodeAndNo(refundsExchangesOrder);
mmap.put("materialNo",materialNo);
mmap.put("refundsExchangesCode",refundsExchangesCode);
mmap.put("qualityRefundsExchangesOrder",qualityRefundsExchangesOrder);
return prefix + "/beforeQualityReportDetail";
}
/**
* 保存入库后品质单报告不合格数详情页
*/
@ -316,7 +345,6 @@ public class QualityRefundsExchangesController extends BaseController
{
return toAjax(refundsExchangesDetailService.saveAfterQualityRefundsExchangesDetail(refundsExchangesDetail));
}
/**
* 入库后品质报告不合格数信息列表
* */
@ -328,6 +356,19 @@ public class QualityRefundsExchangesController extends BaseController
return getDataTable(list);
}
/**
* 入库前品质报告不合格数信息列表
* */
@ResponseBody
@PostMapping("/getBeforeQualityReportDetail")
public TableDataInfo getBeforeQualityReportDetail(QualityRefundsExchangesOrder qualityRefundsExchangesOrder){
startPage();
QualityRefundsExchangesDetail qualityRefundsExchangesDetail = new QualityRefundsExchangesDetail();
qualityRefundsExchangesDetail.setMaterialNo(qualityRefundsExchangesOrder.getMaterialNo());
qualityRefundsExchangesDetail.setRefundsExchangesCode(qualityRefundsExchangesOrder.getRefundsExchangesCode());
List<QualityRefundsExchangesUnqualified> list = refundsExchangesUnqualifiedService.selectRefundsExchangesUnqualifiedListByCodeAndNo(qualityRefundsExchangesDetail);
return getDataTable(list);
}
/**
* 入库前退换货单-确认供应商-已有退换货
@ -347,9 +388,10 @@ public class QualityRefundsExchangesController extends BaseController
@Log(title = "品质管理退换货单", businessType = BusinessType.UPDATE)
@PostMapping("/beforeHasConfirmSupplier")
@ResponseBody
public AjaxResult beforeHasConfirmSupplierSave(QualityRefundsExchanges qualityRefundsExchanges)
public AjaxResult beforeHasConfirmSupplierSave(@RequestBody QualityRefundsExchanges qualityRefundsExchanges)
{
return toAjax(qualityRefundsExchangesService.returnBeforeStorageDetail(qualityRefundsExchanges));
qualityRefundsExchanges.setQualityPurchaseStatus("1");
return toAjax(qualityRefundsExchangesService.updateQualityRefundsExchanges(qualityRefundsExchanges));
}
/**

8
ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesOrderMapper.java

@ -82,4 +82,12 @@ public interface QualityRefundsExchangesOrderMapper
* 前面的 THH年月日
* */
public String findMaxRoundCode(@Param("prefix") String prefix);
// 根据退换货单号查找入库前详情
public List<QualityRefundsExchangesOrder> selectQualityRefundsExchangesOrderByCode(String refundsExchangesCode);
// 根据退换货单号和料号查找入库前详情
public QualityRefundsExchangesOrder selectQualityRefundsExchangesOrderByCodeAndNo(QualityRefundsExchangesOrder refundsExchangesOrder);
}

6
ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesOrderService.java

@ -1,6 +1,8 @@
package com.ruoyi.quality.service;
import java.util.List;
import com.ruoyi.quality.domain.QualityRefundsExchangesDetail;
import com.ruoyi.quality.domain.QualityRefundsExchangesOrder;
/**
@ -72,4 +74,8 @@ public interface IQualityRefundsExchangesOrderService
* @return
*/
int restoreQualityRefundsExchangesOrderById(Long qualityRefundsExchangesOrderId);
List<QualityRefundsExchangesOrder> selectQualityRefundsExchangesOrderByCode(String refundsExchangesCode);
public QualityRefundsExchangesOrder selectQualityRefundsExchangesOrderByCodeAndNo(QualityRefundsExchangesOrder refundsExchangesOrder);
}

11
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesOrderServiceImpl.java

@ -123,4 +123,15 @@ public class QualityRefundsExchangesOrderServiceImpl implements IQualityRefundsE
{
return qualityRefundsExchangesOrderMapper.restoreQualityRefundsExchangesOrderById(qualityRefundsExchangesOrderId);
}
@Override
public List<QualityRefundsExchangesOrder> selectQualityRefundsExchangesOrderByCode(String refundsExchangesCode) {
return qualityRefundsExchangesOrderMapper.selectQualityRefundsExchangesOrderByCode(refundsExchangesCode);
}
public QualityRefundsExchangesOrder selectQualityRefundsExchangesOrderByCodeAndNo(QualityRefundsExchangesOrder refundsExchangesOrder){
QualityRefundsExchangesOrder exchangesOrder = qualityRefundsExchangesOrderMapper.selectQualityRefundsExchangesOrderByCodeAndNo(refundsExchangesOrder);
return exchangesOrder;
};
}

11
ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesOrderMapper.xml

@ -146,4 +146,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select max(substring(refunds_exchanges_code,7)) from quality_refunds_exchanges_order where refunds_exchanges_code like concat(#{refundsExchangesCode},'%')
</select>
<select id="selectQualityRefundsExchangesOrderByCode" parameterType="String" resultMap="QualityRefundsExchangesOrderResult">
<include refid="selectQualityRefundsExchangesOrderVo"/>
where refunds_exchanges_code = #{refundsExchangesCode}
</select>
<select id="selectQualityRefundsExchangesOrderByCodeAndNo" parameterType="QualityRefundsExchangesOrder" resultMap="QualityRefundsExchangesOrderResult">
<include refid="selectQualityRefundsExchangesOrderVo"/>
where refunds_exchanges_code = #{refundsExchangesCode}
and material_no = #{materialNo}
</select>
</mapper>
Loading…
Cancel
Save