From 98f9112c1de70cd53778edf5e53924a01f154e2a Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 30 六月 2023 20:15:27 +0800 Subject: [PATCH] 部署web端打包 --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java index 834bb02..643f036 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java @@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; @@ -55,6 +56,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springblade.core.cache.utils.CacheUtil; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.DateUtil; @@ -3345,8 +3347,8 @@ * @return 鍒楄〃鏁版嵁 */ @Override - public Page<BaseModel>referDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject) { -// checkReferConfig(referConfigVO); + public IPage<BaseModel> referDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject) { + //checkReferConfig(referConfigVO); //浣跨敤涓氬姟绫诲瀷鏌ヨ R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getAllAttributeByBtmId(referConfigVO.getReferType()); BtmTypeVO btmTypeVO = allAttributeByBtmId.getData(); @@ -3363,7 +3365,11 @@ BtmTypeLcStatusConstant.RELEASE_LIFE_CYCLE.equalsIgnoreCase(btmTypeVO.getLifeCycleId())) { baseQueryObject.getConditionMap().put(VciQueryWrapperForDO.LC_STATUS_FIELD, CodeDefaultLC.RELEASED.getValue()); } + R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referConfigVO.getReferType())); + if (listR.getCode() != 200) { + throw new ServiceException("涓氬姟绫诲瀷feign鎺ュ彛璋冪敤閿欒"); + } if (listR.getData().size() == 0) { throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒"); } @@ -3390,8 +3396,8 @@ String num2 = ((baseQueryObject.getPage()) - 1) * baseQueryObject.getLimit() + 1 + ""; List<Map> maps = commonsMapper.selectBySql("select * from ( select rownum rn, t.* from (select * from " + listR.getData().get(0).getTableName() - + " where lastr = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastr").toString()) - + "and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString()) + + (StringUtils.isNotBlank(listR.getData().get(0).getRevisionRuleId()) ? (" where lastr = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastr").toString()) + + "and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())):"") + lcstatusSql + namesql + codesql + ") t where rownum <=" + num1 + ") where rn >=" + num2 ); List<BaseModel> baseModels = new ArrayList<>(); @@ -3434,14 +3440,17 @@ throw new VciBaseException("鏌ヨ澶辫触锛�" + e.getMessage()); } int total = commonsMapper.queryCountBySql("select count(*) from " + listR.getData().get(0).getTableName() - + " where lastr = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastr").toString()) - + "and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString()) + + (StringUtils.isNotBlank(listR.getData().get(0).getRevisionRuleId()) ? (" where lastr = " + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastr").toString()) + + "and lastv =" + VciBaseUtil.toInSql(baseQueryObject.getConditionMap().get("lastv").toString())):"") + lcstatusSql + namesql + codesql ); - Page<BaseModel>page=new Page<>(); - page.setRecords(baseModels); - page.setTotal(total); - return page; + IPage<BaseModel> objectDataGrid = new Page<>(); + objectDataGrid.setPages(baseQueryObject.getPage()); + objectDataGrid.setCurrent(baseQueryObject.getPage()); + objectDataGrid.setRecords(baseModels); + objectDataGrid.setSize(baseQueryObject.getLimit()); + objectDataGrid.setTotal(total); + return objectDataGrid; } /** -- Gitblit v1.9.3