|
@ -2,10 +2,14 @@ package com.ruoyi.quality.controller; |
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
import com.ruoyi.erp.domain.ErpMaterialVo; |
|
|
import com.ruoyi.erp.domain.ErpMaterialVo; |
|
|
import com.ruoyi.erp.service.IErpMaterialService; |
|
|
import com.ruoyi.erp.service.IErpMaterialService; |
|
|
import com.ruoyi.quality.domain.QualityOrderReport; |
|
|
import com.ruoyi.quality.domain.QualityOrderReport; |
|
|
|
|
|
import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; |
|
|
import com.ruoyi.quality.domain.VO.CheckoutMaterialVO; |
|
|
import com.ruoyi.quality.domain.VO.CheckoutMaterialVO; |
|
|
|
|
|
import com.ruoyi.quality.service.IQualityRefundsExchangesUnqualifiedService; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
import org.apache.poi.ss.formula.functions.T; |
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
@ -27,6 +31,7 @@ import com.ruoyi.common.core.page.TableDataInfo; |
|
|
* @author 刘晓旭 |
|
|
* @author 刘晓旭 |
|
|
* @date 2024-05-23 |
|
|
* @date 2024-05-23 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Slf4j |
|
|
@Controller |
|
|
@Controller |
|
|
@RequestMapping("/quality/refundsExchanges") |
|
|
@RequestMapping("/quality/refundsExchanges") |
|
|
public class QualityRefundsExchangesController extends BaseController |
|
|
public class QualityRefundsExchangesController extends BaseController |
|
@ -39,6 +44,9 @@ public class QualityRefundsExchangesController extends BaseController |
|
|
@Autowired |
|
|
@Autowired |
|
|
private IErpMaterialService erpMaterialService; |
|
|
private IErpMaterialService erpMaterialService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private IQualityRefundsExchangesUnqualifiedService refundsExchangesUnqualifiedService; |
|
|
|
|
|
|
|
|
@RequiresPermissions("quality:refundsExchanges:view") |
|
|
@RequiresPermissions("quality:refundsExchanges:view") |
|
|
@GetMapping() |
|
|
@GetMapping() |
|
|
public String refundsExchanges() |
|
|
public String refundsExchanges() |
|
@ -76,9 +84,10 @@ public class QualityRefundsExchangesController extends BaseController |
|
|
/** |
|
|
/** |
|
|
* 新增品质管理退换货单 |
|
|
* 新增品质管理退换货单 |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/add") |
|
|
@GetMapping("/add/{refundsExchangesCode}") |
|
|
public String add() |
|
|
public String add(@PathVariable("refundsExchangesCode") String refundsExchangesCode,ModelMap mmap) |
|
|
{ |
|
|
{ |
|
|
|
|
|
mmap.put("refundsExchangesCode", refundsExchangesCode); |
|
|
return prefix + "/add"; |
|
|
return prefix + "/add"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -163,4 +172,40 @@ public class QualityRefundsExchangesController extends BaseController |
|
|
return toAjax(qualityRefundsExchangesService.updateRefundsExchangesStatus(qualityRefundsExchanges)); |
|
|
return toAjax(qualityRefundsExchangesService.updateRefundsExchangesStatus(qualityRefundsExchanges)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 修改品质单报告不良分类 |
|
|
|
|
|
*/ |
|
|
|
|
|
@GetMapping("/qualityReport") |
|
|
|
|
|
public String qualityReport( @RequestParam("materialNo") String materialNo, |
|
|
|
|
|
@RequestParam("refundsExchangesCode") String refundsExchangesCode, ModelMap mmap) |
|
|
|
|
|
{ |
|
|
|
|
|
if (StringUtils.isEmpty(materialNo)){ |
|
|
|
|
|
log.warn("物料号为空:{}",materialNo); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isEmpty(refundsExchangesCode)){ |
|
|
|
|
|
log.warn("退换货号为空:{}",refundsExchangesCode); |
|
|
|
|
|
} |
|
|
|
|
|
QualityRefundsExchangesUnqualified tempRefundsExchangesUnqualified = new QualityRefundsExchangesUnqualified(); |
|
|
|
|
|
tempRefundsExchangesUnqualified.setRefundsExchangesCode(refundsExchangesCode); |
|
|
|
|
|
tempRefundsExchangesUnqualified.setMaterialNo(materialNo); |
|
|
|
|
|
QualityRefundsExchangesUnqualified refundsExchangesUnqualified=refundsExchangesUnqualifiedService.selectRefundsExchangesUnqualifiedByNoAndCode(tempRefundsExchangesUnqualified); |
|
|
|
|
|
mmap.put("refundsExchangesUnqualified", refundsExchangesUnqualified); |
|
|
|
|
|
return prefix + "/qualityOrderReport"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 新增保存品质单报告不良分类 |
|
|
|
|
|
*/ |
|
|
|
|
|
@RequiresPermissions("quality:qualityOrder:qualityReport") |
|
|
|
|
|
@Log(title = "品质管理品质单", businessType = BusinessType.INSERT) |
|
|
|
|
|
@PostMapping("/qualityReport") |
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
public AjaxResult qualityReportSave(@RequestBody QualityRefundsExchangesUnqualified refundsExchangesUnqualified) |
|
|
|
|
|
{ |
|
|
|
|
|
return toAjax(refundsExchangesUnqualifiedService.addRefundsExchangesUnqualified(refundsExchangesUnqualified)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|