|
|
|
@ -7,10 +7,12 @@ import com.op.common.core.utils.StringUtils;
|
|
|
|
|
import com.op.common.core.web.controller.BaseController;
|
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
|
import com.op.common.core.web.page.TableDataInfo;
|
|
|
|
|
import com.op.common.security.annotation.RequiresPermissions;
|
|
|
|
|
import com.op.common.security.utils.SecurityUtils;
|
|
|
|
|
import com.op.quality.domain.*;
|
|
|
|
|
import com.op.quality.service.*;
|
|
|
|
|
import com.op.system.api.RemoteMesService;
|
|
|
|
|
import com.op.system.api.domain.SysDictData;
|
|
|
|
|
import com.op.system.api.domain.dto.WCSDTO;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
@ -39,7 +41,8 @@ public class QuaController extends BaseController {
|
|
|
|
|
private IQcCheckTaskWarehousingService qcCheckTaskWarehousingService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private IQcCheckTypeService qcCheckTypeService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IQcMaterialGroupService qcMaterialGroupService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private IQcCheckTaskIncomeService qcCheckTaskIncomeService;
|
|
|
|
|
|
|
|
|
@ -179,17 +182,14 @@ public class QuaController extends BaseController {
|
|
|
|
|
* 获取待检验信息列表
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "getCheckTaskList")
|
|
|
|
|
public AjaxResult getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome) {
|
|
|
|
|
if(StringUtils.isBlank(qcCheckTaskIncome.getFactoryCode())){
|
|
|
|
|
return error("[factoryCode]不能为空");
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isBlank(qcCheckTaskIncome.getCheckType())){
|
|
|
|
|
return error("[checkType]不能为空");
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isBlank(qcCheckTaskIncome.getCheckManCode())){
|
|
|
|
|
return error("[checkManCode]不能为空");
|
|
|
|
|
public TableDataInfo getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome) {
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(qcCheckTaskIncome.getCheckStatus())){
|
|
|
|
|
qcCheckTaskIncome.setCheckStatus("'"+ qcCheckTaskIncome.getCheckStatus().replace(",","','")+"'");
|
|
|
|
|
}
|
|
|
|
|
return success(qcProCheckService.getCheckTaskList(qcCheckTaskIncome));
|
|
|
|
|
startPage();
|
|
|
|
|
List<QcCheckTaskIncome> list = qcProCheckService.getCheckTaskList(qcCheckTaskIncome);
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取待检验信息列表
|
|
|
|
@ -204,13 +204,44 @@ public class QuaController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
return success(qcProCheckService.getCheckTaskDetailList(qcCheckTaskDetail));
|
|
|
|
|
}
|
|
|
|
|
/**检测结果提交**/
|
|
|
|
|
@PostMapping("/commitCheckResults")
|
|
|
|
|
public AjaxResult commitCheckResults(@RequestBody List<QcCheckTaskDetail> details) {
|
|
|
|
|
if(CollectionUtils.isEmpty(details)){
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取待检验信息列表
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping(value = "commitCheckResults")
|
|
|
|
|
public AjaxResult commitCheckResults(@RequestBody List<QcCheckTaskDetail> qcCheckTaskDetails) {
|
|
|
|
|
if(CollectionUtils.isEmpty(qcCheckTaskDetails)){
|
|
|
|
|
return error("[List<QcCheckTaskDetail>]不能为空");
|
|
|
|
|
}
|
|
|
|
|
return toAjax(qcCheckTaskIncomeService.commitCheckResults(details));
|
|
|
|
|
return success(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskDetails));
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 检验单位
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "getQcUnitList")
|
|
|
|
|
public TableDataInfo getQcUnitList(SysDictData sysDictData) {
|
|
|
|
|
startPage();
|
|
|
|
|
List<SysDictData> list = qcProCheckService.getQcUnitList(sysDictData);
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 检验项目
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/pdaMaterialTree")
|
|
|
|
|
public AjaxResult pdaMaterialTree(QcMaterialGroup materialGroup) {
|
|
|
|
|
DynamicDataSourceContextHolder.push("ds_"+materialGroup.getFactoryCode());
|
|
|
|
|
return success(qcMaterialGroupService.selectQcMaterialTreeList(materialGroup));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询物料检验项目维护列表
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getCheckTypeProjectList")
|
|
|
|
|
public TableDataInfo list(QcCheckTypeProject qcCheckTypeProject) {
|
|
|
|
|
DynamicDataSourceContextHolder.push("ds_"+qcCheckTypeProject.getFactoryCode());
|
|
|
|
|
startPage();
|
|
|
|
|
List<QcCheckTypeProject> list = qcMaterialGroupService.getCheckTypeProjectList(qcCheckTypeProject);
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|