docs
This commit is contained in:
@@ -3,8 +3,10 @@ package com.ecep.contract.controller.customer;
|
||||
import com.ecep.contract.MyDateTimeUtils;
|
||||
import com.ecep.contract.controller.AbstEntityManagerSkin;
|
||||
import com.ecep.contract.controller.table.cell.CompanyTableCell;
|
||||
import com.ecep.contract.controller.table.cell.CustomerCatalogTableCell;
|
||||
import com.ecep.contract.service.CompanyCustomerService;
|
||||
import com.ecep.contract.service.CompanyService;
|
||||
import com.ecep.contract.service.CustomerCatalogService;
|
||||
import com.ecep.contract.vm.CompanyCustomerViewModel;
|
||||
import com.ecep.contract.vo.CompanyCustomerVo;
|
||||
import com.ecep.contract.vo.CompanyVo;
|
||||
@@ -31,7 +33,10 @@ public class CompanyCustomerManagerSkin
|
||||
public void initializeTable() {
|
||||
controller.idColumn.setCellValueFactory(param -> param.getValue().getId());
|
||||
controller.companyColumn.setCellValueFactory(param -> param.getValue().getCompany());
|
||||
controller.companyColumn.setCellFactory(param -> new CompanyTableCell<>(getCompanyService()));
|
||||
controller.companyColumn.setCellFactory(CompanyTableCell.forTableColumn(getCompanyService()));
|
||||
|
||||
controller.catalogColumn.setCellValueFactory(param -> param.getValue().getCatalog());
|
||||
controller.catalogColumn.setCellFactory(CustomerCatalogTableCell.forTableColumn(getBean(CustomerCatalogService.class)));
|
||||
|
||||
controller.developDateColumn.setCellValueFactory(param -> param.getValue().getDevelopDate());
|
||||
controller.pathColumn.setCellValueFactory(param -> param.getValue().getPath());
|
||||
|
||||
@@ -52,7 +52,7 @@ public class CompanyCustomerManagerWindowController
|
||||
* 客户所属公司,Company
|
||||
*/
|
||||
public TableColumn<CompanyCustomerViewModel, Integer> companyColumn;
|
||||
public TableColumn<CompanyCustomerViewModel, String> catalogColumn;
|
||||
public TableColumn<CompanyCustomerViewModel, Integer> catalogColumn;
|
||||
public TableColumn<CompanyCustomerViewModel, LocalDate> developDateColumn;
|
||||
public TableColumn<CompanyCustomerViewModel, String> pathColumn;
|
||||
public TableColumn<CompanyCustomerViewModel, String> createdColumn;
|
||||
|
||||
@@ -68,7 +68,7 @@ public class CustomerTabSkinSatisfactionSurvey
|
||||
bindLocalDateColumn(dateColumn, CustomerSatisfactionSurveyViewModel::getDate);
|
||||
bindNumberColumn(totalScoreColumn, CustomerSatisfactionSurveyViewModel::getTotalScore);
|
||||
applicantColumn.setCellValueFactory(param -> param.getValue().getApplicant());
|
||||
applicantColumn.setCellFactory(cell -> new EmployeeTableCell<>(getEmployeeService()));
|
||||
applicantColumn.setCellFactory(EmployeeTableCell.forTableColumn(getEmployeeService()));
|
||||
bindLocalDateTimeColumn(applyTimeColumn, CustomerSatisfactionSurveyViewModel::getApplyTime);
|
||||
bindColumn(descriptionColumn, CustomerSatisfactionSurveyViewModel::getDescription);
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ public class CompanyCustomerViewModel extends IdentityViewModel<CompanyCustomerV
|
||||
* 关联的企业,Company
|
||||
*/
|
||||
private SimpleObjectProperty<Integer> company = new SimpleObjectProperty<>();
|
||||
|
||||
private SimpleObjectProperty<Integer> catalog = new SimpleObjectProperty<>();
|
||||
/**
|
||||
* 发展日期
|
||||
*/
|
||||
@@ -46,6 +48,7 @@ public class CompanyCustomerViewModel extends IdentityViewModel<CompanyCustomerV
|
||||
public void updateFrom(CompanyCustomerVo c) {
|
||||
super.updateFrom(c);
|
||||
getCompany().set(c.getCompanyId());
|
||||
getCatalog().set(c.getCatalogId());
|
||||
getDevelopDate().set(c.getDevelopDate());
|
||||
getContact().set(c.getContactId());
|
||||
getPath().set(c.getPath());
|
||||
@@ -60,6 +63,10 @@ public class CompanyCustomerViewModel extends IdentityViewModel<CompanyCustomerV
|
||||
v.setCompanyId(company.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(catalog.get(), v.getCatalogId())) {
|
||||
v.setCatalogId(catalog.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(contact.get(), v.getContactId())) {
|
||||
v.setContactId(contact.get());
|
||||
modified = true;
|
||||
|
||||
Reference in New Issue
Block a user