Browse Source

客户表新增实际控制人从业年限字段

main
likunming 7 months ago
parent
commit
5635c14723
  1. 3
      gradle.properties
  2. 5
      irbs.cust.rating/src/main/java/irbs/cust/rating/controller/CompanyRatingProcessController.java
  3. 5
      irbs.cust.rating/src/main/java/irbs/cust/rating/jpa/repository/MainScaleConfigRepository.java
  4. 2
      irbs.cust.rating/src/main/java/irbs/cust/rating/jpa/repository/MainScaleVersionRepository.java
  5. 2
      irbs.cust.rating/src/main/java/irbs/cust/rating/service/CompanyRatingProcessService.java
  6. 91
      irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/CompanyRatingProcessServiceImpl.java
  7. 7
      irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/CompanyRatingServiceImpl.java
  8. 4
      irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/HomeServiceImpl.java
  9. 18
      irbs.cust.rating/src/main/resources/liquibase/20240321_CUST_RATING_DDL.xml
  10. 2
      irbs.frontend/package.json

3
gradle.properties

@ -38,7 +38,7 @@ application_version=1.0.1
platform_group=io.sc
platform_version=8.1.44
platform_plugin_version=8.1.44
platform_core_frontend_version=8.1.281
platform_core_frontend_version=8.1.287
###########################################################
# product dependencies version
@ -53,6 +53,7 @@ asciidoctor_version=3.3.2
commons_fileupload_version=1.4
commons_io_version=2.11.0
cxf_version=3.2.7
dm_hibernate_version=8.1.2.192
flowable_version=6.8.0
guava_version=31.1-jre

5
irbs.cust.rating/src/main/java/irbs/cust/rating/controller/CompanyRatingProcessController.java

@ -24,12 +24,13 @@ public class CompanyRatingProcessController {
@ResponseBody
public CompleteTaskResponse submit(@PathVariable("taskId") String taskId, @RequestBody ProcessProperties processProperties) throws Exception {
try {
return service.submit(taskId, processProperties);
service.submit(taskId, processProperties);
} catch (CompleteTaskException exception) {
return CompleteTaskResponse.fromAssigneesJson(exception.getMessage());
} catch (Exception e) {
e.printStackTrace();
return new CompleteTaskResponse();
throw e;
}
return new CompleteTaskResponse();
}
}

5
irbs.cust.rating/src/main/java/irbs/cust/rating/jpa/repository/MainScaleConfigRepository.java

@ -2,6 +2,8 @@ package irbs.cust.rating.jpa.repository;
import io.sc.platform.orm.repository.DaoRepository;
import irbs.cust.rating.jpa.entity.MainScaleConfig;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
@ -10,4 +12,7 @@ public interface MainScaleConfigRepository extends DaoRepository<MainScaleConfig
MainScaleConfig findByLevel(String level);
List<MainScaleConfig> findByVersionId(String versionId);
// @Query(value = "from MainScaleConfig msc JOIN MainScaleVersion v where v.status = :custNo and ms.level = :processStatus ")
// void deleteByCustNoAndProcessStatus(@Param("custNo") String custNo, @Param("processStatus") String processStatus);
}

2
irbs.cust.rating/src/main/java/irbs/cust/rating/jpa/repository/MainScaleVersionRepository.java

@ -8,4 +8,6 @@ import java.util.List;
public interface MainScaleVersionRepository extends DaoRepository<MainScaleVersion, String> {
List<MainScaleVersion> findByStatusAndCode(String status, String code);
List<MainScaleVersion> findByStatus(String status);
}

2
irbs.cust.rating/src/main/java/irbs/cust/rating/service/CompanyRatingProcessService.java

@ -11,5 +11,5 @@ import io.sc.platform.flowable.support.CompleteTaskResponse;
*/
public interface CompanyRatingProcessService {
public CompleteTaskResponse submit(String taskId, ProcessProperties processProperties) throws CompleteTaskException, Exception;
public void submit(String taskId, ProcessProperties processProperties) throws Exception;
}

91
irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/CompanyRatingProcessServiceImpl.java

