Commit ff181d28 by liuyang

2024-04-19 客户画像功能添加

parent 60d2c75b
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THppz016.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-04-18 15:57:09 create
*/
public class HPPZ016 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0:否1.是*/
public static final String FIELD_CUST_CODE = "custCode"; /* 客户编码*/
public static final String FIELD_CUST_NAME = "custName"; /* 客户名称*/
public static final String FIELD_BEHAVIOR_TYPE = "behaviorType"; /* 行业类型*/
public static final String FIELD_COMPANY_SCALE = "companyScale"; /* 企业规模*/
public static final String FIELD_USER_COUNT = "userCount"; /* 员工人数*/
public static final String FIELD_REVENUE = "revenue"; /* 营业收入*/
public static final String FIELD_INDU_TYPE = "induType"; /* 产品类型*/
public static final String FIELD_INDU_QUALITY = "induQuality"; /* 产品质量*/
public static final String FIELD_USAGE_SCENARIO = "usageScenario"; /* 使用场景*/
public static final String FIELD_PURCHASE_NUM = "purchaseNum"; /* 购买频率*/
public static final String FIELD_PURCHASE_DATE = "purchaseDate"; /* 最近购买时间*/
public static final String FIELD_PAYMENT_MODE = "paymentMode"; /* 支付方式*/
public static final String FIELD_MISFEASOR_NAME = "misfeasorName"; /* 违法行为*/
public static final String FIELD_MISFEASOR_NUM = "misfeasorNum"; /* 违约次数*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0:否1.是*/
public static final String COL_CUST_CODE = "CUST_CODE"; /* 客户编码*/
public static final String COL_CUST_NAME = "CUST_NAME"; /* 客户名称*/
public static final String COL_BEHAVIOR_TYPE = "BEHAVIOR_TYPE"; /* 行业类型*/
public static final String COL_COMPANY_SCALE = "COMPANY_SCALE"; /* 企业规模*/
public static final String COL_USER_COUNT = "USER_COUNT"; /* 员工人数*/
public static final String COL_REVENUE = "REVENUE"; /* 营业收入*/
public static final String COL_INDU_TYPE = "INDU_TYPE"; /* 产品类型*/
public static final String COL_INDU_QUALITY = "INDU_QUALITY"; /* 产品质量*/
public static final String COL_USAGE_SCENARIO = "USAGE_SCENARIO"; /* 使用场景*/
public static final String COL_PURCHASE_NUM = "PURCHASE_NUM"; /* 购买频率*/
public static final String COL_PURCHASE_DATE = "PURCHASE_DATE"; /* 最近购买时间*/
public static final String COL_PAYMENT_MODE = "PAYMENT_MODE"; /* 支付方式*/
public static final String COL_MISFEASOR_NAME = "MISFEASOR_NAME"; /* 违法行为*/
public static final String COL_MISFEASOR_NUM = "MISFEASOR_NUM"; /* 违约次数*/
public static final String QUERY = "HPPZ016.query";
public static final String COUNT = "HPPZ016.count";
public static final String INSERT = "HPPZ016.insert";
public static final String UPDATE = "HPPZ016.update";
public static final String DELETE = "HPPZ016.delete";
public static final String DELETE_FLAG = "HPPZ016.deleteFlag";
private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0:否1.是*/
private String custCode = " "; /* 客户编码*/
private String custName = " "; /* 客户名称*/
private Integer behaviorType; /* 行业类型*/
private Integer companyScale; /* 企业规模*/
private Long userCount = new Long(0); /* 员工人数*/
private BigDecimal revenue = new BigDecimal("0"); /* 营业收入*/
private String induType = " "; /* 产品类型*/
private String induQuality = " "; /* 产品质量*/
private String usageScenario = " "; /* 使用场景*/
private String purchaseNum = " "; /* 购买频率*/
private String purchaseDate = " "; /* 最近购买时间*/
private String paymentMode = " "; /* 支付方式*/
private String misfeasorName = " "; /* 违法行为*/
private Long misfeasorNum = new Long(0); /* 违约次数*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("修改人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0:否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_CODE);
//eiColumn.setPrimaryKey(true);
eiColumn.setDescName("客户编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_NAME);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BEHAVIOR_TYPE);
eiColumn.setDescName("行业类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_SCALE);
eiColumn.setDescName("企业规模");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_USER_COUNT);
eiColumn.setDescName("员工人数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVENUE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(18);
eiColumn.setDescName("营业收入");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INDU_TYPE);
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INDU_QUALITY);
eiColumn.setDescName("产品质量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_USAGE_SCENARIO);
eiColumn.setDescName("使用场景");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PURCHASE_NUM);
eiColumn.setDescName("购买频率");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PURCHASE_DATE);
eiColumn.setDescName("最近购买时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PAYMENT_MODE);
eiColumn.setDescName("支付方式");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MISFEASOR_NAME);
eiColumn.setDescName("违法行为");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MISFEASOR_NUM);
eiColumn.setDescName("违约次数");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPPZ016() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建名称.
*
* @param createdName - 创建名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 修改人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 修改人.
*
* @param updatedBy - 修改人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedName() {
return updatedName;
}
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
public String getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 是否删除0:否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0:否1.是.
*
* @param deleteFlag - 是否删除0:否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the custCode - 客户编码.
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 客户编码.
*
* @param custCode - 客户编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custName - 客户名称.
* @return the custName
*/
public String getCustName() {
return this.custName;
}
/**
* set the custName - 客户名称.
*
* @param custName - 客户名称
*/
public void setCustName(String custName) {
this.custName = custName;
}
/**
* get the behaviorType - 行业类型.
* @return the behaviorType
*/
public Integer getBehaviorType() {
return this.behaviorType;
}
/**
* set the behaviorType - 行业类型.
*
* @param behaviorType - 行业类型
*/
public void setBehaviorType(Integer behaviorType) {
this.behaviorType = behaviorType;
}
/**
* get the companyScale - 企业规模.
* @return the companyScale
*/
public Integer getCompanyScale() {
return this.companyScale;
}
/**
* set the companyScale - 企业规模.
*
* @param companyScale - 企业规模
*/
public void setCompanyScale(Integer companyScale) {
this.companyScale = companyScale;
}
/**
* get the userCount - 员工人数.
* @return the userCount
*/
public Long getUserCount() {
return this.userCount;
}
/**
* set the userCount - 员工人数.
*
* @param userCount - 员工人数
*/
public void setUserCount(Long userCount) {
this.userCount = userCount;
}
/**
* get the revenue - 营业收入.
* @return the revenue
*/
public BigDecimal getRevenue() {
return this.revenue;
}
/**
* set the revenue - 营业收入.
*
* @param revenue - 营业收入
*/
public void setRevenue(BigDecimal revenue) {
this.revenue = revenue;
}
/**
* get the induType - 产品类型.
* @return the induType
*/
public String getInduType() {
return this.induType;
}
/**
* set the induType - 产品类型.
*
* @param induType - 产品类型
*/
public void setInduType(String induType) {
this.induType = induType;
}
/**
* get the induQuality - 产品质量.
* @return the induQuality
*/
public String getInduQuality() {
return this.induQuality;
}
/**
* set the induQuality - 产品质量.
*
* @param induQuality - 产品质量
*/
public void setInduQuality(String induQuality) {
this.induQuality = induQuality;
}
/**
* get the usageScenario - 使用场景.
* @return the usageScenario
*/
public String getUsageScenario() {
return this.usageScenario;
}
/**
* set the usageScenario - 使用场景.
*
* @param usageScenario - 使用场景
*/
public void setUsageScenario(String usageScenario) {
this.usageScenario = usageScenario;
}
/**
* get the purchaseNum - 购买频率.
* @return the purchaseNum
*/
public String getPurchaseNum() {
return this.purchaseNum;
}
/**
* set the purchaseNum - 购买频率.
*
* @param purchaseNum - 购买频率
*/
public void setPurchaseNum(String purchaseNum) {
this.purchaseNum = purchaseNum;
}
/**
* get the purchaseDate - 最近购买时间.
* @return the purchaseDate
*/
public String getPurchaseDate() {
return this.purchaseDate;
}
/**
* set the purchaseDate - 最近购买时间.
*
* @param purchaseDate - 最近购买时间
*/
public void setPurchaseDate(String purchaseDate) {
this.purchaseDate = purchaseDate;
}
/**
* get the paymentMode - 支付方式.
* @return the paymentMode
*/
public String getPaymentMode() {
return this.paymentMode;
}
/**
* set the paymentMode - 支付方式.
*
* @param paymentMode - 支付方式
*/
public void setPaymentMode(String paymentMode) {
this.paymentMode = paymentMode;
}
/**
* get the misfeasorName - 违法行为.
* @return the misfeasorName
*/
public String getMisfeasorName() {
return this.misfeasorName;
}
/**
* set the misfeasorName - 违法行为.
*
* @param misfeasorName - 违法行为
*/
public void setMisfeasorName(String misfeasorName) {
this.misfeasorName = misfeasorName;
}
/**
* get the misfeasorNum - 违约次数.
* @return the misfeasorNum
*/
public Long getMisfeasorNum() {
return this.misfeasorNum;
}
/**
* set the misfeasorNum - 违约次数.
*
* @param misfeasorNum - 违约次数
*/
public void setMisfeasorNum(Long misfeasorNum) {
this.misfeasorNum = misfeasorNum;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_CODE)), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_NAME)), custName));
setBehaviorType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BEHAVIOR_TYPE)), behaviorType));
setCompanyScale(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPANY_SCALE)), companyScale));
setUserCount(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_USER_COUNT)), userCount));
setRevenue(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REVENUE)), revenue));
setInduType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INDU_TYPE)), induType));
setInduQuality(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INDU_QUALITY)), induQuality));
setUsageScenario(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USAGE_SCENARIO)), usageScenario));
setPurchaseNum(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PURCHASE_NUM)), purchaseNum));
setPurchaseDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PURCHASE_DATE)), purchaseDate));
setPaymentMode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PAYMENT_MODE)), paymentMode));
setMisfeasorName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MISFEASOR_NAME)), misfeasorName));
setMisfeasorNum(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MISFEASOR_NUM)), misfeasorNum));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_CUST_CODE, StringUtils.toString(custCode, eiMetadata.getMeta(FIELD_CUST_CODE)));
map.put(FIELD_CUST_NAME, StringUtils.toString(custName, eiMetadata.getMeta(FIELD_CUST_NAME)));
map.put(FIELD_BEHAVIOR_TYPE, StringUtils.toString(behaviorType, eiMetadata.getMeta(FIELD_BEHAVIOR_TYPE)));
map.put(FIELD_COMPANY_SCALE, StringUtils.toString(companyScale, eiMetadata.getMeta(FIELD_COMPANY_SCALE)));
map.put(FIELD_USER_COUNT, StringUtils.toString(userCount, eiMetadata.getMeta(FIELD_USER_COUNT)));
map.put(FIELD_REVENUE, StringUtils.toString(revenue, eiMetadata.getMeta(FIELD_REVENUE)));
map.put(FIELD_INDU_TYPE, StringUtils.toString(induType, eiMetadata.getMeta(FIELD_INDU_TYPE)));
map.put(FIELD_INDU_QUALITY, StringUtils.toString(induQuality, eiMetadata.getMeta(FIELD_INDU_QUALITY)));
map.put(FIELD_USAGE_SCENARIO, StringUtils.toString(usageScenario, eiMetadata.getMeta(FIELD_USAGE_SCENARIO)));
map.put(FIELD_PURCHASE_NUM, StringUtils.toString(purchaseNum, eiMetadata.getMeta(FIELD_PURCHASE_NUM)));
map.put(FIELD_PURCHASE_DATE, StringUtils.toString(purchaseDate, eiMetadata.getMeta(FIELD_PURCHASE_DATE)));
map.put(FIELD_PAYMENT_MODE, StringUtils.toString(paymentMode, eiMetadata.getMeta(FIELD_PAYMENT_MODE)));
map.put(FIELD_MISFEASOR_NAME, StringUtils.toString(misfeasorName, eiMetadata.getMeta(FIELD_MISFEASOR_NAME)));
map.put(FIELD_MISFEASOR_NUM, StringUtils.toString(misfeasorNum, eiMetadata.getMeta(FIELD_MISFEASOR_NUM)));
return map;
}
}
...@@ -4,11 +4,15 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; ...@@ -4,11 +4,15 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.CompanyTypeEnum; import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ002; import com.baosight.hpjx.hp.pz.domain.HPPZ002;
import com.baosight.hpjx.hp.pz.domain.HPPZ016;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -104,6 +108,14 @@ public class ServiceHPPZ003 extends ServiceBase { ...@@ -104,6 +108,14 @@ public class ServiceHPPZ003 extends ServiceBase {
// 生成客户编码 // 生成客户编码
fPz003.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ003_CUST_CODE)); fPz003.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ003_CUST_CODE));
DaoUtils.insert("HPPZ003.insert", fPz003); DaoUtils.insert("HPPZ003.insert", fPz003);
if (fPz003.getStatus() == 1){
HPPZ016 hppz016 = new HPPZ016();
hppz016.setCustCode(fPz003.getCustCode());
hppz016.setCustName(fPz003.getCustName());
hppz016.setPurchaseDate(StringUtil.removeHorizontalLine(DateUtils.date()));
hppz016.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPPZ016.INSERT, hppz016);
}
} }
/** /**
......
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ016;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/4/18
*/
public class ServiceHPPZ016 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPPZ016.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final EiInfo outEiInfo = super.query(inInfo, HPPZ016.QUERY, new HPPZ016());
CommonMethod.initBlock(outEiInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),null);
return outEiInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
return super.query(inInfo,HPPZ016.QUERY,new HPPZ016());
}
@OperationLogAnnotation(operModul = "客户画像",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPPZ016 hpxs001 = new HPPZ016();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxs001.fromMap(map);
hpxs001.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPPZ016.DELETE_FLAG, hpxs001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "客户画像",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HPPZ016 hppz016 = new HPPZ016();
hppz016.fromMap(resultRows.get(i));
if (hppz016.getId() == null || hppz016.getId() == 0) {
this.add(hppz016);
} else {
this.modify(hppz016);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPPZ016 hppz016) {
DaoUtils.insert(HPPZ016.INSERT, hppz016);
}
/**
* 修改操作
*/
public void modify(HPPZ016 hppz016) {
hppz016.setPurchaseDate(StringUtil.removeHorizontalLine(hppz016.getPurchaseDate()));
DaoUtils.update(HPPZ016.UPDATE, hppz016);
}
}
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.hp.pz.domain.HPPZ016;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/4/18
*/
public class ServiceHPPZ016A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
//String id = MapUtils.getString(queryMap, "id");
List<HPPZ016> dbSc005 = this.dao.query(HPPZ016.QUERY,queryMap);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ016().eiMetadata);
inInfo.getBlock(EiConstant.resultBlock).addRows(dbSc005);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
return super.query(inInfo);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-04-18 15:57:09
Version : 1.0
schema : hpjx
tableName : T_HPPZ016
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
DELETE_FLAG TINYINT,
CUST_CODE VARCHAR NOT NULL primarykey,
CUST_NAME VARCHAR,
BEHAVIOR_TYPE TINYINT,
COMPANY_SCALE TINYINT,
USER_COUNT BIGINT,
REVENUE DECIMAL,
INDU_TYPE VARCHAR,
INDU_QUALITY VARCHAR,
USAGE_SCENARIO VARCHAR,
PURCHASE_NUM BIGINT,
PURCHASE_DATE VARCHAR,
PAYMENT_MODE VARCHAR,
MISFEASOR_NAME VARCHAR,
MISFEASOR_NUM BIGINT
-->
<sqlMap namespace="HPPZ016">
<sql id="column">
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName",
UPDATED_TIME as "updatedTime",
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CUST_CODE as "custCode", <!-- 客户编码 -->
CUST_NAME as "custName", <!-- 客户名称 -->
BEHAVIOR_TYPE as "behaviorType", <!-- 行业类型 -->
COMPANY_SCALE as "companyScale", <!-- 企业规模 -->
USER_COUNT as "userCount", <!-- 员工人数 -->
REVENUE as "revenue", <!-- 营业收入 -->
INDU_TYPE as "induType", <!-- 产品类型 -->
INDU_QUALITY as "induQuality", <!-- 产品质量 -->
USAGE_SCENARIO as "usageScenario", <!-- 使用场景 -->
PURCHASE_NUM as "purchaseNum", <!-- 购买频率 -->
PURCHASE_DATE as "purchaseDate", <!-- 最近购买时间 -->
PAYMENT_MODE as "paymentMode", <!-- 支付方式 -->
MISFEASOR_NAME as "misfeasorName", <!-- 违法行为 -->
MISFEASOR_NUM as "misfeasorNum" <!-- 违约次数 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = '0'
</isEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custName">
CUST_NAME = #custName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="behaviorType">
BEHAVIOR_TYPE = #behaviorType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyScale">
COMPANY_SCALE = #companyScale#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userCount">
USER_COUNT = #userCount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="revenue">
REVENUE = #revenue#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="induType">
INDU_TYPE LIKE CONCAT('%', #induType#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="induQuality">
INDU_QUALITY = #induQuality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="usageScenario">
USAGE_SCENARIO = #usageScenario#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purchaseNum">
PURCHASE_NUM = #purchaseNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purchaseDate">
PURCHASE_DATE = #purchaseDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="paymentMode">
PAYMENT_MODE = #paymentMode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="misfeasorName">
MISFEASOR_NAME = #misfeasorName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="misfeasorNum">
MISFEASOR_NUM = #misfeasorNum#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ016">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPPZ016 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
PURCHASE_DATE desc,CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPPZ016 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custName">
CUST_NAME = #custName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="behaviorType">
BEHAVIOR_TYPE = #behaviorType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyScale">
COMPANY_SCALE = #companyScale#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userCount">
USER_COUNT = #userCount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="revenue">
REVENUE = #revenue#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="induType">
INDU_TYPE = #induType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="induQuality">
INDU_QUALITY = #induQuality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="usageScenario">
USAGE_SCENARIO = #usageScenario#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purchaseNum">
PURCHASE_NUM = #purchaseNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purchaseDate">
PURCHASE_DATE = #purchaseDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="paymentMode">
PAYMENT_MODE = #paymentMode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="misfeasorName">
MISFEASOR_NAME = #misfeasorName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="misfeasorNum">
MISFEASOR_NUM = #misfeasorNum#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPPZ016 (ID, <!-- ID -->
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME,
UPDATED_TIME,
DELETE_FLAG, <!-- 是否删除0:否1.是 -->
CUST_CODE, <!-- 客户编码 -->
CUST_NAME, <!-- 客户名称 -->
BEHAVIOR_TYPE, <!-- 行业类型 -->
COMPANY_SCALE, <!-- 企业规模 -->
USER_COUNT, <!-- 员工人数 -->
REVENUE, <!-- 营业收入 -->
INDU_TYPE, <!-- 产品类型 -->
INDU_QUALITY, <!-- 产品质量 -->
USAGE_SCENARIO, <!-- 使用场景 -->
PURCHASE_NUM, <!-- 购买频率 -->
PURCHASE_DATE, <!-- 最近购买时间 -->
PAYMENT_MODE, <!-- 支付方式 -->
MISFEASOR_NAME, <!-- 违法行为 -->
MISFEASOR_NUM <!-- 违约次数 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #custCode#, #custName#, #behaviorType#, #companyScale#, #userCount#, #revenue#, #induType#, #induQuality#, #usageScenario#, #purchaseNum#, #purchaseDate#, #paymentMode#, #misfeasorName#, #misfeasorNum#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPPZ016 WHERE
ID = #id# AND
CUST_CODE = #custCode#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPPZ016
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0:否1.是 -->
WHERE
ID = #id# AND
CUST_CODE = #custCode#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPPZ016
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#,
CUST_NAME = #custName#, <!-- 客户名称 -->
BEHAVIOR_TYPE = #behaviorType#, <!-- 行业类型 -->
COMPANY_SCALE = #companyScale#, <!-- 企业规模 -->
USER_COUNT = #userCount#, <!-- 员工人数 -->
REVENUE = #revenue#, <!-- 营业收入 -->
INDU_TYPE = #induType#, <!-- 产品类型 -->
INDU_QUALITY = #induQuality#, <!-- 产品质量 -->
USAGE_SCENARIO = #usageScenario#, <!-- 使用场景 -->
PURCHASE_NUM = #purchaseNum#, <!-- 购买频率 -->
PURCHASE_DATE = #purchaseDate#, <!-- 最近购买时间 -->
PAYMENT_MODE = #paymentMode#, <!-- 支付方式 -->
MISFEASOR_NAME = #misfeasorName#, <!-- 违法行为 -->
MISFEASOR_NUM = #misfeasorNum# <!-- 违约次数 -->
WHERE
ID = #id# AND
CUST_CODE = #custCode#
</update>
</sqlMap>
...@@ -9,6 +9,7 @@ import com.baosight.hpjx.core.dao.DaoUtils; ...@@ -9,6 +9,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ003; import com.baosight.hpjx.hp.pz.domain.HPPZ003;
import com.baosight.hpjx.hp.pz.domain.HPPZ016;
import com.baosight.hpjx.hp.sc.domain.HPSC002; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
...@@ -122,6 +123,12 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -122,6 +123,12 @@ public class ServiceHPSC001 extends ServiceBase {
fPz003.setCustName(resultRows.get(i).get("princ2Name").toString()); fPz003.setCustName(resultRows.get(i).get("princ2Name").toString());
fPz003.setCompanyName(resultRows.get(i).get("princ2Name").toString()); fPz003.setCompanyName(resultRows.get(i).get("princ2Name").toString());
DaoUtils.insert("HPPZ003.insert", fPz003); DaoUtils.insert("HPPZ003.insert", fPz003);
HPPZ016 hppz016 = new HPPZ016();
hppz016.setCustCode(fPz003.getCustCode());
hppz016.setCustName(fPz003.getCustName());
hppz016.setPurchaseDate(StringUtil.removeHorizontalLine(DateUtils.date()));
hppz016.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPPZ016.INSERT, hppz016);
hpsc001.setPrinc2(fPz003.getCustCode()); hpsc001.setPrinc2(fPz003.getCustCode());
} }
if (hpsc001.getId() == null || hpsc001.getId() == 0) { if (hpsc001.getId() == null || hpsc001.getId() == 0) {
......
$(function () {
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
IPLATUI.EFAutoComplete = {
"inqu_status-0-deviceName": {
minLength: 1,
dataSource: {
pageSize: 10,
serverPaging: true,
serverFiltering: true
}
}
};
IPLATUI.EFGrid= {
"result": {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100],
},
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let id = item.id;
let template = '';
if (id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="tearDetails(' + item.id + ')" >画像详情</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
},
//单元格数据储存时回调
afterEdit:function (e) {
/*if (e.field === "groupCode" && e.model["factoryCode"].length === 0){
for (let i = 0; i < groupCodeBox.length; i++) {
if (e.model[e.field] === groupCodeBox[i]["valueField"]){
e.model["factoryCode"]=groupCodeBox[i]["param1Field"]
break;
}
}
}*/
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
exportGrid : {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "客户画像_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls",
exportBlockId: "result",
}
}
}
downKeyUp();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
/*$.each(rows, function(index, item) {
let factoryCode= item.get("factoryCode");
if(isBlank(factoryCode)){
message("选中的第"+(index+1)+"行\"工厂\",不能为空!");
flag = false;
return false;
}
});*/
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ016", "save", true);
btnNode.attr("disabled", false);
}
});
}
}
/**
* 客户画像详情
*
* @param id
*/
function tearDetails(id) {
JSColorbox.open({
href: "HPPZ016A?methodName=initLoad&inqu_status-0-id=" + id+"&efParentFormEname=HPPZ016",
title: "<div style='text-align: center;'>客户画像详情</div>",
width: "80%",
height: "90%",
callbackName: tearAssignCallback
});
}
/**
* 客户画像详情回调
*/
function tearAssignCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/18
Time: 14:30
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="客户画像">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="custCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="behaviorType" cname="行业类型" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="companyScale" cname="企业规模" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hppz.companyScale"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="induType" cname="产业类型" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="misfeasorName" cname="有违法行为" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.misfeasorName"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="cell">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="custCode" cname="客户编码" hidden="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<%--<EF:EFColumn ename="custName" cname="公司简称" align="center" width="120" required="true"/>--%>
<EF:EFColumn ename="custName" cname="公司名称" enable="false" align="center" width="100"/>
<EF:EFComboColumn ename="behaviorType" cname="行业类型" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/> <%--hpjx.hppz.companyType--%>
</EF:EFComboColumn>
<EF:EFComboColumn ename="companyScale" cname="企业规模" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hppz.companyScale"/>
</EF:EFComboColumn>
<EF:EFColumn ename="userCount" cname="员工人数" width="100" format="{0:N0}"
displayType="0" sort="true" align="right" maxLength="20"
data-regex="/^-?[0-9]{1,20}?$/" data-errorprompt="请输入数字,该值最大可设置20位整数!"/>
<EF:EFColumn ename="revenue" cname="营业收入" width="120" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="20"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="induType" cname="产品类型" align="center" width="120"/>
<EF:EFColumn ename="induQuality" cname="产品质量" align="center" width="120"/>
<EF:EFColumn ename="usageScenario" cname="使用场景" align="center" width="120"/>
<EF:EFColumn ename="purchaseNum" cname="购买频率" align="center" width="120"/>
<EF:EFColumn ename="purchaseDate" cname="最近购买时间" align="center" width="120" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="paymentMode" cname="常用支付方式" align="center" width="120"/>
<EF:EFComboColumn ename="misfeasorName" cname="有违法行为" align="center" width="100">
<EF:EFCodeOption codeName="hpjx.hpjx.misfeasorName"/>
</EF:EFComboColumn>
<EF:EFColumn ename="misfeasorNum" cname="违约次数" width="100" format="{0:N0}"
displayType="0" sort="true" align="right" maxLength="20"
data-regex="/^-?[0-9]{1,17}?$/" data-errorprompt="请输入数字,该值最大可设置17位整数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function (){
var day1 = new Date();
day1.setTime(day1.getTime());
day1.setDate(day1.getDate());
var month = day1.getMonth() + 1;
var year = day1.getFullYear();
var day = day1.getDate();
var queryBlock = __eiInfo.getBlock("inqu_status").getMappedRows();
//$(".row").children().attr("class", "col-md-3");
$("#inqu").children().children().children().eq(0).hide();
$("#inqu").children().children().children().eq(1).hide();
$("#inqu1").children().children().children().eq(0).hide();
$("#inqu1").children().children().children().eq(1).hide();
$("#inqu2").children().children().children().eq(0).hide();
$("#inqu2").children().children().children().eq(1).hide();
$("#inqu3").children().children().children().eq(0).hide();
$("#inqu3").children().children().children().eq(1).hide();
IPLATUI.EFDatePicker = {
"inqu_status-0-registerDate": {
start: "day",
depth: "day"
}
}
//value:year+"-"+month+"-"+day
IPLATUI.EFGrid = {
"result": {
pageable:false,
exportGrid:false,
toolbarConfig:{
hidden: false,
},
/*pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200],
},*/
columns: [/*{
field: "operator",
title: "操作",
template: function (item) {
let template = '';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="deleteRow(' + item.rowNo + ')" >删除</a>';
return template
}
}*//*,{
field: "registerDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}*/],
loadComplete: function(grid) {
$("#ef_grid_result .k-grid-toolbar").attr("style","display: none;");
//$("#delete").attr("style","display: none;");
// 此 grid 对象
if (queryBlock[0]["userCount"] !== undefined || queryBlock[0]["userCount"] != null){
$("#inqu_status-0-userCount").val(queryBlock[0]["userCount"]);
}else {
$("#inqu_status-0-userCount").val(0);
}
let methodType = $("#inqu_status-0-methodType").val();
if (methodType == "update"){
$("#inqu_status-0-registerDate").attr("disabled","disabled");
}else {
$("#inqu_status-0-registerDate").removeAttr("disabled");
}
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveResult(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'update' || e.eiInfo.extAttr.methodName == 'insert') {
query();
}
},
},
"detail":{
pageable:false,
exportGrid:false,
toolbarConfig:{
hidden: false,
},
columns: [/*{
field: "operator",
title: "操作",
template: function (item) {
let template = '';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="detailDeleteRow(' + item.rowNo + ')" >删除</a>';
return template
}
}*/],
}
};
/**
* 取消
*/
$('#cancel').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
});
/**
* 确认
*/
$('#confirm').on('click', function () {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.set("result-0-id",$("#result-0-id").val());
info.set("result-0-custCode",$("#result-0-custCode").val());
info.set("result-0-custName",$("#result-0-custName").val());
info.set("result-0-behaviorType",$("#result-0-behaviorType").val());
info.set("result-0-companyScale",$("#result-0-companyScale").val());
info.set("result-0-userCount",$("#result-0-userCount").val());
info.set("result-0-revenue",$("#result-0-revenue").val());
info.set("result-0-induType",$("#result-0-induType").val());
info.set("result-0-induQuality",$("#result-0-induQuality").val());
info.set("result-0-usageScenario",$("#result-0-usageScenario").val());
info.set("result-0-purchaseNum",$("#result-0-purchaseNum").val());
info.set("result-0-purchaseDate",$("#result-0-purchaseDate").val());
info.set("result-0-paymentMode",$("#result-0-paymentMode").val());
info.set("result-0-misfeasorName",$("#result-0-misfeasorName").val());
info.set("result-0-misfeasorNum",$("#result-0-misfeasorNum").val());
EiCommunicator.send("HPPZ016", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
parent.JSColorbox.setValueCallback(ei);
parent.JSColorbox.close();
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
});
downKeyUp();
})
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/18
Time: 17:39
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="客户画像详情">
<EF:EFRegion id="inqu" title="基本信息">
<EF:EFInput ename="result-0-id" cname="ID" type="hidden"/>
<EF:EFInput ename="result-0-companyCode" cname="企业编码" type="hidden"/>
<EF:EFInput ename="result-0-depCode" cname="部门编码" type="hidden"/>
<EF:EFInput ename="result-0-deleteFlag" cname="是否删除" type="hidden"/>
<div class="row">
<EF:EFInput ename="result-0-custCode" cname="客户编码" colWidth="4" disabled="true"/>
<EF:EFInput ename="result-0-custName" cname="公司名称" colWidth="4" disabled="true"/>
<EF:EFSelect ename="result-0-behaviorType" cname="行业类型" colWidth="4">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="result-0-companyScale" cname="企业规模" colWidth="4">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hppz.companyScale"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-userCount" cname="员工人数" colWidth="4" type="number"/>
<EF:EFInput ename="result-0-revenue" cname="营业收入" colWidth="4" type="number"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu2" title="业务需求">
<div class="row">
<EF:EFInput blockId="result" cname="产品类型" ename="induType" row="0" colWidth="4"/>
<EF:EFInput blockId="result" cname="产品质量" ename="induQuality" row="0" colWidth="4"/>
<EF:EFInput blockId="result" cname="使用场景" ename="usageScenario" row="0" colWidth="4"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu3" title="业务需求">
<div class="row">
<EF:EFInput blockId="result" cname="购买频率" ename="purchaseNum" row="0" colWidth="4"/>
<EF:EFDatePicker blockId="result" cname="最近购买时间" ename="purchaseDate" row="0" colWidth="4" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput blockId="result" cname="常用支付方式" ename="paymentMode" row="0" colWidth="4"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu4" title="信誉情况">
<div class="row">
<EF:EFSelect ename="result-0-misfeasorName" cname="有违法行为" colWidth="4">
<EF:EFCodeOption codeName="hpjx.hpjx.misfeasorName"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-misfeasorNum" cname="违约次数" colWidth="4" type="number"/>
</div>
</EF:EFRegion>
<div class="row">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-align-right"/>
<EF:EFButton ename="confirm" cname="确认" type="button" class="btn-align-right"/>
</div>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment