@ -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 ) ) ;
}
/ * *