diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java index ca699691..9e318ff9 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java @@ -471,5 +471,9 @@ public class QcCheckTaskIncomeController extends BaseController { dynamicRoutingDataSource.removeDataSource(dataSourceProperty.getPoolName()); return R.ok(); } + @GetMapping("/getWeightValue/{id}") + public AjaxResult getWeightValue(@PathVariable String id) { + return success(qcCheckTaskIncomeService.getWeightValue(id)); + } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java index 1ef4918f..b0c97b03 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java @@ -100,4 +100,6 @@ public interface IQcCheckTaskIncomeService { List getCheckLocList(QcDefectType qcDefectType); List getTodayIncomeLists(); + + public String getWeightValue(String id); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportIncomeServiceImpl.java index 6f6b40bf..9cd273c5 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportIncomeServiceImpl.java @@ -1,8 +1,6 @@ package com.op.quality.service.impl; -import com.alibaba.fastjson2.JSONArray; import com.baomidou.dynamic.datasource.annotation.DS; -import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.StringUtils; import com.op.common.core.utils.uuid.IdUtils; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index e66489a3..2dfb4189 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -86,6 +86,8 @@ public class QcCheckTaskIncomeServiceImpl implements @Autowired private IQcCheckUnqualifiedService qcCheckUnqualifiedService; + @Autowired + private QcProCheckService qcProCheckService; /** * 查询来料检验 @@ -879,4 +881,22 @@ public class QcCheckTaskIncomeServiceImpl implements } + @Override + public String getWeightValue(String id) { + if (StringUtils.isEmpty(id)) { + return ""; + } + QcCheckTaskDetail qcCheckTaskDetail = new QcCheckTaskDetail(); + qcCheckTaskDetail.setRecordId(id); + + ///获取当前所选工厂 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String key = "#header.poolName"; + String factoryCode = request.getHeader(key.substring(8)); + qcCheckTaskDetail.setFactoryCode(factoryCode); + + return qcProCheckService.getWeightInfo(qcCheckTaskDetail); + } + + }