|
|
@ -5,7 +5,9 @@ import java.util.Map; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import com.ruoyi.quality.domain.QualityOrderDetail; |
|
|
|
import com.ruoyi.quality.domain.QualityOrderReport; |
|
|
|
import com.ruoyi.quality.service.IQualityOrderDetailService; |
|
|
|
import com.ruoyi.quality.service.IQualityOrderReportService; |
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
@ -38,6 +40,9 @@ public class QualityOrderController extends BaseController |
|
|
|
@Autowired |
|
|
|
private IQualityOrderDetailService detailService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private IQualityOrderReportService orderReportService; |
|
|
|
|
|
|
|
@RequiresPermissions("quality:qualityOrder:view") |
|
|
|
@GetMapping() |
|
|
|
public String qualityOrder() |
|
|
@ -150,4 +155,31 @@ public class QualityOrderController extends BaseController |
|
|
|
.collect(Collectors.groupingBy(QualityOrderDetail::getSupplierCode)); |
|
|
|
return groupedDetails; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 修改品质单报告 |
|
|
|
*/ |
|
|
|
@GetMapping("/qualityReport") |
|
|
|
public String qualityReport( @RequestParam("materialNo") String materialNo, |
|
|
|
@RequestParam("supplierCode") String supplierCode, ModelMap mmap) |
|
|
|
{ |
|
|
|
// QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId);
|
|
|
|
QualityOrderReport qualityOrderReport = orderReportService.selectQualityOrderReportByNoAndCode(materialNo,supplierCode); |
|
|
|
mmap.put("qualityOrderReport", qualityOrderReport); |
|
|
|
return prefix + "/qualityOrderReport"; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 修改保存品质单报告 |
|
|
|
*/ |
|
|
|
@RequiresPermissions("quality:qualityOrder:qualityReport") |
|
|
|
@Log(title = "品质管理品质单", businessType = BusinessType.UPDATE) |
|
|
|
@PostMapping("/qualityReport") |
|
|
|
@ResponseBody |
|
|
|
public AjaxResult orderReportSave(@RequestBody QualityOrderReport qualityOrderReport) |
|
|
|
{ |
|
|
|
return toAjax(orderReportService.updateQualityOrderReport(qualityOrderReport)); |
|
|
|
} |
|
|
|
} |
|
|
|