@ -66,62 +66,53 @@ public class CompanyRatingProcessServiceImpl implements CompanyRatingProcessServ
@Override
@Transactional
public CompleteTaskResponse submit(String taskId, ProcessProperties processProperties) throws CompleteTaskException, Exception {
try {
Task task = processEngine.getTaskService().createTaskQuery().taskId(taskId).singleResult();
Map<String, Object> transientVariables = processProperties.getTransientVariables();
Integer opaVal = (Integer) transientVariables.get("opaVal");
ProcessInstance instance = processEngine.getRuntimeService().createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).singleResult();
String suggestLevel = null;
if (transientVariables.containsKey("suggestLevel")) {
suggestLevel = (String) transientVariables.get("suggestLevel");
}
public void submit(String taskId, ProcessProperties processProperties) throws Exception {
Task task = processEngine.getTaskService().createTaskQuery().taskId(taskId).singleResult();
Map<String, Object> transientVariables = processProperties.getTransientVariables();
Integer opaVal = (Integer) transientVariables.get("opaVal");
// TODO 当前流程通过读取流程设计中任务节点的输出线加载页面按钮,而实际业务存在需要根据业务信息判断下一步提交的节点。
List<VariableWrapper> variableWrapperList = processQueryService.queryVariables(task.getProcessInstanceId());
Integer lastGoback = -1;
Boolean flag = false;
for (VariableWrapper variableWrapper : variableWrapperList) {
if (variableWrapper.getName().equals(TaskVariable.LAST_GOBACK)) {
lastGoback = Integer.parseInt(variableWrapper.getText());
}
}
if (opaVal == RatingGoBackType.JUDGMENT.code()) {
transientVariables.put("submit", lastGoback);
} else if (opaVal == RatingGoBackType.SUBMIT_HEAD.code() && isNeedHeadBankApprove(suggestLevel, instance.getBusinessKey())) {
transientVariables.put("submit", RatingGoBackType.SUBMIT.code());
flag = true;
} else if (opaVal == RatingGoBackType.SUBMIT_HEAD.code()) {
transientVariables.put("submit", RatingGoBackType.APPROVE.code());
ProcessInstance instance = processEngine.getRuntimeService().createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).singleResult();
String suggestLevel = null;
if (transientVariables.containsKey("suggestLevel")) {
suggestLevel = (String) transientVariables.get("suggestLevel");
}
// TODO 当前流程通过读取流程设计中任务节点的输出线加载页面按钮,而实际业务存在需要根据业务信息判断下一步提交的节点。
List<VariableWrapper> variableWrapperList = processQueryService.queryVariables(task.getProcessInstanceId());
Integer lastGoback = -1;
Boolean flag = false;
for (VariableWrapper variableWrapper : variableWrapperList) {
if (variableWrapper.getName().equals(TaskVariable.LAST_GOBACK)) {
lastGoback = Integer.parseInt(variableWrapper.getText());
}
Map<String, Object> variables = processProperties.getVariables();
variables.put(TaskVariable.LAST_GOBACK, transientVariables.get("goback").toString());
processOperationService.completeTask(taskId, variables, transientVariables);
}
if (opaVal == RatingGoBackType.JUDGMENT.code()) {
transientVariables.put("submit", lastGoback);
} else if (opaVal == RatingGoBackType.SUBMIT_HEAD.code() && isNeedHeadBankApprove(suggestLevel, instance.getBusinessKey())) {
transientVariables.put("submit", RatingGoBackType.SUBMIT.code());
flag = true;
} else if (opaVal == RatingGoBackType.SUBMIT_HEAD.code()) {
transientVariables.put("submit", RatingGoBackType.APPROVE.code());
}
Map<String, Object> variables = processProperties.getVariables();
variables.put(TaskVariable.LAST_GOBACK, transientVariables.get("goback").toString());
processOperationService.completeTask(taskId, variables, transientVariables);
if (opaVal == RatingGoBackType.REJECT.code()) {
companyRatingService.reject(instance.getBusinessKey(), processProperties.getData());
} else if (opaVal == RatingGoBackType.SUBMIT_HEAD.code()) {
if (flag) {
companyRatingService.submit(instance.getBusinessKey(), processProperties.getData());
} else {
companyRatingService.approve(instance.getBusinessKey(), processProperties.getData());
}
} else if(opaVal < 0){
companyRatingService.backStart(instance.getBusinessKey(), processProperties.getData());
} else if(opaVal == RatingGoBackType.APPROVE.code()) {
companyRatingService.approve(instance.getBusinessKey(), processProperties.getData());
} else {
if (opaVal == RatingGoBackType.REJECT.code()) {
companyRatingService.reject(instance.getBusinessKey(), processProperties.getData());
} else if (opaVal == RatingGoBackType.SUBMIT_HEAD.code()) {
if (flag) {
companyRatingService.submit(instance.getBusinessKey(), processProperties.getData());
} else {
companyRatingService.approve(instance.getBusinessKey(), processProperties.getData());
}
//companyRatingService.back(instance.getBusinessKey());
return new CompleteTaskResponse();
} catch (CompleteTaskException exception) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return CompleteTaskResponse.fromAssigneesJson(exception.getMessage());
} catch (Exception exception) {
throw exception;
} else if(opaVal < 0){
companyRatingService.backStart(instance.getBusinessKey(), processProperties.getData());
} else if(opaVal == RatingGoBackType.APPROVE.code()) {
companyRatingService.approve(instance.getBusinessKey(), processProperties.getData());
} else {
companyRatingService.submit(instance.getBusinessKey(), processProperties.getData());
}
}

7
irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/CompanyRatingServiceImpl.java

@ -14,6 +14,7 @@ import irbs.cust.rating.enums.*;
import irbs.cust.rating.jpa.entity.*;
import irbs.cust.rating.jpa.repository.CompanyRatingRepository;
import irbs.cust.rating.jpa.repository.MainScaleConfigRepository;
import irbs.cust.rating.jpa.repository.MainScaleVersionRepository;
import irbs.cust.rating.jpa.vo.CompanyRatingVo;
import irbs.cust.rating.service.*;
import irbs.defaultManager.service.DefaultCognizanceService;
@ -59,6 +60,8 @@ public class CompanyRatingServiceImpl extends DaoServiceImpl<CompanyRating, Stri
private MainScaleConfigRepository mainScaleConfigRepository;
@Autowired
private ProcessEngine processEngine;
@Autowired
private MainScaleVersionRepository mainScaleVersionRepository;
@Override
public Page<CompanyRatingVo> pageQuery(QueryParameter queryParameter) throws Exception {
@ -733,7 +736,9 @@ public class CompanyRatingServiceImpl extends DaoServiceImpl<CompanyRating, Stri
rating.setMatureTime(c.getTime());
rating.setFinalLevel(rating.getSpLevel());
// RatingLevelPDEnum.getPD(rating.getSpLevel())
rating.setPd(mainScaleConfigRepository.findByLevel(rating.getSpLevel()).getPd());
List<MainScaleVersion> versionList = mainScaleVersionRepository.findByStatus(VersionEnum.RELEASE.name());
rating.setPd(mainScaleConfigRepository.findByVersionId(versionList.get(0).getId()).get(0).getPd());
getRepository().save(rating);
sendRatingStatus(rating);
}

4
irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/HomeServiceImpl.java

@ -70,8 +70,8 @@ public class HomeServiceImpl implements HomeService {
@Override
public List<KeyValueWrapper> getRatingLevelExposureList() throws Exception {
String querySql1 = "select p.FINAL_LEVEL,count(*) FINAL_NUMBER from (" +
"select distinct(cust_no) as cust_no,FINAL_LEVEL from NS_COMPANY_RATING " +
"WHERE cust_no is not null and FINAL_LEVEL IS NOT NULL AND RATING_STATUS = '"+ RatingStatus.EFFECTIVE.name() +"' ";
"select distinct(CUSTOMER_ID) as cust_no,FINAL_LEVEL from NS_COMPANY_RATING " +
"WHERE CUSTOMER_ID is not null and FINAL_LEVEL IS NOT NULL AND RATING_STATUS = '"+ RatingStatus.EFFECTIVE.name() +"' ";
String querySql2 = "select 'D' FINAL_LEVEL, COUNT(*) FINAL_NUMBER from (" +
"select distinct(cust_no) as cust_no from P_IRS_DEFAULT_COGNIZANCE " +
"where ((VALID = '1' and DEFAULT_TYPE ='02') or (VALID <> '0' and DEFAULT_TYPE = '01')) and cust_no is not null ";

18
irbs.cust.rating/src/main/resources/liquibase/20240321_CUST_RATING_DDL.xml

@ -60,7 +60,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
<column name="MODEL_ID_G" type="java.sql.Types.NVARCHAR(50)" remarks="评级模型ID(灰度)"></column>
<column name="MODEL_CODE_G" type="java.sql.Types.NVARCHAR(50)" remarks="评级模型编号(灰度)"></column>
@ -111,7 +111,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
</createTable>
@ -160,7 +160,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
</createTable>
@ -180,7 +180,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
</createTable>
@ -201,7 +201,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
</createTable>
@ -230,7 +230,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
<column name="INDEX_SCORE_G" type="java.sql.Types.NUMERIC(20, 4)" remarks="指标得分(灰度)"/>
</createTable>
@ -318,7 +318,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
</createTable>
@ -390,7 +390,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
</createTable>
@ -407,7 +407,7 @@
<column name="LAST_MODIFIER_" type="java.sql.Types.NVARCHAR(255)" remarks="最后修改人"></column>
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"></column>
<column name="CORP_CODE_" type="java.sql.Types.NVARCHAR(255)" remarks="所属法人代码" defaultValue="_PRIMARY_">
<constraints nullable="false"/>
</column>
</createTable>
<addUniqueConstraint tableName="NS_RATING_REPORT_SHOW_SCORE_ROLE" columnNames="ROLE_"></addUniqueConstraint>

2
irbs.frontend/package.json

@ -78,7 +78,7 @@
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.281",
"platform-core": "8.1.287",
"quasar": "2.15.4",
"tailwindcss": "3.4.4",
"vue": "3.4.31",

Loading…
Cancel
Save