|
@@ -291,18 +291,22 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
@@ -291,18 +291,22 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
291
|
QueryCorePersonnelVo queryCorePersonnelVo = new QueryCorePersonnelVo();
|
291
|
QueryCorePersonnelVo queryCorePersonnelVo = new QueryCorePersonnelVo();
|
|
292
|
queryCorePersonnelVo.setCreditId(data.getId());
|
292
|
queryCorePersonnelVo.setCreditId(data.getId());
|
|
293
|
List<CorePersonnel> corePersonnelList = corePersonnelService.query(queryCorePersonnelVo);
|
293
|
List<CorePersonnel> corePersonnelList = corePersonnelService.query(queryCorePersonnelVo);
|
|
|
|
294
|
+ String historyId = null;
|
|
|
|
295
|
+ String sort = "1";
|
|
294
|
if ("CHANGE".equals(type)) {
|
296
|
if ("CHANGE".equals(type)) {
|
|
295
|
CreateCustomerCreditHistoryVo historyVo = new CreateCustomerCreditHistoryVo();
|
297
|
CreateCustomerCreditHistoryVo historyVo = new CreateCustomerCreditHistoryVo();
|
|
296
|
historyVo.setCreditId(data.getId());
|
298
|
historyVo.setCreditId(data.getId());
|
|
297
|
//第几次变更序号
|
299
|
//第几次变更序号
|
|
298
|
QueryCustomerCreditHistoryVo queryCustomerCreditHistoryVo = new QueryCustomerCreditHistoryVo();
|
300
|
QueryCustomerCreditHistoryVo queryCustomerCreditHistoryVo = new QueryCustomerCreditHistoryVo();
|
|
299
|
queryCustomerCreditHistoryVo.setCreditId(data.getId());
|
301
|
queryCustomerCreditHistoryVo.setCreditId(data.getId());
|
|
|
|
302
|
+ queryCustomerCreditHistoryVo.setType("PART");
|
|
300
|
List<CustomerCreditHistory> query = customerCreditHistoryService.query(queryCustomerCreditHistoryVo);
|
303
|
List<CustomerCreditHistory> query = customerCreditHistoryService.query(queryCustomerCreditHistoryVo);
|
|
301
|
if (CollectionUtils.isEmpty(query)) {
|
304
|
if (CollectionUtils.isEmpty(query)) {
|
|
302
|
historyVo.setSort("1");
|
305
|
historyVo.setSort("1");
|
|
303
|
} else {
|
306
|
} else {
|
|
304
|
int i = query.size() + 1;
|
307
|
int i = query.size() + 1;
|
|
305
|
historyVo.setSort(String.valueOf(i));
|
308
|
historyVo.setSort(String.valueOf(i));
|
|
|
|
309
|
+ sort = String.valueOf(i);
|
|
306
|
}
|
310
|
}
|
|
307
|
historyVo.setSerialNumber(data.getSerialNumber());
|
311
|
historyVo.setSerialNumber(data.getSerialNumber());
|
|
308
|
if (!StringUtil.isBlank(data.getRegion())) {
|
312
|
if (!StringUtil.isBlank(data.getRegion())) {
|
|
@@ -458,7 +462,7 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
@@ -458,7 +462,7 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
458
|
if (!StringUtil.isBlank(data.getCertificationCertificate())) {
|
462
|
if (!StringUtil.isBlank(data.getCertificationCertificate())) {
|
|
459
|
historyVo.setCertificationCertificate(data.getCertificationCertificate());
|
463
|
historyVo.setCertificationCertificate(data.getCertificationCertificate());
|
|
460
|
}
|
464
|
}
|
|
461
|
- String historyId = customerCreditHistoryService.create(historyVo);
|
465
|
+ historyId = customerCreditHistoryService.create(historyVo);
|
|
462
|
if (CollectionUtils.isNotEmpty(corePersonnelList)) {
|
466
|
if (CollectionUtils.isNotEmpty(corePersonnelList)) {
|
|
463
|
for (CorePersonnel corePersonnel : corePersonnelList) {
|
467
|
for (CorePersonnel corePersonnel : corePersonnelList) {
|
|
464
|
CreateCorePersonnelHistoryVo personnelHistoryVo = new CreateCorePersonnelHistoryVo();
|
468
|
CreateCorePersonnelHistoryVo personnelHistoryVo = new CreateCorePersonnelHistoryVo();
|
|
@@ -633,6 +637,210 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
@@ -633,6 +637,210 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
633
|
}
|
637
|
}
|
|
634
|
}
|
638
|
}
|
|
635
|
}
|
639
|
}
|
|
|
|
640
|
+ //
|
|
|
|
641
|
+ //再保存一次变更后的数据
|
|
|
|
642
|
+ if ("CHANGE".equals(type)) {
|
|
|
|
643
|
+ CustomerCredit customerCredit = customerCreditMapper.findById(vo.getId());
|
|
|
|
644
|
+ CreateCustomerCreditHistoryVo historyVo1 = new CreateCustomerCreditHistoryVo();
|
|
|
|
645
|
+ historyVo1.setId(historyId + "_01");
|
|
|
|
646
|
+ historyVo1.setCreditId(data.getId());
|
|
|
|
647
|
+ historyVo1.setSort(sort);
|
|
|
|
648
|
+ historyVo1.setSerialNumber(data.getSerialNumber());
|
|
|
|
649
|
+ if (!StringUtil.isBlank(customerCredit.getRegion())) {
|
|
|
|
650
|
+ historyVo1.setRegion(customerCredit.getRegion());
|
|
|
|
651
|
+ }
|
|
|
|
652
|
+ if (customerCredit.getRegisterDate() != null) {
|
|
|
|
653
|
+ historyVo1.setRegisterDate(customerCredit.getRegisterDate());
|
|
|
|
654
|
+ }
|
|
|
|
655
|
+ if (!StringUtil.isBlank(customerCredit.getCustomerShortName())) {
|
|
|
|
656
|
+ historyVo1.setCustomerShortName(customerCredit.getCustomerShortName());
|
|
|
|
657
|
+ }
|
|
|
|
658
|
+ if (!StringUtil.isBlank(customerCredit.getEnterpriseType())) {
|
|
|
|
659
|
+ historyVo1.setEnterpriseType(customerCredit.getEnterpriseType());
|
|
|
|
660
|
+ }
|
|
|
|
661
|
+ if (!StringUtil.isBlank(customerCredit.getCompanyId())) {
|
|
|
|
662
|
+ historyVo1.setCompanyId(customerCredit.getCompanyId());
|
|
|
|
663
|
+ }
|
|
|
|
664
|
+ if (!StringUtil.isBlank(customerCredit.getCompanyNature())) {
|
|
|
|
665
|
+ historyVo1.setCompanyNature(customerCredit.getCompanyNature());
|
|
|
|
666
|
+ }
|
|
|
|
667
|
+ if (!StringUtil.isBlank(customerCredit.getCompanyAddress())) {
|
|
|
|
668
|
+ historyVo1.setCompanyAddress(customerCredit.getCompanyAddress());
|
|
|
|
669
|
+ }
|
|
|
|
670
|
+ if (customerCredit.getRegisteredCapital() != null) {
|
|
|
|
671
|
+ historyVo1.setRegisteredCapital(customerCredit.getRegisteredCapital());
|
|
|
|
672
|
+ }
|
|
|
|
673
|
+ if (!StringUtil.isBlank(customerCredit.getBankAccount())) {
|
|
|
|
674
|
+ historyVo1.setBankAccount(customerCredit.getBankAccount());
|
|
|
|
675
|
+ }
|
|
|
|
676
|
+ if (!StringUtil.isBlank(customerCredit.getBankName())) {
|
|
|
|
677
|
+ historyVo1.setBankName(customerCredit.getBankName());
|
|
|
|
678
|
+ }
|
|
|
|
679
|
+ if (!StringUtil.isBlank(customerCredit.getTaxNumber())) {
|
|
|
|
680
|
+ historyVo1.setTaxNumber(customerCredit.getTaxNumber());
|
|
|
|
681
|
+ }
|
|
|
|
682
|
+ if (customerCredit.getRegistrationTime() != null) {
|
|
|
|
683
|
+ historyVo1.setRegistrationTime(customerCredit.getRegistrationTime());
|
|
|
|
684
|
+ }
|
|
|
|
685
|
+ if (!StringUtil.isBlank(customerCredit.getBusinessYears())) {
|
|
|
|
686
|
+ historyVo1.setBusinessYears(customerCredit.getBusinessYears());
|
|
|
|
687
|
+ }
|
|
|
|
688
|
+ if (!StringUtil.isBlank(customerCredit.getBusinessScope())) {
|
|
|
|
689
|
+ historyVo1.setBusinessScope(customerCredit.getBusinessScope());
|
|
|
|
690
|
+ }
|
|
|
|
691
|
+ if (!StringUtil.isBlank(customerCredit.getBusinessProperty())) {
|
|
|
|
692
|
+ historyVo1.setBusinessProperty(customerCredit.getBusinessProperty());
|
|
|
|
693
|
+ }
|
|
|
|
694
|
+ if (!StringUtil.isBlank(customerCredit.getLandArea())) {
|
|
|
|
695
|
+ historyVo1.setLandArea(customerCredit.getLandArea());
|
|
|
|
696
|
+ }
|
|
|
|
697
|
+ if (!StringUtil.isBlank(customerCredit.getStorageConditions())) {
|
|
|
|
698
|
+ historyVo1.setStorageConditions(customerCredit.getStorageConditions());
|
|
|
|
699
|
+ }
|
|
|
|
700
|
+ if (customerCredit.getEmployeeCount() != null) {
|
|
|
|
701
|
+ historyVo1.setEmployeeCount(customerCredit.getEmployeeCount());
|
|
|
|
702
|
+ }
|
|
|
|
703
|
+ if (!StringUtil.isBlank(customerCredit.getEquipmentAttributes())) {
|
|
|
|
704
|
+ historyVo1.setEquipmentAttributes(customerCredit.getEquipmentAttributes());
|
|
|
|
705
|
+ }
|
|
|
|
706
|
+ if (!StringUtil.isBlank(customerCredit.getAssetEvaluation())) {
|
|
|
|
707
|
+ historyVo1.setAssetEvaluation(customerCredit.getAssetEvaluation());
|
|
|
|
708
|
+ }
|
|
|
|
709
|
+ if (!StringUtil.isBlank(customerCredit.getLastYearSales())) {
|
|
|
|
710
|
+ historyVo1.setLastYearSales(customerCredit.getLastYearSales());
|
|
|
|
711
|
+ }
|
|
|
|
712
|
+ if (!StringUtil.isBlank(customerCredit.getMonthlyAvgSales())) {
|
|
|
|
713
|
+ historyVo1.setMonthlyAvgSales(customerCredit.getMonthlyAvgSales());
|
|
|
|
714
|
+ }
|
|
|
|
715
|
+ if (!StringUtil.isBlank(customerCredit.getInvoiceItemUnit())) {
|
|
|
|
716
|
+ historyVo1.setInvoiceItemUnit(customerCredit.getInvoiceItemUnit());
|
|
|
|
717
|
+ }
|
|
|
|
718
|
+ if (!StringUtil.isBlank(customerCredit.getProductMatch())) {
|
|
|
|
719
|
+ historyVo1.setProductMatch(customerCredit.getProductMatch());
|
|
|
|
720
|
+ }
|
|
|
|
721
|
+ if (!StringUtil.isBlank(customerCredit.getMajorCustomers())) {
|
|
|
|
722
|
+ historyVo1.setMajorCustomers(customerCredit.getMajorCustomers());
|
|
|
|
723
|
+ }
|
|
|
|
724
|
+ if (!StringUtil.isBlank(customerCredit.getMainProjects())) {
|
|
|
|
725
|
+ historyVo1.setMainProjects(customerCredit.getMainProjects());
|
|
|
|
726
|
+ }
|
|
|
|
727
|
+ if (!StringUtil.isBlank(customerCredit.getIndustryInvolved())) {
|
|
|
|
728
|
+ historyVo1.setIndustryInvolved(customerCredit.getIndustryInvolved());
|
|
|
|
729
|
+ }
|
|
|
|
730
|
+ if (!StringUtil.isBlank(customerCredit.getIndustryExperience())) {
|
|
|
|
731
|
+ historyVo1.setIndustryExperience(customerCredit.getIndustryExperience());
|
|
|
|
732
|
+ }
|
|
|
|
733
|
+ if (!StringUtil.isBlank(customerCredit.getHasDispute())) {
|
|
|
|
734
|
+ historyVo1.setHasDispute(customerCredit.getHasDispute());
|
|
|
|
735
|
+ }
|
|
|
|
736
|
+ if (!StringUtil.isBlank(customerCredit.getCooperationStartDate())) {
|
|
|
|
737
|
+ historyVo1.setCooperationStartDate(customerCredit.getCooperationStartDate());
|
|
|
|
738
|
+ }
|
|
|
|
739
|
+ if (!StringUtil.isBlank(customerCredit.getMonthlyAvgVolume())) {
|
|
|
|
740
|
+ historyVo1.setMonthlyAvgVolume(customerCredit.getMonthlyAvgVolume());
|
|
|
|
741
|
+ }
|
|
|
|
742
|
+ if (!StringUtil.isBlank(customerCredit.getIsVerbalAgreement())) {
|
|
|
|
743
|
+ historyVo1.setIsVerbalAgreement(customerCredit.getIsVerbalAgreement());
|
|
|
|
744
|
+ }
|
|
|
|
745
|
+ if (!StringUtil.isBlank(customerCredit.getOtherAgreements())) {
|
|
|
|
746
|
+ historyVo1.setOtherAgreements(customerCredit.getOtherAgreements());
|
|
|
|
747
|
+ }
|
|
|
|
748
|
+ if (!StringUtil.isBlank(customerCredit.getHasLongTermContract())) {
|
|
|
|
749
|
+ historyVo1.setHasLongTermContract(customerCredit.getHasLongTermContract());
|
|
|
|
750
|
+ }
|
|
|
|
751
|
+ if (!StringUtil.isBlank(customerCredit.getContractType())) {
|
|
|
|
752
|
+ historyVo1.setContractType(customerCredit.getContractType());
|
|
|
|
753
|
+ }
|
|
|
|
754
|
+ if (!StringUtil.isBlank(customerCredit.getHasInterruption())) {
|
|
|
|
755
|
+ historyVo1.setHasInterruption(customerCredit.getHasInterruption());
|
|
|
|
756
|
+ }
|
|
|
|
757
|
+ if (!StringUtil.isBlank(customerCredit.getSettlementPeriod())) {
|
|
|
|
758
|
+ historyVo1.setSettlementPeriod(customerCredit.getSettlementPeriod());
|
|
|
|
759
|
+ }
|
|
|
|
760
|
+ if (!StringUtil.isBlank(customerCredit.getMaterialSupplyPlan())) {
|
|
|
|
761
|
+ historyVo1.setMaterialSupplyPlan(customerCredit.getMaterialSupplyPlan());
|
|
|
|
762
|
+ }
|
|
|
|
763
|
+ if (!StringUtil.isBlank(customerCredit.getSuggestedCategory())) {
|
|
|
|
764
|
+ historyVo1.setSuggestedCategory(customerCredit.getSuggestedCategory());
|
|
|
|
765
|
+ }
|
|
|
|
766
|
+ if (!StringUtil.isBlank(customerCredit.getCreditLimit())) {
|
|
|
|
767
|
+ historyVo1.setCreditLimit(customerCredit.getCreditLimit());
|
|
|
|
768
|
+ }
|
|
|
|
769
|
+ if (!StringUtil.isBlank(customerCredit.getInvestigator())) {
|
|
|
|
770
|
+ historyVo1.setInvestigator(customerCredit.getInvestigator());
|
|
|
|
771
|
+ }
|
|
|
|
772
|
+ if (!StringUtil.isBlank(customerCredit.getSupervisorReview())) {
|
|
|
|
773
|
+ historyVo1.setSupervisorReview(customerCredit.getSupervisorReview());
|
|
|
|
774
|
+ }
|
|
|
|
775
|
+ if (!StringUtil.isBlank(customerCredit.getAnnualTotalSales())) {
|
|
|
|
776
|
+ historyVo1.setAnnualTotalSales(customerCredit.getAnnualTotalSales());
|
|
|
|
777
|
+ }
|
|
|
|
778
|
+ if (!StringUtil.isBlank(customerCredit.getMainIndustry())) {
|
|
|
|
779
|
+ historyVo1.setMainIndustry(customerCredit.getMainIndustry());
|
|
|
|
780
|
+ }
|
|
|
|
781
|
+ if (!StringUtil.isBlank(customerCredit.getAnnualMaterialOverview())) {
|
|
|
|
782
|
+ historyVo1.setAnnualMaterialOverview(customerCredit.getAnnualMaterialOverview());
|
|
|
|
783
|
+ }
|
|
|
|
784
|
+ if (!StringUtil.isBlank(customerCredit.getCompanySettlementPeriod())) {
|
|
|
|
785
|
+ historyVo1.setCompanySettlementPeriod(customerCredit.getCompanySettlementPeriod());
|
|
|
|
786
|
+ }
|
|
|
|
787
|
+ if (!StringUtil.isBlank(customerCredit.getCompanyCreditLimit())) {
|
|
|
|
788
|
+ historyVo1.setCompanyCreditLimit(customerCredit.getCompanyCreditLimit());
|
|
|
|
789
|
+ }
|
|
|
|
790
|
+ if (!StringUtil.isBlank(customerCredit.getCompanyMaterialSupplyPlan())) {
|
|
|
|
791
|
+ historyVo1.setCompanyMaterialSupplyPlan(customerCredit.getCompanyMaterialSupplyPlan());
|
|
|
|
792
|
+ }
|
|
|
|
793
|
+ if (!StringUtil.isBlank(customerCredit.getCompanySuggestedCategory())) {
|
|
|
|
794
|
+ historyVo1.setCompanySuggestedCategory(customerCredit.getCompanySuggestedCategory());
|
|
|
|
795
|
+ }
|
|
|
|
796
|
+ if (!StringUtil.isBlank(customerCredit.getStatus())) {
|
|
|
|
797
|
+ historyVo1.setStatus(customerCredit.getStatus());
|
|
|
|
798
|
+ }
|
|
|
|
799
|
+ if (!StringUtil.isBlank(customerCredit.getCertificationCertificate())) {
|
|
|
|
800
|
+ historyVo1.setCertificationCertificate(customerCredit.getCertificationCertificate());
|
|
|
|
801
|
+ }
|
|
|
|
802
|
+ String historyId1 = customerCreditHistoryService.create(historyVo1);
|
|
|
|
803
|
+ //变更后的核心人员
|
|
|
|
804
|
+ QueryCorePersonnelVo queryCorePersonnelVo1 = new QueryCorePersonnelVo();
|
|
|
|
805
|
+ queryCorePersonnelVo1.setCreditId(data.getId());
|
|
|
|
806
|
+ List<CorePersonnel> corePersonnelList1 = corePersonnelService.query(queryCorePersonnelVo1);
|
|
|
|
807
|
+ if (CollectionUtils.isNotEmpty(corePersonnelList1)) {
|
|
|
|
808
|
+ for (CorePersonnel corePersonnel : corePersonnelList1) {
|
|
|
|
809
|
+ CreateCorePersonnelHistoryVo personnelHistoryVo = new CreateCorePersonnelHistoryVo();
|
|
|
|
810
|
+ personnelHistoryVo.setPersonnelId(corePersonnel.getId());
|
|
|
|
811
|
+ personnelHistoryVo.setCreditHistoryId(historyId1);
|
|
|
|
812
|
+ personnelHistoryVo.setName(corePersonnel.getName());
|
|
|
|
813
|
+ if (!StringUtil.isBlank(corePersonnel.getSex())) {
|
|
|
|
814
|
+ personnelHistoryVo.setSex(corePersonnel.getSex());
|
|
|
|
815
|
+ }
|
|
|
|
816
|
+ if (!StringUtil.isBlank(corePersonnel.getNativePlace())) {
|
|
|
|
817
|
+ personnelHistoryVo.setNativePlace(corePersonnel.getNativePlace());
|
|
|
|
818
|
+ }
|
|
|
|
819
|
+ if (!StringUtil.isBlank(corePersonnel.getAge())) {
|
|
|
|
820
|
+ personnelHistoryVo.setAge(corePersonnel.getAge());
|
|
|
|
821
|
+ }
|
|
|
|
822
|
+ if (!StringUtil.isBlank(corePersonnel.getPosition())) {
|
|
|
|
823
|
+ personnelHistoryVo.setPosition(corePersonnel.getPosition());
|
|
|
|
824
|
+ }
|
|
|
|
825
|
+ if (!StringUtil.isBlank(corePersonnel.getMobile())) {
|
|
|
|
826
|
+ personnelHistoryVo.setMobile(corePersonnel.getMobile());
|
|
|
|
827
|
+ }
|
|
|
|
828
|
+ if (!StringUtil.isBlank(corePersonnel.getPhone())) {
|
|
|
|
829
|
+ personnelHistoryVo.setPhone(corePersonnel.getPhone());
|
|
|
|
830
|
+ }
|
|
|
|
831
|
+ if (!StringUtil.isBlank(corePersonnel.getEmail())) {
|
|
|
|
832
|
+ personnelHistoryVo.setEmail(corePersonnel.getEmail());
|
|
|
|
833
|
+ }
|
|
|
|
834
|
+ if (!StringUtil.isBlank(corePersonnel.getAddress())) {
|
|
|
|
835
|
+ personnelHistoryVo.setAddress(corePersonnel.getAddress());
|
|
|
|
836
|
+ }
|
|
|
|
837
|
+ if (!StringUtil.isBlank(corePersonnel.getPersonId())) {
|
|
|
|
838
|
+ personnelHistoryVo.setPersonId(corePersonnel.getPersonId());
|
|
|
|
839
|
+ }
|
|
|
|
840
|
+ corePersonnelHistoryService.create(personnelHistoryVo);
|
|
|
|
841
|
+ }
|
|
|
|
842
|
+ }
|
|
|
|
843
|
+ }
|
|
636
|
OpLogUtil.setVariable("id", data.getId());
|
844
|
OpLogUtil.setVariable("id", data.getId());
|
|
637
|
OpLogUtil.setExtra(vo);
|
845
|
OpLogUtil.setExtra(vo);
|
|
638
|
|
846
|
|