|
@@ -1614,6 +1614,456 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
@@ -1614,6 +1614,456 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
1614
|
.orElseThrow(() -> new DefaultClientException("办事处 " + prefix + " 的编号已用尽 (001-999)"));
|
1614
|
.orElseThrow(() -> new DefaultClientException("办事处 " + prefix + " 的编号已用尽 (001-999)"));
|
|
1615
|
}
|
1615
|
}
|
|
1616
|
|
1616
|
|
|
|
|
1617
|
+ @OpLog(type = OtherOpLogType.class, name = "变更客户资信表,ID:{}", params = {"#id"})
|
|
|
|
1618
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
1619
|
+ @Override
|
|
|
|
1620
|
+ public void updateChange(UpdateCustomerCreditVo vo) {
|
|
|
|
1621
|
+
|
|
|
|
1622
|
+ CustomerCredit data = customerCreditMapper.findById(vo.getId());
|
|
|
|
1623
|
+ if (ObjectUtil.isNull(data)) {
|
|
|
|
1624
|
+ throw new DefaultClientException("客户资信表不存在!");
|
|
|
|
1625
|
+ }
|
|
|
|
1626
|
+ //变更记录
|
|
|
|
1627
|
+ QueryCorePersonnelVo queryCorePersonnelVo = new QueryCorePersonnelVo();
|
|
|
|
1628
|
+ queryCorePersonnelVo.setCreditId(data.getId());
|
|
|
|
1629
|
+ List<CorePersonnel> corePersonnelList = corePersonnelService.query(queryCorePersonnelVo);
|
|
|
|
1630
|
+ String historyId = null;
|
|
|
|
1631
|
+ String sort = "1";
|
|
|
|
1632
|
+ CreateCustomerCreditHistoryVo historyVo = new CreateCustomerCreditHistoryVo();
|
|
|
|
1633
|
+ historyVo.setCreditId(data.getId());
|
|
|
|
1634
|
+ //第几次变更序号
|
|
|
|
1635
|
+ QueryCustomerCreditHistoryVo queryCustomerCreditHistoryVo = new QueryCustomerCreditHistoryVo();
|
|
|
|
1636
|
+ queryCustomerCreditHistoryVo.setCreditId(data.getId());
|
|
|
|
1637
|
+ queryCustomerCreditHistoryVo.setType("PART");
|
|
|
|
1638
|
+ List<CustomerCreditHistory> query = customerCreditHistoryService.query(queryCustomerCreditHistoryVo);
|
|
|
|
1639
|
+ if (CollectionUtils.isEmpty(query)) {
|
|
|
|
1640
|
+ historyVo.setSort("1");
|
|
|
|
1641
|
+ } else {
|
|
|
|
1642
|
+ int i = query.size() + 1;
|
|
|
|
1643
|
+ historyVo.setSort(String.valueOf(i));
|
|
|
|
1644
|
+ sort = String.valueOf(i);
|
|
|
|
1645
|
+ }
|
|
|
|
1646
|
+ historyVo.setSerialNumber(data.getSerialNumber());
|
|
|
|
1647
|
+ if (!StringUtil.isBlank(data.getRegion())) {
|
|
|
|
1648
|
+ historyVo.setRegion(data.getRegion());
|
|
|
|
1649
|
+ }
|
|
|
|
1650
|
+ if (!StringUtil.isBlank(data.getDeptId())) {
|
|
|
|
1651
|
+ historyVo.setDeptId(data.getDeptId());
|
|
|
|
1652
|
+ }
|
|
|
|
1653
|
+ if (data.getRegisterDate() != null) {
|
|
|
|
1654
|
+ historyVo.setRegisterDate(data.getRegisterDate());
|
|
|
|
1655
|
+ }
|
|
|
|
1656
|
+ if (!StringUtil.isBlank(data.getCustomerShortName())) {
|
|
|
|
1657
|
+ historyVo.setCustomerShortName(data.getCustomerShortName());
|
|
|
|
1658
|
+ }
|
|
|
|
1659
|
+ if (!StringUtil.isBlank(data.getEnterpriseType())) {
|
|
|
|
1660
|
+ historyVo.setEnterpriseType(data.getEnterpriseType());
|
|
|
|
1661
|
+ }
|
|
|
|
1662
|
+ if (!StringUtil.isBlank(data.getCompanyId())) {
|
|
|
|
1663
|
+ historyVo.setCompanyId(data.getCompanyId());
|
|
|
|
1664
|
+ }
|
|
|
|
1665
|
+ if (!StringUtil.isBlank(data.getCompanyNature())) {
|
|
|
|
1666
|
+ historyVo.setCompanyNature(data.getCompanyNature());
|
|
|
|
1667
|
+ }
|
|
|
|
1668
|
+ if (!StringUtil.isBlank(data.getCompanyAddress())) {
|
|
|
|
1669
|
+ historyVo.setCompanyAddress(data.getCompanyAddress());
|
|
|
|
1670
|
+ }
|
|
|
|
1671
|
+ if (data.getRegisteredCapital() != null) {
|
|
|
|
1672
|
+ historyVo.setRegisteredCapital(data.getRegisteredCapital());
|
|
|
|
1673
|
+ }
|
|
|
|
1674
|
+ if (!StringUtil.isBlank(data.getBankAccount())) {
|
|
|
|
1675
|
+ historyVo.setBankAccount(data.getBankAccount());
|
|
|
|
1676
|
+ }
|
|
|
|
1677
|
+ if (!StringUtil.isBlank(data.getBankName())) {
|
|
|
|
1678
|
+ historyVo.setBankName(data.getBankName());
|
|
|
|
1679
|
+ }
|
|
|
|
1680
|
+ if (!StringUtil.isBlank(data.getTaxNumber())) {
|
|
|
|
1681
|
+ historyVo.setTaxNumber(data.getTaxNumber());
|
|
|
|
1682
|
+ }
|
|
|
|
1683
|
+ if (data.getRegistrationTime() != null) {
|
|
|
|
1684
|
+ historyVo.setRegistrationTime(data.getRegistrationTime());
|
|
|
|
1685
|
+ }
|
|
|
|
1686
|
+ if (!StringUtil.isBlank(data.getBusinessYears())) {
|
|
|
|
1687
|
+ historyVo.setBusinessYears(data.getBusinessYears());
|
|
|
|
1688
|
+ }
|
|
|
|
1689
|
+ if (!StringUtil.isBlank(data.getBusinessScope())) {
|
|
|
|
1690
|
+ historyVo.setBusinessScope(data.getBusinessScope());
|
|
|
|
1691
|
+ }
|
|
|
|
1692
|
+ if (!StringUtil.isBlank(data.getBusinessProperty())) {
|
|
|
|
1693
|
+ historyVo.setBusinessProperty(data.getBusinessProperty());
|
|
|
|
1694
|
+ }
|
|
|
|
1695
|
+ if (!StringUtil.isBlank(data.getLandArea())) {
|
|
|
|
1696
|
+ historyVo.setLandArea(data.getLandArea());
|
|
|
|
1697
|
+ }
|
|
|
|
1698
|
+ if (!StringUtil.isBlank(data.getStorageConditions())) {
|
|
|
|
1699
|
+ historyVo.setStorageConditions(data.getStorageConditions());
|
|
|
|
1700
|
+ }
|
|
|
|
1701
|
+ if (data.getEmployeeCount() != null) {
|
|
|
|
1702
|
+ historyVo.setEmployeeCount(data.getEmployeeCount());
|
|
|
|
1703
|
+ }
|
|
|
|
1704
|
+ if (!StringUtil.isBlank(data.getEquipmentAttributes())) {
|
|
|
|
1705
|
+ historyVo.setEquipmentAttributes(data.getEquipmentAttributes());
|
|
|
|
1706
|
+ }
|
|
|
|
1707
|
+ if (!StringUtil.isBlank(data.getAssetEvaluation())) {
|
|
|
|
1708
|
+ historyVo.setAssetEvaluation(data.getAssetEvaluation());
|
|
|
|
1709
|
+ }
|
|
|
|
1710
|
+ if (!StringUtil.isBlank(data.getLastYearSales())) {
|
|
|
|
1711
|
+ historyVo.setLastYearSales(data.getLastYearSales());
|
|
|
|
1712
|
+ }
|
|
|
|
1713
|
+ if (!StringUtil.isBlank(data.getMonthlyAvgSales())) {
|
|
|
|
1714
|
+ historyVo.setMonthlyAvgSales(data.getMonthlyAvgSales());
|
|
|
|
1715
|
+ }
|
|
|
|
1716
|
+ if (!StringUtil.isBlank(data.getInvoiceItemUnit())) {
|
|
|
|
1717
|
+ historyVo.setInvoiceItemUnit(data.getInvoiceItemUnit());
|
|
|
|
1718
|
+ }
|
|
|
|
1719
|
+ if (!StringUtil.isBlank(data.getProductMatch())) {
|
|
|
|
1720
|
+ historyVo.setProductMatch(data.getProductMatch());
|
|
|
|
1721
|
+ }
|
|
|
|
1722
|
+ if (!StringUtil.isBlank(data.getMajorCustomers())) {
|
|
|
|
1723
|
+ historyVo.setMajorCustomers(data.getMajorCustomers());
|
|
|
|
1724
|
+ }
|
|
|
|
1725
|
+ if (!StringUtil.isBlank(data.getMainProjects())) {
|
|
|
|
1726
|
+ historyVo.setMainProjects(data.getMainProjects());
|
|
|
|
1727
|
+ }
|
|
|
|
1728
|
+ if (!StringUtil.isBlank(data.getIndustryInvolved())) {
|
|
|
|
1729
|
+ historyVo.setIndustryInvolved(data.getIndustryInvolved());
|
|
|
|
1730
|
+ }
|
|
|
|
1731
|
+ if (!StringUtil.isBlank(data.getIndustryExperience())) {
|
|
|
|
1732
|
+ historyVo.setIndustryExperience(data.getIndustryExperience());
|
|
|
|
1733
|
+ }
|
|
|
|
1734
|
+ if (!StringUtil.isBlank(data.getHasDispute())) {
|
|
|
|
1735
|
+ historyVo.setHasDispute(data.getHasDispute());
|
|
|
|
1736
|
+ }
|
|
|
|
1737
|
+ if (!StringUtil.isBlank(data.getCooperationStartDate())) {
|
|
|
|
1738
|
+ historyVo.setCooperationStartDate(data.getCooperationStartDate());
|
|
|
|
1739
|
+ }
|
|
|
|
1740
|
+ if (!StringUtil.isBlank(data.getMonthlyAvgVolume())) {
|
|
|
|
1741
|
+ historyVo.setMonthlyAvgVolume(data.getMonthlyAvgVolume());
|
|
|
|
1742
|
+ }
|
|
|
|
1743
|
+ if (!StringUtil.isBlank(data.getIsVerbalAgreement())) {
|
|
|
|
1744
|
+ historyVo.setIsVerbalAgreement(data.getIsVerbalAgreement());
|
|
|
|
1745
|
+ }
|
|
|
|
1746
|
+ if (!StringUtil.isBlank(data.getOtherAgreements())) {
|
|
|
|
1747
|
+ historyVo.setOtherAgreements(data.getOtherAgreements());
|
|
|
|
1748
|
+ }
|
|
|
|
1749
|
+ if (!StringUtil.isBlank(data.getHasLongTermContract())) {
|
|
|
|
1750
|
+ historyVo.setHasLongTermContract(data.getHasLongTermContract());
|
|
|
|
1751
|
+ }
|
|
|
|
1752
|
+ if (!StringUtil.isBlank(data.getContractType())) {
|
|
|
|
1753
|
+ historyVo.setContractType(data.getContractType());
|
|
|
|
1754
|
+ }
|
|
|
|
1755
|
+ if (!StringUtil.isBlank(data.getHasInterruption())) {
|
|
|
|
1756
|
+ historyVo.setHasInterruption(data.getHasInterruption());
|
|
|
|
1757
|
+ }
|
|
|
|
1758
|
+ if (!StringUtil.isBlank(data.getSettlementPeriod())) {
|
|
|
|
1759
|
+ historyVo.setSettlementPeriod(data.getSettlementPeriod());
|
|
|
|
1760
|
+ }
|
|
|
|
1761
|
+ if (!StringUtil.isBlank(data.getMaterialSupplyPlan())) {
|
|
|
|
1762
|
+ historyVo.setMaterialSupplyPlan(data.getMaterialSupplyPlan());
|
|
|
|
1763
|
+ }
|
|
|
|
1764
|
+ if (!StringUtil.isBlank(data.getSuggestedCategory())) {
|
|
|
|
1765
|
+ historyVo.setSuggestedCategory(data.getSuggestedCategory());
|
|
|
|
1766
|
+ }
|
|
|
|
1767
|
+ if (!StringUtil.isBlank(data.getCreditLimit())) {
|
|
|
|
1768
|
+ historyVo.setCreditLimit(data.getCreditLimit());
|
|
|
|
1769
|
+ }
|
|
|
|
1770
|
+ if (!StringUtil.isBlank(data.getInvestigator())) {
|
|
|
|
1771
|
+ historyVo.setInvestigator(data.getInvestigator());
|
|
|
|
1772
|
+ }
|
|
|
|
1773
|
+ if (!StringUtil.isBlank(data.getSupervisorReview())) {
|
|
|
|
1774
|
+ historyVo.setSupervisorReview(data.getSupervisorReview());
|
|
|
|
1775
|
+ }
|
|
|
|
1776
|
+ if (!StringUtil.isBlank(data.getAnnualTotalSales())) {
|
|
|
|
1777
|
+ historyVo.setAnnualTotalSales(data.getAnnualTotalSales());
|
|
|
|
1778
|
+ }
|
|
|
|
1779
|
+ if (!StringUtil.isBlank(data.getMainIndustry())) {
|
|
|
|
1780
|
+ historyVo.setMainIndustry(data.getMainIndustry());
|
|
|
|
1781
|
+ }
|
|
|
|
1782
|
+ if (!StringUtil.isBlank(data.getAnnualMaterialOverview())) {
|
|
|
|
1783
|
+ historyVo.setAnnualMaterialOverview(data.getAnnualMaterialOverview());
|
|
|
|
1784
|
+ }
|
|
|
|
1785
|
+ if (!StringUtil.isBlank(data.getCompanySettlementPeriod())) {
|
|
|
|
1786
|
+ historyVo.setCompanySettlementPeriod(data.getCompanySettlementPeriod());
|
|
|
|
1787
|
+ }
|
|
|
|
1788
|
+ if (!StringUtil.isBlank(data.getCompanyCreditLimit())) {
|
|
|
|
1789
|
+ historyVo.setCompanyCreditLimit(data.getCompanyCreditLimit());
|
|
|
|
1790
|
+ }
|
|
|
|
1791
|
+ if (!StringUtil.isBlank(data.getCompanyMaterialSupplyPlan())) {
|
|
|
|
1792
|
+ historyVo.setCompanyMaterialSupplyPlan(data.getCompanyMaterialSupplyPlan());
|
|
|
|
1793
|
+ }
|
|
|
|
1794
|
+ if (!StringUtil.isBlank(data.getCompanySuggestedCategory())) {
|
|
|
|
1795
|
+ historyVo.setCompanySuggestedCategory(data.getCompanySuggestedCategory());
|
|
|
|
1796
|
+ }
|
|
|
|
1797
|
+ if (!StringUtil.isBlank(data.getStatus())) {
|
|
|
|
1798
|
+ historyVo.setStatus(data.getStatus());
|
|
|
|
1799
|
+ }
|
|
|
|
1800
|
+ if (!StringUtil.isBlank(data.getCertificationCertificate())) {
|
|
|
|
1801
|
+ historyVo.setCertificationCertificate(data.getCertificationCertificate());
|
|
|
|
1802
|
+ }
|
|
|
|
1803
|
+ historyId = customerCreditHistoryService.create(historyVo);
|
|
|
|
1804
|
+ vo.setCreditHistoryId(historyId);
|
|
|
|
1805
|
+ if (CollectionUtils.isNotEmpty(corePersonnelList)) {
|
|
|
|
1806
|
+ for (CorePersonnel corePersonnel : corePersonnelList) {
|
|
|
|
1807
|
+ CreateCorePersonnelHistoryVo personnelHistoryVo = new CreateCorePersonnelHistoryVo();
|
|
|
|
1808
|
+ personnelHistoryVo.setPersonnelId(corePersonnel.getId());
|
|
|
|
1809
|
+ personnelHistoryVo.setCreditHistoryId(historyId);
|
|
|
|
1810
|
+ personnelHistoryVo.setName(corePersonnel.getName());
|
|
|
|
1811
|
+ if (!StringUtil.isBlank(corePersonnel.getSex())) {
|
|
|
|
1812
|
+ personnelHistoryVo.setSex(corePersonnel.getSex());
|
|
|
|
1813
|
+ }
|
|
|
|
1814
|
+ if (!StringUtil.isBlank(corePersonnel.getNativePlace())) {
|
|
|
|
1815
|
+ personnelHistoryVo.setNativePlace(corePersonnel.getNativePlace());
|
|
|
|
1816
|
+ }
|
|
|
|
1817
|
+ if (!StringUtil.isBlank(corePersonnel.getAge())) {
|
|
|
|
1818
|
+ personnelHistoryVo.setAge(corePersonnel.getAge());
|
|
|
|
1819
|
+ }
|
|
|
|
1820
|
+ if (!StringUtil.isBlank(corePersonnel.getPosition())) {
|
|
|
|
1821
|
+ personnelHistoryVo.setPosition(corePersonnel.getPosition());
|
|
|
|
1822
|
+ }
|
|
|
|
1823
|
+ if (!StringUtil.isBlank(corePersonnel.getMobile())) {
|
|
|
|
1824
|
+ personnelHistoryVo.setMobile(corePersonnel.getMobile());
|
|
|
|
1825
|
+ }
|
|
|
|
1826
|
+ if (!StringUtil.isBlank(corePersonnel.getPhone())) {
|
|
|
|
1827
|
+ personnelHistoryVo.setPhone(corePersonnel.getPhone());
|
|
|
|
1828
|
+ }
|
|
|
|
1829
|
+ if (!StringUtil.isBlank(corePersonnel.getEmail())) {
|
|
|
|
1830
|
+ personnelHistoryVo.setEmail(corePersonnel.getEmail());
|
|
|
|
1831
|
+ }
|
|
|
|
1832
|
+ if (!StringUtil.isBlank(corePersonnel.getAddress())) {
|
|
|
|
1833
|
+ personnelHistoryVo.setAddress(corePersonnel.getAddress());
|
|
|
|
1834
|
+ }
|
|
|
|
1835
|
+ if (!StringUtil.isBlank(corePersonnel.getPersonId())) {
|
|
|
|
1836
|
+ personnelHistoryVo.setPersonId(corePersonnel.getPersonId());
|
|
|
|
1837
|
+ }
|
|
|
|
1838
|
+ corePersonnelHistoryService.create(personnelHistoryVo);
|
|
|
|
1839
|
+ }
|
|
|
|
1840
|
+ }
|
|
|
|
1841
|
+
|
|
|
|
1842
|
+ //保存变更后的数据
|
|
|
|
1843
|
+ CreateCustomerCreditHistoryVo historyVo1 = new CreateCustomerCreditHistoryVo();
|
|
|
|
1844
|
+ historyVo1.setId(historyId + "_01");
|
|
|
|
1845
|
+ historyVo1.setCreditId(data.getId());
|
|
|
|
1846
|
+ historyVo1.setSort(sort);
|
|
|
|
1847
|
+ historyVo1.setSerialNumber(data.getSerialNumber());
|
|
|
|
1848
|
+ if (!StringUtil.isBlank(data.getRegion())) {
|
|
|
|
1849
|
+ historyVo1.setRegion(data.getRegion());
|
|
|
|
1850
|
+ }
|
|
|
|
1851
|
+ if (!StringUtil.isBlank(data.getDeptId())) {
|
|
|
|
1852
|
+ historyVo1.setDeptId(data.getDeptId());
|
|
|
|
1853
|
+ }
|
|
|
|
1854
|
+ if (data.getRegisterDate() != null) {
|
|
|
|
1855
|
+ historyVo1.setRegisterDate(data.getRegisterDate());
|
|
|
|
1856
|
+ }
|
|
|
|
1857
|
+ if (!StringUtil.isBlank(data.getCustomerShortName())) {
|
|
|
|
1858
|
+ historyVo1.setCustomerShortName(data.getCustomerShortName());
|
|
|
|
1859
|
+ }
|
|
|
|
1860
|
+ if (!StringUtil.isBlank(data.getEnterpriseType())) {
|
|
|
|
1861
|
+ historyVo1.setEnterpriseType(data.getEnterpriseType());
|
|
|
|
1862
|
+ }
|
|
|
|
1863
|
+ if (!StringUtil.isBlank(data.getCompanyId())) {
|
|
|
|
1864
|
+ historyVo1.setCompanyId(data.getCompanyId());
|
|
|
|
1865
|
+ }
|
|
|
|
1866
|
+ if (!StringUtil.isBlank(data.getCompanyNature())) {
|
|
|
|
1867
|
+ historyVo1.setCompanyNature(data.getCompanyNature());
|
|
|
|
1868
|
+ }
|
|
|
|
1869
|
+ if (!StringUtil.isBlank(data.getCompanyAddress())) {
|
|
|
|
1870
|
+ historyVo1.setCompanyAddress(data.getCompanyAddress());
|
|
|
|
1871
|
+ }
|
|
|
|
1872
|
+ if (data.getRegisteredCapital() != null) {
|
|
|
|
1873
|
+ historyVo1.setRegisteredCapital(data.getRegisteredCapital());
|
|
|
|
1874
|
+ }
|
|
|
|
1875
|
+ if (!StringUtil.isBlank(data.getBankAccount())) {
|
|
|
|
1876
|
+ historyVo1.setBankAccount(data.getBankAccount());
|
|
|
|
1877
|
+ }
|
|
|
|
1878
|
+ if (!StringUtil.isBlank(data.getBankName())) {
|
|
|
|
1879
|
+ historyVo1.setBankName(data.getBankName());
|
|
|
|
1880
|
+ }
|
|
|
|
1881
|
+ if (!StringUtil.isBlank(data.getTaxNumber())) {
|
|
|
|
1882
|
+ historyVo1.setTaxNumber(data.getTaxNumber());
|
|
|
|
1883
|
+ }
|
|
|
|
1884
|
+ if (data.getRegistrationTime() != null) {
|
|
|
|
1885
|
+ historyVo1.setRegistrationTime(data.getRegistrationTime());
|
|
|
|
1886
|
+ }
|
|
|
|
1887
|
+ if (!StringUtil.isBlank(data.getBusinessYears())) {
|
|
|
|
1888
|
+ historyVo1.setBusinessYears(data.getBusinessYears());
|
|
|
|
1889
|
+ }
|
|
|
|
1890
|
+ if (!StringUtil.isBlank(data.getBusinessScope())) {
|
|
|
|
1891
|
+ historyVo1.setBusinessScope(data.getBusinessScope());
|
|
|
|
1892
|
+ }
|
|
|
|
1893
|
+ if (!StringUtil.isBlank(data.getBusinessProperty())) {
|
|
|
|
1894
|
+ historyVo1.setBusinessProperty(data.getBusinessProperty());
|
|
|
|
1895
|
+ }
|
|
|
|
1896
|
+ if (!StringUtil.isBlank(data.getLandArea())) {
|
|
|
|
1897
|
+ historyVo1.setLandArea(data.getLandArea());
|
|
|
|
1898
|
+ }
|
|
|
|
1899
|
+ if (!StringUtil.isBlank(data.getStorageConditions())) {
|
|
|
|
1900
|
+ historyVo1.setStorageConditions(data.getStorageConditions());
|
|
|
|
1901
|
+ }
|
|
|
|
1902
|
+ if (data.getEmployeeCount() != null) {
|
|
|
|
1903
|
+ historyVo1.setEmployeeCount(data.getEmployeeCount());
|
|
|
|
1904
|
+ }
|
|
|
|
1905
|
+ if (!StringUtil.isBlank(data.getEquipmentAttributes())) {
|
|
|
|
1906
|
+ historyVo1.setEquipmentAttributes(data.getEquipmentAttributes());
|
|
|
|
1907
|
+ }
|
|
|
|
1908
|
+ if (!StringUtil.isBlank(data.getAssetEvaluation())) {
|
|
|
|
1909
|
+ historyVo1.setAssetEvaluation(data.getAssetEvaluation());
|
|
|
|
1910
|
+ }
|
|
|
|
1911
|
+ if (!StringUtil.isBlank(data.getLastYearSales())) {
|
|
|
|
1912
|
+ historyVo1.setLastYearSales(data.getLastYearSales());
|
|
|
|
1913
|
+ }
|
|
|
|
1914
|
+ if (!StringUtil.isBlank(data.getMonthlyAvgSales())) {
|
|
|
|
1915
|
+ historyVo1.setMonthlyAvgSales(data.getMonthlyAvgSales());
|
|
|
|
1916
|
+ }
|
|
|
|
1917
|
+ if (!StringUtil.isBlank(data.getInvoiceItemUnit())) {
|
|
|
|
1918
|
+ historyVo1.setInvoiceItemUnit(data.getInvoiceItemUnit());
|
|
|
|
1919
|
+ }
|
|
|
|
1920
|
+ if (!StringUtil.isBlank(data.getProductMatch())) {
|
|
|
|
1921
|
+ historyVo1.setProductMatch(data.getProductMatch());
|
|
|
|
1922
|
+ }
|
|
|
|
1923
|
+ if (!StringUtil.isBlank(data.getMajorCustomers())) {
|
|
|
|
1924
|
+ historyVo1.setMajorCustomers(data.getMajorCustomers());
|
|
|
|
1925
|
+ }
|
|
|
|
1926
|
+ if (!StringUtil.isBlank(data.getMainProjects())) {
|
|
|
|
1927
|
+ historyVo1.setMainProjects(data.getMainProjects());
|
|
|
|
1928
|
+ }
|
|
|
|
1929
|
+ if (!StringUtil.isBlank(data.getIndustryInvolved())) {
|
|
|
|
1930
|
+ historyVo1.setIndustryInvolved(data.getIndustryInvolved());
|
|
|
|
1931
|
+ }
|
|
|
|
1932
|
+ if (!StringUtil.isBlank(data.getIndustryExperience())) {
|
|
|
|
1933
|
+ historyVo1.setIndustryExperience(data.getIndustryExperience());
|
|
|
|
1934
|
+ }
|
|
|
|
1935
|
+ if (!StringUtil.isBlank(data.getHasDispute())) {
|
|
|
|
1936
|
+ historyVo1.setHasDispute(data.getHasDispute());
|
|
|
|
1937
|
+ }
|
|
|
|
1938
|
+ if (!StringUtil.isBlank(data.getCooperationStartDate())) {
|
|
|
|
1939
|
+ historyVo1.setCooperationStartDate(data.getCooperationStartDate());
|
|
|
|
1940
|
+ }
|
|
|
|
1941
|
+ if (!StringUtil.isBlank(data.getMonthlyAvgVolume())) {
|
|
|
|
1942
|
+ historyVo1.setMonthlyAvgVolume(data.getMonthlyAvgVolume());
|
|
|
|
1943
|
+ }
|
|
|
|
1944
|
+ if (!StringUtil.isBlank(data.getIsVerbalAgreement())) {
|
|
|
|
1945
|
+ historyVo1.setIsVerbalAgreement(data.getIsVerbalAgreement());
|
|
|
|
1946
|
+ }
|
|
|
|
1947
|
+ if (!StringUtil.isBlank(data.getOtherAgreements())) {
|
|
|
|
1948
|
+ historyVo1.setOtherAgreements(data.getOtherAgreements());
|
|
|
|
1949
|
+ }
|
|
|
|
1950
|
+ if (!StringUtil.isBlank(data.getHasLongTermContract())) {
|
|
|
|
1951
|
+ historyVo1.setHasLongTermContract(data.getHasLongTermContract());
|
|
|
|
1952
|
+ }
|
|
|
|
1953
|
+ if (!StringUtil.isBlank(data.getContractType())) {
|
|
|
|
1954
|
+ historyVo1.setContractType(data.getContractType());
|
|
|
|
1955
|
+ }
|
|
|
|
1956
|
+ if (!StringUtil.isBlank(data.getHasInterruption())) {
|
|
|
|
1957
|
+ historyVo1.setHasInterruption(data.getHasInterruption());
|
|
|
|
1958
|
+ }
|
|
|
|
1959
|
+ if (!StringUtil.isBlank(data.getSettlementPeriod())) {
|
|
|
|
1960
|
+ historyVo1.setSettlementPeriod(data.getSettlementPeriod());
|
|
|
|
1961
|
+ }
|
|
|
|
1962
|
+ if (!StringUtil.isBlank(data.getMaterialSupplyPlan())) {
|
|
|
|
1963
|
+ historyVo1.setMaterialSupplyPlan(data.getMaterialSupplyPlan());
|
|
|
|
1964
|
+ }
|
|
|
|
1965
|
+ if (!StringUtil.isBlank(data.getSuggestedCategory())) {
|
|
|
|
1966
|
+ historyVo1.setSuggestedCategory(data.getSuggestedCategory());
|
|
|
|
1967
|
+ }
|
|
|
|
1968
|
+ if (!StringUtil.isBlank(data.getCreditLimit())) {
|
|
|
|
1969
|
+ historyVo1.setCreditLimit(data.getCreditLimit());
|
|
|
|
1970
|
+ }
|
|
|
|
1971
|
+ if (!StringUtil.isBlank(data.getInvestigator())) {
|
|
|
|
1972
|
+ historyVo1.setInvestigator(data.getInvestigator());
|
|
|
|
1973
|
+ }
|
|
|
|
1974
|
+ if (!StringUtil.isBlank(data.getSupervisorReview())) {
|
|
|
|
1975
|
+ historyVo1.setSupervisorReview(data.getSupervisorReview());
|
|
|
|
1976
|
+ }
|
|
|
|
1977
|
+ if (!StringUtil.isBlank(data.getStatus())) {
|
|
|
|
1978
|
+ historyVo1.setStatus(data.getStatus());
|
|
|
|
1979
|
+ }
|
|
|
|
1980
|
+ if (!StringUtil.isBlank(data.getCertificationCertificate())) {
|
|
|
|
1981
|
+ historyVo1.setCertificationCertificate(data.getCertificationCertificate());
|
|
|
|
1982
|
+ }
|
|
|
|
1983
|
+ if (!StringUtil.isBlank(vo.getAnnualTotalSales())) {
|
|
|
|
1984
|
+ historyVo1.setAnnualTotalSales(vo.getAnnualTotalSales());
|
|
|
|
1985
|
+ }
|
|
|
|
1986
|
+ if (!StringUtil.isBlank(vo.getMainIndustry())) {
|
|
|
|
1987
|
+ historyVo1.setMainIndustry(vo.getMainIndustry());
|
|
|
|
1988
|
+ }
|
|
|
|
1989
|
+ if (!StringUtil.isBlank(vo.getAnnualMaterialOverview())) {
|
|
|
|
1990
|
+ historyVo1.setAnnualMaterialOverview(vo.getAnnualMaterialOverview());
|
|
|
|
1991
|
+ }
|
|
|
|
1992
|
+ if (!StringUtil.isBlank(vo.getCompanySettlementPeriod())) {
|
|
|
|
1993
|
+ historyVo1.setCompanySettlementPeriod(vo.getCompanySettlementPeriod());
|
|
|
|
1994
|
+ }
|
|
|
|
1995
|
+ if (!StringUtil.isBlank(vo.getCompanyCreditLimit())) {
|
|
|
|
1996
|
+ historyVo1.setCompanyCreditLimit(vo.getCompanyCreditLimit());
|
|
|
|
1997
|
+ }
|
|
|
|
1998
|
+ if (!StringUtil.isBlank(vo.getCompanyMaterialSupplyPlan())) {
|
|
|
|
1999
|
+ historyVo1.setCompanyMaterialSupplyPlan(vo.getCompanyMaterialSupplyPlan());
|
|
|
|
2000
|
+ }
|
|
|
|
2001
|
+ if (!StringUtil.isBlank(vo.getCompanySuggestedCategory())) {
|
|
|
|
2002
|
+ historyVo1.setCompanySuggestedCategory(vo.getCompanySuggestedCategory());
|
|
|
|
2003
|
+ }
|
|
|
|
2004
|
+ String historyId1 = customerCreditHistoryService.create(historyVo1);
|
|
|
|
2005
|
+ //变更后的核心人员
|
|
|
|
2006
|
+ if (CollectionUtils.isNotEmpty(corePersonnelList)) {
|
|
|
|
2007
|
+ for (CorePersonnel corePersonnel : corePersonnelList) {
|
|
|
|
2008
|
+ CreateCorePersonnelHistoryVo personnelHistoryVo = new CreateCorePersonnelHistoryVo();
|
|
|
|
2009
|
+ if (StringUtil.isBlank(corePersonnel.getId())) {
|
|
|
|
2010
|
+ String id = IdUtil.getId();
|
|
|
|
2011
|
+ personnelHistoryVo.setPersonnelId(id);
|
|
|
|
2012
|
+ corePersonnel.setId(id);
|
|
|
|
2013
|
+ } else {
|
|
|
|
2014
|
+ personnelHistoryVo.setPersonnelId(corePersonnel.getId());
|
|
|
|
2015
|
+ }
|
|
|
|
2016
|
+ personnelHistoryVo.setCreditHistoryId(historyId1);
|
|
|
|
2017
|
+ personnelHistoryVo.setName(corePersonnel.getName());
|
|
|
|
2018
|
+ if (!StringUtil.isBlank(corePersonnel.getSex())) {
|
|
|
|
2019
|
+ personnelHistoryVo.setSex(corePersonnel.getSex());
|
|
|
|
2020
|
+ }
|
|
|
|
2021
|
+ if (!StringUtil.isBlank(corePersonnel.getNativePlace())) {
|
|
|
|
2022
|
+ personnelHistoryVo.setNativePlace(corePersonnel.getNativePlace());
|
|
|
|
2023
|
+ }
|
|
|
|
2024
|
+ if (!StringUtil.isBlank(corePersonnel.getAge())) {
|
|
|
|
2025
|
+ personnelHistoryVo.setAge(corePersonnel.getAge());
|
|
|
|
2026
|
+ }
|
|
|
|
2027
|
+ if (!StringUtil.isBlank(corePersonnel.getPosition())) {
|
|
|
|
2028
|
+ personnelHistoryVo.setPosition(corePersonnel.getPosition());
|
|
|
|
2029
|
+ }
|
|
|
|
2030
|
+ if (!StringUtil.isBlank(corePersonnel.getMobile())) {
|
|
|
|
2031
|
+ personnelHistoryVo.setMobile(corePersonnel.getMobile());
|
|
|
|
2032
|
+ }
|
|
|
|
2033
|
+ if (!StringUtil.isBlank(corePersonnel.getPhone())) {
|
|
|
|
2034
|
+ personnelHistoryVo.setPhone(corePersonnel.getPhone());
|
|
|
|
2035
|
+ }
|
|
|
|
2036
|
+ if (!StringUtil.isBlank(corePersonnel.getEmail())) {
|
|
|
|
2037
|
+ personnelHistoryVo.setEmail(corePersonnel.getEmail());
|
|
|
|
2038
|
+ }
|
|
|
|
2039
|
+ if (!StringUtil.isBlank(corePersonnel.getAddress())) {
|
|
|
|
2040
|
+ personnelHistoryVo.setAddress(corePersonnel.getAddress());
|
|
|
|
2041
|
+ }
|
|
|
|
2042
|
+ if (!StringUtil.isBlank(corePersonnel.getPersonId())) {
|
|
|
|
2043
|
+ personnelHistoryVo.setPersonId(corePersonnel.getPersonId());
|
|
|
|
2044
|
+ }
|
|
|
|
2045
|
+ corePersonnelHistoryService.create(personnelHistoryVo);
|
|
|
|
2046
|
+ }
|
|
|
|
2047
|
+ }
|
|
|
|
2048
|
+
|
|
|
|
2049
|
+ LambdaUpdateWrapper<CustomerCredit> updateWrapper = Wrappers.lambdaUpdate(CustomerCredit.class)
|
|
|
|
2050
|
+ .set(CustomerCredit::getIsChange, "true")
|
|
|
|
2051
|
+ .set(CustomerCredit::getFrozenStatus, "NORMAL")
|
|
|
|
2052
|
+ .set(CustomerCredit::getAnnualTotalSales, StringUtil.isBlank(vo.getAnnualTotalSales()) ? null : vo.getAnnualTotalSales())
|
|
|
|
2053
|
+ .set(CustomerCredit::getMainIndustry, StringUtil.isBlank(vo.getMainIndustry()) ? null : vo.getMainIndustry())
|
|
|
|
2054
|
+ .set(CustomerCredit::getAnnualMaterialOverview, StringUtil.isBlank(vo.getAnnualMaterialOverview()) ? null : vo.getAnnualMaterialOverview())
|
|
|
|
2055
|
+ .set(CustomerCredit::getCompanySettlementPeriod, StringUtil.isBlank(vo.getCompanySettlementPeriod()) ? null : vo.getCompanySettlementPeriod())
|
|
|
|
2056
|
+ .set(CustomerCredit::getCompanyCreditLimit, StringUtil.isBlank(vo.getCompanyCreditLimit()) ? null : vo.getCompanyCreditLimit())
|
|
|
|
2057
|
+ .set(CustomerCredit::getCompanyMaterialSupplyPlan, StringUtil.isBlank(vo.getCompanyMaterialSupplyPlan()) ? null : vo.getCompanyMaterialSupplyPlan())
|
|
|
|
2058
|
+ .set(CustomerCredit::getCompanySuggestedCategory, StringUtil.isBlank(vo.getCompanySuggestedCategory()) ? null : vo.getCompanySuggestedCategory())
|
|
|
|
2059
|
+ .eq(CustomerCredit::getId, vo.getId());
|
|
|
|
2060
|
+
|
|
|
|
2061
|
+ getBaseMapper().update(updateWrapper);
|
|
|
|
2062
|
+ OpLogUtil.setVariable("id", data.getId());
|
|
|
|
2063
|
+ OpLogUtil.setExtra(vo);
|
|
|
|
2064
|
+ }
|
|
|
|
2065
|
+
|
|
|
|
2066
|
+
|
|
1617
|
@Override
|
2067
|
@Override
|
|
1618
|
public void cleanCacheByKey(Serializable key) {
|
2068
|
public void cleanCacheByKey(Serializable key) {
|
|
1619
|
|
2069
|
|