Procházet zdrojové kódy

feat(日志):用户操作日志

liutao před 7 měsíci
rodič
revize
f6096b176a

+ 17 - 0
src/main/java/com/sunxung/factoring/service/project/impl/ProjectCoreEnterpriseServiceImpl.java

@@ -99,6 +99,9 @@ public class ProjectCoreEnterpriseServiceImpl extends ServiceImpl<ProjectCoreEnt
     @Autowired
     private DictionaryService dictionaryService;
 
+    @Autowired
+    private BusinessProcessingLogService businessProcessingLogService;
+
     @Override
     public void startProjectProcess(ProjectInformation projectInformation) {
         User admin = userService.getByLoginName("admin");
@@ -196,6 +199,20 @@ public class ProjectCoreEnterpriseServiceImpl extends ServiceImpl<ProjectCoreEnt
         search.setUserIds(userIdList);
         Page page = PageHelper.startPage(search.getPage(), search.getRows());
         List<ProjectCoreEnterprise> list = baseMapper.findBySearch(search);
+        for (ProjectCoreEnterprise projectCoreEnterprise : list) {
+            List<BusinessProcessingLog> businessProcessingLogs = businessProcessingLogService.listForNullValueOfEndTime(projectCoreEnterprise.getId(), ConstantUtil.PROJECT_CORE_ENTERPRISE);
+            if(CollectionUtil.isNotEmpty(businessProcessingLogs) && businessProcessingLogs.get(0).getAssignee() != null){
+                User user = userService.get(businessProcessingLogs.get(0).getAssignee().getId());
+                if(user.getLoginName().equals("admin")){
+                    projectCoreEnterprise.setAssigner("C端用户");
+                }else {
+                    projectCoreEnterprise.setAssigner(user.getName());
+                }
+            }
+            if(projectCoreEnterprise.getCoreStatusStr().equals("补充信息")){
+                projectCoreEnterprise.setAssigner("C端用户");
+            }
+        }
         return new GridPage<>(search.getRows(), search.getPage(), page.getTotal(), list);
     }
 

+ 17 - 0
src/main/java/com/sunxung/factoring/service/project/impl/ProjectInformationServiceImpl.java

@@ -98,6 +98,9 @@ public class ProjectInformationServiceImpl extends ServiceImpl<ProjectInformatio
     @Autowired
     private DictionaryService dictionaryService;
 
+    @Autowired
+    private BusinessProcessingLogService businessProcessingLogService;
+
     @Override
     public ProjectInformationVo getByBusinessNo(String businessNumber) {
 
@@ -177,6 +180,20 @@ public class ProjectInformationServiceImpl extends ServiceImpl<ProjectInformatio
         search.setUserIds(userIdList);
         Page page = PageHelper.startPage(search.getPage(), search.getRows());
         List<ProjectInformation> list = baseMapper.findBySearch(search);
+        for (ProjectInformation projectInformation : list) {
+            List<BusinessProcessingLog> businessProcessingLogs = businessProcessingLogService.listForNullValueOfEndTime(projectInformation.getId(), ConstantUtil.PROJECT_INFORMATION);
+            if(CollectionUtil.isNotEmpty(businessProcessingLogs) && businessProcessingLogs.get(0).getAssignee() != null){
+                User user = userService.get(businessProcessingLogs.get(0).getAssignee().getId());
+                if(user.getLoginName().equals("admin")){
+                    projectInformation.setAssigner("C端用户");
+                }else {
+                    projectInformation.setAssigner(user.getName());
+                }
+            }
+            if(projectInformation.getStatusStr().equals("补充信息")){
+                projectInformation.setAssigner("C端用户");
+            }
+        }
         return new GridPage<>(page.getPageSize(), page.getPageNum(), page.getTotal(), list);
     }
 

+ 8 - 9
src/main/java/com/sunxung/factoring/service/supplier/impl/SupplierApprovalFirstServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.json.JSONArray;
 import cn.hutool.json.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.sunxung.factoring.component.constance.SupplierScoringModel;
+import com.sunxung.factoring.component.enums.SupplierStatusEnums;
 import com.sunxung.factoring.component.exception.ServiceException;
 import com.sunxung.factoring.component.exception.ValidatorException;
 import com.sunxung.factoring.component.util.*;
@@ -169,6 +170,7 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
                                 + ConstantConversionUtil.flowBusinessKeyNames.get(ConstantUtil.SUPPLIER_INFO) + "—供应商审核第二步,"
                                 + ConstantUtil.FLOWABLE_MSG_ASSIGNEE);
             }else {
+                supplierInfoService.lambdaUpdate().eq(SupplierInfo::getId,supplierInfo.getId()).set(SupplierInfo::getStatusStr, SupplierStatusEnums.VOTE.getCode()).update();
                 msgVariables.put(ConstantUtil.FLOWABLE_MSG_CONTENT,
                         "供应商名称为“" + enterprise.getCorporateName() + "”的供应商审核已被否决");
             }
@@ -648,19 +650,16 @@ public class SupplierApprovalFirstServiceImpl extends ServiceImpl<SupplierApprov
                         .eq(CreditSituation::getcCreditInvestigationInfoHistoryId,creditSituation.getcCreditInvestigationInfoHistoryId())
                         .eq(CreditSituation::getcSupplierInfoId,supplierApprovalFirst.getcSupplierInfoId()).remove();
                 creditSituationService.save(creditSituation);
-                if(creditSituation.getNumberOfOverdueAccounts() > 0){
+                //近两年发生过逾期的账户数≥3且合计金额≥5000元
+                if(creditSituation.getNumberOfOverdueAccounts() >= 3 && creditSituation.getTotalOverdueAmount().compareTo(new BigDecimal(5000)) > -1){
                     count ++;
                 }
-                if(creditSituation.getTotalOverdueAmount().compareTo(BigDecimal.ZERO) == 1){
+                //发生过90天以上逾期的账户数≥1
+                if(creditSituation.getOverdue() >= 1){
                     count ++;
                 }
-                if(creditSituation.getOverdue().equals(1)){
-                    count ++;
-                }
-                if(creditSituation.getConsecutiveOverdueMonth() > 0){
-                    count ++;
-                }
-                if(creditSituation.getAccumulatedOverdueTimes() > 0){
+                //近两年贷款、信用卡连续逾期月数>2个月且近两年逾期还款记录累计次数>5次
+                if(creditSituation.getConsecutiveOverdueMonth() > 2 && creditSituation.getAccumulatedOverdueTimes() > 5){
                     count ++;
                 }
                 if(creditSituation.getBadRecords().equals(1)){

+ 1 - 1
src/main/java/com/sunxung/factoring/service/supplier/impl/SupplierInfoServiceImpl.java

@@ -431,7 +431,7 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
             Long id = processingLog.getAssignee().getId();
             if (id != null) {
                 User user = userService.get(id);
-                if("admin".equals(user.getName())){
+                if("admin".equals(user.getLoginName())){
                     supplierInfo.setAssigneeName("C端用户");
                 }else {
                     supplierInfo.setAssigneeName(user.getName());

+ 1 - 1
src/main/resources/mapper/project/BusinessProcessingLogMapper.xml

@@ -264,7 +264,7 @@
         LIMIT 1
 	</select>
 	<select id="listForNullValueOfEndTime"
-			resultType="com.sunxung.factoring.entity.project.BusinessProcessingLog">
+			resultType="com.sunxung.factoring.entity.project.BusinessProcessingLog" resultMap="processingLogResult">
 		SELECT
 		<include refid="fields"/>
 		FROM