组织物料属性展示弹窗,新增通用物料属性的只读展示, 优化物料信息查询效率 http://172.16.46.63:31560/index.php?m=task&f=view&taskID=706
This commit is contained in:
@@ -108,4 +108,8 @@
|
|||||||
</root>
|
</root>
|
||||||
</springProfile>
|
</springProfile>
|
||||||
|
|
||||||
|
<logger name="com.zt.plat.module.base.dal" level="DEBUG" additivity="false">
|
||||||
|
<appender-ref ref="STDOUT"/>
|
||||||
|
</logger>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
29
sql/dm/2026-1-14物料相关表增加索引.sql
Normal file
29
sql/dm/2026-1-14物料相关表增加索引.sql
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
CREATE INDEX idx_hs_cls_tenant_deleted_cls
|
||||||
|
ON bse_mtrl_hs_cls(tenant_id, deleted, CLS_ID, INF_ID);
|
||||||
|
|
||||||
|
CREATE INDEX idx_hs_cls_composite
|
||||||
|
ON bse_mtrl_hs_cls(tenant_id, deleted, CLS_ID);
|
||||||
|
|
||||||
|
CREATE INDEX idx_mtrl_inf_tenant_deleted_id
|
||||||
|
ON bse_mtrl_inf(tenant_id, deleted, id);
|
||||||
|
|
||||||
|
CREATE INDEX idx_mtrl_inf_tenant_deleted_cd
|
||||||
|
ON bse_mtrl_inf(tenant_id, deleted, CD, id);
|
||||||
|
|
||||||
|
CREATE INDEX idx_mtrl_inf_cover
|
||||||
|
ON bse_mtrl_inf(tenant_id, deleted, CD, id, NAME, RMK, create_time, update_time, creator, updater);
|
||||||
|
|
||||||
|
CREATE INDEX idx_hs_prps_tenant_deleted_inf
|
||||||
|
ON bse_mtrl_hs_prps(tenant_id, deleted, INF_ID, PRPS_ID);
|
||||||
|
|
||||||
|
CREATE INDEX idx_hs_prps_tenant_inf_deleted
|
||||||
|
ON bse_mtrl_hs_prps(tenant_id, INF_ID, deleted);
|
||||||
|
|
||||||
|
CREATE INDEX idx_hs_prps_cover
|
||||||
|
ON bse_mtrl_hs_prps(tenant_id, deleted, INF_ID, PRPS_ID, UNT_ID, IS_KY, IS_MTNG, SRT, DEPT_ID);
|
||||||
|
|
||||||
|
CREATE INDEX idx_mtrl_prps_tenant_deleted_id
|
||||||
|
ON bse_mtrl_prps(tenant_id, deleted, id);
|
||||||
|
|
||||||
|
CREATE INDEX idx_mtrl_prps_cover
|
||||||
|
ON bse_mtrl_prps(tenant_id, deleted, id, CD, NAME, UNT_QTY_ID, DIC_DAT_VAL, DAT_TP, RMK, DEPT_ID);
|
||||||
@@ -52,7 +52,7 @@ public class MaterialHasPropertiesDeptController {
|
|||||||
public CommonResult<MaterialHasPropertiesBatchSaveRespVO> batchSave(@Valid @RequestBody MaterialHasPropertiesBatchSaveReqVO reqVO) {
|
public CommonResult<MaterialHasPropertiesBatchSaveRespVO> batchSave(@Valid @RequestBody MaterialHasPropertiesBatchSaveReqVO reqVO) {
|
||||||
Long deptId = reqVO.getDeptId();
|
Long deptId = reqVO.getDeptId();
|
||||||
if (deptId == null) {
|
if (deptId == null) {
|
||||||
throw new ServiceException(401, "部门ID不能为空");
|
throw new ServiceException(500, "部门ID不能为空");
|
||||||
}
|
}
|
||||||
MaterialHasPropertiesBatchSaveRespVO resp = materialHasPropertiesService.batchSave(reqVO, deptId);
|
MaterialHasPropertiesBatchSaveRespVO resp = materialHasPropertiesService.batchSave(reqVO, deptId);
|
||||||
return success(resp);
|
return success(resp);
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class MaterialPropertiesDeptController {
|
|||||||
public CommonResult<MaterialPropertiesRespVO> getMaterialProperties(@RequestParam("id") Long id) {
|
public CommonResult<MaterialPropertiesRespVO> getMaterialProperties(@RequestParam("id") Long id) {
|
||||||
MaterialPropertiesRespVO materialProperties = materialPropertiesService.getMaterialProperties(id);
|
MaterialPropertiesRespVO materialProperties = materialPropertiesService.getMaterialProperties(id);
|
||||||
if (materialProperties.getDeptId() == null) {
|
if (materialProperties.getDeptId() == null) {
|
||||||
throw new ServiceException(401, "没有权限");
|
throw new ServiceException(500, "没有权限");
|
||||||
}
|
}
|
||||||
return success(materialProperties);
|
return success(materialProperties);
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ public class MaterialPropertiesDeptController {
|
|||||||
@PreAuthorize("@ss.hasPermission('base:material-properties-dept:query')")
|
@PreAuthorize("@ss.hasPermission('base:material-properties-dept:query')")
|
||||||
public CommonResult<PageResult<MaterialPropertiesRespVO>> getMaterialPropertiesPage(@Valid MaterialPropertiesPageReqVO pageReqVO) {
|
public CommonResult<PageResult<MaterialPropertiesRespVO>> getMaterialPropertiesPage(@Valid MaterialPropertiesPageReqVO pageReqVO) {
|
||||||
if (pageReqVO.getDeptId() == null) {
|
if (pageReqVO.getDeptId() == null) {
|
||||||
throw new ServiceException(401, "部门ID不能为空");
|
throw new ServiceException(500, "部门ID不能为空");
|
||||||
}
|
}
|
||||||
PageResult<MaterialPropertiesRespVO> pageResult = materialPropertiesService.getMaterialPropertiesPage(pageReqVO);
|
PageResult<MaterialPropertiesRespVO> pageResult = materialPropertiesService.getMaterialPropertiesPage(pageReqVO);
|
||||||
return success(pageResult);
|
return success(pageResult);
|
||||||
@@ -118,7 +118,7 @@ public class MaterialPropertiesDeptController {
|
|||||||
@PreAuthorize("@ss.hasPermission('base:material-properties-dept:query')")
|
@PreAuthorize("@ss.hasPermission('base:material-properties-dept:query')")
|
||||||
public CommonResult<PageResult<MaterialPropertiesSimpleRespVO>> getMaterialPropertiesSimplePage(@Valid MaterialPropertiesSimplePageReqVO pageReqVO) {
|
public CommonResult<PageResult<MaterialPropertiesSimpleRespVO>> getMaterialPropertiesSimplePage(@Valid MaterialPropertiesSimplePageReqVO pageReqVO) {
|
||||||
if (pageReqVO.getDeptId() == null) {
|
if (pageReqVO.getDeptId() == null) {
|
||||||
throw new ServiceException(401, "部门ID不能为空");
|
throw new ServiceException(500, "部门ID不能为空");
|
||||||
}
|
}
|
||||||
return success(materialPropertiesService.getMaterialPropertiesSimplePage(pageReqVO));
|
return success(materialPropertiesService.getMaterialPropertiesSimplePage(pageReqVO));
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ public class MaterialPropertiesDeptController {
|
|||||||
public void exportMaterialPropertiesExcel(@Valid MaterialPropertiesPageReqVO pageReqVO,
|
public void exportMaterialPropertiesExcel(@Valid MaterialPropertiesPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
if (pageReqVO.getDeptId() == null) {
|
if (pageReqVO.getDeptId() == null) {
|
||||||
throw new ServiceException(401, "部门ID不能为空");
|
throw new ServiceException(500, "部门ID不能为空");
|
||||||
}
|
}
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<MaterialPropertiesRespVO> list = materialPropertiesService.getMaterialPropertiesPage(pageReqVO).getList();
|
List<MaterialPropertiesRespVO> list = materialPropertiesService.getMaterialPropertiesPage(pageReqVO).getList();
|
||||||
|
|||||||
@@ -114,8 +114,14 @@ public class MaterialHasPropertiesServiceImpl implements MaterialHasPropertiesSe
|
|||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
// 全量替换:先删除该物料的已有属性
|
// 全量替换:先删除该物料的已有属性
|
||||||
materialHasPropertiesMapper.delete(new LambdaQueryWrapperX<MaterialHasPropertiesDO>()
|
LambdaQueryWrapperX<MaterialHasPropertiesDO> delQuery = new LambdaQueryWrapperX<>();
|
||||||
.eq(MaterialHasPropertiesDO::getInfomationId, infoId));
|
delQuery.eq(MaterialHasPropertiesDO::getInfomationId, infoId);
|
||||||
|
if (deptId == null) {
|
||||||
|
delQuery.isNull(MaterialHasPropertiesDO::getDeptId);
|
||||||
|
} else {
|
||||||
|
delQuery.eq(MaterialHasPropertiesDO::getDeptId, deptId);
|
||||||
|
}
|
||||||
|
materialHasPropertiesMapper.delete(delQuery);
|
||||||
|
|
||||||
List<MaterialHasPropertiesBatchItemReqVO> properties = batchReqVO.getProperties();
|
List<MaterialHasPropertiesBatchItemReqVO> properties = batchReqVO.getProperties();
|
||||||
if (CollUtil.isEmpty(properties)) {
|
if (CollUtil.isEmpty(properties)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user