Commit af47ff5a by liuyang

2024-09-28 营销管理

parent 49cafc1a
......@@ -119,6 +119,8 @@ public class HPConstant {
public static final String PRODUCT_CODE = "PRODUCT_CODE";
//渠道编码
public static final String CHANNEL_CODE = "CHANNEL_CODE";
//产品编码
public static final String HPYX005_PRODUCT_CODE = "HPYX005_PRODUCT_CODE";
}
/**
......
package com.baosight.hpjx.hp.yx.domain;
import com.baosight.hpjx.util.DateUtils;
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:THpyx005.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 13:48:23 create
*/
public class HPYX005 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_SELL_DATE = "sellDate"; /* 销售日期*/
public static final String FIELD_CLIENT_CODE = "clientCode"; /* 客户名称*/
public static final String FIELD_CLIENT_NAME = "clientName"; /* 客户名称*/
public static final String FIELD_QUANTITY = "quantity"; /* 产品数量*/
public static final String FIELD_PRODUCT_COST = "productCost"; /* 产品成本*/
public static final String FIELD_AMOUNT = "amount"; /* 销售金额*/
public static final String FIELD_SELL_CHANNEL = "sellChannel"; /* 销售渠道*/
public static final String FIELD_SELL_AMOUNT = "sellAmount"; /* 销售费用*/
public static final String FIELD_SELL_USER = "sellUser"; /* 销售人员*/
public static final String COL_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_SELL_DATE = "SELL_DATE"; /* 销售日期*/
public static final String COL_CLIENT_NAME = "CLIENT_NAME"; /* 客户名称*/
public static final String COL_QUANTITY = "QUANTITY"; /* 产品数量*/
public static final String COL__PRODUCT_COST = "_PRODUCT_COST"; /* 产品成本*/
public static final String COL_AMOUNT = "AMOUNT"; /* 销售金额*/
public static final String COL_SELL_CHANNEL = "SELL_CHANNEL"; /* 销售渠道*/
public static final String COL_SELL_AMOUNT = "SELL_AMOUNT"; /* 销售费用*/
public static final String COL_SELL_USER = "SELL_USER"; /* 销售人员*/
public static final String QUERY = "HPYX005.query";
public static final String COUNT = "HPYX005.count";
public static final String INSERT = "HPYX005.insert";
public static final String UPDATE = "HPYX005.update";
public static final String DELETE = "HPYX005.delete";
public static final String DELETE_FLAG = "HPYX005.deleteFlag";
private Long id = new Long(0);
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 sellDate = " "; /* 销售日期*/
private String clientCode = " "; /* 客户编码*/
private String clientName = " "; /* 客户名称*/
private BigDecimal quantity = new BigDecimal(0); /* 产品数量*/
private BigDecimal productCost = new BigDecimal(0.00); /* 产品成本*/
private BigDecimal amount = new BigDecimal(0.00); /* 销售金额*/
private String sellChannel = " "; /* 销售渠道*/
private BigDecimal sellAmount = new BigDecimal(0.00); /* 销售费用*/
private String sellUser = " "; /* 销售人员*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_SELL_DATE);
eiColumn.setDescName("销售日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CLIENT_CODE);
eiColumn.setDescName("客户编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CLIENT_NAME);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("产品数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_COST);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("产品成本");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("销售金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SELL_CHANNEL);
eiColumn.setDescName("销售渠道");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SELL_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("销售费用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SELL_USER);
eiColumn.setDescName("销售人员");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX005() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param 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 sellDate - 销售日期.
* @return the sellDate
*/
public String getSellDate() {
return this.sellDate;
}
/**
* set the sellDate - 销售日期.
*
* @param sellDate - 销售日期
*/
public void setSellDate(String sellDate) {
this.sellDate = sellDate;
}
public String getClientCode() {
return clientCode;
}
public void setClientCode(String clientCode) {
this.clientCode = clientCode;
}
/**
* get the clientName - 客户名称.
* @return the clientName
*/
public String getClientName() {
return this.clientName;
}
/**
* set the clientName - 客户名称.
*
* @param clientName - 客户名称
*/
public void setClientName(String clientName) {
this.clientName = clientName;
}
/**
* get the quantity - 产品数量.
* @return the quantity
*/
public BigDecimal getQuantity() {
return this.quantity;
}
/**
* set the quantity - 产品数量.
*
* @param quantity - 产品数量
*/
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
/**
* get the productCost - 产品成本.
* @return the productCost
*/
public BigDecimal getProductCost() {
return this.productCost;
}
/**
* set the productCost - 产品成本.
*
* @param productCost - 产品成本
*/
public void setProductCost(BigDecimal productCost) {
this.productCost = productCost;
}
/**
* get the amount - 销售金额.
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 销售金额.
*
* @param amount - 销售金额
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the sellChannel - 销售渠道.
* @return the sellChannel
*/
public String getSellChannel() {
return this.sellChannel;
}
/**
* set the sellChannel - 销售渠道.
*
* @param sellChannel - 销售渠道
*/
public void setSellChannel(String sellChannel) {
this.sellChannel = sellChannel;
}
/**
* get the sellAmount - 销售费用.
* @return the sellAmount
*/
public BigDecimal getSellAmount() {
return this.sellAmount;
}
/**
* set the sellAmount - 销售费用.
*
* @param sellAmount - 销售费用
*/
public void setSellAmount(BigDecimal sellAmount) {
this.sellAmount = sellAmount;
}
/**
* get the sellUser - 销售人员.
* @return the sellUser
*/
public String getSellUser() {
return this.sellUser;
}
/**
* set the sellUser - 销售人员.
*
* @param sellUser - 销售人员
*/
public void setSellUser(String sellUser) {
this.sellUser = sellUser;
}
/**
* 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));
setSellDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_SELL_DATE))), sellDate));
setClientCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CLIENT_CODE)), clientCode));
setClientName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CLIENT_NAME)), clientName));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setProductCost(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRODUCT_COST)), productCost));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setSellChannel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SELL_CHANNEL)), sellChannel));
setSellAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SELL_AMOUNT)), sellAmount));
setSellUser(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SELL_USER)), sellUser));
}
/**
* 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_SELL_DATE, StringUtils.toString(sellDate, eiMetadata.getMeta(FIELD_SELL_DATE)));
map.put(FIELD_CLIENT_CODE, StringUtils.toString(clientCode, eiMetadata.getMeta(FIELD_CLIENT_CODE)));
map.put(FIELD_CLIENT_NAME, StringUtils.toString(clientName, eiMetadata.getMeta(FIELD_CLIENT_NAME)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_PRODUCT_COST, StringUtils.toString(productCost, eiMetadata.getMeta(FIELD_PRODUCT_COST)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_SELL_CHANNEL, StringUtils.toString(sellChannel, eiMetadata.getMeta(FIELD_SELL_CHANNEL)));
map.put(FIELD_SELL_AMOUNT, StringUtils.toString(sellAmount, eiMetadata.getMeta(FIELD_SELL_AMOUNT)));
map.put(FIELD_SELL_USER, StringUtils.toString(sellUser, eiMetadata.getMeta(FIELD_SELL_USER)));
return map;
}
}
package com.baosight.hpjx.hp.yx.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:THpyx005a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 13:48:23 create
*/
public class HPYX005A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_PRODUCT_CODE = "productCode"; /* 产品名称*/
public static final String FIELD_PRODUCT_NAME = "productName"; /* 产品名称*/
public static final String FIELD_PRODUCT_MODEL = "productModel"; /* 产品型号*/
public static final String FIELD_QUANTITY = "quantity"; /* 产品数量*/
public static final String FIELD_PRICE = "price"; /* 产品单价*/
public static final String FIELD_PRODUCT_COST = "productCost"; /* 产品成本*/
public static final String FIELD_AMOUNT = "amount"; /* 产品销售金额*/
public static final String FIELD_PARENT_ID = "parentId"; /* 父级ID*/
public static final String COL_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_PRODUCT_CODE = "PRODUCT_CODE"; /* 产品名称*/
public static final String COL_PRODUCT_NAME = "PRODUCT_NAME"; /* 产品名称*/
public static final String COL_PRODUCT_MODEL = "PRODUCT_MODEL"; /* 产品型号*/
public static final String COL_QUANTITY = "QUANTITY"; /* 产品数量*/
public static final String COL_PRODUCT_COST = "PRODUCT_COST"; /* 产品成本*/
public static final String COL_AMOUNT = "AMOUNT"; /* 产品销售金额*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 父级ID*/
public static final String QUERY = "HPYX005A.query";
public static final String COUNT = "HPYX005A.count";
public static final String INSERT = "HPYX005A.insert";
public static final String BATCH_INSERT = "HPYX005A.batchInsert";
public static final String UPDATE = "HPYX005A.update";
public static final String DELETE = "HPYX005A.delete";
private Long id = new Long(0);
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 productCode = " "; /* 产品编码*/
private String productName = " "; /* 产品名称*/
private String productModel = " "; /* 产品型号*/
private BigDecimal quantity = new BigDecimal(0); /* 产品数量*/
private BigDecimal price = new BigDecimal(0); /* 产品单价*/
private BigDecimal productCost = new BigDecimal(0.00); /* 产品成本*/
private BigDecimal amount = new BigDecimal(0.00); /* 产品销售金额*/
private Long parentId = new Long(0); /* 父级ID*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_PRODUCT_CODE);
eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_NAME);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_MODEL);
eiColumn.setDescName("产品型号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("产品数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("产品单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_COST);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("产品成本");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("产品销售金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("父级ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX005A() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param 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;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
/**
* get the productName - 产品名称.
* @return the productName
*/
public String getProductName() {
return this.productName;
}
/**
* set the productName - 产品名称.
*
* @param productName - 产品名称
*/
public void setProductName(String productName) {
this.productName = productName;
}
/**
* get the productModel - 产品型号.
* @return the productModel
*/
public String getProductModel() {
return this.productModel;
}
/**
* set the productModel - 产品型号.
*
* @param productModel - 产品型号
*/
public void setProductModel(String productModel) {
this.productModel = productModel;
}
/**
* get the quantity - 产品数量.
* @return the quantity
*/
public BigDecimal getQuantity() {
return this.quantity;
}
/**
* set the quantity - 产品数量.
*
* @param quantity - 产品数量
*/
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
/**
* get the productCost - 产品成本.
* @return the productCost
*/
public BigDecimal getProductCost() {
return this.productCost;
}
/**
* set the productCost - 产品成本.
*
* @param productCost - 产品成本
*/
public void setProductCost(BigDecimal productCost) {
this.productCost = productCost;
}
/**
* get the amount - 产品销售金额.
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 产品销售金额.
*
* @param amount - 产品销售金额
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the parentId - 父级ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 父级ID.
*
* @param parentId - 父级ID
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* 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));
setProductCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_CODE)), productCode));
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_NAME)), productName));
setProductModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_MODEL)), productModel));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setProductCost(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRODUCT_COST)), productCost));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
}
/**
* 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_PRODUCT_CODE, StringUtils.toString(productCode, eiMetadata.getMeta(FIELD_PRODUCT_CODE)));
map.put(FIELD_PRODUCT_NAME, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_PRODUCT_NAME)));
map.put(FIELD_PRODUCT_MODEL, StringUtils.toString(productModel, eiMetadata.getMeta(FIELD_PRODUCT_MODEL)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_PRODUCT_COST, StringUtils.toString(productCost, eiMetadata.getMeta(FIELD_PRODUCT_COST)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
return map;
}
}
package com.baosight.hpjx.hp.yx.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:THpyx006.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 13:48:23 create
*/
public class HPYX006 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_PRODUCT_CODE = "productCode"; /* 产品编码*/
public static final String FIELD_PRODUCT_NAME = "productName"; /* 产品名称*/
public static final String FIELD_PRODUCT_TYPE = "productType"; /* 产品类型*/
public static final String FIELD_PRODUCT_PECU = "productPecu"; /* 产品特性*/
public static final String FIELD_PRODUCT_GOOD = "productGood"; /* 产品卖点*/
public static final String FIELD_PRODUCT_PRICE = "productPrice"; /* 产品定价*/
public static final String FIELD_DIS_WAY = "disWay"; /* 折扣策略*/
public static final String FIELD_PRODUCT_INVENT = "productInvent"; /* 产品库存*/
public static final String COL_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_PRODUCT_CODE = "PRODUCT_CODE"; /* 产品编码*/
public static final String COL_PRODUCT_NAME = "PRODUCT_NAME"; /* 产品名称*/
public static final String COL_PRODUCT_TYPE = "PRODUCT_TYPE"; /* 产品类型*/
public static final String COL_PRODUCT_PECU = "PRODUCT_PECU"; /* 产品特性*/
public static final String COL_PRODUCT_GOOD = "PRODUCT_GOOD"; /* 产品卖点*/
public static final String COL_PRODUCT_PRICE = "PRODUCT_PRICE"; /* 产品定价*/
public static final String COL_DIS_WAY = "DIS_WAY"; /* 折扣策略*/
public static final String COL_PRODUCT_INVENT = "PRODUCT_INVENT"; /* 产品库存*/
public static final String QUERY = "HPYX006.query";
public static final String COUNT = "HPYX006.count";
public static final String INSERT = "HPYX006.insert";
public static final String UPDATE = "HPYX006.update";
public static final String DELETE = "HPYX006.delete";
public static final String DELETE_FLAG = "HPYX006.deleteFlag";
private Long id = new Long(0);
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 productCode = " "; /* 产品编码*/
private String productName = " "; /* 产品名称*/
private Boolean productType; /* 产品类型*/
private String productPecu = " "; /* 产品特性*/
private String productGood = " "; /* 产品卖点*/
private BigDecimal productPrice = new BigDecimal(0.00); /* 产品定价*/
private String disWay = " "; /* 折扣策略*/
private BigDecimal productInvent = new BigDecimal(0); /* 产品库存*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_PRODUCT_CODE);
eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_NAME);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_TYPE);
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_PECU);
eiColumn.setDescName("产品特性");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_GOOD);
eiColumn.setDescName("产品卖点");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("产品定价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DIS_WAY);
eiColumn.setDescName("折扣策略");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_INVENT);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("产品库存");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX006() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param 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 productCode - 产品编码.
* @return the productCode
*/
public String getProductCode() {
return this.productCode;
}
/**
* set the productCode - 产品编码.
*
* @param productCode - 产品编码
*/
public void setProductCode(String productCode) {
this.productCode = productCode;
}
/**
* get the productName - 产品名称.
* @return the productName
*/
public String getProductName() {
return this.productName;
}
/**
* set the productName - 产品名称.
*
* @param productName - 产品名称
*/
public void setProductName(String productName) {
this.productName = productName;
}
/**
* get the productType - 产品类型.
* @return the productType
*/
public Boolean getProductType() {
return this.productType;
}
/**
* set the productType - 产品类型.
*
* @param productType - 产品类型
*/
public void setProductType(Boolean productType) {
this.productType = productType;
}
/**
* get the productPecu - 产品特性.
* @return the productPecu
*/
public String getProductPecu() {
return this.productPecu;
}
/**
* set the productPecu - 产品特性.
*
* @param productPecu - 产品特性
*/
public void setProductPecu(String productPecu) {
this.productPecu = productPecu;
}
/**
* get the productGood - 产品卖点.
* @return the productGood
*/
public String getProductGood() {
return this.productGood;
}
/**
* set the productGood - 产品卖点.
*
* @param productGood - 产品卖点
*/
public void setProductGood(String productGood) {
this.productGood = productGood;
}
/**
* get the productPrice - 产品定价.
* @return the productPrice
*/
public BigDecimal getProductPrice() {
return this.productPrice;
}
/**
* set the productPrice - 产品定价.
*
* @param productPrice - 产品定价
*/
public void setProductPrice(BigDecimal productPrice) {
this.productPrice = productPrice;
}
/**
* get the disWay - 折扣策略.
* @return the disWay
*/
public String getDisWay() {
return this.disWay;
}
/**
* set the disWay - 折扣策略.
*
* @param disWay - 折扣策略
*/
public void setDisWay(String disWay) {
this.disWay = disWay;
}
/**
* get the productInvent - 产品库存.
* @return the productInvent
*/
public BigDecimal getProductInvent() {
return this.productInvent;
}
/**
* set the productInvent - 产品库存.
*
* @param productInvent - 产品库存
*/
public void setProductInvent(BigDecimal productInvent) {
this.productInvent = productInvent;
}
/**
* 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));
setProductCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_CODE)), productCode));
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_NAME)), productName));
setProductType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_PRODUCT_TYPE)), productType));
setProductPecu(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_PECU)), productPecu));
setProductGood(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_GOOD)), productGood));
setProductPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRODUCT_PRICE)), productPrice));
setDisWay(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DIS_WAY)), disWay));
setProductInvent(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRODUCT_INVENT)), productInvent));
}
/**
* 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_PRODUCT_CODE, StringUtils.toString(productCode, eiMetadata.getMeta(FIELD_PRODUCT_CODE)));
map.put(FIELD_PRODUCT_NAME, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_PRODUCT_NAME)));
map.put(FIELD_PRODUCT_TYPE, StringUtils.toString(productType, eiMetadata.getMeta(FIELD_PRODUCT_TYPE)));
map.put(FIELD_PRODUCT_PECU, StringUtils.toString(productPecu, eiMetadata.getMeta(FIELD_PRODUCT_PECU)));
map.put(FIELD_PRODUCT_GOOD, StringUtils.toString(productGood, eiMetadata.getMeta(FIELD_PRODUCT_GOOD)));
map.put(FIELD_PRODUCT_PRICE, StringUtils.toString(productPrice, eiMetadata.getMeta(FIELD_PRODUCT_PRICE)));
map.put(FIELD_DIS_WAY, StringUtils.toString(disWay, eiMetadata.getMeta(FIELD_DIS_WAY)));
map.put(FIELD_PRODUCT_INVENT, StringUtils.toString(productInvent, eiMetadata.getMeta(FIELD_PRODUCT_INVENT)));
return map;
}
}
package com.baosight.hpjx.hp.yx.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
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:THpyx007.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 13:48:23 create
*/
public class HPYX007 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_CHANNEL_CODE = "channelCode"; /* 渠道编码*/
public static final String FIELD_CHANNEL_NAME = "channelName"; /* 渠道名称*/
public static final String FIELD_COVER_DIST = "coverDist"; /* 覆盖范围*/
public static final String FIELD_TAR_MARKET = "tarMarket"; /* 目标市场*/
public static final String FIELD_BUS_PART = "busPart"; /* 合作伙伴*/
public static final String COL_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_CHANNEL_CODE = "CHANNEL_CODE"; /* 渠道编码*/
public static final String COL_CHANNEL_NAME = "CHANNEL_NAME"; /* 渠道名称*/
public static final String COL_COVER_DIST = "COVER_DIST"; /* 覆盖范围*/
public static final String COL_TAR_MARKET = "TAR_MARKET"; /* 目标市场*/
public static final String COL_BUS_PART = "BUS_PART"; /* 合作伙伴*/
public static final String QUERY = "HPYX007.query";
public static final String COUNT = "HPYX007.count";
public static final String INSERT = "HPYX007.insert";
public static final String UPDATE = "HPYX007.update";
public static final String DELETE = "HPYX007.delete";
public static final String DELETE_FLAG = "HPYX007.deleteFlag";
private Long id = new Long(0);
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 channelCode = " "; /* 渠道编码*/
private String channelName = " "; /* 渠道名称*/
private String coverDist = " "; /* 覆盖范围*/
private String tarMarket = " "; /* 目标市场*/
private String busPart = " "; /* 合作伙伴*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_CHANNEL_CODE);
eiColumn.setDescName("渠道编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHANNEL_NAME);
eiColumn.setDescName("渠道名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COVER_DIST);
eiColumn.setDescName("覆盖范围");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAR_MARKET);
eiColumn.setDescName("目标市场");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BUS_PART);
eiColumn.setDescName("合作伙伴");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX007() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param 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 channelCode - 渠道编码.
* @return the channelCode
*/
public String getChannelCode() {
return this.channelCode;
}
/**
* set the channelCode - 渠道编码.
*
* @param channelCode - 渠道编码
*/
public void setChannelCode(String channelCode) {
this.channelCode = channelCode;
}
/**
* get the channelName - 渠道名称.
* @return the channelName
*/
public String getChannelName() {
return this.channelName;
}
/**
* set the channelName - 渠道名称.
*
* @param channelName - 渠道名称
*/
public void setChannelName(String channelName) {
this.channelName = channelName;
}
/**
* get the coverDist - 覆盖范围.
* @return the coverDist
*/
public String getCoverDist() {
return this.coverDist;
}
/**
* set the coverDist - 覆盖范围.
*
* @param coverDist - 覆盖范围
*/
public void setCoverDist(String coverDist) {
this.coverDist = coverDist;
}
/**
* get the tarMarket - 目标市场.
* @return the tarMarket
*/
public String getTarMarket() {
return this.tarMarket;
}
/**
* set the tarMarket - 目标市场.
*
* @param tarMarket - 目标市场
*/
public void setTarMarket(String tarMarket) {
this.tarMarket = tarMarket;
}
/**
* get the busPart - 合作伙伴.
* @return the busPart
*/
public String getBusPart() {
return this.busPart;
}
/**
* set the busPart - 合作伙伴.
*
* @param busPart - 合作伙伴
*/
public void setBusPart(String busPart) {
this.busPart = busPart;
}
/**
* 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));
setChannelCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHANNEL_CODE)), channelCode));
setChannelName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHANNEL_NAME)), channelName));
setCoverDist(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COVER_DIST)), coverDist));
setTarMarket(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TAR_MARKET)), tarMarket));
setBusPart(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BUS_PART)), busPart));
}
/**
* 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_CHANNEL_CODE, StringUtils.toString(channelCode, eiMetadata.getMeta(FIELD_CHANNEL_CODE)));
map.put(FIELD_CHANNEL_NAME, StringUtils.toString(channelName, eiMetadata.getMeta(FIELD_CHANNEL_NAME)));
map.put(FIELD_COVER_DIST, StringUtils.toString(coverDist, eiMetadata.getMeta(FIELD_COVER_DIST)));
map.put(FIELD_TAR_MARKET, StringUtils.toString(tarMarket, eiMetadata.getMeta(FIELD_TAR_MARKET)));
map.put(FIELD_BUS_PART, StringUtils.toString(busPart, eiMetadata.getMeta(FIELD_BUS_PART)));
return map;
}
}
package com.baosight.hpjx.hp.yx.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
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:THpyx008.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 13:48:23 create
*/
public class HPYX008 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_NAME = "name"; /* 姓名*/
public static final String FIELD_POSITION = "position"; /* 职位*/
public static final String FIELD_DEGREE = "degree"; /* 学历*/
public static final String FIELD_PROFES = "profes"; /* 专业*/
public static final String FIELD_SKILL = "skill"; /* 技能*/
public static final String FIELD_SPECIALITY = "speciality"; /* 专长*/
public static final String FIELD_WORK_EXPE = "workExpe"; /* 工作经历*/
public static final String COL_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_NAME = "NAME"; /* 姓名*/
public static final String COL_POSITION = "POSITION"; /* 职位*/
public static final String COL_DEGREE = "DEGREE"; /* 学历*/
public static final String COL_PROFES = "PROFES"; /* 专业*/
public static final String COL_SKILL = "SKILL"; /* 技能*/
public static final String COL_SPECIALITY = "SPECIALITY"; /* 专长*/
public static final String COL_WORK_EXPE = "WORK_EXPE"; /* 工作经历*/
public static final String QUERY = "HPYX008.query";
public static final String COUNT = "HPYX008.count";
public static final String INSERT = "HPYX008.insert";
public static final String UPDATE = "HPYX008.update";
public static final String DELETE = "HPYX008.delete";
public static final String DELETE_FLAG = "HPYX008.deleteFlag";
private Long id = new Long(0);
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 name = " "; /* 姓名*/
private String position = " "; /* 职位*/
private String degree = " "; /* 学历*/
private String profes = " "; /* 专业*/
private String skill = " "; /* 技能*/
private String speciality = " "; /* 专长*/
private String workExpe = " "; /* 工作经历*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_NAME);
eiColumn.setDescName("姓名");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_POSITION);
eiColumn.setDescName("职位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEGREE);
eiColumn.setDescName("学历");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROFES);
eiColumn.setDescName("专业");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SKILL);
eiColumn.setDescName("技能");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPECIALITY);
eiColumn.setDescName("专长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WORK_EXPE);
eiColumn.setDescName("工作经历");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX008() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param 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 name - 姓名.
* @return the name
*/
public String getName() {
return this.name;
}
/**
* set the name - 姓名.
*
* @param name - 姓名
*/
public void setName(String name) {
this.name = name;
}
/**
* get the position - 职位.
* @return the position
*/
public String getPosition() {
return this.position;
}
/**
* set the position - 职位.
*
* @param position - 职位
*/
public void setPosition(String position) {
this.position = position;
}
/**
* get the degree - 学历.
* @return the degree
*/
public String getDegree() {
return this.degree;
}
/**
* set the degree - 学历.
*
* @param degree - 学历
*/
public void setDegree(String degree) {
this.degree = degree;
}
/**
* get the profes - 专业.
* @return the profes
*/
public String getProfes() {
return this.profes;
}
/**
* set the profes - 专业.
*
* @param profes - 专业
*/
public void setProfes(String profes) {
this.profes = profes;
}
/**
* get the skill - 技能.
* @return the skill
*/
public String getSkill() {
return this.skill;
}
/**
* set the skill - 技能.
*
* @param skill - 技能
*/
public void setSkill(String skill) {
this.skill = skill;
}
/**
* get the speciality - 专长.
* @return the speciality
*/
public String getSpeciality() {
return this.speciality;
}
/**
* set the speciality - 专长.
*
* @param speciality - 专长
*/
public void setSpeciality(String speciality) {
this.speciality = speciality;
}
/**
* get the workExpe - 工作经历.
* @return the workExpe
*/
public String getWorkExpe() {
return this.workExpe;
}
/**
* set the workExpe - 工作经历.
*
* @param workExpe - 工作经历
*/
public void setWorkExpe(String workExpe) {
this.workExpe = workExpe;
}
/**
* 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));
setName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_NAME)), name));
setPosition(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_POSITION)), position));
setDegree(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEGREE)), degree));
setProfes(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROFES)), profes));
setSkill(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SKILL)), skill));
setSpeciality(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPECIALITY)), speciality));
setWorkExpe(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WORK_EXPE)), workExpe));
}
/**
* 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_NAME, StringUtils.toString(name, eiMetadata.getMeta(FIELD_NAME)));
map.put(FIELD_POSITION, StringUtils.toString(position, eiMetadata.getMeta(FIELD_POSITION)));
map.put(FIELD_DEGREE, StringUtils.toString(degree, eiMetadata.getMeta(FIELD_DEGREE)));
map.put(FIELD_PROFES, StringUtils.toString(profes, eiMetadata.getMeta(FIELD_PROFES)));
map.put(FIELD_SKILL, StringUtils.toString(skill, eiMetadata.getMeta(FIELD_SKILL)));
map.put(FIELD_SPECIALITY, StringUtils.toString(speciality, eiMetadata.getMeta(FIELD_SPECIALITY)));
map.put(FIELD_WORK_EXPE, StringUtils.toString(workExpe, eiMetadata.getMeta(FIELD_WORK_EXPE)));
return map;
}
}
package com.baosight.hpjx.hp.yx.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:THpyx009.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 13:48:23 create
*/
public class HPYX009 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_BUDGET = "budget"; /* 预算*/
public static final String FIELD_SOURCE_FUNDS = "sourceFunds"; /* 资金来源*/
public static final String FIELD_DIST_SITUA = "distSitua"; /* 分配情况*/
public static final String FIELD_ACTUAL_EXPE = "actualExpe"; /* 实际支出*/
public static final String COL_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_BUDGET = "BUDGET"; /* 预算*/
public static final String COL_SOURCE_FUNDS = "SOURCE_FUNDS"; /* 资金来源*/
public static final String COL_DIST_SITUA = "DIST_SITUA"; /* 分配情况*/
public static final String COL_ACTUAL_EXPE = "ACTUAL_EXPE"; /* 实际支出*/
public static final String QUERY = "HPYX009.query";
public static final String COUNT = "HPYX009.count";
public static final String INSERT = "HPYX009.insert";
public static final String UPDATE = "HPYX009.update";
public static final String DELETE = "HPYX009.delete";
public static final String DELETE_FLAG = "HPYX009.deleteFlag";
private Long id = new Long(0);
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 BigDecimal budget = new BigDecimal("0"); /* 预算*/
private String sourceFunds = " "; /* 资金来源*/
private String distSitua = " "; /* 分配情况*/
private BigDecimal actualExpe = new BigDecimal("0"); /* 实际支出*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_BUDGET);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("预算");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SOURCE_FUNDS);
eiColumn.setDescName("资金来源");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DIST_SITUA);
eiColumn.setDescName("分配情况");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACTUAL_EXPE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("实际支出");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX009() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param 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 budget - 预算.
* @return the budget
*/
public BigDecimal getBudget() {
return this.budget;
}
/**
* set the budget - 预算.
*
* @param budget - 预算
*/
public void setBudget(BigDecimal budget) {
this.budget = budget;
}
/**
* get the sourceFunds - 资金来源.
* @return the sourceFunds
*/
public String getSourceFunds() {
return this.sourceFunds;
}
/**
* set the sourceFunds - 资金来源.
*
* @param sourceFunds - 资金来源
*/
public void setSourceFunds(String sourceFunds) {
this.sourceFunds = sourceFunds;
}
/**
* get the distSitua - 分配情况.
* @return the distSitua
*/
public String getDistSitua() {
return this.distSitua;
}
/**
* set the distSitua - 分配情况.
*
* @param distSitua - 分配情况
*/
public void setDistSitua(String distSitua) {
this.distSitua = distSitua;
}
/**
* get the actualExpe - 实际支出.
* @return the actualExpe
*/
public BigDecimal getActualExpe() {
return this.actualExpe;
}
/**
* set the actualExpe - 实际支出.
*
* @param actualExpe - 实际支出
*/
public void setActualExpe(BigDecimal actualExpe) {
this.actualExpe = actualExpe;
}
/**
* 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));
setBudget(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_BUDGET)), budget));
setSourceFunds(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SOURCE_FUNDS)), sourceFunds));
setDistSitua(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DIST_SITUA)), distSitua));
setActualExpe(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_EXPE)), actualExpe));
}
/**
* 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_BUDGET, StringUtils.toString(budget, eiMetadata.getMeta(FIELD_BUDGET)));
map.put(FIELD_SOURCE_FUNDS, StringUtils.toString(sourceFunds, eiMetadata.getMeta(FIELD_SOURCE_FUNDS)));
map.put(FIELD_DIST_SITUA, StringUtils.toString(distSitua, eiMetadata.getMeta(FIELD_DIST_SITUA)));
map.put(FIELD_ACTUAL_EXPE, StringUtils.toString(actualExpe, eiMetadata.getMeta(FIELD_ACTUAL_EXPE)));
return map;
}
}
package com.baosight.hpjx.hp.yx.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:THpyx010.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 13:48:23 create
*/
public class HPYX010 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_SELL_DATE = "sellDate"; /* 推广日期*/
public static final String FIELD_SOURCE_FUNDS = "sourceFunds"; /* 推广名称*/
public static final String FIELD_DISTRICT = "district"; /* 推广区域*/
public static final String FIELD_CONTENT = "content"; /* 推广内容*/
public static final String FIELD_PROM_CHANNEL = "promChannel"; /* 推广渠道*/
public static final String FIELD_GOAL_MARKET = "goalMarket"; /* 目标市场*/
public static final String FIELD_GOAL_AMOUNT = "goalAmount"; /* 目标销售额*/
public static final String FIELD_GOAL_TRAN = "goalTran"; /* 目标转化率*/
public static final String FIELD_BUDGET = "budget"; /* 推广预算*/
public static final String FIELD_ACTUAL_CODE = "actualCode"; /* 实际成本*/
public static final String FIELD_ACTUAL_TRAN = "actualTran"; /* 实际转化率*/
public static final String COL_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_SELL_DATE = "SELL_DATE"; /* 推广日期*/
public static final String COL_SOURCE_FUNDS = "SOURCE_FUNDS"; /* 推广名称*/
public static final String COL_DISTRICT = "DISTRICT"; /* 推广区域*/
public static final String COL_CONTENT = "CONTENT"; /* 推广内容*/
public static final String COL_GOAL_MARKET = "GOAL_MARKET"; /* 目标市场*/
public static final String COL_GOAL_AMOUNT = "GOAL_AMOUNT"; /* 目标销售额*/
public static final String COL_GOAL_TRAN = "GOAL_TRAN"; /* 目标转化率*/
public static final String COL_BUDGET = "BUDGET"; /* 推广预算*/
public static final String COL_ACTUAL_CODE = "ACTUAL_CODE"; /* 实际成本*/
public static final String COL_ACTUAL_TRAN = "ACTUAL_TRAN"; /* 实际转化率*/
public static final String QUERY = "HPYX010.query";
public static final String COUNT = "HPYX010.count";
public static final String INSERT = "HPYX010.insert";
public static final String UPDATE = "HPYX010.update";
public static final String DELETE = "HPYX010.delete";
public static final String DELETE_FLAG = "HPYX010.deleteFlag";
private Long id = new Long(0);
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 sellDate = " "; /* 推广日期*/
private String sourceFunds = " "; /* 推广名称*/
private String district = " "; /* 推广区域*/
private String promChannel = " "; /* 推广渠道*/
private String content = " "; /* 推广内容*/
private String goalMarket = " "; /* 目标市场*/
private BigDecimal goalAmount = new BigDecimal("0"); /* 目标销售额*/
private BigDecimal goalTran = new BigDecimal("0"); /* 目标转化率*/
private BigDecimal budget = new BigDecimal("0"); /* 推广预算*/
private BigDecimal actualCode = new BigDecimal("0"); /* 实际成本*/
private BigDecimal actualTran = new BigDecimal("0"); /* 实际转化率*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_SELL_DATE);
eiColumn.setDescName("推广日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SOURCE_FUNDS);
eiColumn.setDescName("推广名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DISTRICT);
eiColumn.setDescName("推广区域");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROM_CHANNEL);
eiColumn.setDescName("推广渠道");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTENT);
eiColumn.setDescName("推广内容");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_GOAL_MARKET);
eiColumn.setDescName("目标市场");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_GOAL_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("目标销售额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_GOAL_TRAN);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("目标转化率");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BUDGET);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("推广预算");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACTUAL_CODE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("实际成本");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACTUAL_TRAN);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("实际转化率");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX010() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param 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 sellDate - 推广日期.
* @return the sellDate
*/
public String getSellDate() {
return this.sellDate;
}
/**
* set the sellDate - 推广日期.
*
* @param sellDate - 推广日期
*/
public void setSellDate(String sellDate) {
this.sellDate = sellDate;
}
/**
* get the sourceFunds - 推广名称.
* @return the sourceFunds
*/
public String getSourceFunds() {
return this.sourceFunds;
}
/**
* set the sourceFunds - 推广名称.
*
* @param sourceFunds - 推广名称
*/
public void setSourceFunds(String sourceFunds) {
this.sourceFunds = sourceFunds;
}
/**
* get the district - 推广区域.
* @return the district
*/
public String getDistrict() {
return this.district;
}
/**
* set the district - 推广区域.
*
* @param district - 推广区域
*/
public void setDistrict(String district) {
this.district = district;
}
/**
* get the content - 推广内容.
* @return the content
*/
public String getContent() {
return this.content;
}
/**
* set the content - 推广内容.
*
* @param content - 推广内容
*/
public void setContent(String content) {
this.content = content;
}
public String getPromChannel() {
return promChannel;
}
public void setPromChannel(String promChannel) {
this.promChannel = promChannel;
}
/**
* get the goalMarket - 目标市场.
* @return the goalMarket
*/
public String getGoalMarket() {
return this.goalMarket;
}
/**
* set the goalMarket - 目标市场.
*
* @param goalMarket - 目标市场
*/
public void setGoalMarket(String goalMarket) {
this.goalMarket = goalMarket;
}
/**
* get the goalAmount - 目标销售额.
* @return the goalAmount
*/
public BigDecimal getGoalAmount() {
return this.goalAmount;
}
/**
* set the goalAmount - 目标销售额.
*
* @param goalAmount - 目标销售额
*/
public void setGoalAmount(BigDecimal goalAmount) {
this.goalAmount = goalAmount;
}
/**
* get the goalTran - 目标转化率.
* @return the goalTran
*/
public BigDecimal getGoalTran() {
return this.goalTran;
}
/**
* set the goalTran - 目标转化率.
*
* @param goalTran - 目标转化率
*/
public void setGoalTran(BigDecimal goalTran) {
this.goalTran = goalTran;
}
/**
* get the budget - 推广预算.
* @return the budget
*/
public BigDecimal getBudget() {
return this.budget;
}
/**
* set the budget - 推广预算.
*
* @param budget - 推广预算
*/
public void setBudget(BigDecimal budget) {
this.budget = budget;
}
/**
* get the actualCode - 实际成本.
* @return the actualCode
*/
public BigDecimal getActualCode() {
return this.actualCode;
}
/**
* set the actualCode - 实际成本.
*
* @param actualCode - 实际成本
*/
public void setActualCode(BigDecimal actualCode) {
this.actualCode = actualCode;
}
/**
* get the actualTran - 实际转化率.
* @return the actualTran
*/
public BigDecimal getActualTran() {
return this.actualTran;
}
/**
* set the actualTran - 实际转化率.
*
* @param actualTran - 实际转化率
*/
public void setActualTran(BigDecimal actualTran) {
this.actualTran = actualTran;
}
/**
* 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));
setSellDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SELL_DATE)), sellDate));
setSourceFunds(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SOURCE_FUNDS)), sourceFunds));
setDistrict(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DISTRICT)), district));
setContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTENT)), content));
setPromChannel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROM_CHANNEL)), promChannel));
setGoalMarket(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_GOAL_MARKET)), goalMarket));
setGoalAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_GOAL_AMOUNT)), goalAmount));
setGoalTran(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_GOAL_TRAN)), goalTran));
setBudget(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_BUDGET)), budget));
setActualCode(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_CODE)), actualCode));
setActualTran(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_TRAN)), actualTran));
}
/**
* 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_SELL_DATE, StringUtils.toString(sellDate, eiMetadata.getMeta(FIELD_SELL_DATE)));
map.put(FIELD_SOURCE_FUNDS, StringUtils.toString(sourceFunds, eiMetadata.getMeta(FIELD_SOURCE_FUNDS)));
map.put(FIELD_DISTRICT, StringUtils.toString(district, eiMetadata.getMeta(FIELD_DISTRICT)));
map.put(FIELD_CONTENT, StringUtils.toString(content, eiMetadata.getMeta(FIELD_CONTENT)));
map.put(FIELD_PROM_CHANNEL, StringUtils.toString(promChannel, eiMetadata.getMeta(FIELD_PROM_CHANNEL)));
map.put(FIELD_GOAL_MARKET, StringUtils.toString(goalMarket, eiMetadata.getMeta(FIELD_GOAL_MARKET)));
map.put(FIELD_GOAL_AMOUNT, StringUtils.toString(goalAmount, eiMetadata.getMeta(FIELD_GOAL_AMOUNT)));
map.put(FIELD_GOAL_TRAN, StringUtils.toString(goalTran, eiMetadata.getMeta(FIELD_GOAL_TRAN)));
map.put(FIELD_BUDGET, StringUtils.toString(budget, eiMetadata.getMeta(FIELD_BUDGET)));
map.put(FIELD_ACTUAL_CODE, StringUtils.toString(actualCode, eiMetadata.getMeta(FIELD_ACTUAL_CODE)));
map.put(FIELD_ACTUAL_TRAN, StringUtils.toString(actualTran, eiMetadata.getMeta(FIELD_ACTUAL_TRAN)));
return map;
}
}
package com.baosight.hpjx.hp.yx.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.constant.HPConstant;
import com.baosight.hpjx.hp.wd.domain.HPWD001;
import com.baosight.hpjx.hp.yx.domain.*;
import com.baosight.hpjx.hp.yx.domain.HPYX005;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 销售业绩
*/
public class ServiceHPYX005 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo eiInfo = super.initLoad(inInfo,new HPYX005());
try {
CommonMethod.initBlock(eiInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return eiInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String sellDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX005.FIELD_SELL_DATE);
if (!sellDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX005.FIELD_SELL_DATE, DateUtils.formatShort(sellDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX005.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPYX005.QUERY,new HPYX005());
}
@OperationLogAnnotation(operModul = "销售业绩",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HPYX005.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "销售业绩",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<HPYX005> resultRows = MapUtils.toDaoEPBases(inInfo.getBlock(EiConstant.resultBlock).getRows(), HPYX005.class);
List<HPYX005A> detailRows = MapUtils.toDaoEPBases(inInfo, CommonConstant.Field.DETAIL, HPYX005A.class);
// 写入数据
for (HPYX005 hpyx005 : resultRows) {
if (hpyx005.getId() == null || hpyx005.getId() == 0) {
this.add(hpyx005, detailRows);
} else {
this.modify(hpyx005,detailRows);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX005 hpyx005, List<HPYX005A> hpyx005AList) {
hpyx005.setSellDate(DateUtils.formatShort(hpyx005.getSellDate()));
DaoUtils.insert(HPYX005.INSERT, hpyx005);
for (HPYX005A hpyx005A:hpyx005AList) {
hpyx005A.setProductCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPYX005_PRODUCT_CODE));
hpyx005A.setParentId(hpyx005.getId());
DaoUtils.insert(HPYX005A.INSERT, hpyx005A);
}
}
/**
* 修改操作
*/
public void modify(HPYX005 hpyx005, List<HPYX005A> hpyx005AList) {
DaoUtils.update(HPYX005.UPDATE, hpyx005);
for (HPYX005A hpyx005A: hpyx005AList) {
if (hpyx005A.getId() == null || hpyx005A.getId() == 0) {
DaoUtils.insert(HPYX005A.INSERT, hpyx005A);
}else {
DaoUtils.update(HPYX005A.UPDATE, hpyx005A);
}
}
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.hp.yx.domain.HPYX005;
import com.baosight.hpjx.hp.yx.domain.HPYX005A;
import com.baosight.hpjx.hp.yx.tools.HPYXTools;
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;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 销售业绩明细
*/
public class ServiceHPYX005A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getString("id");
//获取清单
List<HPYX005A> hpyx005AList = HPYXTools.HpYx005a.queryByParentId(Long.valueOf(id));
inInfo.addBlock(CommonConstant.Field.DETAIL).addRows(hpyx005AList);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
return super.query(inInfo, HPYX005A.QUERY, new HPYX005A());
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.yx.domain.HPYX005A;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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;
/**
* @author LiuYang
* @version 1.0 2024/9/28
* @description 新增销售业绩
*/
public class ServiceHPYX005B extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock("detail").addBlockMeta(new HPYX005A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.yx.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.hp.yx.domain.HPYX005;
import com.baosight.hpjx.hp.yx.domain.HPYX005A;
import com.baosight.hpjx.hp.yx.tools.HPYXTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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;
/**
* @author LiuYang
* @version 1.0 2024/9/28
* @description 修改销售业绩
*/
public class ServiceHPYX005C extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
String id = inInfo.getString("id");
HPYX005 hpyx005 = HPYXTools.HpYx005.queryById(Long.valueOf(id));
inInfo.addBlock(EiConstant.resultBlock).addRow(hpyx005);
//获取清单
List<HPYX005A> hgcw003List = HPYXTools.HpYx005a.queryByParentId(hpyx005.getId());
inInfo.addBlock(CommonConstant.Field.DETAIL).addRows(hgcw003List);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售业绩明细",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo,HPYX005A.DELETE);
}
}
package com.baosight.hpjx.hp.yx.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.constant.HPConstant;
import com.baosight.hpjx.hp.yx.domain.HPYX006;
import com.baosight.hpjx.hp.yx.domain.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.hp.yx.domain.HPYX007;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 营销资源-产品资源
*/
public class ServiceHPYX006 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_NAME_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String createdTime = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX006.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX006.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX006.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPYX006.QUERY,new HPYX006());
}
@OperationLogAnnotation(operModul = "营销资产-产品资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HPYX006.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "营销资产-产品资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPYX006 hpyx006 = new HPYX006();
hpyx006.fromMap(resultRow);
if (hpyx006.getId() == null || hpyx006.getId() == 0) {
this.add(hpyx006);
} else {
this.modify(hpyx006);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX006 hpyx006) {
hpyx006.setProductCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PRODUCT_CODE));
DaoUtils.insert(HPYX006.INSERT, hpyx006);
}
/**
* 修改操作
*/
public void modify(HPYX006 hpyx006) {
DaoUtils.update(HPYX006.UPDATE, hpyx006);
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.yx.domain.HPYX007;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
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 com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 营销资源-渠道资源
*/
public class ServiceHPYX007 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String createdTime = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX007.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX007.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX007.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX007.QUERY, new HPYX007(),false,new HPYX007().eiMetadata,EiConstant.queryBlock,"resultA","resultA");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-渠道资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultA");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPYX007 hpyx007 = new HPYX007();
hpyx007.fromMap(map);
DaoUtils.update(HPYX007.DELETE_FLAG, hpyx007.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-渠道资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultA").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPYX007 hpyx007 = new HPYX007();
hpyx007.fromMap(resultRow);
if (hpyx007.getId() == null || hpyx007.getId() == 0) {
this.add(hpyx007);
} else {
this.modify(hpyx007);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX007 hpyx007) {
hpyx007.setChannelCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CHANNEL_CODE));
DaoUtils.insert(HPYX007.INSERT, hpyx007);
}
/**
* 修改操作
*/
public void modify(HPYX007 hpyx007) {
DaoUtils.update(HPYX007.UPDATE, hpyx007);
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.yx.domain.HPYX006;
import com.baosight.hpjx.hp.yx.domain.HPYX008;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
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.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 营销资源-人力资源
*/
public class ServiceHPYX008 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String createdTime = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX006.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX006.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX008.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX008.QUERY, new HPYX008(),false,new HPYX008().eiMetadata,EiConstant.queryBlock,"resultB","resultB");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-人力资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultB");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPYX008 hpyx008 = new HPYX008();
hpyx008.fromMap(map);
DaoUtils.update(HPYX008.DELETE_FLAG, hpyx008.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-人力资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultB").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPYX008 hpyx003 = new HPYX008();
hpyx003.fromMap(resultRow);
if (hpyx003.getId() == null || hpyx003.getId() == 0) {
this.add(hpyx003);
} else {
this.modify(hpyx003);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX008 hpyx003) {
DaoUtils.insert(HPYX008.INSERT, hpyx003);
}
/**
* 修改操作
*/
public void modify(HPYX008 hpyx003) {
DaoUtils.update(HPYX008.UPDATE, hpyx003);
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.yx.domain.HPYX006;
import com.baosight.hpjx.hp.yx.domain.HPYX009;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
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.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 营销资源-资金资源
*/
public class ServiceHPYX009 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String createdTime = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX009.FIELD_CREATED_TIME);
if (!createdTime.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX009.FIELD_CREATED_TIME, DateUtils.formatShort(createdTime));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX009.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX009.QUERY, new HPYX009(),false,new HPYX009().eiMetadata,EiConstant.queryBlock,"resultC","resultC");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-资金资源",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock("resultC");
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPYX009 hpyx009 = new HPYX009();
hpyx009.fromMap(map);
DaoUtils.update(HPYX009.DELETE_FLAG, hpyx009.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "营销资产-资金资源",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("resultC").getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPYX009 hpyx009 = new HPYX009();
hpyx009.fromMap(resultRow);
if (hpyx009.getId() == null || hpyx009.getId() == 0) {
this.add(hpyx009);
} else {
this.modify(hpyx009);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX009 hpyx004) {
DaoUtils.insert(HPYX009.INSERT, hpyx004);
}
/**
* 修改操作
*/
public void modify(HPYX009 hpyx004) {
DaoUtils.update(HPYX009.UPDATE, hpyx004);
}
}
package com.baosight.hpjx.hp.yx.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.yx.domain.HPYX010;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
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 com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场推广
*/
public class ServiceHPYX010 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String sellDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX010.FIELD_SELL_DATE);
if (!sellDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX010.FIELD_SELL_DATE, DateUtils.formatShort(sellDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX010.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX010.QUERY, new HPYX010());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场推广",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPYX010 hpyx010 = new HPYX010();
hpyx010.fromMap(map);
DaoUtils.update(HPYX010.DELETE_FLAG, hpyx010.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场推广",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPYX010 hpyx010 = new HPYX010();
hpyx010.fromMap(resultRow);
if (hpyx010.getId() == null || hpyx010.getId() == 0) {
this.add(hpyx010);
} else {
this.modify(hpyx010);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX010 hpyx010) {
DaoUtils.insert(HPYX010.INSERT, hpyx010);
}
/**
* 修改操作
*/
public void modify(HPYX010 hpyx010) {
DaoUtils.update(HPYX010.UPDATE, hpyx010);
}
}
......@@ -110,7 +110,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SURVEY_DATE DESC,ID DESC
</isEmpty>
</dynamic>
......
......@@ -105,7 +105,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SURVEY_DATE DESC,ID DESC
</isEmpty>
</dynamic>
......
......@@ -105,7 +105,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SURVEY_DATE DESC,ID DESC
</isEmpty>
</dynamic>
......
......@@ -105,7 +105,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SURVEY_DATE DESC,ID DESC
</isEmpty>
</dynamic>
......
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX005
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
SELL_DATE VARCHAR,
CLIENT_NAME VARCHAR,
QUANTITY DECIMAL,
PRODUCT_COST DECIMAL,
AMOUNT DECIMAL,
SELL_CHANNEL VARCHAR,
SELL_AMOUNT DECIMAL,
SELL_USER VARCHAR
-->
<sqlMap namespace="HPYX005">
<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="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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellDate">
SELL_DATE = #sellDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="clientCode">
CLIENT_CODE = #clientCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="clientName">
CLIENT_NAME = #clientName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCost">
PRODUCT_COST = #productCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellChannel">
SELL_CHANNEL = #sellChannel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellAmount">
SELL_AMOUNT = #sellAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellUser">
SELL_USER = #sellUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX005">
SELECT
ID as "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.是 -->
SELL_DATE as "sellDate", <!-- 销售日期 -->
CLIENT_CODE as "clientCode",
CLIENT_NAME as "clientName", <!-- 客户名称 -->
QUANTITY as "quantity", <!-- 产品数量 -->
PRODUCT_COST as "productCost", <!-- 产品成本 -->
AMOUNT as "amount", <!-- 销售金额 -->
SELL_CHANNEL as "sellChannel", <!-- 销售渠道 -->
SELL_AMOUNT as "sellAmount", <!-- 销售费用 -->
SELL_USER as "sellUser" <!-- 销售人员 -->
FROM ${hpjxSchema}.T_HPYX005 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPYX005 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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellDate">
SELL_DATE = #sellDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="clientName">
CLIENT_NAME = #clientName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCost">
PRODUCT_COST = #productCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellChannel">
SELL_CHANNEL = #sellChannel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellAmount">
SELL_AMOUNT = #sellAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellUser">
SELL_USER = #sellUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX005 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SELL_DATE, <!-- 销售日期 -->
CLIENT_CODE, <!-- 客户编码 -->
CLIENT_NAME, <!-- 客户名称 -->
QUANTITY, <!-- 产品数量 -->
PRODUCT_COST, <!-- 产品成本 -->
AMOUNT, <!-- 销售金额 -->
SELL_CHANNEL, <!-- 销售渠道 -->
SELL_AMOUNT, <!-- 销售费用 -->
SELL_USER <!-- 销售人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #sellDate#, #clientCode#, #clientName#, #quantity#, #productCost#, #amount#, #sellChannel#,
#sellAmount#, #sellUser#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hpjxSchema}.T_HPYX005
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX005 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
SELL_DATE = #sellDate#, <!-- 销售日期 -->
CLIENT_CODE = #clientCode#,
CLIENT_NAME = #clientName#, <!-- 客户名称 -->
QUANTITY = #quantity#, <!-- 产品数量 -->
PRODUCT_COST = #productCost#, <!-- 产品成本 -->
AMOUNT = #amount#, <!-- 销售金额 -->
SELL_CHANNEL = #sellChannel#, <!-- 销售渠道 -->
SELL_AMOUNT = #sellAmount#, <!-- 销售费用 -->
SELL_USER = #sellUser# <!-- 销售人员 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX005A
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
PRODUCT_NAME VARCHAR,
PRODUCT_MODEL VARCHAR,
QUANTITY DECIMAL,
PRODUCT_COST DECIMAL,
AMOUNT DECIMAL,
PARENT_ID BIGINT
-->
<sqlMap namespace="HPYX005A">
<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="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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productModel">
PRODUCT_MODEL = #productModel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCost">
PRODUCT_COST = #productCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX005A">
SELECT
ID as "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.是 -->
PRODUCT_CODE as "productCode",
PRODUCT_NAME as "productName", <!-- 产品名称 -->
PRODUCT_MODEL as "productModel", <!-- 产品型号 -->
QUANTITY as "quantity", <!-- 产品数量 -->
PRICE AS "price",
PRODUCT_COST as "productCost", <!-- 产品成本 -->
AMOUNT as "amount", <!-- 产品销售金额 -->
PARENT_ID as "parentId" <!-- 父级ID -->
FROM ${hpjxSchema}.T_HPYX005A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPYX005A 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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productModel">
PRODUCT_MODEL = #productModel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCost">
PRODUCT_COST = #productCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX005A (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PRODUCT_CODE,
PRODUCT_NAME, <!-- 产品名称 -->
PRODUCT_MODEL, <!-- 产品型号 -->
QUANTITY, <!-- 产品数量 -->
PRICE,
PRODUCT_COST, <!-- 产品成本 -->
AMOUNT, <!-- 产品销售金额 -->
PARENT_ID <!-- 父级ID -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #productCode#, #productName#, #productModel#, #quantity#, #price#, #productCost#, #amount#,
#parentId#)
</insert>
<!-- 批量写入 -->
<insert id="batchInsert">
INSERT INTO ${hpjxSchema}.T_HPYX005A (
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
PRODUCT_CODE,
PRODUCT_NAME, <!-- 产品名称 -->
PRODUCT_MODEL, <!-- 产品型号 -->
QUANTITY, <!-- 产品数量 -->
PRICE,
PRODUCT_COST, <!-- 产品成本 -->
AMOUNT, <!-- 产品销售金额 -->
PARENT_ID <!-- 父级ID -->
) VALUES
<iterate open="(" conjunction="), (" close=")" property="rows">
#rows[].companyCode, #rows[].depCode#, #rows[].createdBy#, #rows[].createdName#, #rows[].createdTime#,
#rows[].productCode#, #rows[].productName#, #rows[].productModel#, #rows[].quantity#, #rows[].price#,
#rows[].productCost#, #rows[].amount#, #rows[].parentId#
</iterate>
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX005A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX005A
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
PRODUCT_CODE = #productCode#,
PRODUCT_NAME = #productName#, <!-- 产品名称 -->
PRODUCT_MODEL = #productModel#, <!-- 产品型号 -->
QUANTITY = #quantity#, <!-- 产品数量 -->
PRICE = #price#,
PRODUCT_COST = #productCost#, <!-- 产品成本 -->
AMOUNT = #amount#, <!-- 产品销售金额 -->
PARENT_ID = #parentId# <!-- 父级ID -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX006
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
PRODUCT_CODE VARCHAR,
PRODUCT_NAME VARCHAR,
PRODUCT_TYPE TINYINT,
PRODUCT_PECU VARCHAR,
PRODUCT_GOOD VARCHAR,
PRODUCT_PRICE DECIMAL,
DIS_WAY VARCHAR,
PRODUCT_INVENT DECIMAL
-->
<sqlMap namespace="HPYX006">
<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="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME LIKE CONCAT('%',#createdName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
LEFT(CREATED_TIME,8) LIKE CONCAT('%',#createdTime#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
PRODUCT_TYPE = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productPecu">
PRODUCT_PECU = #productPecu#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productGood">
PRODUCT_GOOD = #productGood#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productPrice">
PRODUCT_PRICE = #productPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="disWay">
DIS_WAY = #disWay#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productInvent">
PRODUCT_INVENT = #productInvent#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX006">
SELECT
ID as "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.是 -->
PRODUCT_CODE as "productCode", <!-- 产品编码 -->
PRODUCT_NAME as "productName", <!-- 产品名称 -->
PRODUCT_TYPE as "productType", <!-- 产品类型 -->
PRODUCT_PECU as "productPecu", <!-- 产品特性 -->
PRODUCT_GOOD as "productGood", <!-- 产品卖点 -->
PRODUCT_PRICE as "productPrice", <!-- 产品定价 -->
DIS_WAY as "disWay", <!-- 折扣策略 -->
PRODUCT_INVENT as "productInvent" <!-- 产品库存 -->
FROM ${hpjxSchema}.T_HPYX006 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPYX006 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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
PRODUCT_TYPE = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productPecu">
PRODUCT_PECU = #productPecu#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productGood">
PRODUCT_GOOD = #productGood#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productPrice">
PRODUCT_PRICE = #productPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="disWay">
DIS_WAY = #disWay#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productInvent">
PRODUCT_INVENT = #productInvent#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX006 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PRODUCT_CODE, <!-- 产品编码 -->
PRODUCT_NAME, <!-- 产品名称 -->
PRODUCT_TYPE, <!-- 产品类型 -->
PRODUCT_PECU, <!-- 产品特性 -->
PRODUCT_GOOD, <!-- 产品卖点 -->
PRODUCT_PRICE, <!-- 产品定价 -->
DIS_WAY, <!-- 折扣策略 -->
PRODUCT_INVENT <!-- 产品库存 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #productCode#, #productName#, #productType#, #productPecu#, #productGood#, #productPrice#, #disWay#, #productInvent#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX006 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX006
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX006
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
PRODUCT_CODE = #productCode#, <!-- 产品编码 -->
PRODUCT_NAME = #productName#, <!-- 产品名称 -->
PRODUCT_TYPE = #productType#, <!-- 产品类型 -->
PRODUCT_PECU = #productPecu#, <!-- 产品特性 -->
PRODUCT_GOOD = #productGood#, <!-- 产品卖点 -->
PRODUCT_PRICE = #productPrice#, <!-- 产品定价 -->
DIS_WAY = #disWay#, <!-- 折扣策略 -->
PRODUCT_INVENT = #productInvent# <!-- 产品库存 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX007
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
CHANNEL_CODE VARCHAR,
CHANNEL_NAME VARCHAR,
COVER_DIST VARCHAR,
TAR_MARKET VARCHAR,
BUS_PART VARCHAR
-->
<sqlMap namespace="HPYX007">
<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="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME LIKE CONCAT('%',#createdName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
LEFT(CREATED_TIME,8) LIKE CONCAT('%',#createdTime#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelCode">
CHANNEL_CODE = #channelCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelName">
CHANNEL_NAME = #channelName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="coverDist">
COVER_DIST = #coverDist#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tarMarket">
TAR_MARKET = #tarMarket#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="busPart">
BUS_PART = #busPart#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX007">
SELECT
ID as "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.是 -->
CHANNEL_CODE as "channelCode", <!-- 渠道编码 -->
CHANNEL_NAME as "channelName", <!-- 渠道名称 -->
COVER_DIST as "coverDist", <!-- 覆盖范围 -->
TAR_MARKET as "tarMarket", <!-- 目标市场 -->
BUS_PART as "busPart" <!-- 合作伙伴 -->
FROM ${hpjxSchema}.T_HPYX007 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPYX007 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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelCode">
CHANNEL_CODE = #channelCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelName">
CHANNEL_NAME = #channelName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="coverDist">
COVER_DIST = #coverDist#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tarMarket">
TAR_MARKET = #tarMarket#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="busPart">
BUS_PART = #busPart#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX007 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
CHANNEL_CODE, <!-- 渠道编码 -->
CHANNEL_NAME, <!-- 渠道名称 -->
COVER_DIST, <!-- 覆盖范围 -->
TAR_MARKET, <!-- 目标市场 -->
BUS_PART <!-- 合作伙伴 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #channelCode#, #channelName#, #coverDist#, #tarMarket#, #busPart#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX007 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX007
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX007
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
CHANNEL_CODE = #channelCode#, <!-- 渠道编码 -->
CHANNEL_NAME = #channelName#, <!-- 渠道名称 -->
COVER_DIST = #coverDist#, <!-- 覆盖范围 -->
TAR_MARKET = #tarMarket#, <!-- 目标市场 -->
BUS_PART = #busPart# <!-- 合作伙伴 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX008
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
NAME VARCHAR,
POSITION VARCHAR,
DEGREE VARCHAR,
PROFES VARCHAR,
SKILL VARCHAR,
SPECIALITY VARCHAR,
WORK_EXPE VARCHAR
-->
<sqlMap namespace="HPYX008">
<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="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME LIKE CONCAT('%',#createdName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
LEFT(CREATED_TIME,8) LIKE CONCAT('%',#createdTime#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="name">
NAME = #name#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="position">
POSITION = #position#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="degree">
DEGREE = #degree#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="profes">
PROFES = #profes#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="skill">
SKILL = #skill#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="speciality">
SPECIALITY = #speciality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workExpe">
WORK_EXPE = #workExpe#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX008">
SELECT
ID as "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.是 -->
NAME as "name", <!-- 姓名 -->
POSITION as "position", <!-- 职位 -->
DEGREE as "degree", <!-- 学历 -->
PROFES as "profes", <!-- 专业 -->
SKILL as "skill", <!-- 技能 -->
SPECIALITY as "speciality", <!-- 专长 -->
WORK_EXPE as "workExpe" <!-- 工作经历 -->
FROM ${hpjxSchema}.T_HPYX008 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPYX008 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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="name">
NAME = #name#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="position">
POSITION = #position#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="degree">
DEGREE = #degree#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="profes">
PROFES = #profes#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="skill">
SKILL = #skill#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="speciality">
SPECIALITY = #speciality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="workExpe">
WORK_EXPE = #workExpe#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX008 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
NAME, <!-- 姓名 -->
POSITION, <!-- 职位 -->
DEGREE, <!-- 学历 -->
PROFES, <!-- 专业 -->
SKILL, <!-- 技能 -->
SPECIALITY, <!-- 专长 -->
WORK_EXPE <!-- 工作经历 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #name#, #position#, #degree#, #profes#, #skill#, #speciality#, #workExpe#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX008 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX008
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX008
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
NAME = #name#, <!-- 姓名 -->
POSITION = #position#, <!-- 职位 -->
DEGREE = #degree#, <!-- 学历 -->
PROFES = #profes#, <!-- 专业 -->
SKILL = #skill#, <!-- 技能 -->
SPECIALITY = #speciality#, <!-- 专长 -->
WORK_EXPE = #workExpe# <!-- 工作经历 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX009
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
BUDGET DECIMAL,
SOURCE_FUNDS VARCHAR,
DIST_SITUA VARCHAR,
ACTUAL_EXPE DECIMAL
-->
<sqlMap namespace="HPYX009">
<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="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME LIKE CONCAT('%',#createdName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
LEFT(CREATED_TIME,8) LIKE CONCAT('%',#createdTime#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="budget">
BUDGET = #budget#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sourceFunds">
SOURCE_FUNDS = #sourceFunds#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="distSitua">
DIST_SITUA = #distSitua#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualExpe">
ACTUAL_EXPE = #actualExpe#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX009">
SELECT
ID as "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.是 -->
BUDGET as "budget", <!-- 预算 -->
SOURCE_FUNDS as "sourceFunds", <!-- 资金来源 -->
DIST_SITUA as "distSitua", <!-- 分配情况 -->
ACTUAL_EXPE as "actualExpe" <!-- 实际支出 -->
FROM ${hpjxSchema}.T_HPYX009 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPYX009 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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="budget">
BUDGET = #budget#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sourceFunds">
SOURCE_FUNDS = #sourceFunds#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="distSitua">
DIST_SITUA = #distSitua#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualExpe">
ACTUAL_EXPE = #actualExpe#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX009 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
BUDGET, <!-- 预算 -->
SOURCE_FUNDS, <!-- 资金来源 -->
DIST_SITUA, <!-- 分配情况 -->
ACTUAL_EXPE <!-- 实际支出 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #budget#, #sourceFunds#, #distSitua#, #actualExpe#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX009 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX009
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX009
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
BUDGET = #budget#, <!-- 预算 -->
SOURCE_FUNDS = #sourceFunds#, <!-- 资金来源 -->
DIST_SITUA = #distSitua#, <!-- 分配情况 -->
ACTUAL_EXPE = #actualExpe# <!-- 实际支出 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-09-27 13:48:23
Version : 1.0
schema : hpjx
tableName : T_HPYX010
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
SELL_DATE VARCHAR,
SOURCE_FUNDS VARCHAR,
DISTRICT VARCHAR,
CONTENT VARCHAR,
GOAL_MARKET VARCHAR,
GOAL_AMOUNT DECIMAL,
GOAL_TRAN DECIMAL,
BUDGET DECIMAL,
ACTUAL_CODE DECIMAL,
ACTUAL_TRAN DECIMAL
-->
<sqlMap namespace="HPYX010">
<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="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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellDate">
SELL_DATE = #sellDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sourceFunds">
SOURCE_FUNDS like CONCAT('%',#sourceFunds#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like CONCAT('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="content">
CONTENT = #content#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="promChannel">
PROM_CHANNEL = #promChannel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalMarket">
GOAL_MARKET = #goalMarket#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalAmount">
GOAL_AMOUNT = #goalAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalTran">
GOAL_TRAN = #goalTran#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="budget">
BUDGET = #budget#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCode">
ACTUAL_CODE = #actualCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualTran">
ACTUAL_TRAN = #actualTran#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX010">
SELECT
ID as "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.是 -->
SELL_DATE as "sellDate", <!-- 推广日期 -->
SOURCE_FUNDS as "sourceFunds", <!-- 推广名称 -->
DISTRICT as "district", <!-- 推广区域 -->
CONTENT as "content", <!-- 推广内容 -->
PROM_CHANNEL as "promChannel",
GOAL_MARKET as "goalMarket", <!-- 目标市场 -->
GOAL_AMOUNT as "goalAmount", <!-- 目标销售额 -->
GOAL_TRAN as "goalTran", <!-- 目标转化率 -->
BUDGET as "budget", <!-- 推广预算 -->
ACTUAL_CODE as "actualCode", <!-- 实际成本 -->
ACTUAL_TRAN as "actualTran" <!-- 实际转化率 -->
FROM ${hpjxSchema}.T_HPYX010 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
SELL_DATE DESC, ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPYX010 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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sellDate">
SELL_DATE = #sellDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sourceFunds">
SOURCE_FUNDS = #sourceFunds#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="content">
CONTENT = #content#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalMarket">
GOAL_MARKET = #goalMarket#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalAmount">
GOAL_AMOUNT = #goalAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="goalTran">
GOAL_TRAN = #goalTran#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="budget">
BUDGET = #budget#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCode">
ACTUAL_CODE = #actualCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualTran">
ACTUAL_TRAN = #actualTran#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX010 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SELL_DATE, <!-- 推广日期 -->
SOURCE_FUNDS, <!-- 推广名称 -->
DISTRICT, <!-- 推广区域 -->
CONTENT, <!-- 推广内容 -->
PROM_CHANNEL,
GOAL_MARKET, <!-- 目标市场 -->
GOAL_AMOUNT, <!-- 目标销售额 -->
GOAL_TRAN, <!-- 目标转化率 -->
BUDGET, <!-- 推广预算 -->
ACTUAL_CODE, <!-- 实际成本 -->
ACTUAL_TRAN <!-- 实际转化率 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #sellDate#, #sourceFunds#, #district#, #content#, #promChannel#, #goalMarket#, #goalAmount#, #goalTran#, #budget#, #actualCode#, #actualTran#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX010 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX010
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPYX010
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
SELL_DATE = #sellDate#, <!-- 推广日期 -->
SOURCE_FUNDS = #sourceFunds#, <!-- 推广名称 -->
DISTRICT = #district#, <!-- 推广区域 -->
CONTENT = #content#, <!-- 推广内容 -->
PROM_CHANNEL = #promChannel#
GOAL_MARKET = #goalMarket#, <!-- 目标市场 -->
GOAL_AMOUNT = #goalAmount#, <!-- 目标销售额 -->
GOAL_TRAN = #goalTran#, <!-- 目标转化率 -->
BUDGET = #budget#, <!-- 推广预算 -->
ACTUAL_CODE = #actualCode#, <!-- 实际成本 -->
ACTUAL_TRAN = #actualTran# <!-- 实际转化率 -->
WHERE
ID = #id#
</update>
</sqlMap>
package com.baosight.hpjx.hp.yx.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.yx.domain.HPYX005;
import com.baosight.hpjx.hp.yx.domain.HPYX005A;
import com.baosight.hpjx.util.AssertUtils;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
/**
* @author LiuYang
* @version 1.0 2024/9/28
* @description
*/
public class HPYXTools {
public static class HpYx005 {
/**
* 根据ID查询销售业绩
* @param id
* @return
*/
public static HPYX005 queryById(Long id) {
AssertUtils.isNull(id, "销售业绩ID,不能为空!");
List<HPYX005> results = DaoBase.getInstance().query(HPYX005.QUERY,new HashMap<String,Object>(){
{put(HPYX005.FIELD_ID,id);}
});
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
public static class HpYx005a {
/**
* 根据父级ID查询销售业绩明细
* @param parentId
* @return
*/
public static List<HPYX005A> queryByParentId(Long parentId) {
AssertUtils.isNull(parentId, "销售业绩ID,不能为空!");
List<HPYX005A> results = DaoBase.getInstance().query(HPYX005A.QUERY,new HashMap<String,Object>(){
{put(HPYX005A.FIELD_PARENT_ID,parentId);}
});
return results;
}
}
}
......@@ -4,12 +4,6 @@ $(function() {
$("#QUERY").on("click", function () {
query();
});
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFTab = {
"info": {
......@@ -39,7 +33,7 @@ $(function() {
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px"'
+ 'onclick="uploadFile(' + item.id + ',\''+YX001+'\')" >附件清单</a>';
+ ' onclick="uploadFile(' + item.id + ',\''+YX001+'\')" >附件清单</a>';
}
return template;
}
......
......@@ -105,11 +105,11 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="district" cname="区域" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" sumType="all"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数!" sumType="all"/>
<EF:EFColumn ename="price" cname="价格" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" sumType="all"/>
<EF:EFColumn ename="quality" cname="质量" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFComboColumn ename="surveyUser" cname="调查人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let YX005 = "YX005";
let template = "";
if (item.id) {
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="detailFunc(' + item.id + ')">详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px"'
+ ' onclick="uploadFile(' + item.id + ',\''+YX005+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
$("#BTN_INSERT").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc);
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['sellDate'] = currShortDate()
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
function detailFunc(id) {
JSColorbox.open({
href: "HPYX005A?methodName=initLoad&id=" + id + "&efParentFormEname=HPYX005",
title: "<div style='text-align: center;'>销售详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
/**
* 新增
*/
function addFunc() {
JSColorbox.open({
href: "HPYX005B?methodName=initLoad&efParentFormEname=HPYX005",
title: "<div style='text-align: center;'>新增销售业绩</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
/**
* 修改
*/
function updateFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].reviewStatus == "3") {
message("已经提交的数据不能进行修改!");
return;
}
JSColorbox.open({
href: "HPYX005C?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HPYX005",
title: "<div style='text-align: center;'>修改合同</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function btnSaveFunc(btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.sellDate)){
message("选中的第"+(index+1)+"行\"推广日期\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.sourceFunds)){
message("选中的第"+(index+1)+"行\"推广名称\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.goalAmount) || !isNumber(item.goalAmount)){
message("选中的第"+(index+1)+"行\"目标销售额\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.budget) || !isNumber(item.budget)){
message("选中的第"+(index+1)+"行\"推广预算\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPYX010", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
/**
* 文件上传
*
* @param id 业务主键
* @param bizType 业务类型
*/
function uploadFile(id,bizType) {
JSColorbox.open({
href: "HPSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType="+bizType,
title: "<div style='text-align: center;'>附件清单</div>",
width: "60%",
height: "50%",
//callbackName: uploadFileCallback
});
}
function windowCallback(ei) {
if (ei.getStatus() === -1) {
NotificationUtil(ei.getMsg(), "error");
return;
}
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 18:01
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<EF:EFPage title="销售业绩">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="sellDate" cname="销售日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="clientName" 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="sellUser" cname="销售人员" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="sellDate" cname="销售日期" width="120" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="clientCode" cname="客户名称" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="100" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数" />
<EF:EFColumn ename="productCost" cname="成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="amount" cname="销售金额" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="sellChannel" cname="销售渠道" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="sellAmount" cname="销售费用" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFComboColumn ename="sellUser" cname="销售人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="100" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="140" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result": {
columns: [
],
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 18:02
To change this template use File | Settings | File Templates.
--%>
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 18:01
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<EF:EFPage title="销售业绩明细">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="productModel" cname="产品型号" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="productName" cname="产品名称" align="center" required="true"/>
<EF:EFColumn ename="productModel" cname="产品型号" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" required="true" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数" />
<EF:EFColumn ename="price" cname="单价" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="productCost" cname="产品成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="amount" cname="销售金额" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" enable="false"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
$("#result-0-sellDate").val(currShortDate())
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "quantity" || e.field == "price") {
var tr,index;
// 获取此model元素信息
for (let i = 0; i < e.items.length; i++) {
let item = e.items[i];
detailGrid.setCellValue(item, 'amount', item.quantity * item.price);
}
calculateAmount();
}
if (e.field == "productCost"){
calculateAmount();
}
});
},
onSave: function (e) {
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
}
}
$("#DELETE_FILE").on("click", function () {
deleteFileFunc();
});
/**
* 下拉框事件
* @type {{"result-0-contractType": {select: IPLATUI.EFSelect.result-0-contractType.select}, projCodeBox: {select: IPLATUI.EFSelect.projCodeBox.select}}}
*/
IPLATUI.EFSelect = {
"result-0-clientCode": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'];
$("#result-0-clientCode").val(valueField);
$("#result-0-clientName").val(textField);
}
}
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
let flag = true;
flag = fieldValidation();
if(flag)
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail", "HPYX005", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detail2Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detailGrid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
}
let refreshRowNo = function () {
let allRows = detailGrid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detailGrid.setCellValue(i, "rowNo", i);
detailGrid.refresh();
}
}
function fieldValidation() {
var sellDate = $("#result-0-sellDate").val();
if (isBlank(sellDate)) {
message("请选择销售日期!");
return false;
}
var clientCode = $("#result-0-clientCode").val();
if (isBlank(clientCode)) {
message("请选择客户名称!");
return false;
}
var sellUser = $("#result-0-sellUser").val();
if (isBlank(sellUser)) {
message("销售人员不能为空!!");
return false;
}
return true;
}
/**
* 根据单价数量计算总金额
* @param item
*/
function calculateAmount() {
var allRows = detailGrid.getDataItems();
var quantity = 0;
var productCost = 0;
var amount = 0;
allRows.forEach(function (row, index) {
quantity += parseFloat(row.quantity);
productCost += parseFloat(row.productCost);
amount += parseFloat(row.amount);
});
$("#result-0-quantity").val(quantity.toFixed(2))
$("#result-0-productCost").val(productCost.toFixed(2))
$("#result-0-amount").val(amount.toFixed(2))
}
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/28
Time: 13:31
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" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="新增营销业绩">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
<EF:EFDatePicker cname="销售日期" ename="result-0-sellDate" colWidth="4" required="true"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFSelect cname="客户名称" ename="result-0-clientCode" colWidth="4" required="true" filter="contains">
<EF:EFOption label="请选择客户" value=""/>
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-clientName" cname="产品名称" colWidth="4" readonly="true" type="hidden"/>
<EF:EFInput ename="result-0-quantity" cname="产品数量" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-productCost" cname="成本" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-amount" cname="销售金额" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-sellChannel" cname="销售渠道" colWidth="4"/>
<EF:EFInput ename="result-0-sellAmount" cname="销售费用" colWidth="4" defaultValue="0"/>
<EF:EFSelect ename="result-0-sellUser" cname="销售人员" colWidth="4" filter="contains"
required="true" defaultValue="${loginName}">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail" title="记录详情">
<EF:EFGrid blockId="detail" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="productName" cname="产品名称" align="center" required="true"/>
<EF:EFColumn ename="productModel" cname="产品型号" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" required="true" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数" />
<EF:EFColumn ename="price" cname="单价" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="productCost" cname="产品成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="amount" cname="销售金额" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" enable="false"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGCW002A" path="cw"/>
</EF:EFRegion>
</EF:EFWindow>
$(function() {
$("#result-0-sellDate").val(currShortDate())
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "quantity" || e.field == "price") {
var tr,index;
// 获取此model元素信息
for (let i = 0; i < e.items.length; i++) {
let item = e.items[i];
detailGrid.setCellValue(item, 'amount', item.quantity * item.price);
}
calculateAmount();
}
if (e.field == "productCost"){
calculateAmount();
}
});
},
onSave: function (e) {
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
}
}
$("#DELETE_FILE").on("click", function () {
deleteFileFunc();
});
/**
* 下拉框事件
* @type {{"result-0-contractType": {select: IPLATUI.EFSelect.result-0-contractType.select}, projCodeBox: {select: IPLATUI.EFSelect.projCodeBox.select}}}
*/
IPLATUI.EFSelect = {
"result-0-clientCode": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'];
$("#result-0-clientCode").val(valueField);
$("#result-0-clientName").val(textField);
}
}
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
let flag = true;
flag = fieldValidation();
if(flag)
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail", "HPYX005", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detail2Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detailGrid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
}
let refreshRowNo = function () {
let allRows = detailGrid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detailGrid.setCellValue(i, "rowNo", i);
detailGrid.refresh();
}
}
function fieldValidation() {
var sellDate = $("#result-0-sellDate").val();
if (isBlank(sellDate)) {
message("请选择销售日期!");
return false;
}
var clientCode = $("#result-0-clientCode").val();
if (isBlank(clientCode)) {
message("请选择客户名称!");
return false;
}
var sellUser = $("#result-0-sellUser").val();
if (isBlank(sellUser)) {
message("销售人员不能为空!!");
return false;
}
return true;
}
function deleteResult1Func() {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail"));
EiCommunicator.send("HPYX005C", "delete", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
NotificationUtil(ei.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail")) {
window['detail1Grid'].setEiInfo(ei);
calculateAmount();
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
/**
* 根据单价数量计算总金额
* @param item
*/
function calculateAmount() {
var allRows = detailGrid.getDataItems();
var quantity = 0;
var productCost = 0;
var amount = 0;
allRows.forEach(function (row, index) {
quantity += parseFloat(row.quantity);
productCost += parseFloat(row.productCost);
amount += parseFloat(row.amount);
});
$("#result-0-quantity").val(quantity.toFixed(2))
$("#result-0-productCost").val(productCost.toFixed(2))
$("#result-0-amount").val(amount.toFixed(2))
}
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/28
Time: 13:31
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" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="修改营销业绩">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
<EF:EFInput ename="result-0-id" cname="ID" colWidth="4" readonly="true" type="hidden"/>
<EF:EFDatePicker cname="销售日期" ename="result-0-sellDate" colWidth="4" required="true"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFSelect cname="客户名称" ename="result-0-clientCode" colWidth="4" required="true" filter="contains">
<EF:EFOption label="请选择客户" value=""/>
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-clientName" cname="产品名称" colWidth="4" readonly="true" type="hidden"/>
<EF:EFInput ename="result-0-quantity" cname="产品数量" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-productCost" cname="成本" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-amount" cname="销售金额" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFInput ename="result-0-sellChannel" cname="销售渠道" colWidth="4"/>
<EF:EFInput ename="result-0-sellAmount" cname="销售费用" colWidth="4" defaultValue="0"/>
<EF:EFSelect ename="result-0-sellUser" cname="销售人员" colWidth="4" filter="contains"
required="true" defaultValue="${loginName}">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail" title="记录详情">
<EF:EFGrid blockId="detail" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="productName" cname="产品名称" align="center" required="true"/>
<EF:EFColumn ename="productModel" cname="产品型号" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="15" displayType="0.00" format="{0:N0}"
data-regex="/^-?[0-9]{1,12}$/" required="true" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数" />
<EF:EFColumn ename="price" cname="单价" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="productCost" cname="产品成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="amount" cname="销售金额" maxLength="15" displayType="0.00" format="{0:C2}" defaultValue="0"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="false" align="right" enable="false"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGCW002A" path="cw"/>
</EF:EFRegion>
</EF:EFWindow>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFTab = {
"info": {
show: function (e) {
$(e.contentElement).find("div[data-role='grid']").data("kendoGrid").refresh();
let grid = $(e.contentElement).find("div[data-role='grid']").data("kendoGrid");
grid.dataSource.page(1)
/*if (e.name == "info-tab-1") {
} else if (e.name == "info-tab-2") {
$("#info-tab-2").click();
} else if (e.name == "info-tab-3") {
$("#info-tab-3").click();
}*/
},
select: onSelect // 绑定select事件处理函数
}
}
IPLATUI.EFGrid = {
"result": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let YX006 = "YX006";
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px"'
+ ' onclick="uploadFile(' + item.id + ',\''+YX006+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-1").on("click", function () {
grid.dataSource.page(1);
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
},
"resultA": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let YX007 = "YX007";
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ',\''+YX007+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-2").on("click", function () {
grid.dataSource.page(1);
});
$("#SAVEA").on("click", function () {
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode,"resultA");
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFuncA(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
},
"resultB": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let YX008 = "YX008";
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ',\''+YX008+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-3").on("click", function () {
grid.dataSource.page(1);
});
$("#SAVEB").on("click", function () {
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode,"resultB");
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFuncB(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
},
"resultC": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let template = '';
let YX009 = "YX009";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ',\''+YX009+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-4").on("click", function () {
grid.dataSource.page(1);
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFuncC(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
var selectedTab = 0;
let query = function () {
if (selectedTab == 0){
resultGrid.dataSource.page(1);
}else if (selectedTab == 1){
resultAGrid.dataSource.page(1);
}else if (selectedTab == 2){
resultBGrid.dataSource.page(1);
} else if (selectedTab == 3){
resultCGrid.dataSource.page(1);
}
}
function onSelect(e) {
var selecTab = e.item; // e.item是被选中的标签DOM元素
selectedTab = $("#info").find("li").index(selecTab); // 获取被选中标签的索引
//var selectedTabText = $(selectedTab).find("a").text(); // 获取被选中标签的文本
}
function btnSaveFunc(btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.productName)){
message("选中的第"+(index+1)+"行\"产品名称\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.productPrice) || !isNumber(item.productPrice)){
message("选中的第"+(index+1)+"行\"产品定价\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPYX006", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
function btnSaveFuncA(btnNode) {
let rows = resultAGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.channelName)){
message("选中的第"+(index+1)+"行\"渠道名称\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.busPart)){
message("选中的第"+(index+1)+"行\"合作伙伴\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("resultA", "HPYX007", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
function btnSaveFuncB(btnNode) {
let rows = resultBGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.name)){
message("选中的第"+(index+1)+"行\"姓名\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("resultB", "HPYX008", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
function btnSaveFuncC(btnNode) {
let rows = resultCGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.budget) || !isNumber(item.budget)){
message("选中的第"+(index+1)+"行\"预算\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.sourceFunds)){
message("选中的第"+(index+1)+"行\"资金来源\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("resultC", "HPYX009", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id,bizType) {
JSColorbox.open({
href: "HPSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType="+bizType,
title: "<div style='text-align: center;'>附件清单</div>",
width: "60%",
height: "50%",
//callbackName: uploadFileCallback
});
}
\ No newline at end of file
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 14:43
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" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="营销资源">
<EF:EFRegion id="inqu">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="createdTime" cname="创建日期"
role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="createdName" cname="创建人名称" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFTab id="info">
<div title="产品资源">
<EF:EFGrid blockId="result" autoDraw="override" autoBind="false">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="productCode" cname="产品编码" width="120" enable="false" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFComboColumn ename="productType" cname="产品类型" blockName="invent_name_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="false"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="productPecu" cname="产品特性" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productGood" cname="产品卖点" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productPrice" cname="产品定价" width="120" enable="true" format="{0:C2}" align="right" required="true"
maxLength="15" displayType="0.00"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!"/>
<EF:EFColumn ename="disWay" cname="折扣策略" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productInvent" cname="产品库存" width="120" enable="true" format="{0:N0}" align="right"
maxLength="15" displayType="0.00"
data-regex="/^-?[0-9]{1,12}$/"
data-errorprompt="请输入数字,该值最大可设置12位整数!"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</div>
<div title="渠道资源">
<EF:EFGrid blockId="resultA" autoDraw="override" autoBind="false" needAuth="false" serviceName="HPYX007">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="channelCode" cname="渠道编码" width="120" enable="false" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="channelName" cname="渠道名称" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="coverDist" cname="覆盖范围" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="tarMarket" cname="目标市场" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="busPart" cname="合作伙伴" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</div>
<div title="人力资源">
<EF:EFGrid blockId="resultB" autoDraw="override" autoBind="false" needAuth="false" serviceName="HPYX008">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="name" cname="姓名" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="position" cname="职位" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="degree" cname="学历" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="profes" cname="专业" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="skill" cname="技能" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="speciality" cname="专长" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="workExpe" cname="工作经历" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</div>
<div title="营销调查">
<EF:EFGrid blockId="resultC" autoDraw="override" autoBind="false" needAuth="false" serviceName="HPYX009">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="budget" cname="预算" width="120" enable="true" format="{0:C2}" align="right"
maxLength="15" displayType="0.00" required="true"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!"/>
<EF:EFColumn ename="sourceFunds" cname="资金来源" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="distSitua" cname="分配情况" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="actualExpe" cname="实际支出" width="120" enable="true" format="{0:C2}" align="right"
maxLength="15" displayType="0.00"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</div>
</EF:EFTab>
</EF:EFPage>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let YX010 = "YX010";
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px"'
+ ' onclick="uploadFile(' + item.id + ',\''+YX010+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['sellDate'] = currShortDate()
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
var selectedTab = 0;
let query = function () {
resultGrid.dataSource.page(1);
}
function btnSaveFunc(btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.sellDate)){
message("选中的第"+(index+1)+"行\"推广日期\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.sourceFunds)){
message("选中的第"+(index+1)+"行\"推广名称\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.goalAmount) || !isNumber(item.goalAmount)){
message("选中的第"+(index+1)+"行\"目标销售额\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.budget) || !isNumber(item.budget)){
message("选中的第"+(index+1)+"行\"推广预算\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPYX010", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id,bizType) {
JSColorbox.open({
href: "HPSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType="+bizType,
title: "<div style='text-align: center;'>附件清单</div>",
width: "60%",
height: "50%",
//callbackName: uploadFileCallback
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/27
Time: 18:02
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<EF:EFPage title="市场推广">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="sellDate" cname="推广日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="sourceFunds" cname="推广名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="district" cname="推广区域" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="sellDate" cname="推广日期" width="120" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="sourceFunds" cname="推广名称" width="180" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="district" cname="推广区域" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="promChannel" cname="推广渠道" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="content" cname="推广内容" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="goalMarket" cname="目标市场" width="180" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="goalAmount" cname="目标销售额" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="goalTran" cname="目标转化率" maxLength="15" displayType="0.00" format="{0:N2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="budget" cname="推广预算" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" required="true" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="actualCode" cname="实际成本" maxLength="15" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn ename="actualTran" cname="实际转化率" maxLength="15" displayType="0.00" format="{0:N2}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,2})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置12位整数和2位小数!" />
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="140" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</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