feat(service): 实现来料检验任务相关核心业务逻辑
- 新增来料检验任务控制服务类,实现来料检验和库存检测申请接口 - 实现质检人员自动分配逻辑,支持物料和物料类别绑定递归查找 - 完善AQL类型计算和抽样严格性转移规则逻辑,自动调整抽样方案 - 实现任务待检验列表、任务详情、当前用户任务统计等查询功能 - 实现检验任务转办功能,支持代办人校验和批量更新 - 实现检验项目获取、检验记录增删改查及检验结果提交与暂存功能 - 新增相关持久层接口,包含检验标准、抽样方案、检验任务记录服务 - 新增检验任务检验详情、检验项目VO,支持检验项显示及样本数量计算
This commit is contained in:
parent
8bbd89629f
commit
5727b7a8f1
|
|
@ -3,15 +3,15 @@ package com.nflg.qms.admin.controller;
|
||||||
import com.nflg.qms.admin.service.IncomingInspectionTaskControllerService;
|
import com.nflg.qms.admin.service.IncomingInspectionTaskControllerService;
|
||||||
import com.nflg.wms.common.pojo.ApiResult;
|
import com.nflg.wms.common.pojo.ApiResult;
|
||||||
import com.nflg.wms.common.pojo.PageData;
|
import com.nflg.wms.common.pojo.PageData;
|
||||||
import com.nflg.wms.common.pojo.qo.QmsIncomingInspectionTaskSearchQO;
|
import com.nflg.wms.common.pojo.qo.*;
|
||||||
import com.nflg.wms.common.pojo.qo.QmsIncomingInspectionTaskTodoSearchQO;
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCheckDetailVO;
|
||||||
import com.nflg.wms.common.pojo.qo.QmsIncomingInspectionTaskTransferQO;
|
|
||||||
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCountVO;
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCountVO;
|
||||||
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskVO;
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskVO;
|
||||||
import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskRecord;
|
import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskRecord;
|
||||||
import com.nflg.wms.starter.BaseController;
|
import com.nflg.wms.starter.BaseController;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -74,4 +74,43 @@ public class QmsIncomingInspectionTaskController extends BaseController {
|
||||||
public ApiResult<List<QmsIncomingInspectionTaskRecord>> getRecords(@RequestParam Long taskId){
|
public ApiResult<List<QmsIncomingInspectionTaskRecord>> getRecords(@RequestParam Long taskId){
|
||||||
return ApiResult.success(incomingInspectionTaskControllerService.getRecords(taskId));
|
return ApiResult.success(incomingInspectionTaskControllerService.getRecords(taskId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询待检测项
|
||||||
|
*/
|
||||||
|
@PostMapping("pad/items-for-check")
|
||||||
|
public ApiResult<QmsIncomingInspectionTaskCheckDetailVO> getItemsForCheck(@Valid @RequestBody QmsIncomingInspectionTaskTodoCheckItemsQO request){
|
||||||
|
return ApiResult.success(incomingInspectionTaskControllerService.getItemsForCheck(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交检测项
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@PostMapping("pad/add-check-item")
|
||||||
|
public ApiResult<Void> addCheckItem(@Valid @RequestBody QmsIncomingInspectionTaskTodoCheckSubmitQO request){
|
||||||
|
incomingInspectionTaskControllerService.submitCheckItem(request);
|
||||||
|
return ApiResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂存检验结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@PostMapping("pad/staging")
|
||||||
|
public ApiResult<Void> staging(@Valid @RequestBody QmsIncomingInspectionTaskSubmitQO request){
|
||||||
|
incomingInspectionTaskControllerService.staging(request);
|
||||||
|
return ApiResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交检验结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@PostMapping("pad/submit")
|
||||||
|
public ApiResult<Void> submit(@Valid @RequestBody QmsIncomingInspectionTaskSubmitQO request){
|
||||||
|
incomingInspectionTaskControllerService.submit(request);
|
||||||
|
return ApiResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
import com.nflg.wms.common.constant.STATE;
|
import com.nflg.wms.common.constant.STATE;
|
||||||
import com.nflg.wms.common.exception.NflgException;
|
import com.nflg.wms.common.exception.NflgException;
|
||||||
import com.nflg.wms.common.pojo.qo.ExternalIncomingInspectionApplyQO;
|
import com.nflg.wms.common.pojo.qo.*;
|
||||||
import com.nflg.wms.common.pojo.qo.ExternalInventoryInspectionApplyQO;
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCheckDetailVO;
|
||||||
import com.nflg.wms.common.pojo.qo.QmsIncomingInspectionTaskSearchQO;
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCheckItemVO;
|
||||||
import com.nflg.wms.common.pojo.qo.QmsIncomingInspectionTaskTodoSearchQO;
|
|
||||||
import com.nflg.wms.common.pojo.qo.QmsIncomingInspectionTaskTransferQO;
|
|
||||||
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCountVO;
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCountVO;
|
||||||
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskVO;
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskVO;
|
||||||
import com.nflg.wms.common.util.UserUtil;
|
import com.nflg.wms.common.util.UserUtil;
|
||||||
|
|
@ -18,6 +16,7 @@ import com.nflg.wms.common.util.VUtil;
|
||||||
import com.nflg.wms.repository.entity.*;
|
import com.nflg.wms.repository.entity.*;
|
||||||
import com.nflg.wms.repository.service.*;
|
import com.nflg.wms.repository.service.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
@ -37,9 +36,6 @@ public class IncomingInspectionTaskControllerService {
|
||||||
@Resource
|
@Resource
|
||||||
private IQmsIncomingInspectionTaskService incomingInspectionTaskService;
|
private IQmsIncomingInspectionTaskService incomingInspectionTaskService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IQmsInspectionStandardItemService inspectionStandardItemService;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IQmsQualityInspectorService qualityInspectorService;
|
private IQmsQualityInspectorService qualityInspectorService;
|
||||||
|
|
||||||
|
|
@ -52,6 +48,9 @@ public class IncomingInspectionTaskControllerService {
|
||||||
@Resource
|
@Resource
|
||||||
private IQmsInspectionStandardService inspectionStandardService;
|
private IQmsInspectionStandardService inspectionStandardService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IQmsInspectionStandardItemService inspectionStandardItemService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BasdeSerialNumberControllerService basdeSerialNumberControllerService;
|
private BasdeSerialNumberControllerService basdeSerialNumberControllerService;
|
||||||
|
|
||||||
|
|
@ -79,6 +78,21 @@ public class IncomingInspectionTaskControllerService {
|
||||||
@Resource
|
@Resource
|
||||||
private IQmsIncomingInspectionTaskRecordService incomingInspectionTaskRecordService;
|
private IQmsIncomingInspectionTaskRecordService incomingInspectionTaskRecordService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IQmsIncomingInspectionTaskRecordItemService incomingInspectionTaskRecordItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IQmsIncomingInspectionTaskRecordItemDataService incomingInspectionTaskRecordItemDataService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IQmsSamplingPlanService samplingPlanService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IQmsSamplingPlanInspectionService samplingPlanInspectionService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IQmsCodeLetterMatrixService codeLetterMatrixService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 来料检验申请(对外接口)
|
* 来料检验申请(对外接口)
|
||||||
* 业务规则:
|
* 业务规则:
|
||||||
|
|
@ -575,4 +589,194 @@ public class IncomingInspectionTaskControllerService {
|
||||||
.eq(QmsIncomingInspectionTaskRecord::getTaskId, taskId)
|
.eq(QmsIncomingInspectionTaskRecord::getTaskId, taskId)
|
||||||
.list();
|
.list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public QmsIncomingInspectionTaskCheckDetailVO getItemsForCheck(@Valid QmsIncomingInspectionTaskTodoCheckItemsQO request) {
|
||||||
|
QmsIncomingInspectionTask task = incomingInspectionTaskService.getById(request.getTaskId());
|
||||||
|
VUtil.trueThrowBusinessError(Objects.isNull(task)).throwMessage("任务不存在");
|
||||||
|
QmsInspectionStandard standard = inspectionStandardService.getById(task.getInspectionStandardId());
|
||||||
|
VUtil.trueThrowBusinessError(Objects.isNull(standard)).throwMessage("检验标准不存在");
|
||||||
|
List<QmsIncomingInspectionTaskCheckItemVO> datas = inspectionStandardService.getItemsForCheck(standard.getId());
|
||||||
|
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(datas)).throwMessage("未设置检验项目");
|
||||||
|
Integer count = incomingInspectionTaskRecordService.getCount(task.getId());
|
||||||
|
Integer total;
|
||||||
|
if (Objects.equals(standard.getTestingMethodDictItemId(), dictionaryItemService.getIdByCode("InspectionStandardTestingMethod", "Full"))) {
|
||||||
|
total = task.getInspectionQty();
|
||||||
|
} else {
|
||||||
|
total = getCountOfSampling(task.getId(), task.getInspectionQty(), standard);
|
||||||
|
}
|
||||||
|
VUtil.trueThrowBusinessError(count > total).throwMessage("样本数量不能大于总数量");
|
||||||
|
return new QmsIncomingInspectionTaskCheckDetailVO()
|
||||||
|
.setItems(datas)
|
||||||
|
.setCount(total - count)
|
||||||
|
.setPdfDrawings(
|
||||||
|
inspectionStandardItemService.lambdaQuery()
|
||||||
|
.select(QmsInspectionStandardItem::getPdfDrawing)
|
||||||
|
.eq(QmsInspectionStandardItem::getInspectionStandardId, standard.getId())
|
||||||
|
.list()
|
||||||
|
.stream()
|
||||||
|
.map(QmsInspectionStandardItem::getPdfDrawing)
|
||||||
|
.toList()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer getCountOfSampling(Long taskId, Integer inspectionQty, QmsInspectionStandard standard) {
|
||||||
|
QmsSamplingPlan samplingPlan = samplingPlanService.getById(standard.getSamplingPlanId());
|
||||||
|
VUtil.trueThrowBusinessError(Objects.isNull(samplingPlan)).throwMessage("抽样方案不存在");
|
||||||
|
Long codeLetterId = getCodeLetter(samplingPlan.getId(), standard.getInspectionLevelDictItemId(), inspectionQty);
|
||||||
|
QmsIncomingInspectionTaskAqlRule incomingInspectionTaskAqlRule = incomingInspectionTaskAqlRuleService.lambdaQuery()
|
||||||
|
.eq(QmsIncomingInspectionTaskAqlRule::getTaskId, taskId)
|
||||||
|
.one();
|
||||||
|
VUtil.trueThrowBusinessError(Objects.isNull(incomingInspectionTaskAqlRule)).throwMessage("该任务未设置AQL类型");
|
||||||
|
DictionaryItem dictionaryItem = dictionaryItemService.getById(incomingInspectionTaskAqlRule.getUsedAqlType());
|
||||||
|
Integer aqltype = StrUtil.contains(dictionaryItem.getName(), "正常")
|
||||||
|
? 0
|
||||||
|
: (StrUtil.contains(dictionaryItem.getName(), "加严") ? 1 : 2);
|
||||||
|
QmsCodeLetterMatrix codeLetterMatrix = codeLetterMatrixService.lambdaQuery()
|
||||||
|
.eq(QmsCodeLetterMatrix::getSamplingPlanId, samplingPlan.getId())
|
||||||
|
.eq(QmsCodeLetterMatrix::getCodeLetterId, codeLetterId)
|
||||||
|
.eq(QmsCodeLetterMatrix::getInspectionType, aqltype)
|
||||||
|
.last("LIMIT 1")
|
||||||
|
.one();
|
||||||
|
VUtil.trueThrowBusinessError(Objects.isNull(codeLetterMatrix)).throwMessage("未找到对应的字码矩阵");
|
||||||
|
return codeLetterMatrix.getSampleSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Long getCodeLetter(Long planId, Long inspectionLevelDictItemId, Integer inspectionQty) {
|
||||||
|
QmsSamplingPlanInspection samplingPlanInspection = samplingPlanInspectionService.lambdaQuery()
|
||||||
|
.eq(QmsSamplingPlanInspection::getSamplingPlanId, planId)
|
||||||
|
.eq(QmsSamplingPlanInspection::getInspectionDictionaryItemId, inspectionLevelDictItemId)
|
||||||
|
.le(QmsSamplingPlanInspection::getRangeStart, inspectionQty)
|
||||||
|
.ge(QmsSamplingPlanInspection::getRangeEnd, inspectionQty)
|
||||||
|
.one();
|
||||||
|
VUtil.trueThrowBusinessError(Objects.isNull(samplingPlanInspection)).throwMessage("未找到对应的检验水平");
|
||||||
|
return samplingPlanInspection.getCodeLetterId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void submitCheckItem(QmsIncomingInspectionTaskTodoCheckSubmitQO request) {
|
||||||
|
QmsIncomingInspectionTaskRecord record = new QmsIncomingInspectionTaskRecord()
|
||||||
|
.setId(request.getId())
|
||||||
|
.setTaskId(request.getTaskId())
|
||||||
|
.setMaterialUniqueNo(request.getMaterialUniqueNo())
|
||||||
|
.setQualifiedQty(request.getQualifiedQty())
|
||||||
|
.setUnqualifiedQty(request.getUnqualifiedQty())
|
||||||
|
.setInspectionQty(request.getInspectionQty())
|
||||||
|
.setQualified(Objects.equals(request.getQualifiedQty(), request.getInspectionQty()))
|
||||||
|
.setCreateUserId(UserUtil.getUserId())
|
||||||
|
.setCreateUserName(UserUtil.getUserName())
|
||||||
|
.setCreateTime(LocalDateTime.now());
|
||||||
|
incomingInspectionTaskRecordService.saveOrUpdate(record);
|
||||||
|
request.getItems().forEach(item -> {
|
||||||
|
QmsIncomingInspectionTaskRecordItem ditem = new QmsIncomingInspectionTaskRecordItem()
|
||||||
|
.setId(item.getId())
|
||||||
|
.setRecordId(record.getId())
|
||||||
|
.setRemark(item.getRemark())
|
||||||
|
.setInspectionStandardItemContentId(item.getInspectionStandardItemContentId());
|
||||||
|
incomingInspectionTaskRecordItemService.saveOrUpdate(ditem);
|
||||||
|
item.getDatas().forEach(data -> {
|
||||||
|
QmsIncomingInspectionTaskRecordItemData ddata = new QmsIncomingInspectionTaskRecordItemData()
|
||||||
|
.setId(data.getId())
|
||||||
|
.setTaskId(record.getTaskId())
|
||||||
|
.setItemId(ditem.getId())
|
||||||
|
.setQualified(data.getQualified())
|
||||||
|
.setMeasuredValue(data.getMeasuredValue())
|
||||||
|
.setImages(StrUtil.join(",",data.getImages()));
|
||||||
|
incomingInspectionTaskRecordItemDataService.saveOrUpdate(ddata);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂存检验结果
|
||||||
|
* 1. 根据任务ID查询所有样本记录
|
||||||
|
* 2. 计算合格数量和不合格数量
|
||||||
|
* 3. 更新任务的合格数量、不合格数量、检验结果
|
||||||
|
* 4. 如果检验开始时间为空,则更新检验开始时间
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public void staging(QmsIncomingInspectionTaskSubmitQO request) {
|
||||||
|
QmsIncomingInspectionTask task = incomingInspectionTaskService.getById(request.getTaskId());
|
||||||
|
VUtil.trueThrowBusinessError(Objects.isNull(task)).throwMessage("任务不存在");
|
||||||
|
|
||||||
|
// 查询该任务下所有检验记录
|
||||||
|
List<QmsIncomingInspectionTaskRecord> records = incomingInspectionTaskRecordService.lambdaQuery()
|
||||||
|
.eq(QmsIncomingInspectionTaskRecord::getTaskId, request.getTaskId())
|
||||||
|
.list();
|
||||||
|
|
||||||
|
// 计算合格数量和不合格数量
|
||||||
|
int qualifiedQty = records.stream()
|
||||||
|
.map(QmsIncomingInspectionTaskRecord::getQualifiedQty)
|
||||||
|
.reduce(0, Integer::sum);
|
||||||
|
int unqualifiedQty = records.stream()
|
||||||
|
.map(QmsIncomingInspectionTaskRecord::getUnqualifiedQty)
|
||||||
|
.reduce(0, Integer::sum);
|
||||||
|
|
||||||
|
Long userId = UserUtil.getUserId();
|
||||||
|
String userName = UserUtil.getUserName();
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|
||||||
|
// 构建更新对象
|
||||||
|
var updateWrapper = incomingInspectionTaskService.lambdaUpdate()
|
||||||
|
.eq(QmsIncomingInspectionTask::getId, request.getTaskId())
|
||||||
|
.ne(QmsIncomingInspectionTask::getInspectionStatus, 2)
|
||||||
|
.set(QmsIncomingInspectionTask::getQualifiedQty, qualifiedQty)
|
||||||
|
.set(QmsIncomingInspectionTask::getUnqualifiedQty, unqualifiedQty)
|
||||||
|
.set(QmsIncomingInspectionTask::getInspectionResult, request.getQualified())
|
||||||
|
.set(QmsIncomingInspectionTask::getUpdateUserId, userId)
|
||||||
|
.set(QmsIncomingInspectionTask::getUpdateUserName, userName)
|
||||||
|
.set(QmsIncomingInspectionTask::getUpdateTime, now);
|
||||||
|
|
||||||
|
// 如果检验开始时间为空,则更新检验开始时间
|
||||||
|
if (Objects.isNull(task.getInspectionStartTime())) {
|
||||||
|
updateWrapper.set(QmsIncomingInspectionTask::getInspectionStartTime, request.getInspectionStartTime());
|
||||||
|
updateWrapper.set(QmsIncomingInspectionTask::getInspectionStatus, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateWrapper.update();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void submit(@Valid QmsIncomingInspectionTaskSubmitQO request) {
|
||||||
|
QmsIncomingInspectionTask task = incomingInspectionTaskService.getById(request.getTaskId());
|
||||||
|
VUtil.trueThrowBusinessError(Objects.isNull(task)).throwMessage("任务不存在");
|
||||||
|
|
||||||
|
// 查询该任务下所有检验记录
|
||||||
|
List<QmsIncomingInspectionTaskRecord> records = incomingInspectionTaskRecordService.lambdaQuery()
|
||||||
|
.eq(QmsIncomingInspectionTaskRecord::getTaskId, request.getTaskId())
|
||||||
|
.list();
|
||||||
|
|
||||||
|
// 计算合格数量和不合格数量
|
||||||
|
int qualifiedQty = records.stream()
|
||||||
|
.map(QmsIncomingInspectionTaskRecord::getQualifiedQty)
|
||||||
|
.reduce(0, Integer::sum);
|
||||||
|
int unqualifiedQty = records.stream()
|
||||||
|
.map(QmsIncomingInspectionTaskRecord::getUnqualifiedQty)
|
||||||
|
.reduce(0, Integer::sum);
|
||||||
|
|
||||||
|
Long userId = UserUtil.getUserId();
|
||||||
|
String userName = UserUtil.getUserName();
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|
||||||
|
// 构建更新对象
|
||||||
|
var updateWrapper = incomingInspectionTaskService.lambdaUpdate()
|
||||||
|
.eq(QmsIncomingInspectionTask::getId, request.getTaskId())
|
||||||
|
.ne(QmsIncomingInspectionTask::getInspectionStatus, 2)
|
||||||
|
.set(QmsIncomingInspectionTask::getQualifiedQty, qualifiedQty)
|
||||||
|
.set(QmsIncomingInspectionTask::getUnqualifiedQty, unqualifiedQty)
|
||||||
|
.set(QmsIncomingInspectionTask::getInspectionResult, request.getQualified())
|
||||||
|
.set(QmsIncomingInspectionTask::getInspectionStatus, 2)
|
||||||
|
.set(QmsIncomingInspectionTask::getInspectionFinishTime, LocalDateTime.now())
|
||||||
|
.set(QmsIncomingInspectionTask::getUpdateUserId, userId)
|
||||||
|
.set(QmsIncomingInspectionTask::getUpdateUserName, userName)
|
||||||
|
.set(QmsIncomingInspectionTask::getUpdateTime, now);
|
||||||
|
|
||||||
|
// 如果检验开始时间为空,则更新检验开始时间
|
||||||
|
if (Objects.isNull(task.getInspectionStartTime())) {
|
||||||
|
updateWrapper.set(QmsIncomingInspectionTask::getInspectionStartTime, request.getInspectionStartTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
updateWrapper.update();
|
||||||
|
|
||||||
|
if (!request.getQualified()) {
|
||||||
|
//TODO
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class QmsIncomingInspectionTaskSubmitQO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "任务ID不能为空")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验结果:true=合格,false=不合格
|
||||||
|
*/
|
||||||
|
@NotNull(message = "检验结果不能为空")
|
||||||
|
private Boolean qualified;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验开始时间
|
||||||
|
*/
|
||||||
|
@NotNull(message = "检验开始时间不能为空")
|
||||||
|
private LocalDateTime inspectionStartTime;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class QmsIncomingInspectionTaskTodoCheckItemsQO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "任务id不能为空")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量,二维码上的数量
|
||||||
|
*/
|
||||||
|
@NotNull(message = "数量不能为空")
|
||||||
|
private Integer num;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class QmsIncomingInspectionTaskTodoCheckSubmitItemDataQO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量值
|
||||||
|
*/
|
||||||
|
private BigDecimal measuredValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否合格
|
||||||
|
*/
|
||||||
|
@NotNull(message = "是否合格不能为空")
|
||||||
|
private Boolean qualified;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片列表
|
||||||
|
*/
|
||||||
|
private List<String> images;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class QmsIncomingInspectionTaskTodoCheckSubmitItemQO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验标准项内容ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "检验标准项内容ID不能为空")
|
||||||
|
private Long inspectionStandardItemContentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
@NotEmpty(message = "样本列表不能为空")
|
||||||
|
private List<QmsIncomingInspectionTaskTodoCheckSubmitItemDataQO> datas;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.nflg.wms.common.pojo.qo;
|
||||||
|
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class QmsIncomingInspectionTaskTodoCheckSubmitQO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "任务ID不能为空")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料唯一编号
|
||||||
|
*/
|
||||||
|
@NotNull(message = "物料唯一编号不能为空")
|
||||||
|
private String materialUniqueNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 样本数量
|
||||||
|
*/
|
||||||
|
@NotNull(message = "样本数量不能为空")
|
||||||
|
private Integer inspectionQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合格数量
|
||||||
|
*/
|
||||||
|
@NotNull(message = "合格数量不能为空")
|
||||||
|
private Integer qualifiedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 不合格数量
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不合格数量不能为空")
|
||||||
|
private Integer unqualifiedQty;
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
@NotEmpty
|
||||||
|
private List<QmsIncomingInspectionTaskTodoCheckSubmitItemQO> items;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.nflg.wms.common.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class QmsIncomingInspectionTaskCheckDetailVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pdf图纸列表
|
||||||
|
*/
|
||||||
|
private List<String> pdfDrawings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 样本数量
|
||||||
|
*/
|
||||||
|
private Integer count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查项列表
|
||||||
|
*/
|
||||||
|
private List<QmsIncomingInspectionTaskCheckItemVO> items;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.nflg.wms.common.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class QmsIncomingInspectionTaskCheckItemVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查项内容ID
|
||||||
|
*/
|
||||||
|
private Long itemContentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验标准项类型:0-标准检测项,1-尺寸检测项
|
||||||
|
*/
|
||||||
|
private Short itemType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测项名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测标准
|
||||||
|
*/
|
||||||
|
private String testStandard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图例
|
||||||
|
*/
|
||||||
|
private String legend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判定类型,0:直接判定;1:测量值
|
||||||
|
*/
|
||||||
|
private Integer judgmentType;
|
||||||
|
}
|
||||||
|
|
@ -36,21 +36,6 @@ public class QmsIncomingInspectionTaskRecord implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Long taskId;
|
private Long taskId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 检验标准id,关联检验标准表
|
|
||||||
*/
|
|
||||||
private Long inspectionStandardId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检验标准项ID
|
|
||||||
*/
|
|
||||||
private Long inspectionStandardItemId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检验标准项内容ID
|
|
||||||
*/
|
|
||||||
private Long inspectionStandardItemContentId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料唯一码
|
* 物料唯一码
|
||||||
*/
|
*/
|
||||||
|
|
@ -64,12 +49,17 @@ public class QmsIncomingInspectionTaskRecord implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 样本数量
|
* 样本数量
|
||||||
*/
|
*/
|
||||||
private Integer count;
|
private Integer inspectionQty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 合格数量
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private Integer qualifiedQty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 不合格数量
|
||||||
|
*/
|
||||||
|
private Integer unqualifiedQty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人ID
|
* 创建人ID
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -31,28 +30,18 @@ public class QmsIncomingInspectionTaskRecordItem implements Serializable {
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
|
||||||
* 来料检测任务id
|
|
||||||
*/
|
|
||||||
private Long taskId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 来料检测任务记录id
|
* 来料检测任务记录id
|
||||||
*/
|
*/
|
||||||
private Long recordId;
|
private Long recordId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 测量值
|
* 检验标准项内容ID
|
||||||
*/
|
*/
|
||||||
private BigDecimal measuredValue;
|
private Long inspectionStandardItemContentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否合格
|
* 备注
|
||||||
*/
|
*/
|
||||||
private Boolean qualified;
|
private String remark;
|
||||||
|
|
||||||
/**
|
|
||||||
* 图片列表,多个逗号分隔
|
|
||||||
*/
|
|
||||||
private String images;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.nflg.wms.repository.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 来料检验任务检验记录子项样本
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author 代码生成器生成
|
||||||
|
* @since 2026
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("qms_incoming_inspection_task_record_item_data")
|
||||||
|
public class QmsIncomingInspectionTaskRecordItemData {
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来料检测任务id
|
||||||
|
*/
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 来料检测任务记录项id
|
||||||
|
*/
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量值
|
||||||
|
*/
|
||||||
|
private BigDecimal measuredValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否合格
|
||||||
|
*/
|
||||||
|
private Boolean qualified;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片列表,多个逗号分隔
|
||||||
|
*/
|
||||||
|
private String images;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.nflg.wms.repository.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskRecordItemData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 来料检验任务检验记录子项样本 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author 代码生成器生成
|
||||||
|
* @since 2026
|
||||||
|
*/
|
||||||
|
public interface QmsIncomingInspectionTaskRecordItemDataMapper extends BaseMapper<QmsIncomingInspectionTaskRecordItemData> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -8,4 +8,5 @@ import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskRecord;
|
||||||
*/
|
*/
|
||||||
public interface QmsIncomingInspectionTaskRecordMapper extends BaseMapper<QmsIncomingInspectionTaskRecord> {
|
public interface QmsIncomingInspectionTaskRecordMapper extends BaseMapper<QmsIncomingInspectionTaskRecord> {
|
||||||
|
|
||||||
|
Integer getCount(Long taskId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nflg.wms.common.pojo.qo.QmsInspectionStandardSearchQO;
|
import com.nflg.wms.common.pojo.qo.QmsInspectionStandardSearchQO;
|
||||||
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCheckItemVO;
|
||||||
import com.nflg.wms.common.pojo.vo.QmsInspectionStandardDetailVO;
|
import com.nflg.wms.common.pojo.vo.QmsInspectionStandardDetailVO;
|
||||||
import com.nflg.wms.common.pojo.vo.QmsInspectionStandardVO;
|
import com.nflg.wms.common.pojo.vo.QmsInspectionStandardVO;
|
||||||
import com.nflg.wms.repository.entity.QmsInspectionStandard;
|
import com.nflg.wms.repository.entity.QmsInspectionStandard;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验标准 Mapper
|
* 检验标准 Mapper
|
||||||
*/
|
*/
|
||||||
|
|
@ -23,4 +26,6 @@ public interface QmsInspectionStandardMapper extends BaseMapper<QmsInspectionSta
|
||||||
* 根据ID查询检验标准详情(关联物料等信息)
|
* 根据ID查询检验标准详情(关联物料等信息)
|
||||||
*/
|
*/
|
||||||
QmsInspectionStandardDetailVO getDetailById(@Param("id") Long id);
|
QmsInspectionStandardDetailVO getDetailById(@Param("id") Long id);
|
||||||
|
|
||||||
|
List<QmsIncomingInspectionTaskCheckItemVO> getItemsForCheck(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,5 @@ import com.nflg.wms.repository.entity.QmsSamplingPlan;
|
||||||
* 抽样方案 Mapper
|
* 抽样方案 Mapper
|
||||||
*/
|
*/
|
||||||
public interface QmsSamplingPlanMapper extends BaseMapper<QmsSamplingPlan> {
|
public interface QmsSamplingPlanMapper extends BaseMapper<QmsSamplingPlan> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.nflg.wms.repository.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskRecordItemData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 来料检验任务检验记录子项样本 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author 代码生成器生成
|
||||||
|
* @since 2026
|
||||||
|
*/
|
||||||
|
public interface IQmsIncomingInspectionTaskRecordItemDataService extends IService<QmsIncomingInspectionTaskRecordItemData> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -8,4 +8,5 @@ import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskRecord;
|
||||||
*/
|
*/
|
||||||
public interface IQmsIncomingInspectionTaskRecordService extends IService<QmsIncomingInspectionTaskRecord> {
|
public interface IQmsIncomingInspectionTaskRecordService extends IService<QmsIncomingInspectionTaskRecord> {
|
||||||
|
|
||||||
|
Integer getCount(Long taskId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.nflg.wms.repository.service;
|
package com.nflg.wms.repository.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCheckItemVO;
|
||||||
import com.nflg.wms.repository.entity.QmsInspectionStandard;
|
import com.nflg.wms.repository.entity.QmsInspectionStandard;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -22,4 +23,6 @@ public interface IQmsInspectionStandardService extends IService<QmsInspectionSta
|
||||||
* @param enable 是否启用
|
* @param enable 是否启用
|
||||||
*/
|
*/
|
||||||
void enable(Long id, Boolean enable);
|
void enable(Long id, Boolean enable);
|
||||||
|
|
||||||
|
List<QmsIncomingInspectionTaskCheckItemVO> getItemsForCheck(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,5 @@ import com.nflg.wms.repository.entity.QmsSamplingPlan;
|
||||||
* 抽样方案 服务类
|
* 抽样方案 服务类
|
||||||
*/
|
*/
|
||||||
public interface IQmsSamplingPlanService extends IService<QmsSamplingPlan> {
|
public interface IQmsSamplingPlanService extends IService<QmsSamplingPlan> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.nflg.wms.repository.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.nflg.wms.repository.entity.QmsIncomingInspectionTaskRecordItemData;
|
||||||
|
import com.nflg.wms.repository.mapper.QmsIncomingInspectionTaskRecordItemDataMapper;
|
||||||
|
import com.nflg.wms.repository.service.IQmsIncomingInspectionTaskRecordItemDataService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 来料检验任务检验记录子项样本 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author 代码生成器生成
|
||||||
|
* @since 2026
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class QmsIncomingInspectionTaskRecordItemDataServiceImpl extends ServiceImpl<QmsIncomingInspectionTaskRecordItemDataMapper, QmsIncomingInspectionTaskRecordItemData>
|
||||||
|
implements IQmsIncomingInspectionTaskRecordItemDataService {
|
||||||
|
}
|
||||||
|
|
@ -12,4 +12,8 @@ import org.springframework.stereotype.Service;
|
||||||
@Service
|
@Service
|
||||||
public class QmsIncomingInspectionTaskRecordServiceImpl extends ServiceImpl<QmsIncomingInspectionTaskRecordMapper, QmsIncomingInspectionTaskRecord> implements IQmsIncomingInspectionTaskRecordService {
|
public class QmsIncomingInspectionTaskRecordServiceImpl extends ServiceImpl<QmsIncomingInspectionTaskRecordMapper, QmsIncomingInspectionTaskRecord> implements IQmsIncomingInspectionTaskRecordService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getCount(Long taskId) {
|
||||||
|
return baseMapper.getCount(taskId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.nflg.wms.repository.service.impl;
|
package com.nflg.wms.repository.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.nflg.wms.common.pojo.qo.QmsIncomingInspectionTaskTodoCheckItemsQO;
|
||||||
|
import com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCheckItemVO;
|
||||||
import com.nflg.wms.common.util.UserUtil;
|
import com.nflg.wms.common.util.UserUtil;
|
||||||
import com.nflg.wms.repository.entity.QmsInspectionStandard;
|
import com.nflg.wms.repository.entity.QmsInspectionStandard;
|
||||||
import com.nflg.wms.repository.mapper.QmsInspectionStandardMapper;
|
import com.nflg.wms.repository.mapper.QmsInspectionStandardMapper;
|
||||||
|
|
@ -54,4 +56,9 @@ public class QmsInspectionStandardServiceImpl extends ServiceImpl<QmsInspectionS
|
||||||
.set(QmsInspectionStandard::getUpdateTime, now)
|
.set(QmsInspectionStandard::getUpdateTime, now)
|
||||||
.update();
|
.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<QmsIncomingInspectionTaskCheckItemVO> getItemsForCheck(Long id) {
|
||||||
|
return baseMapper.getItemsForCheck(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,7 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nflg.wms.repository.mapper.QmsIncomingInspectionTaskRecordMapper">
|
<mapper namespace="com.nflg.wms.repository.mapper.QmsIncomingInspectionTaskRecordMapper">
|
||||||
|
|
||||||
|
<select id="getCount" resultType="java.lang.Integer">
|
||||||
|
SELECT SUM(count) FROM qms_incoming_inspection_task_record WHERE task_id=#{taskId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -89,4 +89,10 @@
|
||||||
s.create_user_id, s.create_user_name, s.create_time, s.update_user_id, s.update_user_name, s.update_time
|
s.create_user_id, s.create_user_name, s.create_time, s.update_user_id, s.update_user_name, s.update_time
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getItemsForCheck" resultType="com.nflg.wms.common.pojo.vo.QmsIncomingInspectionTaskCheckItemVO">
|
||||||
|
SELECT qisic.id as "itemContentId",qisi.item_type,CASE WHEN qisi.item_type=0 THEN qisi.name ELSE qisic.name END as "name",qisic.test_standard,qisic.legend,qisic.judgment_type
|
||||||
|
FROM qms_inspection_standard_item qisi
|
||||||
|
INNER JOIN qms_inspection_standard_item_content qisic ON qisi."id"=qisic.inspection_standard_item_id
|
||||||
|
WHERE qisi.inspection_standard_id=#{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.nflg.wms.repository.mapper.QmsSamplingPlanMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue