Commit c21b4584 by 宋祥
parents 03c9ec8b ffcf575b
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
a.PROJ_CODE as "projCode", <!-- 项目编码 --> a.PROJ_CODE as "projCode", <!-- 项目编码 -->
a.PROJ_NAME as "projName", <!-- 项目名称 --> a.PROJ_NAME as "projName", <!-- 项目名称 -->
a.CALCULATION_METHOD as "calculationMethod", <!-- 计算方式 0-数量乘单价 1-重量乘单价 --> a.CALCULATION_METHOD as "calculationMethod", <!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
b.STATUS as "status", <!-- 状态 --> a.STATUS as "status", <!-- 状态 -->
b.CONTRACT_DATE as "contractDate", <!-- 合同日期 --> b.CONTRACT_DATE as "contractDate", <!-- 合同日期 -->
b.CONTRACT_NO as "contractNo", <!-- 合同号 --> b.CONTRACT_NO as "contractNo", <!-- 合同号 -->
b.PLAN_NO as "planNo", <!-- 计划单号 --> b.PLAN_NO as "planNo", <!-- 计划单号 -->
......
package com.baosight.hggp.hg.pz.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* 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 HGPZ016 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
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_ACCOUNT_CODE = "ACCOUNT_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 = "HGPZ016.query";
public static final String COUNT = "HGPZ016.count";
public static final String INSERT = "HGPZ016.insert";
public static final String UPDATE = "HGPZ016.update";
public static final String DELETE = "HGPZ016.delete";
public static final String DELETE_FLAG = "HPPZ016.deleteFlag";
private Long id = new Long(0); /* ID*/
private String accountCode = " "; /* 企业编码*/
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_ACCOUNT_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 HGPZ016() {
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 accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* 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));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_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;
}
}
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ016;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.StringUtil;
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.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/8/23,16:47
*/
public class ServiceHGPZ016 extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID));
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HGPZ016.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGPZ016.QUERY, new HGPZ016());
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 保存
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户画像", operType = "保存", operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<HGPZ016> fPz016s = MapUtils.toDaoEPBases(inInfo, HGPZ016.class);
// 写入数据
for (HGPZ016 fPz016 : fPz016s) {
if (fPz016.getId() == null || fPz016.getId() == 0) {
this.add(fPz016);
} else {
this.modify(fPz016);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fPz016s.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param fPz016
*/
public void add(HGPZ016 fPz016) {
DaoUtils.insert(HGPZ016.INSERT, fPz016);
}
/**
* 修改操作
*
* @param fPz016
*/
public void modify(HGPZ016 fPz016) {
fPz016.setPurchaseDate(StringUtil.removeHorizontalLine(fPz016.getPurchaseDate()));
DaoUtils.update(HGPZ016.UPDATE, fPz016);
}
/**
* 删除
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户画像", operType = "删除", operDesc = "删除操作")
public EiInfo remove(EiInfo inInfo) {
try {
List<HGPZ016> fPz016s = MapUtils.toDaoEPBases(inInfo, HGPZ016.class);
for (HGPZ016 fPz016 : fPz016s) {
fPz016.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGPZ016.DELETE, fPz016);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("操作成功!本次对[" + fPz016s.size() + "]条数据删除成功!");
} catch (PlatException e) {
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.pz.domain.HGPZ016;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.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.Arrays;
import java.util.Map;
/**
* @author:songx
* @date:2024/8/23,16:06
*/
public class ServiceHGPZ016A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID));
// 填充信息
this.setProjectInfo(inInfo);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 设置项目信息
*
* @param inInfo
*/
public void setProjectInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
Long id = MapUtils.getLong(queryRow, HGPZ016.FIELD_ID);
if (id == null) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HGPZTools.HgPz016.get(id));
resultBlock.addBlockMeta(new HGPZ016().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 查询
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
return super.query(inInfo);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGPZ016">
<sql id="column">
ID as "id", <!-- ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
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">
AND DELETE_FLAG = '0'
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</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="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>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
PURCHASE_DATE desc, CREATED_TIME desc
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.pz.domain.HGPZ016">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGPZ016
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ016
WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ016 (
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建名称 -->
CREATED_TIME, <!-- 创建时间 -->
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 (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#custCode#, #custName#, #behaviorType#, #companyScale#, #userCount#,
#revenue#, #induType#, #induQuality#, #usageScenario#, #purchaseNum#,
#purchaseDate#, #paymentMode#, #misfeasorName#, #misfeasorNum#
)
</insert>
<delete id="delete">
UPDATE ${hggpSchema}.HGPZ016
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGPZ016
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#,
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#
</update>
</sqlMap>
...@@ -720,4 +720,23 @@ public class HGPZTools { ...@@ -720,4 +720,23 @@ public class HGPZTools {
} }
} }
/**
* @author:songx
* @date:2024/8/23,16:48
*/
public static class HgPz016 {
/**
* @param id
* @return
*/
public static HGPZ016 get(Long id) {
AssertUtils.isNull(id, "ID不能为空!");
Map paramMap = new HashMap();
paramMap.put(HGPZ016.FIELD_ID, id);
List<HGPZ016> results = DaoBase.getInstance().query(HGPZ016.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
} }
package com.baosight.iplat4j.core.security;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import com.baosight.iplat4j.core.util.StringUtils;
import com.baosight.iplat4j.core.web.WebUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.util.matcher.OrRequestMatcher;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* @author:songx
* @date:2024/8/26,17:01
*/
public class PlatServiceValidateFilter implements Filter {
private final Logger logger = LogManager.getLogger(PlatServiceValidateFilter.class);
protected ITokenValidateFilter iTokenValidateFilter = null;
private AuthenticationEntryPoint entryPoint;
private String filterServiceId = null;
private OrRequestMatcher orRequestMatcher;
public PlatServiceValidateFilter() {
}
public void setFilterServiceId(String filterServiceId) {
this.filterServiceId = filterServiceId;
}
protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,
FilterChain filterChain) throws ServletException, IOException {
String ip = WebUtils.getRemoteAddr(httpServletRequest);
this.logger.debug("******cached ip:" + ip + "**********");
boolean authed = false;
String uri = httpServletRequest.getServletPath();
SecurityContext context = SecurityContextHolder.getContext();
if (context != null && context.getAuthentication() != null) {
Collection<? extends GrantedAuthority> authoritis = context.getAuthentication().getAuthorities();
if (authoritis != null && !authoritis.isEmpty()) {
Iterator var9 = authoritis.iterator();
while (var9.hasNext()) {
GrantedAuthority authority = (GrantedAuthority) var9.next();
authed = authority.getAuthority().equals("ROLE_VERIFIED");
if (!authed && authority.getAuthority().equals("CHANGEPASS")) {
authed = uri.indexOf("service/XS0104/") >= 0;
}
if (authed) {
break;
}
}
}
}
if (uri.indexOf("service") < 0) {
authed = true;
}
// modify by songx at 20240826 if条件去掉authed,否则token会串
if (this.iTokenValidateFilter != null) {
this.iTokenValidateFilter.doFilter(httpServletRequest, httpServletResponse);
authed = this.isAuthedByJwt(httpServletRequest);
}
Map headerMap = new HashMap();
Enumeration<String> headerNames = httpServletRequest.getHeaderNames();
String headValue;
String serviceParam;
boolean hasXPlatHeader;
for (hasXPlatHeader = false; headerNames.hasMoreElements(); headerMap.put(serviceParam, headValue)) {
String name = (String) headerNames.nextElement();
headValue = httpServletRequest.getHeader(name);
this.logger.debug("******cached header:" + name + "****** value:" + headValue + "********");
serviceParam = name.toLowerCase();
if (serviceParam.contains("xplat")) {
hasXPlatHeader = true;
}
}
if (authed) {
filterChain.doFilter(httpServletRequest, httpServletResponse);
} else {
try {
EiInfo securityInfo = new EiInfo();
securityInfo.set("headerMap", headerMap);
securityInfo.set("clientIp", ip);
if (uri.indexOf("service/") > 0) {
String[] uriParts = uri.split("service/");
serviceParam = uriParts[uriParts.length - 1];
if (serviceParam.contains("/")) {
String[] serviceInfos = serviceParam.split("/");
securityInfo.set("paramServiceName", serviceInfos[0]);
securityInfo.set("paramMethodName", serviceInfos[1]);
} else {
securityInfo.set("paramServiceId", serviceParam);
}
}
securityInfo.set("uri", uri);
EiInfo outInfo = null;
if (StringUtils.isNotEmpty(this.filterServiceId)) {
securityInfo.set(EiConstant.serviceId, this.filterServiceId);
outInfo = XServiceManager.call(securityInfo);
} else {
if (!hasXPlatHeader) {
throw new AccessDeniedException("Access is denied, reason: no service validate public key!");
}
securityInfo.set(EiConstant.serviceName, "EPFI01");
securityInfo.set(EiConstant.methodName, "validate");
outInfo = XLocalManager.call(securityInfo);
}
if (outInfo.getStatus() < 0) {
throw new AccessDeniedException("Access is denied, reason:" + outInfo.getMsg());
}
Object jwtMapObj = outInfo.get("jwt_map");
if (jwtMapObj != null && jwtMapObj instanceof Map) {
httpServletRequest.setAttribute("jwt_map", jwtMapObj);
}
filterChain.doFilter(httpServletRequest, httpServletResponse);
} catch (Exception var15) {
if (this.orRequestMatcher != null && this.orRequestMatcher.matches(httpServletRequest)) {
filterChain.doFilter(httpServletRequest, httpServletResponse);
} else {
this.logger.warn(var15.getMessage());
if (this.entryPoint == null) {
if (var15 instanceof AccessDeniedException) {
throw var15;
}
throw new AccessDeniedException("Access is denied, reason:" + var15.getMessage());
}
this.entryPoint.commence(httpServletRequest, httpServletResponse, (AuthenticationException) null);
}
}
}
}
private boolean isAuthedByJwt(HttpServletRequest httpServletRequest) {
boolean authed = false;
Object jwtMapObj = httpServletRequest.getAttribute("jwt_map");
if (jwtMapObj != null && jwtMapObj instanceof Map) {
Map jwtMap = (Map) jwtMapObj;
String s_loginName = (String) jwtMap.get("sub");
if (s_loginName != null) {
authed = true;
}
}
return authed;
}
public void init(FilterConfig filterConfig) throws ServletException {
}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
this.doFilterInternal((HttpServletRequest) request, (HttpServletResponse) response, chain);
}
public void destroy() {
}
public OrRequestMatcher getOrRequestMatcher() {
return this.orRequestMatcher;
}
public void setOrRequestMatcher(OrRequestMatcher orRequestMatcher) {
this.orRequestMatcher = orRequestMatcher;
}
public AuthenticationEntryPoint getEntryPoint() {
return this.entryPoint;
}
public void setEntryPoint(AuthenticationEntryPoint entryPoint) {
this.entryPoint = entryPoint;
}
public void setITokenValidateFilter(ITokenValidateFilter iTokenValidateFilter) {
this.iTokenValidateFilter = iTokenValidateFilter;
}
}
$(function () {
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="modify(' + item.id + ')" >画像详情</a>';
}
return template;
}
}],
loadComplete: function (grid) {
}
}
}
// 查询
$("#QUERY").on("click", query);
// 新增
$("#ADD").on("click", add);
// 新增
$("#REMOVE").on("click", remove);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (id) {
let params = "&inqu_status-0-id=" + id;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HGPZ016A?methodName=initLoad" + params,
title: "<div style='text-align: center;'>" + (isBlank(params) ? "新增客户画像" : "客户画像详情") + "</div>",
width: "90%",
height: "80%",
callbackName: addOrUpdateCallback
});
}
/**
* 新增成功后回调
*/
let addOrUpdateCallback = function (res) {
// msg
message(res.msg);
// 刷新列表
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGPZ016", "save", true);
btnNode.attr("disabled", false);
}
});
}
}
/**
* 删除
*/
let remove = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGPZ016", "remove",
true, function (res) {
message(res);
if (res.status > -1) {
query();
}
}
);
}
});
}
<!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="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="custCode" enable="false" cname="客户编码" hidden="true" width="100"
align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="custName" cname="公司名称" enable="false" align="center" width="100"/>
<EF:EFComboColumn ename="behaviorType" cname="行业类型" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="companyScale" cname="企业规模" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hppz.companyScale"/>
</EF:EFComboColumn>
<EF:EFColumn ename="userCount" cname="员工人数" enable="false" width="100" format="{0:N0}"
sort="true" align="right" maxLength="20"/>
<EF:EFColumn ename="revenue" cname="营业收入" enable="false" width="120" format="{0:C3}"
sort="true" align="right" maxLength="20"/>
<EF:EFColumn ename="induType" cname="产品类型" enable="false" align="center" width="120"/>
<EF:EFColumn ename="induQuality" cname="产品质量" enable="false" align="center" width="120"/>
<EF:EFColumn ename="usageScenario" cname="使用场景" enable="false" align="center" width="120"/>
<EF:EFColumn ename="purchaseNum" cname="购买频率" enable="false" align="center" width="120"/>
<EF:EFColumn ename="purchaseDate" cname="最近购买时间" enable="false" align="center" width="120" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="paymentMode" cname="常用支付方式" enable="false" align="center" width="120"/>
<EF:EFComboColumn ename="misfeasorName" cname="有违法行为" enable="false" align="center" width="100">
<EF:EFCodeOption codeName="hpjx.hpjx.misfeasorName"/>
</EF:EFComboColumn>
<EF:EFColumn ename="misfeasorNum" cname="违约次数" enable="false" width="100" format="{0:N0}"
sort="true" align="right" maxLength="20"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFSelect = {
"result-0-custCode": {
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = dataItem['textField'];
if (valueField) {
textField = textField.indexOf("-") > -1 ? textField.split("-")[1] : textField;
$("#result-0-custName").val(textField);
} else {
$("#result-0-custName").val("");
}
}
}
}
IPLATUI.EFGrid = {
"result": {
pageable: false,
exportGrid: false,
toolbarConfig: {
hidden: false,
},
columns: [],
loadComplete: function (grid) {
},
onSuccess: function (e) {
}
},
"detail": {
pageable: false,
exportGrid: false,
toolbarConfig: {
hidden: false,
},
columns: [],
}
};
/**
* 取消
*/
$('#cancel').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
});
// 确认
$('#confirm').on('click', confirm);
// 键盘按键
downKeyUp();
})
/**
* 确认
*/
let confirm = function () {
let custCode = $("#result-0-custCode").val();
if (isBlank(custCode)) {
message("客户名称不能为空");
return;
}
let companyScale = $("#result-0-companyScale").val();
if (isBlank(companyScale)) {
message("企业规模不能为空");
return;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HGPZ016", "save", true, function (res) {
if (res.status > -1) {
parent.JSColorbox.setValueCallback(res);
} else {
message(res.msg);
}
});
}
});
}
<!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="id" cname="ID" blockId="result" row="0" type="hidden"/>
<div class="row">
<EF:EFSelect ename="custCode" cname="客户名称" blockId="result" row="0"
colWidth="4" optionLabel="请选择" template="#=valueField#-#=textField#"
valueTemplate="#=valueField#-#=textField#">
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="custName" cname="客户名称" blockId="result" row="0" type="hidden"/>
<EF:EFSelect ename="behaviorType" cname="行业类型" blockId="result" row="0" colWidth="4">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="companyScale" cname="企业规模" blockId="result" row="0" colWidth="4">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="hpjx.hppz.companyScale"/>
</EF:EFSelect>
<EF:EFInput ename="userCount" cname="员工人数" blockId="result" row="0" colWidth="4" type="number"/>
<EF:EFInput ename="revenue" cname="营业收入" blockId="result" row="0" colWidth="4" type="number"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu2" title="业务需求">
<div class="row">
<EF:EFInput cname="产品类型" ename="induType" blockId="result" row="0" colWidth="4"/>
<EF:EFInput cname="产品质量" ename="induQuality" blockId="result" row="0" colWidth="4"/>
<EF:EFInput cname="使用场景" ename="usageScenario" blockId="result" row="0" colWidth="4"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu3" title="业务需求">
<div class="row">
<EF:EFInput cname="购买频率" ename="purchaseNum" blockId="result" row="0" colWidth="4"/>
<EF:EFDatePicker cname="最近购买时间" ename="purchaseDate" blockId="result" row="0" colWidth="4"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true"/>
<EF:EFInput cname="常用支付方式" ename="paymentMode" blockId="result" row="0" colWidth="4"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu4" title="信誉情况">
<div class="row">
<EF:EFSelect cname="有违法行为" ename="misfeasorName" blockId="result" row="0" colWidth="4">
<EF:EFCodeOption codeName="hpjx.hpjx.misfeasorName"/>
</EF:EFSelect>
<EF:EFInput cname="违约次数" ename="misfeasorNum" blockId="result" row="0" colWidth="4" type="number"/>
</div>
</EF:EFRegion>
<div class="row">
<EF:EFButton cname="取消" ename="cancel" type="button" class="btn-align-right"/>
<EF:EFButton cname="确认" ename="confirm" 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