Commit d31b269efde2a6b2d67d29a7cdca58b3c99a6624

Authored by 房远帅
1 parent cc82971b

楚江ERP:客户资信-变更记录优化

1 1 package com.lframework.xingyun.sc.controller.customer;
2 2
3   -import com.lframework.starter.common.utils.StringUtil;
4 3 import com.lframework.starter.web.core.annotations.security.HasPermission;
5 4 import com.lframework.starter.web.core.controller.DefaultBaseController;
6 5 import com.lframework.starter.web.core.utils.PageResultUtil;
7 6 import com.lframework.starter.web.core.components.resp.PageResult;
8 7 import com.lframework.starter.web.core.components.resp.InvokeResult;
9   -
10 8 import javax.annotation.Resource;
11 9 import javax.validation.constraints.NotBlank;
12   -
13 10 import com.lframework.xingyun.sc.bo.customer.credit.ChangeData;
14 11 import com.lframework.xingyun.sc.bo.customer.credit.ChangeItem;
15 12 import com.lframework.xingyun.sc.bo.customer.credit.GetCustomerCreditHistoryBo;
16   -import com.lframework.xingyun.sc.entity.CorePersonnel;
17 13 import com.lframework.xingyun.sc.entity.CorePersonnelHistory;
18   -import com.lframework.xingyun.sc.entity.CustomerCredit;
19 14 import com.lframework.xingyun.sc.entity.CustomerCreditHistory;
20 15 import com.lframework.xingyun.sc.service.customer.CorePersonnelHistoryService;
21   -import com.lframework.xingyun.sc.service.customer.CorePersonnelService;
22 16 import com.lframework.xingyun.sc.service.customer.CustomerCreditHistoryService;
23   -import com.lframework.xingyun.sc.service.customer.CustomerCreditService;
24 17 import com.lframework.xingyun.sc.vo.customer.credit.CreateCustomerCreditHistoryVo;
25 18 import com.lframework.xingyun.sc.vo.customer.credit.QueryCorePersonnelHistoryVo;
26   -import com.lframework.xingyun.sc.vo.customer.credit.QueryCorePersonnelVo;
27 19 import com.lframework.xingyun.sc.vo.customer.credit.QueryCustomerCreditHistoryVo;
28 20 import io.swagger.annotations.ApiImplicitParam;
29 21 import com.lframework.starter.web.core.components.resp.InvokeResultBuilder;
... ... @@ -54,11 +46,7 @@ public class CustomerCreditHistoryController extends DefaultBaseController {
54 46 @Resource
55 47 private CustomerCreditHistoryService customerCreditHistoryService;
56 48 @Resource
57   - private CustomerCreditService customerCreditService;
58   - @Resource
59 49 private CorePersonnelHistoryService corePersonnelHistoryService;
60   - @Resource
61   - private CorePersonnelService corePersonnelService;
62 50
63 51 /**
64 52 * 查询列表
... ... @@ -87,7 +75,7 @@ public class CustomerCreditHistoryController extends DefaultBaseController {
87 75 @HasPermission({"customerCreditHistory:customercredithistory:query"})
88 76 @GetMapping("/customerCreditHistoryList")
89 77 public InvokeResult<List<GetCustomerCreditHistoryBo>> customerCreditHistoryList(@Valid QueryCustomerCreditHistoryVo vo) {
90   -
  78 + vo.setType("PART");
91 79 List<CustomerCreditHistory> query = customerCreditHistoryService.query(vo);
92 80
93 81 List<GetCustomerCreditHistoryBo> results = null;
... ... @@ -122,22 +110,11 @@ public class CustomerCreditHistoryController extends DefaultBaseController {
122 110 if (data == null) {
123 111 throw new DefaultClientException("客户资信历史记录表不存在!");
124 112 }
125   - //客户资信ID
126   - String creditId = data.getCreditId();
127   - QueryCustomerCreditHistoryVo vo = new QueryCustomerCreditHistoryVo();
128   - vo.setCreditId(creditId);
129   - List<CustomerCreditHistory> query = customerCreditHistoryService.query(vo);
130   - Map<String, CustomerCreditHistory> map = query.stream()
131   - .filter(item -> item.getSort() != null)
132   - .collect(Collectors.toMap(
133   - CustomerCreditHistory::getSort,
134   - item -> item,
135   - (a, b) -> a // 保留第一个,去重
136   - ));
137   - //第几次变更
138   - int sort = Integer.parseInt(data.getSort());
139   - //变更次数
140   - int size = query.size();
  113 + CustomerCreditHistory customerCreditHistory = customerCreditHistoryService.findById(id + "_01");
  114 + if (customerCreditHistory == null) {
  115 + throw new DefaultClientException("客户资信历史记录表不存在!");
  116 + }
  117 +
141 118 List<ChangeItem> differencesWithIndex;
142 119 //核心人员变更前
143 120 List<CorePersonnelHistory> personnelBeforeChangeList;
... ... @@ -145,54 +122,24 @@ public class CustomerCreditHistoryController extends DefaultBaseController {
145 122 List<CorePersonnelHistory> personnelAfterChangeList;
146 123
147 124 ChangeData result = new ChangeData();
148   - if (sort + 1 <= size) {
149   - //data与customerCreditHistory的比较,其中data与为变更前,customerCreditHistory为变更后
150   - CustomerCreditHistory customerCreditHistory = map.get(String.valueOf(sort + 1));
151   - differencesWithIndex = customerCreditHistoryService.getDifferencesWithIndex(data, customerCreditHistory);
152   - //核心人员变更前
153   - String idBefore = data.getId();
154   - QueryCorePersonnelHistoryVo corePersonnelHistoryVo = new QueryCorePersonnelHistoryVo();
155   - corePersonnelHistoryVo.setCreditHistoryId(idBefore);
156   - personnelBeforeChangeList = corePersonnelHistoryService.query(corePersonnelHistoryVo);
157   -
158   - //核心人员变更后
159   - String idAfter = customerCreditHistory.getId();
160   - QueryCorePersonnelHistoryVo corePersonnelHistoryVo1 = new QueryCorePersonnelHistoryVo();
161   - corePersonnelHistoryVo1.setCreditHistoryId(idAfter);
162   - personnelAfterChangeList = corePersonnelHistoryService.query(corePersonnelHistoryVo1);
163   -
164   - //添加变更记录
165   - corePersonnelHistoryService.updateWithChangeInfo(personnelBeforeChangeList, personnelAfterChangeList);
166   - result.setPersonnelBeforeChangeList(personnelBeforeChangeList);
167   - result.setPersonnelAfterChangeList(personnelAfterChangeList);
168   - } else {
169   - //现在的数据与这data相对比,其中data为变更前,customerCredit为变更后
170   - CustomerCredit customerCredit = customerCreditService.findById(creditId);
171   - CustomerCreditHistory customerCreditHistory = customerCreditHistoryService.changeCustomerCredit(customerCredit);
172   - differencesWithIndex = customerCreditHistoryService.getDifferencesWithIndex(data, customerCreditHistory);
173   - //核心人员变更前
174   - String idBefore = data.getId();
175   - QueryCorePersonnelHistoryVo corePersonnelHistoryVo = new QueryCorePersonnelHistoryVo();
176   - corePersonnelHistoryVo.setCreditHistoryId(idBefore);
177   - personnelBeforeChangeList = corePersonnelHistoryService.query(corePersonnelHistoryVo);
178   -
179   - //核心人员变更后
180   - String idAfter = customerCredit.getId();
181   - QueryCorePersonnelVo queryCorePersonnelVo = new QueryCorePersonnelVo();
182   - queryCorePersonnelVo.setCreditId(idAfter);
183   - List<CorePersonnel> query1 = corePersonnelService.query(queryCorePersonnelVo);
184   - List<CorePersonnelHistory> query2 = new ArrayList<>();
185   - if (query1 != null) {
186   - for (CorePersonnel corePersonnel : query1) {
187   - CorePersonnelHistory corePersonnelHistory = corePersonnelHistoryService.changeCorePersonnel(corePersonnel);
188   - query2.add(corePersonnelHistory);
189   - }
190   - }
191   - //添加变更记录
192   - corePersonnelHistoryService.updateWithChangeInfo(personnelBeforeChangeList, query2);
193   - result.setPersonnelBeforeChangeList(personnelBeforeChangeList);
194   - result.setPersonnelAfterChangeList(query2);
195   - }
  125 + //data与customerCreditHistory的比较,其中data与为变更前,customerCreditHistory为变更后
  126 + differencesWithIndex = customerCreditHistoryService.getDifferencesWithIndex(data, customerCreditHistory);
  127 + //核心人员变更前
  128 + String idBefore = data.getId();
  129 + QueryCorePersonnelHistoryVo corePersonnelHistoryVo = new QueryCorePersonnelHistoryVo();
  130 + corePersonnelHistoryVo.setCreditHistoryId(idBefore);
  131 + personnelBeforeChangeList = corePersonnelHistoryService.query(corePersonnelHistoryVo);
  132 +
  133 + //核心人员变更后
  134 + String idAfter = customerCreditHistory.getId();
  135 + QueryCorePersonnelHistoryVo corePersonnelHistoryVo1 = new QueryCorePersonnelHistoryVo();
  136 + corePersonnelHistoryVo1.setCreditHistoryId(idAfter);
  137 + personnelAfterChangeList = corePersonnelHistoryService.query(corePersonnelHistoryVo1);
  138 +
  139 + //添加变更记录
  140 + corePersonnelHistoryService.updateWithChangeInfo(personnelBeforeChangeList, personnelAfterChangeList);
  141 + result.setPersonnelBeforeChangeList(personnelBeforeChangeList);
  142 + result.setPersonnelAfterChangeList(personnelAfterChangeList);
196 143
197 144 result.setOtherChangeList(differencesWithIndex);
198 145
... ...
... ... @@ -59,6 +59,7 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer
59 59 Assert.greaterThanZero(pageSize);
60 60
61 61 PageHelperUtil.startPage(pageIndex, pageSize);
  62 + vo.setType("PART");
62 63 List<CustomerCreditHistory> datas = this.query(vo);
63 64
64 65 return PageResultUtil.convert(new PageInfo<>(datas));
... ... @@ -83,7 +84,11 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer
83 84 public String create(CreateCustomerCreditHistoryVo vo) {
84 85
85 86 CustomerCreditHistory data = new CustomerCreditHistory();
86   - data.setId(IdUtil.getId());
  87 + if (StringUtil.isBlank(vo.getId())) {
  88 + data.setId(IdUtil.getId());
  89 + } else {
  90 + data.setId(vo.getId());
  91 + }
87 92 data.setCreditId(vo.getCreditId());
88 93 data.setSort(vo.getSort());
89 94 data.setSerialNumber(vo.getSerialNumber());
... ...
... ... @@ -291,18 +291,22 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM
291 291 QueryCorePersonnelVo queryCorePersonnelVo = new QueryCorePersonnelVo();
292 292 queryCorePersonnelVo.setCreditId(data.getId());
293 293 List<CorePersonnel> corePersonnelList = corePersonnelService.query(queryCorePersonnelVo);
  294 + String historyId = null;
  295 + String sort = "1";
294 296 if ("CHANGE".equals(type)) {
295 297 CreateCustomerCreditHistoryVo historyVo = new CreateCustomerCreditHistoryVo();
296 298 historyVo.setCreditId(data.getId());
297 299 //第几次变更序号
298 300 QueryCustomerCreditHistoryVo queryCustomerCreditHistoryVo = new QueryCustomerCreditHistoryVo();
299 301 queryCustomerCreditHistoryVo.setCreditId(data.getId());
  302 + queryCustomerCreditHistoryVo.setType("PART");
300 303 List<CustomerCreditHistory> query = customerCreditHistoryService.query(queryCustomerCreditHistoryVo);
301 304 if (CollectionUtils.isEmpty(query)) {
302 305 historyVo.setSort("1");
303 306 } else {
304 307 int i = query.size() + 1;
305 308 historyVo.setSort(String.valueOf(i));
  309 + sort = String.valueOf(i);
306 310 }
307 311 historyVo.setSerialNumber(data.getSerialNumber());
308 312 if (!StringUtil.isBlank(data.getRegion())) {
... ... @@ -458,7 +462,7 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM
458 462 if (!StringUtil.isBlank(data.getCertificationCertificate())) {
459 463 historyVo.setCertificationCertificate(data.getCertificationCertificate());
460 464 }
461   - String historyId = customerCreditHistoryService.create(historyVo);
  465 + historyId = customerCreditHistoryService.create(historyVo);
462 466 if (CollectionUtils.isNotEmpty(corePersonnelList)) {
463 467 for (CorePersonnel corePersonnel : corePersonnelList) {
464 468 CreateCorePersonnelHistoryVo personnelHistoryVo = new CreateCorePersonnelHistoryVo();
... ... @@ -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 844 OpLogUtil.setVariable("id", data.getId());
637 845 OpLogUtil.setExtra(vo);
638 846
... ...
... ... @@ -16,6 +16,13 @@ public class CreateCustomerCreditHistoryVo implements BaseVo, Serializable {
16 16 private static final long serialVersionUID = 1L;
17 17
18 18 /**
  19 + * ID
  20 + */
  21 + @ApiModelProperty(value = "ID")
  22 + @Length(message = "ID最多允许50个字符!")
  23 + private String Id;
  24 +
  25 + /**
19 26 * 客户资信ID
20 27 */
21 28 @ApiModelProperty(value = "客户资信ID", required = true)
... ...
... ... @@ -29,4 +29,10 @@ public class QueryCustomerCreditHistoryVo extends PageVo implements BaseVo, Seri
29 29 @ApiModelProperty("编号")
30 30 private String serialNumber;
31 31
  32 + /**
  33 + * 查询类型 部分(PART)
  34 + */
  35 + @ApiModelProperty("查询类型")
  36 + private String type;
  37 +
32 38 }
... ...
... ... @@ -144,6 +144,9 @@
144 144 <if test="vo.serialNumber != null and vo.serialNumber != ''">
145 145 AND tb.serial_number = #{vo.serialNumber}
146 146 </if>
  147 + <if test="vo.type != null and vo.type != '' and vo.type=='PART'">
  148 + AND tb.id NOT LIKE '%\_01'
  149 + </if>
147 150 </where>
148 151 </select>
149 152 </mapper>
... ...