From 336265194a47bcbdbd5f8d2274d10a6284ee1246 Mon Sep 17 00:00:00 2001
From: mamc <1428594221@qq.com>
Date: 星期三, 28 六月 2023 14:43:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java | 42 ++++++++++++++++++++++++++++--------------
1 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
index e363a31..b20064a 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -131,9 +131,11 @@
MPJLambdaWrapper<CodeBasicSec> mpjLambdaWrapper = new MPJLambdaWrapper<>(CodeBasicSec.class, CodeTableNameEnum.PL_CODE_BASICSEC.getText())
.selectAll(CodeBasicSec.class)
.selectAs(CodeClassify::getName, CodeBasicSec::getReferCodeClassifyOidName)
- .leftJoin(CodeClassify.class,CodeTableNameEnum.PL_CODE_CLASSIFY.getText(), CodeClassify::getOid, CodeBasicSec::getReferCodeClassifyOid);
+ .leftJoin(CodeClassify.class, CodeTableNameEnum.PL_CODE_CLASSIFY.getText(), CodeClassify::getOid, CodeBasicSec::getReferCodeClassifyOid)
+ .leftJoin(CodeBasicSec.class,CodeTableNameEnum.PL_CODE_BASICSEC.getText()+1,CodeBasicSec::getOid,CodeBasicSec::getParentClassifySecOid
+ ,ext->ext.selectAs(CodeBasicSec::getName,CodeBasicSec::getParentClassifySecText));
// 娣诲姞where鏉′欢
- UBCSSqlKeyword.buildCondition(conditionMap,mpjLambdaWrapper);
+ UBCSSqlKeyword.buildConditionByAs(conditionMap,mpjLambdaWrapper,CodeTableNameEnum.PL_CODE_BASICSEC.getText());
IPage<CodeBasicSec> codeBasicSecIPage = codeBasicSecMapper.selectPage(UBCSCondition.getPage(query), mpjLambdaWrapper);
return CodeBasicSecWrapper.build().pageVO(codeBasicSecIPage);
}
@@ -265,7 +267,6 @@
//JSONObject.parseObject(codeBasicSecDO.getReferConfig(), UIFormReferVO.class);
codeReferConfigVO = JSONObject.parseObject(codeBasicSecDO.getReferConfig(), CodeReferConfigVO.class);
// 灏嗗弬鐓ч厤缃繘琛屾寔涔呭寲锛岀粰鐢ㄦ埛鎻愪緵鍙彲閫夋嫨鍙傜収閰嶇疆鐨勬柟寮�
-
}catch (Throwable e){
throw new VciBaseException("寮曠敤鐮佹鐨勬椂鍊欙紝鍙傜収閰嶇疆鐨勫唴瀹圭殑鏍煎紡涓嶆纭�,",new String[0],e);
}
@@ -508,20 +509,23 @@
}
List<CodeBasicSec> createList = new ArrayList<>();
List<CodeBasicSec> basicSecDOS = codeBasicSecMapper.selectBatchIds(oidList);
+ if(basicSecDOS.isEmpty()){
+ return R.fail("鍏嬮殕鐨勭爜娈典俊鎭笉瀛樺湪锛�");
+ }
basicSecDOS.forEach(sec -> {
CodeBasicSec newSecDO = new CodeBasicSec();
BeanUtilForVCI.copyPropertiesIgnoreCase(sec,newSecDO);
- newSecDO.setOid("");
- newSecDO.setNameOid("");
- newSecDO.setRevisionOid("");
+ newSecDO.setOid(VciBaseUtil.getPk());
+ newSecDO.setNameOid(VciBaseUtil.getPk());
+ newSecDO.setRevisionOid(VciBaseUtil.getPk());
newSecDO.setId(newSecDO.getId() + "_copy");
newSecDO.setName(newSecDO.getName() + "_copy");
newSecDO.setPkCodeRule(pkCodeRule);
createList.add(newSecDO);
});
- boolean b = saveBatch(createList);
+ boolean resBoolean = saveBatch(createList);
//codeBasicSecMapper.insertBatch(createList);
- return R.data(b,"鍏嬮殕鐮佹淇℃伅鎴愬姛");
+ return resBoolean ? R.data(resBoolean,"鍏嬮殕鐮佹淇℃伅鎴愬姛"):R.fail("鍏嬮殕鐮佹淇℃伅澶辫触锛�");
}
/**
@@ -787,12 +791,22 @@
public CodeBasicSecVO codeBasicSecDO2VO(CodeBasicSec codeBasicSecDO) throws VciBaseException {
CodeBasicSecVO codeBasicSecVO = new CodeBasicSecVO();
if (codeBasicSecDO != null) {
- BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecVO, codeBasicSecVO);
- codeBasicSecVO.setSecTypeText(CodeSecTypeEnum.getTextByValue(codeBasicSecVO.getSecType()));
- codeBasicSecVO.setCodeLevelTypeText(CodeLevelTypeEnum.getTextByValue(codeBasicSecVO.getCodeLevelType()));
- codeBasicSecVO.setCodeSecLengthTypeText(CodeSecLengthTypeEnum.getTextByValue(codeBasicSecVO.getCodeSecLengthType()));
- codeBasicSecVO.setValueCutTypeText(CodeCutTypeEnum.getValueByText(codeBasicSecVO.getValueCutType()));
- codeBasicSecVO.setCodeGetValueTypeText(CodeGetValueTypeEnum.getValueByText(codeBasicSecVO.getCodeGetValueType()));
+ BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecDO, codeBasicSecVO);
+ if(StringUtils.isNotBlank(codeBasicSecDO.getSecType())){
+ codeBasicSecVO.setSecTypeText(EnumCache.getValue(EnumEnum.CODE_SEC_TYPE,codeBasicSecDO.getSecType()));
+ }
+ if(StringUtils.isNotBlank(codeBasicSecDO.getCodeLevelType())){
+ codeBasicSecVO.setCodeLevelTypeText(EnumCache.getValue(EnumEnum.CODE_LEVEL_TYPE,codeBasicSecDO.getCodeLevelType()));
+ }
+ if(StringUtils.isNotBlank(codeBasicSecDO.getCodeSecLengthType())){
+ codeBasicSecVO.setCodeSecLengthTypeText(EnumCache.getValue(EnumEnum.CODE_SEC_LENGTH,codeBasicSecDO.getCodeSecLengthType()));
+ }
+ if(StringUtils.isNotBlank(codeBasicSecDO.getValueCutType())){
+ codeBasicSecVO.setValueCutTypeText(EnumCache.getValue(EnumEnum.CODE_CUT_TYPE,codeBasicSecDO.getValueCutType()));
+ }
+ if(StringUtils.isNotBlank(codeBasicSecDO.getCodeGetValueType())){
+ codeBasicSecVO.setCodeGetValueTypeText(EnumCache.getValue(EnumEnum.CODE_GET_VALUE_TYPE,codeBasicSecDO.getCodeGetValueType()));
+ }
// 濡傛灉鏄垎绫荤爜娈甸渶瑕佹煡璇㈡墍灞炲垎绫荤殑涓枃鍚嶇О
if(codeBasicSecDO.getSecType().equals("codeclassifysec") && Func.isNotEmpty(codeBasicSecDO.getParentClassifySecOid())){
CodeBasicSec codeBasicSec = codeBasicSecMapper.selectOne(Wrappers.<CodeBasicSec>query().lambda()
--
Gitblit v1.9.3