来样品位配置
This commit is contained in:
@@ -92,6 +92,12 @@ public class MaterialAssayStandardForecastProjectController implements BusinessC
|
||||
return success(BeanUtils.toBean(pageResult, MaterialAssayStandardForecastProjectRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public CommonResult<?> getMaterialAssayStandardForecastProjectList(MaterialAssayStandardForecastProjectReqVO reqVO) {
|
||||
List<MaterialAssayStandardForecastProjectExtendRespVO> list = materialAssayStandardForecastProjectService.getMaterialAssayStandardForecastProjectList(reqVO);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出物料检测标准来样品位配置 Excel")
|
||||
//@PreAuthorize("@ss.hasPermission('t:material-assay-standard-forecast-project:export')")
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MaterialAssayStandardForecastProjectExtendRespVO extends MaterialAssayStandardForecastProjectRespVO {
|
||||
|
||||
@Schema(description = "检测项目key")
|
||||
private String dictionaryProjectKey;
|
||||
|
||||
@Schema(description = "检测项目缩写")
|
||||
private String simpleName;
|
||||
|
||||
@Schema(description = "显示名称")
|
||||
private String showName;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.zt.plat.module.qms.business.config.controller.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 物料检测标准来样品位配置分页 Request VO")
|
||||
@Data
|
||||
public class MaterialAssayStandardForecastProjectReqVO {
|
||||
|
||||
@Schema(description = "物料检测标准ID", example = "28807")
|
||||
private Long materialAssayStandardId;
|
||||
|
||||
@Schema(description = "检测项目ID", example = "16539")
|
||||
private Long dictionaryProjectId;
|
||||
|
||||
@Schema(description = "检测项目编码")
|
||||
private String dictionaryProjectCode;
|
||||
|
||||
@Schema(description = "检测结果单位ID", example = "11072")
|
||||
private Long unitId;
|
||||
|
||||
@Schema(description = "检测结果单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "数据类型,【字典】【jy_sample_data_type】字符串,整数,小数,日期,时间", example = "1")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "小数位")
|
||||
private Integer decimalPosition;
|
||||
|
||||
@Schema(description = "是否必填,委托时是否必填;1-是,0-否")
|
||||
private Integer isDefault;
|
||||
|
||||
@Schema(description = "所属部门")
|
||||
private String systemDepartmentCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
//=================样品大类属性====================
|
||||
@Schema(description = "样品大类ID", example = "1394")
|
||||
private Long baseSampleId;
|
||||
}
|
||||
@@ -2,10 +2,16 @@ package com.zt.plat.module.qms.business.config.dal.mapper;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardForecastProjectPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardDO;
|
||||
import com.zt.plat.module.qms.business.config.dal.dataobject.MaterialAssayStandardForecastProjectDO;
|
||||
import com.zt.plat.module.qms.business.dic.dal.dataobject.DictionaryProjectDO;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
@@ -32,4 +38,28 @@ public interface MaterialAssayStandardForecastProjectMapper extends BaseMapperX<
|
||||
.orderByDesc(MaterialAssayStandardForecastProjectDO::getId));
|
||||
}
|
||||
|
||||
|
||||
default List<MaterialAssayStandardForecastProjectExtendRespVO> selectList(MaterialAssayStandardForecastProjectReqVO reqVO) {
|
||||
return selectJoinList(MaterialAssayStandardForecastProjectExtendRespVO.class, new MPJLambdaWrapperX<MaterialAssayStandardForecastProjectDO>()
|
||||
.leftJoin(DictionaryProjectDO.class, DictionaryProjectDO::getId, MaterialAssayStandardForecastProjectDO::getDictionaryProjectId)
|
||||
.leftJoin(MaterialAssayStandardDO.class, MaterialAssayStandardDO::getId, MaterialAssayStandardForecastProjectDO::getMaterialAssayStandardId)
|
||||
.selectAll(MaterialAssayStandardForecastProjectDO.class)
|
||||
.selectAs(DictionaryProjectDO::getKey, MaterialAssayStandardForecastProjectExtendRespVO::getDictionaryProjectKey)
|
||||
.selectAs(DictionaryProjectDO::getSimpleName, MaterialAssayStandardForecastProjectExtendRespVO::getSimpleName)
|
||||
.selectAs(DictionaryProjectDO::getShowName, MaterialAssayStandardForecastProjectExtendRespVO::getShowName)
|
||||
.eqIfPresent(MaterialAssayStandardDO::getBaseSampleId, reqVO.getBaseSampleId())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getMaterialAssayStandardId, reqVO.getMaterialAssayStandardId())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getDictionaryProjectId, reqVO.getDictionaryProjectId())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getDictionaryProjectCode, reqVO.getDictionaryProjectCode())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getUnitId, reqVO.getUnitId())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getUnit, reqVO.getUnit())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getDataType, reqVO.getDataType())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getDecimalPosition, reqVO.getDecimalPosition())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getIsDefault, reqVO.getIsDefault())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(MaterialAssayStandardForecastProjectDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(MaterialAssayStandardForecastProjectDO::getRemark, reqVO.getRemark())
|
||||
.orderByDesc(MaterialAssayStandardForecastProjectDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,9 +2,6 @@ package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardForecastProjectPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardForecastProjectRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardForecastProjectSaveReqVO;
|
||||
import jakarta.validation.*;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.*;
|
||||
@@ -63,4 +60,11 @@ public interface MaterialAssayStandardForecastProjectService {
|
||||
*/
|
||||
PageResult<MaterialAssayStandardForecastProjectDO> getMaterialAssayStandardForecastProjectPage(MaterialAssayStandardForecastProjectPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得物料检测标准来样品位配置
|
||||
* @param reqVO 查询条件
|
||||
* @return 物料检测标准来样品位配置
|
||||
*/
|
||||
List<MaterialAssayStandardForecastProjectExtendRespVO> getMaterialAssayStandardForecastProjectList(MaterialAssayStandardForecastProjectReqVO reqVO);
|
||||
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.zt.plat.module.qms.business.config.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardForecastProjectPageReqVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardForecastProjectRespVO;
|
||||
import com.zt.plat.module.qms.business.config.controller.vo.MaterialAssayStandardForecastProjectSaveReqVO;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -90,4 +88,10 @@ public class MaterialAssayStandardForecastProjectServiceImpl implements Material
|
||||
return materialAssayStandardForecastProjectMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaterialAssayStandardForecastProjectExtendRespVO> getMaterialAssayStandardForecastProjectList(
|
||||
MaterialAssayStandardForecastProjectReqVO reqVO) {
|
||||
return materialAssayStandardForecastProjectMapper.selectList(reqVO);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user