Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test
This commit is contained in:
@@ -1329,6 +1329,9 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||
String project = source.getProject();
|
||||
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataExtendList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskData.getId()) && project.equals(f.getSimpleName())).findFirst().orElse(null);
|
||||
if (currentBusinessAssayProjectData == null) {
|
||||
continue;
|
||||
}
|
||||
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||
for (BusinessAssayTaskDataDO targetBusinessAssayTaskData : targetBusinessAssayTaskDataList) {
|
||||
List<String> targetProjectList = Arrays.asList(target.getProject().split(","));
|
||||
@@ -1360,6 +1363,9 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||
String project = source.getProject();
|
||||
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataExtendList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskData.getId()) && project.equals(f.getSimpleName())).findFirst().orElse(null);
|
||||
if (currentBusinessAssayProjectData == null) {
|
||||
continue;
|
||||
}
|
||||
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||
for (BusinessAssayTaskDataDO targetBusinessAssayTaskData : targetBusinessAssayTaskDataList) {
|
||||
List<String> targetProjectList = Arrays.asList(target.getProject().split(","));
|
||||
@@ -1391,6 +1397,9 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
ConfigSubSampleMethodConfPoint source = configSubSampleMethodConfItem.getSource();
|
||||
String project = source.getProject();
|
||||
BusinessAssayProjectDataExtendRespVO currentBusinessAssayProjectData = businessAssayProjectDataExtendList.stream().filter(f -> f.getBusinessAssayTaskDataId().equals(businessAssayTaskData.getId()) && project.equals(f.getSimpleName())).findFirst().orElse(null);
|
||||
if (currentBusinessAssayProjectData == null) {
|
||||
continue;
|
||||
}
|
||||
ConfigSubSampleMethodConfPoint target = configSubSampleMethodConfItem.getTarget();
|
||||
for (BusinessAssayTaskDataDO targetBusinessAssayTaskData : targetBusinessAssayTaskDataList) {
|
||||
List<String> targetProjectList = Arrays.asList(target.getProject().split(","));
|
||||
|
||||
@@ -37,7 +37,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
@RestController
|
||||
@RequestMapping("/qms/resource/material-product")
|
||||
@Validated
|
||||
@FileUploadController(source = "resource.materialproduct")
|
||||
@FileUploadController(source = "resource.materialproduct", codeKey = "data.fileUploadBusinessCode")
|
||||
@DeptDataPermissionIgnore(enable = "true")
|
||||
public class MaterialProductController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
@@ -134,8 +134,8 @@ public class MaterialProductController extends AbstractFileUploadController impl
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
// @PreAuthorize("@ss.hasPermission('qms:material-product:query')")
|
||||
public CommonResult<MaterialProductRespVO> getMaterialProduct(@RequestParam("id") Long id) {
|
||||
MaterialProductDO materialProduct = materialProductService.getMaterialProductInfo(id);
|
||||
return success(BeanUtils.toBean(materialProduct, MaterialProductRespVO.class));
|
||||
MaterialProductRespVO materialProduct = materialProductService.getMaterialProductInfoWithFiles(id);
|
||||
return success(materialProduct);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
|
||||
@@ -41,6 +41,10 @@ public class MaterialBatchRespVO {
|
||||
@ExcelProperty("物料大类型号")
|
||||
private String productModelNo;
|
||||
|
||||
@Schema(description = "标签模板key")
|
||||
@ExcelProperty("标签模板key")
|
||||
private String labelTemplateKey;
|
||||
|
||||
@Schema(description = "批次编号")
|
||||
@ExcelProperty("批次编号")
|
||||
private String batchNo;
|
||||
|
||||
@@ -16,6 +16,9 @@ public class MaterialInventoryInboundDetailPageReqVO extends PageParam {
|
||||
@Schema(description = "入库单ID", example = "30205")
|
||||
private Long inboundId;
|
||||
|
||||
@Schema(description = "物料大类id", example = "30205")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "批次id", example = "16666")
|
||||
private Long batchId;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 入库 Response VO")
|
||||
@Data
|
||||
@@ -93,4 +94,8 @@ public class MaterialInventoryInboundRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "入库明细")
|
||||
@ExcelProperty("入库明细")
|
||||
private List<MaterialInventoryInboundDetailRespVO> detailList;
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.zt.plat.module.qms.resource.material.controller.vo;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -163,4 +165,11 @@ public class MaterialProductRespVO {
|
||||
@Schema(description = "子物料分类")
|
||||
private List<MaterialProductRespVO> children;
|
||||
|
||||
@Schema(description = "附件上传code")
|
||||
private String fileUploadBusinessCode = "qms_resource_material_product";
|
||||
|
||||
@Schema(description = "附件对象")
|
||||
private List<BusinessFileWithUrlRespDTO> businessFileRet;
|
||||
|
||||
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Null;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 物料大类新增/修改 Request VO")
|
||||
@Data
|
||||
public class MaterialProductSaveReqVO {
|
||||
@@ -102,4 +104,7 @@ public class MaterialProductSaveReqVO {
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "删除的文件id")
|
||||
private List<Long> deleteFileIdList;
|
||||
|
||||
}
|
||||
@@ -117,6 +117,7 @@ public interface MaterialBatchMapper extends BaseMapperX<MaterialBatchDO> {
|
||||
.selectAs(MaterialProductDO::getName, MaterialBatchRespVO::getProductName)
|
||||
.selectAs(MaterialProductDO::getCode, MaterialBatchRespVO::getProductCode)
|
||||
.selectAs(MaterialProductDO::getModelNo, MaterialBatchRespVO::getProductModelNo)
|
||||
.selectAs(MaterialProductDO::getLabelTemplateKey, MaterialBatchRespVO::getLabelTemplateKey)
|
||||
.selectAs("batch.MFR_DT", MaterialBatchDO::getManufacturerDate)
|
||||
.selectAs("batch.DUE_DT", MaterialBatchDO::getDueDate)
|
||||
.leftJoin(MaterialProductDO.class, MaterialProductDO::getId, MaterialBatchDO::getProductId)
|
||||
@@ -124,7 +125,6 @@ public interface MaterialBatchMapper extends BaseMapperX<MaterialBatchDO> {
|
||||
// 只查询工段
|
||||
.ne(MaterialBatchDO::getParentId, 0)
|
||||
.eq(MaterialBatchDO::getSubmitStatus, 1)
|
||||
.eq(MaterialBatchDO::getAcceptanceStatus, reqVO.getAcceptanceStatus())
|
||||
.in(CollUtil.isNotEmpty(pdtIds), MaterialBatchDO::getProductId, pdtIds)
|
||||
.eq(CollUtil.isEmpty(pdtIds) && reqVO.getProductId() != null, MaterialBatchDO::getProductId, reqVO.getProductId())
|
||||
.likeIfExists(MaterialBatchDO::getBatchNo, reqVO.getBatchNo())
|
||||
@@ -140,10 +140,10 @@ public interface MaterialBatchMapper extends BaseMapperX<MaterialBatchDO> {
|
||||
.eqIfExists(MaterialBatchDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.eqIfExists(MaterialBatchDO::getRemark, reqVO.getRemark())
|
||||
// 已处理
|
||||
.le(reqVO.getTreatment(), MaterialBatchDO::getInboundQuantity, MaterialBatchDO::getInboundEndQuantity)
|
||||
.apply(reqVO.getTreatment(), "t.INB_END_QTY >= t.INB_QTY")
|
||||
// 未处理
|
||||
.gt(!reqVO.getTreatment(), MaterialBatchDO::getInboundQuantity, MaterialBatchDO::getInboundEndQuantity)
|
||||
.orderByDesc(MaterialBatchDO::getParentId);
|
||||
.apply(!reqVO.getTreatment(), "t.INB_END_QTY < t.INB_QTY")
|
||||
.orderByDesc(MaterialBatchDO::getId);
|
||||
if (reqVO.getCreateTime() != null && reqVO.getCreateTime().length == 2) {
|
||||
wrapper.between(MaterialBatchDO::getCreateTime, reqVO.getCreateTime()[0], reqVO.getCreateTime()[1]);
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public interface MaterialInventoryInboundDetailMapper extends BaseMapperX<Materi
|
||||
.leftJoin(MaterialProductDO.class, MaterialProductDO::getId, MaterialInfomationDO::getProductId)
|
||||
.leftJoin(MaterialInventoryInboundDO.class, MaterialInventoryInboundDO::getId, MaterialInventoryInboundDetailDO::getInboundId)
|
||||
.leftJoin(ConfigWarehouseLocationDO.class, ConfigWarehouseLocationDO::getId, MaterialInfomationDO::getLocationId)
|
||||
.eqIfPresent(MaterialInfomationDO::getProductId, reqVO.getProductId())
|
||||
.eqIfPresent(MaterialInventoryInboundDetailDO::getInboundId, reqVO.getInboundId())
|
||||
.eqIfPresent(MaterialInventoryInboundDetailDO::getBatchId, reqVO.getBatchId())
|
||||
.eqIfPresent(MaterialInventoryInboundDetailDO::getBatchGongduanId, reqVO.getBatchGongduanId())
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.zt.plat.module.qms.resource.material.dal.mapper;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
@@ -8,9 +11,13 @@ import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialLifecycleDetailPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.material.controller.vo.MaterialLifecycleDetailRespVO;
|
||||
import com.zt.plat.module.qms.resource.material.dal.dataobject.*;
|
||||
import groovy.util.logging.Slf4j;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 物料通用流程明细 Mapper
|
||||
@@ -87,4 +94,22 @@ public interface MaterialLifecycleDetailMapper extends BaseMapperX<MaterialLifec
|
||||
.in(MaterialLifecycleDetailDO::getLifecycleId, lfcIds);
|
||||
return selectJoinList(MaterialLifecycleDetailRespVO.class, wrapper);
|
||||
}
|
||||
|
||||
default Map<Long, Long> getMadeCountMapByDetailIds(List<Long> detailIds) {
|
||||
|
||||
MPJLambdaWrapper<MaterialLifecycleDetailDO> wrapper = new MPJLambdaWrapper<MaterialLifecycleDetailDO>()
|
||||
.select(MaterialLifecycleDetailDO::getId)
|
||||
.selectCount(MaterialStandardSolutionDO::getId, "quantity")
|
||||
.leftJoin(MaterialStandardSolutionDO.class, MaterialStandardSolutionDO::getDetailId, MaterialLifecycleDetailDO::getId)
|
||||
.in(MaterialLifecycleDetailDO::getId, detailIds)
|
||||
.groupBy(MaterialLifecycleDetailDO::getId);
|
||||
|
||||
List<Map<String, Object>> maps = selectJoinMaps(wrapper);
|
||||
if (CollUtil.isEmpty(maps)) return new HashMap<>();
|
||||
|
||||
return maps.stream().collect(Collectors.toMap(
|
||||
map -> (Long) map.get("ID"),
|
||||
map -> (Long) map.get("QUANTITY")
|
||||
));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user