Commit 163e2a8f by 宋祥

Merge branch 'dev' of http://129.211.46.84:8800/platform/hp-smart into dev

parents ea7187a5 31519291
package com.baosight.hpjx.hp.cg.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:HPCG004.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 14:04:00 create
*/
public class HPCG004 extends DaoEPBase{
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_INQUIRY_DATE = "inquiryDate"; /* 询价日期*/
public static final String FIELD_INQUIRY_NUMBER = "inquiryNumber"; /* 询价单号*/
public static final String FIELD_SUPPLIER_NAME = "supplierName"; /* 供应商名称*/
public static final String FIELD_INQUIRY_TYPE = "inquiryType"; /* 询价单类型*/
public static final String FIELD_INQUIRY_PERSON = "inquiryPerson"; /* 询价单申请人*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_PRO_APPLY_STATUS = "proApplyStatus"; /* 申请状态*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_INQUIRY_DATE = "INQUIRY_DATE"; /* 询价日期*/
public static final String COL_INQUIRY_NUMBER = "INQUIRY_NUMBER"; /* 询价单号*/
public static final String COL_SUPPLIER_NAME = "SUPPLIER_NAME"; /* 供应商名称*/
public static final String COL_INQUIRY_TYPE = "INQUIRY_TYPE"; /* 询价单类型*/
public static final String COL_INQUIRY_PERSON = "INQUIRY_PERSON"; /* 询价单申请人*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_PRO_APPLY_STATUS = "PRO_APPLY_STATUS"; /* 申请状态*/
public static final String QUERY = "HPCG004.query";
public static final String COUNT = "HPCG004.count";
public static final String INSERT = "HPCG004.insert";
public static final String UPDATE = "HPCG004.update";
public static final String DELETE = "HPCG004.delete";
public static final String DELETE_FLAG = "HPCG004.deleteFlag";
public static final String UPDATE_PRO_APPLY_STATUS = "HPCG004.updateProApplyStatus";
private Long id = new Long(0); /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String inquiryDate = " "; /* 询价日期*/
private String inquiryNumber = " "; /* 询价单号*/
private String supplierName = " "; /* 供应商名称*/
private String inquiryType = " "; /* 询价单类型*/
private String inquiryPerson = " "; /* 询价单申请人*/
private Integer deleteFlag; /* 是否删除0.否1.是*/
private Integer proApplyStatus; /* 申请状态*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INQUIRY_DATE);
eiColumn.setDescName("询价日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INQUIRY_NUMBER);
eiColumn.setDescName("询价单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUPPLIER_NAME);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INQUIRY_TYPE);
eiColumn.setDescName("询价单类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INQUIRY_PERSON);
eiColumn.setDescName("询价单申请人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRO_APPLY_STATUS);
eiColumn.setDescName("申请状态");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCG004() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* 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 inquiryDate - 询价日期.
* @return the inquiryDate
*/
public String getInquiryDate() {
return this.inquiryDate;
}
/**
* set the inquiryDate - 询价日期.
*
* @param inquiryDate - 询价日期
*/
public void setInquiryDate(String inquiryDate) {
this.inquiryDate = inquiryDate;
}
/**
* get the inquiryNumber - 询价单号.
* @return the inquiryNumber
*/
public String getInquiryNumber() {
return this.inquiryNumber;
}
/**
* set the inquiryNumber - 询价单号.
*
* @param inquiryNumber - 询价单号
*/
public void setInquiryNumber(String inquiryNumber) {
this.inquiryNumber = inquiryNumber;
}
/**
* get the supplierName - 供应商名称.
* @return the supplierName
*/
public String getSupplierName() {
return this.supplierName;
}
/**
* set the supplierName - 供应商名称.
*
* @param supplierName - 供应商名称
*/
public void setSupplierName(String supplierName) {
this.supplierName = supplierName;
}
/**
* get the inquiryType - 询价单类型.
* @return the inquiryType
*/
public String getInquiryType() {
return this.inquiryType;
}
/**
* set the inquiryType - 询价单类型.
*
* @param inquiryType - 询价单类型
*/
public void setInquiryType(String inquiryType) {
this.inquiryType = inquiryType;
}
/**
* get the inquiryPerson - 询价单申请人.
* @return the inquiryPerson
*/
public String getInquiryPerson() {
return this.inquiryPerson;
}
/**
* set the inquiryPerson - 询价单申请人.
*
* @param inquiryPerson - 询价单申请人
*/
public void setInquiryPerson(String inquiryPerson) {
this.inquiryPerson = inquiryPerson;
}
/**
* 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 proApplyStatus - 申请状态.
* @return the proApplyStatus
*/
public Integer getProApplyStatus() {
return this.proApplyStatus;
}
/**
* set the proApplyStatus - 申请状态.
*
* @param proApplyStatus - 申请状态
*/
public void setProApplyStatus(Integer proApplyStatus) {
this.proApplyStatus = proApplyStatus;
}
/**
* 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));
setInquiryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INQUIRY_DATE)), inquiryDate));
setInquiryNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INQUIRY_NUMBER)), inquiryNumber));
setSupplierName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SUPPLIER_NAME)), supplierName));
setInquiryType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INQUIRY_TYPE)), inquiryType));
setInquiryPerson(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INQUIRY_PERSON)), inquiryPerson));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setProApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRO_APPLY_STATUS)), proApplyStatus));
}
/**
* 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_INQUIRY_DATE, StringUtils.toString(inquiryDate, eiMetadata.getMeta(FIELD_INQUIRY_DATE)));
map.put(FIELD_INQUIRY_NUMBER, StringUtils.toString(inquiryNumber, eiMetadata.getMeta(FIELD_INQUIRY_NUMBER)));
map.put(FIELD_SUPPLIER_NAME, StringUtils.toString(supplierName, eiMetadata.getMeta(FIELD_SUPPLIER_NAME)));
map.put(FIELD_INQUIRY_TYPE, StringUtils.toString(inquiryType, eiMetadata.getMeta(FIELD_INQUIRY_TYPE)));
map.put(FIELD_INQUIRY_PERSON, StringUtils.toString(inquiryPerson, eiMetadata.getMeta(FIELD_INQUIRY_PERSON)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_PRO_APPLY_STATUS, StringUtils.toString(proApplyStatus, eiMetadata.getMeta(FIELD_PRO_APPLY_STATUS)));
return map;
}
}
package com.baosight.hpjx.hp.cg.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:HPCG004A.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-27 8:18:33 create
*/
public class HPCG004A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_PRODUCT_CODE = "productCode"; /* 产品编码*/
public static final String FIELD_PRODUCT_NAME = "productName"; /* 产品名称*/
public static final String FIELD_SPECIFICATION = "specification"; /* 规格*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_QUANTITY = "quantity"; /* 数量*/
public static final String FIELD_UNIT_PRICE = "unitPrice"; /* 单价*/
public static final String FIELD_TAX_RATE = "taxRate"; /* 税率*/
public static final String FIELD_INVOICE_TYPE = "invoiceType"; /* 税率票据类型*/
public static final String FIELD_DISCOUNT = "discount"; /* 折扣*/
public static final String FIELD_DISCOUNTED_PRICE = "discountedPrice"; /* 折后单价*/
public static final String FIELD_TAX_INCLUSIVE_PRICE = "taxInclusivePrice"; /* 含税单价*/
public static final String FIELD_TAX_INCLUSIVE_DISCOUNTED_PRICE = "taxInclusiveDiscountedPrice"; /* 含税折后单价*/
public static final String FIELD_NON_TAX_AMOUNT = "nonTaxAmount"; /* 不含税金额*/
public static final String FIELD_TAX_AMOUNT = "taxAmount"; /* 税额*/
public static final String FIELD_TAX_INCLUSIVE_AMOUNT = "taxInclusiveAmount"; /* 含税金额*/
public static final String FIELD_DELIVERY_DATE = "deliveryDate"; /* 交货日期*/
public static final String FIELD_MIN_PURCHASE_QUANTITY = "minPurchaseQuantity"; /* 最小采购量*/
public static final String FIELD_DELETE_FLAG = "deleteFlag";
public static final String FIELD_T_HPJG004_ID= "tHpjg004Id";
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_PRODUCT_CODE = "PRODUCT_CODE"; /* 产品编码*/
public static final String COL_PRODUCT_NAME = "PRODUCT_NAME"; /* 产品名称*/
public static final String COL_SPECIFICATION = "SPECIFICATION"; /* 规格*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_QUANTITY = "QUANTITY"; /* 数量*/
public static final String COL_UNIT_PRICE = "UNIT_PRICE"; /* 单价*/
public static final String COL_TAX_RATE = "TAX_RATE"; /* 税率*/
public static final String COL_INVOICE_TYPE = "INVOICE_TYPE"; /* 税率票据类型*/
public static final String COL_DISCOUNT = "DISCOUNT"; /* 折扣*/
public static final String COL_DISCOUNTED_PRICE = "DISCOUNTED_PRICE"; /* 折后单价*/
public static final String COL_TAX_INCLUSIVE_PRICE = "TAX_INCLUSIVE_PRICE"; /* 含税单价*/
public static final String COL_TAX_INCLUSIVE_DISCOUNTED_PRICE = "TAX_INCLUSIVE_DISCOUNTED_PRICE"; /* 含税折后单价*/
public static final String COL_NON_TAX_AMOUNT = "NON_TAX_AMOUNT"; /* 不含税金额*/
public static final String COL_TAX_AMOUNT = "TAX_AMOUNT"; /* 税额*/
public static final String COL_TAX_INCLUSIVE_AMOUNT = "TAX_INCLUSIVE_AMOUNT"; /* 含税金额*/
public static final String COL_DELIVERY_DATE = "DELIVERY_DATE"; /* 交货日期*/
public static final String COL_MIN_PURCHASE_QUANTITY = "MIN_PURCHASE_QUANTITY"; /* 最小采购量*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_T_HPJG004_ID = "T_HPJG004_ID";
public static final String QUERY = "HPCG004A.query";
public static final String COUNT = "HPCG004A.count";
public static final String INSERT = "HPCG004A.insert";
public static final String UPDATE = "HPCG004A.update";
public static final String DELETE = "HPCG004A.delete";
public static final String DELETE_FLAG = "HPCG004A.deleteFlag";
private Long id = new Long(0); /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String productCode = " "; /* 产品编码*/
private String productName = " "; /* 产品名称*/
private String specification = " "; /* 规格*/
private String unit = " "; /* 单位*/
private BigDecimal quantity = new BigDecimal("0"); /* 数量*/
private BigDecimal unitPrice = new BigDecimal("0"); /* 单价*/
private BigDecimal taxRate = new BigDecimal("0"); /* 税率*/
private String invoiceType = " "; /* 税率票据类型*/
private BigDecimal discount = new BigDecimal("0"); /* 折扣*/
private BigDecimal discountedPrice = new BigDecimal("0"); /* 折后单价*/
private BigDecimal taxInclusivePrice = new BigDecimal("0"); /* 含税单价*/
private BigDecimal taxInclusiveDiscountedPrice = new BigDecimal("0"); /* 含税折后单价*/
private BigDecimal nonTaxAmount = new BigDecimal("0"); /* 不含税金额*/
private BigDecimal taxAmount = new BigDecimal("0"); /* 税额*/
private BigDecimal taxInclusiveAmount = new BigDecimal("0"); /* 含税金额*/
private String deliveryDate = " "; /* 交货日期*/
private Integer minPurchaseQuantity = new Integer(0); /* 最小采购量*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Long tHpjg004Id = new Long(0);
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_T_HPJG004_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主表ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_CODE);
eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_NAME);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPECIFICATION);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_RATE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(5);
eiColumn.setDescName("税率");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_TYPE);
eiColumn.setDescName("税率票据类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DISCOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(5);
eiColumn.setDescName("折扣");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DISCOUNTED_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("折后单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_INCLUSIVE_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("含税单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_INCLUSIVE_DISCOUNTED_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("含税折后单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NON_TAX_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("不含税金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("税额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_INCLUSIVE_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("含税金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELIVERY_DATE);
eiColumn.setDescName("交货日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MIN_PURCHASE_QUANTITY);
eiColumn.setDescName("最小采购量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCG004A() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* 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 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 specification - 规格.
* @return the specification
*/
public String getSpecification() {
return this.specification;
}
/**
* set the specification - 规格.
*
* @param specification - 规格
*/
public void setSpecification(String specification) {
this.specification = specification;
}
/**
* get the unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* 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 unitPrice - 单价.
* @return the unitPrice
*/
public BigDecimal getUnitPrice() {
return this.unitPrice;
}
/**
* set the unitPrice - 单价.
*
* @param unitPrice - 单价
*/
public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice;
}
/**
* get the taxRate - 税率.
* @return the taxRate
*/
public BigDecimal getTaxRate() {
return this.taxRate;
}
/**
* set the taxRate - 税率.
*
* @param taxRate - 税率
*/
public void setTaxRate(BigDecimal taxRate) {
this.taxRate = taxRate;
}
/**
* get the invoiceType - 税率票据类型.
* @return the invoiceType
*/
public String getInvoiceType() {
return this.invoiceType;
}
/**
* set the invoiceType - 税率票据类型.
*
* @param invoiceType - 税率票据类型
*/
public void setInvoiceType(String invoiceType) {
this.invoiceType = invoiceType;
}
/**
* get the discount - 折扣.
* @return the discount
*/
public BigDecimal getDiscount() {
return this.discount;
}
/**
* set the discount - 折扣.
*
* @param discount - 折扣
*/
public void setDiscount(BigDecimal discount) {
this.discount = discount;
}
/**
* get the discountedPrice - 折后单价.
* @return the discountedPrice
*/
public BigDecimal getDiscountedPrice() {
return this.discountedPrice;
}
/**
* set the discountedPrice - 折后单价.
*
* @param discountedPrice - 折后单价
*/
public void setDiscountedPrice(BigDecimal discountedPrice) {
this.discountedPrice = discountedPrice;
}
/**
* get the taxInclusivePrice - 含税单价.
* @return the taxInclusivePrice
*/
public BigDecimal getTaxInclusivePrice() {
return this.taxInclusivePrice;
}
/**
* set the taxInclusivePrice - 含税单价.
*
* @param taxInclusivePrice - 含税单价
*/
public void setTaxInclusivePrice(BigDecimal taxInclusivePrice) {
this.taxInclusivePrice = taxInclusivePrice;
}
/**
* get the taxInclusiveDiscountedPrice - 含税折后单价.
* @return the taxInclusiveDiscountedPrice
*/
public BigDecimal getTaxInclusiveDiscountedPrice() {
return this.taxInclusiveDiscountedPrice;
}
/**
* set the taxInclusiveDiscountedPrice - 含税折后单价.
*
* @param taxInclusiveDiscountedPrice - 含税折后单价
*/
public void setTaxInclusiveDiscountedPrice(BigDecimal taxInclusiveDiscountedPrice) {
this.taxInclusiveDiscountedPrice = taxInclusiveDiscountedPrice;
}
/**
* get the nonTaxAmount - 不含税金额.
* @return the nonTaxAmount
*/
public BigDecimal getNonTaxAmount() {
return this.nonTaxAmount;
}
/**
* set the nonTaxAmount - 不含税金额.
*
* @param nonTaxAmount - 不含税金额
*/
public void setNonTaxAmount(BigDecimal nonTaxAmount) {
this.nonTaxAmount = nonTaxAmount;
}
/**
* get the taxAmount - 税额.
* @return the taxAmount
*/
public BigDecimal getTaxAmount() {
return this.taxAmount;
}
/**
* set the taxAmount - 税额.
*
* @param taxAmount - 税额
*/
public void setTaxAmount(BigDecimal taxAmount) {
this.taxAmount = taxAmount;
}
/**
* get the taxInclusiveAmount - 含税金额.
* @return the taxInclusiveAmount
*/
public BigDecimal getTaxInclusiveAmount() {
return this.taxInclusiveAmount;
}
/**
* set the taxInclusiveAmount - 含税金额.
*
* @param taxInclusiveAmount - 含税金额
*/
public void setTaxInclusiveAmount(BigDecimal taxInclusiveAmount) {
this.taxInclusiveAmount = taxInclusiveAmount;
}
/**
* get the deliveryDate - 交货日期.
* @return the deliveryDate
*/
public String getDeliveryDate() {
return this.deliveryDate;
}
/**
* set the deliveryDate - 交货日期.
*
* @param deliveryDate - 交货日期
*/
public void setDeliveryDate(String deliveryDate) {
this.deliveryDate = deliveryDate;
}
/**
* get the minPurchaseQuantity - 最小采购量.
* @return the minPurchaseQuantity
*/
public Integer getMinPurchaseQuantity() {
return this.minPurchaseQuantity;
}
/**
* set the minPurchaseQuantity - 最小采购量.
*
* @param minPurchaseQuantity - 最小采购量
*/
public void setMinPurchaseQuantity(Integer minPurchaseQuantity) {
this.minPurchaseQuantity = minPurchaseQuantity;
}
/**
* 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 Long gettHpjg004Id() {
return tHpjg004Id;
}
public void settHpjg004Id(Long tHpjg004Id) {
this.tHpjg004Id = tHpjg004Id;
}
/**
* 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));
setProductCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_CODE)), productCode));
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_NAME)), productName));
setSpecification(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPECIFICATION)), specification));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setUnitPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_PRICE)), unitPrice));
setTaxRate(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_RATE)), taxRate));
setInvoiceType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVOICE_TYPE)), invoiceType));
setDiscount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DISCOUNT)), discount));
setDiscountedPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DISCOUNTED_PRICE)), discountedPrice));
setTaxInclusivePrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_INCLUSIVE_PRICE)), taxInclusivePrice));
setTaxInclusiveDiscountedPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_INCLUSIVE_DISCOUNTED_PRICE)), taxInclusiveDiscountedPrice));
setNonTaxAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NON_TAX_AMOUNT)), nonTaxAmount));
setTaxAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_AMOUNT)), taxAmount));
setTaxInclusiveAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_INCLUSIVE_AMOUNT)), taxInclusiveAmount));
setDeliveryDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_DATE)), deliveryDate));
setMinPurchaseQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_MIN_PURCHASE_QUANTITY)), minPurchaseQuantity));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
settHpjg004Id(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_T_HPJG004_ID)), tHpjg004Id));
}
/**
* 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_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_SPECIFICATION, StringUtils.toString(specification, eiMetadata.getMeta(FIELD_SPECIFICATION)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_UNIT_PRICE, StringUtils.toString(unitPrice, eiMetadata.getMeta(FIELD_UNIT_PRICE)));
map.put(FIELD_TAX_RATE, StringUtils.toString(taxRate, eiMetadata.getMeta(FIELD_TAX_RATE)));
map.put(FIELD_INVOICE_TYPE, StringUtils.toString(invoiceType, eiMetadata.getMeta(FIELD_INVOICE_TYPE)));
map.put(FIELD_DISCOUNT, StringUtils.toString(discount, eiMetadata.getMeta(FIELD_DISCOUNT)));
map.put(FIELD_DISCOUNTED_PRICE, StringUtils.toString(discountedPrice, eiMetadata.getMeta(FIELD_DISCOUNTED_PRICE)));
map.put(FIELD_TAX_INCLUSIVE_PRICE, StringUtils.toString(taxInclusivePrice, eiMetadata.getMeta(FIELD_TAX_INCLUSIVE_PRICE)));
map.put(FIELD_TAX_INCLUSIVE_DISCOUNTED_PRICE, StringUtils.toString(taxInclusiveDiscountedPrice, eiMetadata.getMeta(FIELD_TAX_INCLUSIVE_DISCOUNTED_PRICE)));
map.put(FIELD_NON_TAX_AMOUNT, StringUtils.toString(nonTaxAmount, eiMetadata.getMeta(FIELD_NON_TAX_AMOUNT)));
map.put(FIELD_TAX_AMOUNT, StringUtils.toString(taxAmount, eiMetadata.getMeta(FIELD_TAX_AMOUNT)));
map.put(FIELD_TAX_INCLUSIVE_AMOUNT, StringUtils.toString(taxInclusiveAmount, eiMetadata.getMeta(FIELD_TAX_INCLUSIVE_AMOUNT)));
map.put(FIELD_DELIVERY_DATE, StringUtils.toString(deliveryDate, eiMetadata.getMeta(FIELD_DELIVERY_DATE)));
map.put(FIELD_MIN_PURCHASE_QUANTITY, StringUtils.toString(minPurchaseQuantity, eiMetadata.getMeta(FIELD_MIN_PURCHASE_QUANTITY)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_T_HPJG004_ID, StringUtils.toString(tHpjg004Id, eiMetadata.getMeta(FIELD_T_HPJG004_ID)));
return map;
}
}
package com.baosight.hpjx.hp.cg.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.cg.domain.HPCG004;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHPCG004 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPCG004.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPCG004.QUERY, new HPCG004());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "询价管理",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPCG004 hpcg004 = new HPCG004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpcg004.fromMap(map);
hpcg004.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPCG004.DELETE_FLAG, hpcg004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "询价管理",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPCG004 hpcg004 = new HPCG004();
hpcg004.fromMap(resultRow);
if (hpcg004.getId() == null || hpcg004.getId() == 0) {
hpcg004.setDeleteFlag(CommonConstant.YesNo.NO_0);
this.add(hpcg004);
} else {
this.modify(hpcg004);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPCG004 hpcg004) {
this.setBaseInfo(hpcg004);
//生成采购询价单号
hpcg004.setInquiryNumber(SequenceGenerator.getNextSequence(HPConstant.SequenceId.INQUIRY_NUMBER));
DaoUtils.insert(HPCG004.INSERT, hpcg004);
}
/**
* 设置基础信息
*
* @param hpcg004
*/
private void setBaseInfo(HPCG004 hpcg004) {
// 去除日期字符串中的-
hpcg004.setInquiryDate(StringUtil.removeHorizontalLine(hpcg004.getInquiryDate()));
}
/**
* 修改操作
*/
public void modify(HPCG004 hpcg004) {
DaoUtils.update(HPCG004.UPDATE, hpcg004);
}
@OperationLogAnnotation(operModul = "询价管理",operType = "提交",operDesc = "提交审批操作")
public EiInfo approve(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCG004 hpcg004 = new HPCG004();
hpcg004.fromMap(resultRow);
hpcg004.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPCG004.UPDATE_PRO_APPLY_STATUS,hpcg004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("提交失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cg.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.cg.domain.HPCG004;
import com.baosight.hpjx.hp.cg.domain.HPCG004A;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.xt.domain.HPXT002A;
import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHPCG004A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPCG004A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPCG004A.QUERY, new HPCG004A());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "询价管理详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPCG004A hpcg004a = new HPCG004A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpcg004a.fromMap(map);
hpcg004a.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPCG004A.DELETE_FLAG, hpcg004a);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "询价管理详情详情",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPCG004A hpcg004a = new HPCG004A();
hpcg004a.fromMap(resultRow);
if (hpcg004a.getId() == null || hpcg004a.getId() == 0) {
String tHpjg004Id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPCG004A.FIELD_T_HPJG004_ID);
hpcg004a.settHpjg004Id(Long.valueOf(tHpjg004Id));
this.add(hpcg004a);
} else {
this.modify(hpcg004a);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPCG004A hpcg004a) {
this.setBaseInfo(hpcg004a);
//生成采购询价单号
DaoUtils.insert(HPCG004A.INSERT, hpcg004a);
}
/**
* 设置基础信息
*
* @param hpcg004a
*/
private void setBaseInfo(HPCG004A hpcg004a) {
// 去除日期字符串中的-
hpcg004a.setDeliveryDate(StringUtil.removeHorizontalLine(hpcg004a.getDeliveryDate()));
}
/**
* 修改操作
*/
public void modify(HPCG004A hpcg004a) {
DaoUtils.update(HPCG004A.UPDATE, hpcg004a);
}
}
<?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 14:04:00
Version : 1.0
schema : hpjx
tableName : T_HPCG004
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
INQUIRY_DATE VARCHAR,
INQUIRY_NUMBER VARCHAR,
SUPPLIER_NAME VARCHAR,
INQUIRY_TYPE VARCHAR,
INQUIRY_PERSON VARCHAR,
DELETE_FLAG TINYINT,
PRO_APPLY_STATUS TINYINT
-->
<sqlMap namespace="HPCG004">
<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="inquiryDate">
INQUIRY_DATE = #inquiryDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryNumber">
INQUIRY_NUMBER = #inquiryNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplierName">
SUPPLIER_NAME = #supplierName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryType">
INQUIRY_TYPE = #inquiryType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryPerson">
INQUIRY_PERSON = #inquiryPerson#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
CREATED_TIME &gt;= REPLACE(#createdDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
CREATED_TIME &lt;= REPLACE(#createdDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.cg.domain.HPCG004">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
INQUIRY_DATE as "inquiryDate", <!-- 询价日期 -->
INQUIRY_NUMBER as "inquiryNumber", <!-- 询价单号 -->
SUPPLIER_NAME as "supplierName", <!-- 供应商名称 -->
INQUIRY_TYPE as "inquiryType", <!-- 询价单类型 -->
INQUIRY_PERSON as "inquiryPerson", <!-- 询价单申请人 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS as "proApplyStatus" <!-- 申请状态 -->
FROM ${hpjxSchema}.T_HPCG004 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_HPCG004 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="inquiryDate">
INQUIRY_DATE = #inquiryDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryNumber">
INQUIRY_NUMBER = #inquiryNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplierName">
SUPPLIER_NAME = #supplierName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryType">
INQUIRY_TYPE = #inquiryType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryPerson">
INQUIRY_PERSON = #inquiryPerson#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCG004 (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
INQUIRY_DATE, <!-- 询价日期 -->
INQUIRY_NUMBER, <!-- 询价单号 -->
SUPPLIER_NAME, <!-- 供应商名称 -->
INQUIRY_TYPE, <!-- 询价单类型 -->
INQUIRY_PERSON, <!-- 询价单申请人 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS <!-- 申请状态 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #inquiryDate#, #inquiryNumber#, #supplierName#, #inquiryType#, #inquiryPerson#, #deleteFlag#, #proApplyStatus#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCG004 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPCG004
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<!--修改提交状态-->
<update id="updateProApplyStatus">
UPDATE ${hpjxSchema}.T_HPCG004
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
PRO_APPLY_STATUS = #proApplyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCG004
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#, <!-- 更新时间 -->
INQUIRY_DATE = #inquiryDate#, <!-- 询价日期 -->
INQUIRY_NUMBER = #inquiryNumber#, <!-- 询价单号 -->
SUPPLIER_NAME = #supplierName#, <!-- 供应商名称 -->
INQUIRY_TYPE = #inquiryType#, <!-- 询价单类型 -->
INQUIRY_PERSON = #inquiryPerson#, <!-- 询价单申请人 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS = #proApplyStatus# <!-- 申请状态 -->
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 8:18:33
Version : 1.0
schema : hpjx
tableName : T_HPCG004A
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
PRODUCT_CODE VARCHAR,
PRODUCT_NAME VARCHAR,
SPECIFICATION VARCHAR,
UNIT VARCHAR,
QUANTITY DECIMAL,
UNIT_PRICE DECIMAL,
TAX_RATE DECIMAL,
INVOICE_TYPE VARCHAR,
DISCOUNT DECIMAL,
DISCOUNTED_PRICE DECIMAL,
TAX_INCLUSIVE_PRICE DECIMAL,
TAX_INCLUSIVE_DISCOUNTED_PRICE DECIMAL,
NON_TAX_AMOUNT DECIMAL,
TAX_AMOUNT DECIMAL,
TAX_INCLUSIVE_AMOUNT DECIMAL,
DELIVERY_DATE VARCHAR,
MIN_PURCHASE_QUANTITY INTEGER,
DELETE_FLAG TINYINT
-->
<sqlMap namespace="HPCG004A">
<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="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specification">
SPECIFICATION = #specification#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitPrice">
UNIT_PRICE = #unitPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxRate">
TAX_RATE = #taxRate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invoiceType">
INVOICE_TYPE = #invoiceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="discount">
DISCOUNT = #discount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="discountedPrice">
DISCOUNTED_PRICE = #discountedPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxInclusivePrice">
TAX_INCLUSIVE_PRICE = #taxInclusivePrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxInclusiveDiscountedPrice">
TAX_INCLUSIVE_DISCOUNTED_PRICE = #taxInclusiveDiscountedPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="nonTaxAmount">
NON_TAX_AMOUNT = #nonTaxAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxAmount">
TAX_AMOUNT = #taxAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxInclusiveAmount">
TAX_INCLUSIVE_AMOUNT = #taxInclusiveAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryDate">
DELIVERY_DATE = #deliveryDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="minPurchaseQuantity">
MIN_PURCHASE_QUANTITY = #minPurchaseQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tHpjg004Id">
T_HPJG004_ID = #tHpjg004Id#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.cg.domain.HPCG004A">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
PRODUCT_CODE as "productCode", <!-- 产品编码 -->
PRODUCT_NAME as "productName", <!-- 产品名称 -->
SPECIFICATION as "specification", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
UNIT_PRICE as "unitPrice", <!-- 单价 -->
TAX_RATE as "taxRate", <!-- 税率 -->
INVOICE_TYPE as "invoiceType", <!-- 税率票据类型 -->
DISCOUNT as "discount", <!-- 折扣 -->
DISCOUNTED_PRICE as "discountedPrice", <!-- 折后单价 -->
TAX_INCLUSIVE_PRICE as "taxInclusivePrice", <!-- 含税单价 -->
TAX_INCLUSIVE_DISCOUNTED_PRICE as "taxInclusiveDiscountedPrice", <!-- 含税折后单价 -->
NON_TAX_AMOUNT as "nonTaxAmount", <!-- 不含税金额 -->
TAX_AMOUNT as "taxAmount", <!-- 税额 -->
TAX_INCLUSIVE_AMOUNT as "taxInclusiveAmount", <!-- 含税金额 -->
DELIVERY_DATE as "deliveryDate", <!-- 交货日期 -->
MIN_PURCHASE_QUANTITY as "minPurchaseQuantity", <!-- 最小采购量 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
T_HPJG004_ID as "tHpjg004Id"
FROM ${hpjxSchema}.T_HPCG004A 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_HPCG004A 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="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specification">
SPECIFICATION = #specification#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitPrice">
UNIT_PRICE = #unitPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxRate">
TAX_RATE = #taxRate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invoiceType">
INVOICE_TYPE = #invoiceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="discount">
DISCOUNT = #discount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="discountedPrice">
DISCOUNTED_PRICE = #discountedPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxInclusivePrice">
TAX_INCLUSIVE_PRICE = #taxInclusivePrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxInclusiveDiscountedPrice">
TAX_INCLUSIVE_DISCOUNTED_PRICE = #taxInclusiveDiscountedPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="nonTaxAmount">
NON_TAX_AMOUNT = #nonTaxAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxAmount">
TAX_AMOUNT = #taxAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxInclusiveAmount">
TAX_INCLUSIVE_AMOUNT = #taxInclusiveAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryDate">
DELIVERY_DATE = #deliveryDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="minPurchaseQuantity">
MIN_PURCHASE_QUANTITY = #minPurchaseQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCG004A (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
PRODUCT_CODE, <!-- 产品编码 -->
PRODUCT_NAME, <!-- 产品名称 -->
SPECIFICATION, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
UNIT_PRICE, <!-- 单价 -->
TAX_RATE, <!-- 税率 -->
INVOICE_TYPE, <!-- 税率票据类型 -->
DISCOUNT, <!-- 折扣 -->
DISCOUNTED_PRICE, <!-- 折后单价 -->
TAX_INCLUSIVE_PRICE, <!-- 含税单价 -->
TAX_INCLUSIVE_DISCOUNTED_PRICE, <!-- 含税折后单价 -->
NON_TAX_AMOUNT, <!-- 不含税金额 -->
TAX_AMOUNT, <!-- 税额 -->
TAX_INCLUSIVE_AMOUNT, <!-- 含税金额 -->
DELIVERY_DATE, <!-- 交货日期 -->
MIN_PURCHASE_QUANTITY, <!-- 最小采购量 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
T_HPJG004_ID
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #productCode#, #productName#, #specification#, #unit#, #quantity#, #unitPrice#, #taxRate#, #invoiceType#, #discount#, #discountedPrice#, #taxInclusivePrice#, #taxInclusiveDiscountedPrice#, #nonTaxAmount#, #taxAmount#, #taxInclusiveAmount#, #deliveryDate#, #minPurchaseQuantity#, #deleteFlag#, #tHpjg004Id#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCG004A WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPCG004A
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCG004A
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#, <!-- 更新时间 -->
PRODUCT_CODE = #productCode#, <!-- 产品编码 -->
PRODUCT_NAME = #productName#, <!-- 产品名称 -->
SPECIFICATION = #specification#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
QUANTITY = #quantity#, <!-- 数量 -->
UNIT_PRICE = #unitPrice#, <!-- 单价 -->
TAX_RATE = #taxRate#, <!-- 税率 -->
INVOICE_TYPE = #invoiceType#, <!-- 税率票据类型 -->
DISCOUNT = #discount#, <!-- 折扣 -->
DISCOUNTED_PRICE = #discountedPrice#, <!-- 折后单价 -->
TAX_INCLUSIVE_PRICE = #taxInclusivePrice#, <!-- 含税单价 -->
TAX_INCLUSIVE_DISCOUNTED_PRICE = #taxInclusiveDiscountedPrice#, <!-- 含税折后单价 -->
NON_TAX_AMOUNT = #nonTaxAmount#, <!-- 不含税金额 -->
TAX_AMOUNT = #taxAmount#, <!-- 税额 -->
TAX_INCLUSIVE_AMOUNT = #taxInclusiveAmount#, <!-- 含税金额 -->
DELIVERY_DATE = #deliveryDate#, <!-- 交货日期 -->
MIN_PURCHASE_QUANTITY = #minPurchaseQuantity#, <!-- 最小采购量 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -99,6 +99,9 @@ public class HPConstant {
public static final String WD_FILE_ID = "WD_FILE_ID";
// 售后单号
public static final String AFTER_SALE_NO = "AFTER_SALE_NO";
//车辆申请单号
public static final String VEHICLE_APPLY_NO = "VEHICLE_APPLY_NO";
// 客户关怀单号
public static final String CARE_NO = "CARE_NO";
// 回访单号
......@@ -109,6 +112,8 @@ public class HPConstant {
public static final String SUGGEST_NO = "SUGGEST_NO";
// 公告号
public static final String NOTICE_NO = "NOTICE_NO";
//询价单号
public static final String INQUIRY_NUMBER = "INQUIRY_NUMBER";
}
/**
......
package com.baosight.hpjx.hp.xt.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:THpxt001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-25 14:00:57 create
*/
public class HPXT001 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_APPLY_DATE = "applyDate"; /* 申请日期*/
public static final String FIELD_APPLY_NO = "applyNo"; /* 申请单号*/
public static final String FIELD_APPLY_PERSONNEL = "applyPersonnel"; /* 申请人*/
public static final String FIELD_LICENSE_PLATE_CODE = "licensePlateCode"; /* 车牌号*/
public static final String FIELD_DRIVER = "driver"; /* 司机*/
public static final String FIELD_START_TIME = "startTime"; /* 开始时间*/
public static final String FIELD_END_TIME = "endTime"; /* 结束时间*/
public static final String FIELD_DESTINATION = "destination"; /* 目的地*/
public static final String FIELD_MILEAGE = "mileage"; /* 里程*/
public static final String FIELD_REASON = "reason"; /* 事由*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_PRO_APPLY_STATUS = "proApplyStatus"; /* 审批状态 0-未提交 1-已提交*/
public static final String FIELD_STATUS = "status"; /* 返还状态 0-未返还 1-已返还*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_APPLY_DATE = "APPLY_DATE"; /* 申请日期*/
public static final String COL_APPLY_NO = "APPLY_NO"; /* 申请单号*/
public static final String COL_APPLY_PERSONNEL = "APPLY_PERSONNEL"; /* 申请人*/
public static final String COL_LICENSE_PLATE_CODE = "LICENSE_PLATE_CODE"; /* 车牌号*/
public static final String COL_DRIVER = "DRIVER"; /* 司机*/
public static final String COL_START_TIME = "START_TIME"; /* 开始时间*/
public static final String COL_END_TIME = "END_TIME"; /* 结束时间*/
public static final String COL_DESTINATION = "DESTINATION"; /* 目的地*/
public static final String COL_MILEAGE = "MILEAGE"; /* 里程*/
public static final String COL_REASON = "REASON"; /* 事由*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_PRO_APPLY_STATUS = "PRO_APPLY_STATUS"; /* 审批状态 0-未提交 1-已提交*/
public static final String COL_STATUS = "STATUS"; /* 返还状态 0-未返还 1-已返还*/
public static final String QUERY = "HPXT001.query";
public static final String COUNT = "HPXT001.count";
public static final String INSERT = "HPXT001.insert";
public static final String UPDATE = "HPXT001.update";
public static final String DELETE = "HPXT001.delete";
public static final String DELETE_FLAG = "HPXT001.deleteFlag";
public static final String UPDATE_STATUS = "HPXT001.updateStatus";
public static final String UPDATE_PRO_APPLY_STATUS = "HPXT001.updateProApplyStatus";
private Long id = new Long(0); /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String applyDate = " "; /* 申请日期*/
private String applyNo = " "; /* 申请单号*/
private String applyPersonnel = " "; /* 申请人*/
private String licensePlateCode = " "; /* 车牌号*/
private String driver = " "; /* 司机*/
private String startTime = " "; /* 开始时间*/
private String endTime = " "; /* 结束时间*/
private String destination = " "; /* 目的地*/
private BigDecimal mileage = new BigDecimal("0"); /* 里程*/
private String reason = " "; /* 事由*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer proApplyStatus = 0; /* 审批状态 0-未提交 1-已提交*/
private Integer status = 0; /* 返还状态 0-未返还 1-已返还*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_DATE);
eiColumn.setDescName("申请日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_NO);
eiColumn.setDescName("申请单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_PERSONNEL);
eiColumn.setDescName("申请人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LICENSE_PLATE_CODE);
eiColumn.setDescName("车牌号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DRIVER);
eiColumn.setDescName("司机");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_START_TIME);
eiColumn.setDescName("开始时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_END_TIME);
eiColumn.setDescName("结束时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DESTINATION);
eiColumn.setDescName("目的地");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MILEAGE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("里程");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REASON);
eiColumn.setDescName("事由");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRO_APPLY_STATUS);
eiColumn.setDescName("审批状态 0-未提交 1-已提交");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("返还状态 0-未返还 1-已返还");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPXT001() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* 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 applyDate - 申请日期.
* @return the applyDate
*/
public String getApplyDate() {
return this.applyDate;
}
/**
* set the applyDate - 申请日期.
*
* @param applyDate - 申请日期
*/
public void setApplyDate(String applyDate) {
this.applyDate = applyDate;
}
/**
* get the applyNo - 申请单号.
* @return the applyNo
*/
public String getApplyNo() {
return this.applyNo;
}
/**
* set the applyNo - 申请单号.
*
* @param applyNo - 申请单号
*/
public void setApplyNo(String applyNo) {
this.applyNo = applyNo;
}
/**
* get the applyPersonnel - 申请人.
* @return the applyPersonnel
*/
public String getApplyPersonnel() {
return this.applyPersonnel;
}
/**
* set the applyPersonnel - 申请人.
*
* @param applyPersonnel - 申请人
*/
public void setApplyPersonnel(String applyPersonnel) {
this.applyPersonnel = applyPersonnel;
}
/**
* get the licensePlateCode - 车牌号.
* @return the licensePlateCode
*/
public String getLicensePlateCode() {
return this.licensePlateCode;
}
/**
* set the licensePlateCode - 车牌号.
*
* @param licensePlateCode - 车牌号
*/
public void setLicensePlateCode(String licensePlateCode) {
this.licensePlateCode = licensePlateCode;
}
/**
* get the driver - 司机.
* @return the driver
*/
public String getDriver() {
return this.driver;
}
/**
* set the driver - 司机.
*
* @param driver - 司机
*/
public void setDriver(String driver) {
this.driver = driver;
}
/**
* get the startTime - 开始时间.
* @return the startTime
*/
public String getStartTime() {
return this.startTime;
}
/**
* set the startTime - 开始时间.
*
* @param startTime - 开始时间
*/
public void setStartTime(String startTime) {
this.startTime = startTime;
}
/**
* get the endTime - 结束时间.
* @return the endTime
*/
public String getEndTime() {
return this.endTime;
}
/**
* set the endTime - 结束时间.
*
* @param endTime - 结束时间
*/
public void setEndTime(String endTime) {
this.endTime = endTime;
}
/**
* get the destination - 目的地.
* @return the destination
*/
public String getDestination() {
return this.destination;
}
/**
* set the destination - 目的地.
*
* @param destination - 目的地
*/
public void setDestination(String destination) {
this.destination = destination;
}
/**
* get the mileage - 里程.
* @return the mileage
*/
public BigDecimal getMileage() {
return this.mileage;
}
/**
* set the mileage - 里程.
*
* @param mileage - 里程
*/
public void setMileage(BigDecimal mileage) {
this.mileage = mileage;
}
/**
* get the reason - 事由.
* @return the reason
*/
public String getReason() {
return this.reason;
}
/**
* set the reason - 事由.
*
* @param reason - 事由
*/
public void setReason(String reason) {
this.reason = reason;
}
/**
* 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 proApplyStatus - 审批状态 0-未提交 1-已提交.
* @return the proApplyStatus
*/
public Integer getProApplyStatus() {
return this.proApplyStatus;
}
/**
* set the proApplyStatus - 审批状态 0-未提交 1-已提交.
*
* @param proApplyStatus - 审批状态 0-未提交 1-已提交
*/
public void setProApplyStatus(Integer proApplyStatus) {
this.proApplyStatus = proApplyStatus;
}
/**
* get the status - 返还状态 0-未返还 1-已返还.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 返还状态 0-未返还 1-已返还.
*
* @param status - 返还状态 0-未返还 1-已返还
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 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));
setApplyDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_DATE)), applyDate));
setApplyNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_NO)), applyNo));
setApplyPersonnel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_PERSONNEL)), applyPersonnel));
setLicensePlateCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE_CODE)), licensePlateCode));
setDriver(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DRIVER)), driver));
setStartTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_START_TIME)), startTime));
setEndTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_END_TIME)), endTime));
setDestination(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DESTINATION)), destination));
setMileage(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_MILEAGE)), mileage));
setReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REASON)), reason));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setProApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRO_APPLY_STATUS)), proApplyStatus));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
/**
* 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_APPLY_DATE, StringUtils.toString(applyDate, eiMetadata.getMeta(FIELD_APPLY_DATE)));
map.put(FIELD_APPLY_NO, StringUtils.toString(applyNo, eiMetadata.getMeta(FIELD_APPLY_NO)));
map.put(FIELD_APPLY_PERSONNEL, StringUtils.toString(applyPersonnel, eiMetadata.getMeta(FIELD_APPLY_PERSONNEL)));
map.put(FIELD_LICENSE_PLATE_CODE, StringUtils.toString(licensePlateCode, eiMetadata.getMeta(FIELD_LICENSE_PLATE_CODE)));
map.put(FIELD_DRIVER, StringUtils.toString(driver, eiMetadata.getMeta(FIELD_DRIVER)));
map.put(FIELD_START_TIME, StringUtils.toString(startTime, eiMetadata.getMeta(FIELD_START_TIME)));
map.put(FIELD_END_TIME, StringUtils.toString(endTime, eiMetadata.getMeta(FIELD_END_TIME)));
map.put(FIELD_DESTINATION, StringUtils.toString(destination, eiMetadata.getMeta(FIELD_DESTINATION)));
map.put(FIELD_MILEAGE, StringUtils.toString(mileage, eiMetadata.getMeta(FIELD_MILEAGE)));
map.put(FIELD_REASON, StringUtils.toString(reason, eiMetadata.getMeta(FIELD_REASON)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_PRO_APPLY_STATUS, StringUtils.toString(proApplyStatus, eiMetadata.getMeta(FIELD_PRO_APPLY_STATUS)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hpjx.hp.xt.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:THpxt002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-26 13:10:36 create
*/
public class HPXT002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_APPLY_DATE = "applyDate"; /* 申请日期*/
public static final String FIELD_APPLY_NO = "applyNo"; /* 保险单号*/
public static final String FIELD_APPLY_PERSONNEL = "applyPersonnel"; /* 申请人*/
public static final String FIELD_LICENSE_PLATE_CODE = "licensePlateCode"; /* 车牌号*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_APPLY_STATUS = "applyStatus"; /* 申请状态*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_APPLY_DATE = "APPLY_DATE"; /* 申请日期*/
public static final String COL_APPLY_NO = "APPLY_NO"; /* 保险单号*/
public static final String COL_APPLY_PERSONNEL = "APPLY_PERSONNEL"; /* 申请人*/
public static final String COL_LICENSE_PLATE_CODE = "LICENSE_PLATE_CODE"; /* 车牌号*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_APPLY_STATUS = "APPLY_STATUS"; /* 申请状态*/
public static final String QUERY = "HPXT002.query";
public static final String COUNT = "HPXT002.count";
public static final String INSERT = "HPXT002.insert";
public static final String UPDATE = "HPXT002.update";
public static final String DELETE = "HPXT002.delete";
public static final String DELETE_FLAG = "HPXT002.deleteFlag";
private Long id = new Long(0); /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String applyDate = " "; /* 申请日期*/
private String applyNo = " "; /* 保险单号*/
private String applyPersonnel = " "; /* 申请人*/
private String licensePlateCode = " "; /* 车牌号*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer applyStatus = 0; /* 申请状态*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_DATE);
eiColumn.setDescName("申请日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_NO);
eiColumn.setDescName("保险单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_PERSONNEL);
eiColumn.setDescName("申请人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LICENSE_PLATE_CODE);
eiColumn.setDescName("车牌号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_STATUS);
eiColumn.setDescName("申请状态");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPXT002() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* 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 applyDate - 申请日期.
* @return the applyDate
*/
public String getApplyDate() {
return this.applyDate;
}
/**
* set the applyDate - 申请日期.
*
* @param applyDate - 申请日期
*/
public void setApplyDate(String applyDate) {
this.applyDate = applyDate;
}
/**
* get the applyNo - 保险单号.
* @return the applyNo
*/
public String getApplyNo() {
return this.applyNo;
}
/**
* set the applyNo - 保险单号.
*
* @param applyNo - 保险单号
*/
public void setApplyNo(String applyNo) {
this.applyNo = applyNo;
}
/**
* get the applyPersonnel - 申请人.
* @return the applyPersonnel
*/
public String getApplyPersonnel() {
return this.applyPersonnel;
}
/**
* set the applyPersonnel - 申请人.
*
* @param applyPersonnel - 申请人
*/
public void setApplyPersonnel(String applyPersonnel) {
this.applyPersonnel = applyPersonnel;
}
/**
* get the licensePlateCode - 车牌号.
* @return the licensePlateCode
*/
public String getLicensePlateCode() {
return this.licensePlateCode;
}
/**
* set the licensePlateCode - 车牌号.
*
* @param licensePlateCode - 车牌号
*/
public void setLicensePlateCode(String licensePlateCode) {
this.licensePlateCode = licensePlateCode;
}
/**
* 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 applyStatus - 申请状态.
* @return the applyStatus
*/
public Integer getApplyStatus() {
return this.applyStatus;
}
/**
* set the applyStatus - 申请状态.
*
* @param applyStatus - 申请状态
*/
public void setApplyStatus(Integer applyStatus) {
this.applyStatus = applyStatus;
}
/**
* 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));
setApplyDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_DATE)), applyDate));
setApplyNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_NO)), applyNo));
setApplyPersonnel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_PERSONNEL)), applyPersonnel));
setLicensePlateCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE_CODE)), licensePlateCode));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_APPLY_STATUS)), applyStatus));
}
/**
* 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_APPLY_DATE, StringUtils.toString(applyDate, eiMetadata.getMeta(FIELD_APPLY_DATE)));
map.put(FIELD_APPLY_NO, StringUtils.toString(applyNo, eiMetadata.getMeta(FIELD_APPLY_NO)));
map.put(FIELD_APPLY_PERSONNEL, StringUtils.toString(applyPersonnel, eiMetadata.getMeta(FIELD_APPLY_PERSONNEL)));
map.put(FIELD_LICENSE_PLATE_CODE, StringUtils.toString(licensePlateCode, eiMetadata.getMeta(FIELD_LICENSE_PLATE_CODE)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_APPLY_STATUS, StringUtils.toString(applyStatus, eiMetadata.getMeta(FIELD_APPLY_STATUS)));
return map;
}
}
package com.baosight.hpjx.hp.xt.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:THpxt002a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-26 13:10:39 create
*/
public class HPXT002A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_LICENSE_PLATE_CODE = "licensePlateCode"; /* 车牌号*/
public static final String FIELD_INSURANCE_TYPE = "insuranceType"; /* 车险险种*/
public static final String FIELD_INSURANCE_COMPANY = "insuranceCompany"; /* 保险公司*/
public static final String FIELD_INSURANCE_START_DATE = "insuranceStartDate"; /* 投保时间*/
public static final String FIELD_INSURANCE_END_DATE = "insuranceEndDate"; /* 结束时间*/
public static final String FIELD_INSURANCE_AMOUNT = "insuranceAmount"; /* 保险金额*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_T_HPXT002_ID = "tHpxt002Id";
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_LICENSE_PLATE_CODE = "LICENSE_PLATE_CODE"; /* 车牌号*/
public static final String COL_INSURANCE_TYPE = "INSURANCE_TYPE"; /* 车险险种*/
public static final String COL_INSURANCE_COMPANY = "INSURANCE_COMPANY"; /* 保险公司*/
public static final String COL_INSURANCE_START_DATE = "INSURANCE_START_DATE"; /* 投保时间*/
public static final String COL_INSURANCE_END_DATE = "INSURANCE_END_DATE"; /* 结束时间*/
public static final String COL_INSURANCE_AMOUNT = "INSURANCE_AMOUNT"; /* 保险金额*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_T_HPXT002_ID = "T_HPXT002_ID"; /* 主表id*/
public static final String QUERY = "HPXT002A.query";
public static final String COUNT = "HPXT002A.count";
public static final String INSERT = "HPXT002A.insert";
public static final String UPDATE = "HPXT002A.update";
public static final String DELETE = "HPXT002A.delete";
public static final String DELETE_FLAG = "HPXT002A.deleteFlag";
private Long id = new Long(0); /* 主键id*/
private Long tHpxt002Id = new Long(0); /* 主表id*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String licensePlateCode = " "; /* 车牌号*/
private String insuranceType = " "; /* 车险险种*/
private String insuranceCompany = " "; /* 保险公司*/
private String insuranceStartDate = " "; /* 投保时间*/
private String insuranceEndDate = " "; /* 结束时间*/
private BigDecimal insuranceAmount = new BigDecimal("0"); /* 保险金额*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LICENSE_PLATE_CODE);
eiColumn.setDescName("车牌号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INSURANCE_TYPE);
eiColumn.setDescName("车险险种");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INSURANCE_COMPANY);
eiColumn.setDescName("保险公司");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INSURANCE_START_DATE);
eiColumn.setDescName("投保时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INSURANCE_END_DATE);
eiColumn.setDescName("结束时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INSURANCE_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("保险金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_T_HPXT002_ID);
eiColumn.setDescName("主表Id");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPXT002A() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* 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 licensePlateCode - 车牌号.
* @return the licensePlateCode
*/
public String getLicensePlateCode() {
return this.licensePlateCode;
}
/**
* set the licensePlateCode - 车牌号.
*
* @param licensePlateCode - 车牌号
*/
public void setLicensePlateCode(String licensePlateCode) {
this.licensePlateCode = licensePlateCode;
}
/**
* get the insuranceType - 车险险种.
* @return the insuranceType
*/
public String getInsuranceType() {
return this.insuranceType;
}
/**
* set the insuranceType - 车险险种.
*
* @param insuranceType - 车险险种
*/
public void setInsuranceType(String insuranceType) {
this.insuranceType = insuranceType;
}
/**
* get the insuranceCompany - 保险公司.
* @return the insuranceCompany
*/
public String getInsuranceCompany() {
return this.insuranceCompany;
}
/**
* set the insuranceCompany - 保险公司.
*
* @param insuranceCompany - 保险公司
*/
public void setInsuranceCompany(String insuranceCompany) {
this.insuranceCompany = insuranceCompany;
}
/**
* get the insuranceStartDate - 投保时间.
* @return the insuranceStartDate
*/
public String getInsuranceStartDate() {
return this.insuranceStartDate;
}
/**
* set the insuranceStartDate - 投保时间.
*
* @param insuranceStartDate - 投保时间
*/
public void setInsuranceStartDate(String insuranceStartDate) {
this.insuranceStartDate = insuranceStartDate;
}
/**
* get the insuranceEndDate - 结束时间.
* @return the insuranceEndDate
*/
public String getInsuranceEndDate() {
return this.insuranceEndDate;
}
/**
* set the insuranceEndDate - 结束时间.
*
* @param insuranceEndDate - 结束时间
*/
public void setInsuranceEndDate(String insuranceEndDate) {
this.insuranceEndDate = insuranceEndDate;
}
/**
* get the insuranceAmount - 保险金额.
* @return the insuranceAmount
*/
public BigDecimal getInsuranceAmount() {
return this.insuranceAmount;
}
/**
* set the insuranceAmount - 保险金额.
*
* @param insuranceAmount - 保险金额
*/
public void setInsuranceAmount(BigDecimal insuranceAmount) {
this.insuranceAmount = insuranceAmount;
}
/**
* 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 Long gettHpxt002Id() {
return tHpxt002Id;
}
public void settHpxt002Id(Long tHpxt002Id) {
this.tHpxt002Id = tHpxt002Id;
}
/**
* 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));
setLicensePlateCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE_CODE)), licensePlateCode));
setInsuranceType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSURANCE_TYPE)), insuranceType));
setInsuranceCompany(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSURANCE_COMPANY)), insuranceCompany));
setInsuranceStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSURANCE_START_DATE)), insuranceStartDate));
setInsuranceEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSURANCE_END_DATE)), insuranceEndDate));
setInsuranceAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INSURANCE_AMOUNT)), insuranceAmount));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
settHpxt002Id(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_T_HPXT002_ID)), tHpxt002Id));
}
/**
* 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_LICENSE_PLATE_CODE, StringUtils.toString(licensePlateCode, eiMetadata.getMeta(FIELD_LICENSE_PLATE_CODE)));
map.put(FIELD_INSURANCE_TYPE, StringUtils.toString(insuranceType, eiMetadata.getMeta(FIELD_INSURANCE_TYPE)));
map.put(FIELD_INSURANCE_COMPANY, StringUtils.toString(insuranceCompany, eiMetadata.getMeta(FIELD_INSURANCE_COMPANY)));
map.put(FIELD_INSURANCE_START_DATE, StringUtils.toString(insuranceStartDate, eiMetadata.getMeta(FIELD_INSURANCE_START_DATE)));
map.put(FIELD_INSURANCE_END_DATE, StringUtils.toString(insuranceEndDate, eiMetadata.getMeta(FIELD_INSURANCE_END_DATE)));
map.put(FIELD_INSURANCE_AMOUNT, StringUtils.toString(insuranceAmount, eiMetadata.getMeta(FIELD_INSURANCE_AMOUNT)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_T_HPXT002_ID, StringUtils.toString(tHpxt002Id, eiMetadata.getMeta(FIELD_T_HPXT002_ID)));
return map;
}
}
package com.baosight.hpjx.hp.xt.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:THpxt001a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-26 13:10:33 create
*/
public class HPXT099 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
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_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
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_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String QUERY = "HPXT099.query";
public static final String COUNT = "HPXT099.count";
public static final String INSERT = "HPXT099.insert";
public static final String UPDATE = "HPXT099.update";
public static final String DELETE = "HPXT099.delete";
private Long id = new Long(0); /* 主键ID*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private Long matId = new Long(0); /* 物料ID*/
private String docId = " "; /* 文件ID*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String bizType = " "; /* 业务类型*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
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_BIZ_TYPE);
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPXT099() {
initMetaData();
}
/**
* get the id - 主键ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键ID.
*
* @param id - 主键ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码 预留.
*
* @param depCode - 部门编码 预留
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the matId - 物料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* 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 bizType - 业务类型.
* @return the bizType
*/
public String getBizType() {
return this.bizType;
}
/**
* set the bizType - 业务类型.
*
* @param bizType - 业务类型
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* 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));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
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));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
}
/**
* 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_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
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_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
return map;
}
}
package com.baosight.hpjx.hp.xt.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.cg.domain.HPCG001;
import com.baosight.hpjx.hp.cg.domain.HPCG002;
import com.baosight.hpjx.hp.cg.domain.HPCG002A;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sb.domain.HPSB003;
import com.baosight.hpjx.hp.xt.domain.HPXT001;
import com.baosight.hpjx.util.*;
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 lombok.val;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
*
*/
public class ServiceHPXT001 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXT001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPXT001.QUERY, new HPXT001());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPXT001 hpxt001 = new HPXT001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxt001.fromMap(map);
hpxt001.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT001.DELETE_FLAG, hpxt001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPXT001 hpxt001 = new HPXT001();
hpxt001.fromMap(resultRow);
if (hpxt001.getId() == null || hpxt001.getId() == 0) {
this.add(hpxt001);
} else {
this.modify(hpxt001);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPXT001 hpxt001) {
this.setBaseInfo(hpxt001);
//生成车辆申请单号
hpxt001.setApplyNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.VEHICLE_APPLY_NO));
DaoUtils.insert(HPXT001.INSERT, hpxt001);
}
/**
* 设置基础信息
*
* @param hpxt001
*/
private void setBaseInfo(HPXT001 hpxt001) {
// 去除日期字符串中的-
hpxt001.setApplyDate(StringUtil.removeHorizontalLine(hpxt001.getApplyDate()));
hpxt001.setStartTime(StringUtil.removeHorizontalLine(hpxt001.getStartTime()));
hpxt001.setEndTime(StringUtil.removeHorizontalLine(hpxt001.getEndTime()));
}
/**
* 修改操作
*/
public void modify(HPXT001 hpxt001) {
DaoUtils.update(HPXT001.UPDATE, hpxt001);
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "提交",operDesc = "提交审批操作")
public EiInfo approve(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPXT001 hpxt001 = new HPXT001();
hpxt001.fromMap(resultRow);
hpxt001.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT001.UPDATE_PRO_APPLY_STATUS,hpxt001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("提交失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "返还",operDesc = "返还操作")
public EiInfo returnStatus(EiInfo inInfo){
try {
String id = String.valueOf(inInfo.getAttr().get("id"));
HPXT001 hpxt001 = new HPXT001();
hpxt001.setId(Long.parseLong(id));
hpxt001.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT001.UPDATE_STATUS, hpxt001);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
logError("返还失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
package com.baosight.hpjx.hp.xt.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.ds.domain.HPDS002;
import com.baosight.hpjx.hp.xt.domain.HPXT099;
import com.baosight.hpjx.util.FileUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
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 com.baosight.iplat4j.core.service.soa.XServiceManager;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPXT001A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "车辆管理-附件清单A-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPXT099().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "车辆管理-附件清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.ProjectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HPXT099.queryRun", new HPXT099());
} else {
inInfo = super.query(inInfo, "HPXT099.queryDev", new HPXT099());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.xt.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.xt.domain.HPXT002;
import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHPXT002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXT002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPXT002.QUERY, new HPXT002());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆保险",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPXT002 hpxt002 = new HPXT002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxt002.fromMap(map);
hpxt002.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT002.DELETE_FLAG, hpxt002);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆保险",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPXT002 hpxt002 = new HPXT002();
hpxt002.fromMap(resultRow);
if (hpxt002.getId() == null || hpxt002.getId() == 0) {
this.add(hpxt002);
} else {
this.modify(hpxt002);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPXT002 hpxt002) {
this.setBaseInfo(hpxt002);
DaoUtils.insert(HPXT002.INSERT, hpxt002);
}
/**
* 设置基础信息
*
* @param hpxt002
*/
private void setBaseInfo(HPXT002 hpxt002) {
// 去除日期字符串中的-
hpxt002.setApplyDate(StringUtil.removeHorizontalLine(hpxt002.getApplyDate()));
hpxt002.setApplyStatus(CommonConstant.YesNo.NO_0);
}
/**
* 修改操作
*/
public void modify(HPXT002 hpxt002) {
DaoUtils.update(HPXT002.UPDATE, hpxt002);
}
}
package com.baosight.hpjx.hp.xt.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.xt.domain.HPXT002A;
import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHPXT002A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXT002A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPXT002A.QUERY, new HPXT002A());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆保险详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPXT002A hpxt002A = new HPXT002A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxt002A.fromMap(map);
hpxt002A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT002A.DELETE_FLAG, hpxt002A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆保险详情",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPXT002A hpxt002A = new HPXT002A();
hpxt002A.fromMap(resultRow);
if (hpxt002A.getId() == null || hpxt002A.getId() == 0) {
String hpxt002Id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXT002A.FIELD_T_HPXT002_ID);
hpxt002A.settHpxt002Id(Long.valueOf(hpxt002Id));
this.add(hpxt002A);
} else {
this.modify(hpxt002A);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPXT002A hpxt002A) {
this.setBaseInfo(hpxt002A);
DaoUtils.insert(HPXT002A.INSERT, hpxt002A);
}
/**
* 设置基础信息
*
* @param hpxt002A
*/
private void setBaseInfo(HPXT002A hpxt002A) {
// 去除日期字符串中的-
hpxt002A.setInsuranceStartDate(StringUtil.removeHorizontalLine(hpxt002A.getInsuranceStartDate()));
hpxt002A.setInsuranceEndDate(StringUtil.removeHorizontalLine(hpxt002A.getInsuranceEndDate()));
}
/**
* 修改操作
*/
public void modify(HPXT002A hpxt002A) {
DaoUtils.update(HPXT002A.UPDATE, hpxt002A);
}
}
package com.baosight.hpjx.hp.xt.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.ds.domain.HPDS002;
import com.baosight.hpjx.hp.xt.domain.HPXT099;
import com.baosight.hpjx.util.FileUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
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 com.baosight.iplat4j.core.service.soa.XServiceManager;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
*
*/
public class ServiceHPXT099 extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "车辆管理-附件清单A-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPXT099().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "车辆管理-附件清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.ProjectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HPXT099.queryRun", new HPXT099());
} else {
inInfo = super.query(inInfo, "HPXT099.queryDev", new HPXT099());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "新增",operDesc = "车辆管理-附件清单A-新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPXT099 hpxt099 = new HPXT099();
hpxt099.fromMap(resultRows.get(i));
DaoUtils.insert(HPXT099.INSERT, hpxt099);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "车辆管理-附件清单A-删除操作")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPXT099 hpxt099 = new HPXT099();
hpxt099.fromMap(resultRows.get(i));
DaoUtils.update(HPXT099.DELETE, hpxt099);
if (!hpxt099.getDocId().isEmpty()) {
this.delectDoc(hpxt099.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "删除附件文件")
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HPDS002> list = this.dao.query(HPDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.ProjectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HPXT099.FIELD_DOC_ID,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HPDS002.DELETE,map);
}
}
}
<?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-25 14:00:57
Version : 1.0
schema : hpjx
tableName : T_HPXT001
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
APPLY_DATE VARCHAR,
APPLY_NO VARCHAR,
APPLY_PERSONNEL VARCHAR,
LICENSE_PLATE_CODE VARCHAR,
DRIVER VARCHAR,
START_TIME VARCHAR,
END_TIME VARCHAR,
DESTINATION VARCHAR,
MILEAGE DECIMAL,
REASON VARCHAR,
DELETE_FLAG TINYINT,
PRO_APPLY_STATUS TINYINT,
STATUS TINYINT
-->
<sqlMap namespace="HPXT001">
<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="applyDate">
APPLY_DATE = #applyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyNo">
APPLY_NO = #applyNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyPersonnel">
APPLY_PERSONNEL LIKE '%' || #applyPersonnel# || '%'
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlateCode">
LICENSE_PLATE_CODE = #licensePlateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="driver">
DRIVER = #driver#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="startTime">
START_TIME = #startTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endTime">
END_TIME = #endTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="destination">
DESTINATION = #destination#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mileage">
MILEAGE = #mileage#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reason">
REASON = #reason#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
CREATED_TIME &gt;= REPLACE(#createdDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
CREATED_TIME &lt;= REPLACE(#createdDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.xt.domain.HPXT001">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
APPLY_DATE as "applyDate", <!-- 申请日期 -->
APPLY_NO as "applyNo", <!-- 申请单号 -->
APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 -->
LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 -->
DRIVER as "driver", <!-- 司机 -->
START_TIME as "startTime", <!-- 开始时间 -->
END_TIME as "endTime", <!-- 结束时间 -->
DESTINATION as "destination", <!-- 目的地 -->
MILEAGE as "mileage", <!-- 里程 -->
REASON as "reason", <!-- 事由 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS as "proApplyStatus", <!-- 审批状态 0-未提交 1-已提交 -->
STATUS as "status" <!-- 返还状态 0-未返还 1-已返还 -->
FROM ${hpjxSchema}.T_HPXT001 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_HPXT001 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="applyDate">
APPLY_DATE = #applyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyNo">
APPLY_NO = #applyNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyPersonnel">
APPLY_PERSONNEL = #applyPersonnel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlateCode">
LICENSE_PLATE_CODE = #licensePlateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="driver">
DRIVER = #driver#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="startTime">
START_TIME = #startTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endTime">
END_TIME = #endTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="destination">
DESTINATION = #destination#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mileage">
MILEAGE = #mileage#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reason">
REASON = #reason#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPXT001 (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
APPLY_DATE, <!-- 申请日期 -->
APPLY_NO, <!-- 申请单号 -->
APPLY_PERSONNEL, <!-- 申请人 -->
LICENSE_PLATE_CODE, <!-- 车牌号 -->
DRIVER, <!-- 司机 -->
START_TIME, <!-- 开始时间 -->
END_TIME, <!-- 结束时间 -->
DESTINATION, <!-- 目的地 -->
MILEAGE, <!-- 里程 -->
REASON, <!-- 事由 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS, <!-- 审批状态 0-未提交 1-已提交 -->
STATUS <!-- 返还状态 0-未返还 1-已返还 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #driver#, #startTime#, #endTime#, #destination#, #mileage#, #reason#, #deleteFlag#, #proApplyStatus#, #status#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPXT001 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPXT001
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<!--修改提交状态-->
<update id="updateProApplyStatus">
UPDATE ${hpjxSchema}.T_HPXT001
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
PRO_APPLY_STATUS = #proApplyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<!--修改返还状态-->
<update id="updateStatus">
UPDATE ${hpjxSchema}.T_HPXT001
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
STATUS = #status# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPXT001
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#, <!-- 更新时间 -->
APPLY_DATE = #applyDate#, <!-- 申请日期 -->
APPLY_NO = #applyNo#, <!-- 申请单号 -->
APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 -->
LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 -->
DRIVER = #driver#, <!-- 司机 -->
START_TIME = #startTime#, <!-- 开始时间 -->
END_TIME = #endTime#, <!-- 结束时间 -->
DESTINATION = #destination#, <!-- 目的地 -->
MILEAGE = #mileage#, <!-- 里程 -->
REASON = #reason#, <!-- 事由 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS = #proApplyStatus#, <!-- 审批状态 0-未提交 1-已提交 -->
STATUS = #status# <!-- 返还状态 0-未返还 1-已返还 -->
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-26 13:10:36
Version : 1.0
schema : world
tableName : T_HPXT002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
APPLY_DATE VARCHAR,
APPLY_NO VARCHAR,
APPLY_PERSONNEL VARCHAR,
LICENSE_PLATE_CODE VARCHAR,
DELETE_FLAG TINYINT,
APPLY_STATUS TINYINT
-->
<sqlMap namespace="HPXT002">
<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="applyDate">
APPLY_DATE = #applyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyNo">
APPLY_NO = #applyNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyPersonnel">
APPLY_PERSONNEL LIKE '%' || #applyPersonnel# || '%'
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlateCode">
LICENSE_PLATE_CODE LIKE '%' || #licensePlateCode# || '%'
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyStatus">
APPLY_STATUS = #applyStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
CREATED_TIME &gt;= REPLACE(#createdDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
CREATED_TIME &lt;= REPLACE(#createdDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.xt.domain.HPXT002">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
APPLY_DATE as "applyDate", <!-- 申请日期 -->
APPLY_NO as "applyNo", <!-- 保险单号 -->
APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 -->
LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
APPLY_STATUS as "applyStatus" <!-- 申请状态 -->
FROM ${hpjxSchema}.T_HPXT002 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_HPXT002 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="applyDate">
APPLY_DATE = #applyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyNo">
APPLY_NO = #applyNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyPersonnel">
APPLY_PERSONNEL = #applyPersonnel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlateCode">
LICENSE_PLATE_CODE = #licensePlateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyStatus">
APPLY_STATUS = #applyStatus#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPXT002 (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
APPLY_DATE, <!-- 申请日期 -->
APPLY_NO, <!-- 保险单号 -->
APPLY_PERSONNEL, <!-- 申请人 -->
LICENSE_PLATE_CODE, <!-- 车牌号 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
APPLY_STATUS <!-- 申请状态 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #deleteFlag#, #applyStatus#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPXT002 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPXT002
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPXT002
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#, <!-- 更新时间 -->
APPLY_DATE = #applyDate#, <!-- 申请日期 -->
APPLY_NO = #applyNo#, <!-- 保险单号 -->
APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 -->
LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
APPLY_STATUS = #applyStatus# <!-- 申请状态 -->
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-26 13:10:39
Version : 1.0
schema : world
tableName : T_HPXT002A
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
LICENSE_PLATE_CODE VARCHAR,
INSURANCE_TYPE VARCHAR,
INSURANCE_COMPANY VARCHAR,
INSURANCE_START_DATE VARCHAR,
INSURANCE_END_DATE VARCHAR,
INSURANCE_AMOUNT DECIMAL,
DELETE_FLAG TINYINT
-->
<sqlMap namespace="HPXT002A">
<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="licensePlateCode">
LICENSE_PLATE_CODE = #licensePlateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceType">
INSURANCE_TYPE = #insuranceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceCompany">
INSURANCE_COMPANY = #insuranceCompany#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceStartDate">
INSURANCE_START_DATE = #insuranceStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceEndDate">
INSURANCE_END_DATE = #insuranceEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceAmount">
INSURANCE_AMOUNT = #insuranceAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tHpxt002Id">
T_HPXT002_ID = #tHpxt002Id#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.xt.domain.HPXT002A">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 -->
INSURANCE_TYPE as "insuranceType", <!-- 车险险种 -->
INSURANCE_COMPANY as "insuranceCompany", <!-- 保险公司 -->
INSURANCE_START_DATE as "insuranceStartDate", <!-- 投保时间 -->
INSURANCE_END_DATE as "insuranceEndDate", <!-- 结束时间 -->
INSURANCE_AMOUNT as "insuranceAmount", <!-- 保险金额 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
T_HPXT002_ID as "tHpxt002Id"
FROM ${hpjxSchema}.T_HPXT002A 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_HPXT002A 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="licensePlateCode">
LICENSE_PLATE_CODE = #licensePlateCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceType">
INSURANCE_TYPE = #insuranceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceCompany">
INSURANCE_COMPANY = #insuranceCompany#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceStartDate">
INSURANCE_START_DATE = #insuranceStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceEndDate">
INSURANCE_END_DATE = #insuranceEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="insuranceAmount">
INSURANCE_AMOUNT = #insuranceAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPXT002A (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
LICENSE_PLATE_CODE, <!-- 车牌号 -->
INSURANCE_TYPE, <!-- 车险险种 -->
INSURANCE_COMPANY, <!-- 保险公司 -->
INSURANCE_START_DATE, <!-- 投保时间 -->
INSURANCE_END_DATE, <!-- 结束时间 -->
INSURANCE_AMOUNT, <!-- 保险金额 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
T_HPXT002_ID
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #licensePlateCode#, #insuranceType#, #insuranceCompany#, #insuranceStartDate#, #insuranceEndDate#, #insuranceAmount#, #deleteFlag#, #tHpxt002Id# )
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPXT002A WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPXT002A
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPXT002A
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#, <!-- 更新时间 -->
LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 -->
INSURANCE_TYPE = #insuranceType#, <!-- 车险险种 -->
INSURANCE_COMPANY = #insuranceCompany#, <!-- 保险公司 -->
INSURANCE_START_DATE = #insuranceStartDate#, <!-- 投保时间 -->
INSURANCE_END_DATE = #insuranceEndDate#, <!-- 结束时间 -->
INSURANCE_AMOUNT = #insuranceAmount#, <!-- 保险金额 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPXT099">
<sql id="column">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.BIZ_TYPE as "bizType", <!-- 物料ID -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
A.BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
</sql>
<!-- 开发环境 -->
<sql id="conditionDev">
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql id="conditionRun">
AND A.DOC_ID = B.RES_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$order$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="queryDev" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002A">
SELECT
<include refid="columnDev"/>
FROM ${hpjxSchema}.T_HPXT099 A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPXT099 A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
</select>
<select id="queryRun" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002A">
SELECT
<include refid="columnRun"/>
FROM ${hpjxSchema}.T_HPXT099 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countRun" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPXT099 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPXT099 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
BIZ_TYPE,
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #bizType#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPXT099 WHERE ID = #id#
</delete>
</sqlMap>
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:THpyx001.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 HPYX001 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_SURVEY_DATE = "surveyDate"; /* 调研日期*/
public static final String FIELD_DISTRICT = "district"; /* 区域*/
public static final String FIELD_POLICY_ENV = "policyEnv"; /* 政策环境*/
public static final String FIELD_ECONOMY_ENV = "economyEnv"; /* 经济环境*/
public static final String FIELD_SOCI_CULTURE_ENV = "sociCultureEnv"; /* 社会文化环境*/
public static final String FIELD_SUPPLIER = "supplier"; /* 涉及供应商*/
public static final String FIELD_COMPETE_USER = "competeUser"; /* 竞争对手*/
public static final String FIELD_SURVEY_USER = "surveyUser"; /* 调查人员*/
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_SURVEY_DATE = "SURVEY_DATE"; /* 调研日期*/
public static final String COL_DISTRICT = "DISTRICT"; /* 区域*/
public static final String COL_POLICY_ENV = "POLICY_ENV"; /* 政策环境*/
public static final String COL_ECONOMY_ENV = "ECONOMY_ENV"; /* 经济环境*/
public static final String COL_SOCI_CULTURE_ENV = "SOCI_CULTURE_ENV"; /* 社会文化环境*/
public static final String COL_SUPPLIER = "SUPPLIER"; /* 涉及供应商*/
public static final String COL_COMPETE_USER = "COMPETE_USER"; /* 竞争对手*/
public static final String COL_SURVEY_USER = "SURVEY_USER"; /* 调查人员*/
public static final String QUERY = "HPYX001.query";
public static final String COUNT = "HPYX001.count";
public static final String INSERT = "HPYX001.insert";
public static final String UPDATE = "HPYX001.update";
public static final String DELETE = "HPYX001.delete";
public static final String DELETE_FLAG = "HPYX001.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 surveyDate = " "; /* 调研日期*/
private String district = " "; /* 区域*/
private String policyEnv = " "; /* 政策环境*/
private String economyEnv = " "; /* 经济环境*/
private String sociCultureEnv = " "; /* 社会文化环境*/
private String supplier = " "; /* 涉及供应商*/
private String competeUser = " "; /* 竞争对手*/
private String surveyUser = " "; /* 调查人员*/
/**
* 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_SURVEY_DATE);
eiColumn.setDescName("调研日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DISTRICT);
eiColumn.setDescName("区域");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_POLICY_ENV);
eiColumn.setDescName("政策环境");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ECONOMY_ENV);
eiColumn.setDescName("经济环境");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SOCI_CULTURE_ENV);
eiColumn.setDescName("社会文化环境");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUPPLIER);
eiColumn.setDescName("涉及供应商");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPETE_USER);
eiColumn.setDescName("竞争对手");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SURVEY_USER);
eiColumn.setDescName("调查人员");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX001() {
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 surveyDate - 调研日期.
* @return the surveyDate
*/
public String getSurveyDate() {
return this.surveyDate;
}
/**
* set the surveyDate - 调研日期.
*
* @param surveyDate - 调研日期
*/
public void setSurveyDate(String surveyDate) {
this.surveyDate = surveyDate;
}
/**
* 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 policyEnv - 政策环境.
* @return the policyEnv
*/
public String getPolicyEnv() {
return this.policyEnv;
}
/**
* set the policyEnv - 政策环境.
*
* @param policyEnv - 政策环境
*/
public void setPolicyEnv(String policyEnv) {
this.policyEnv = policyEnv;
}
/**
* get the economyEnv - 经济环境.
* @return the economyEnv
*/
public String getEconomyEnv() {
return this.economyEnv;
}
/**
* set the economyEnv - 经济环境.
*
* @param economyEnv - 经济环境
*/
public void setEconomyEnv(String economyEnv) {
this.economyEnv = economyEnv;
}
/**
* get the sociCultureEnv - 社会文化环境.
* @return the sociCultureEnv
*/
public String getSociCultureEnv() {
return this.sociCultureEnv;
}
/**
* set the sociCultureEnv - 社会文化环境.
*
* @param sociCultureEnv - 社会文化环境
*/
public void setSociCultureEnv(String sociCultureEnv) {
this.sociCultureEnv = sociCultureEnv;
}
/**
* get the supplier - 涉及供应商.
* @return the supplier
*/
public String getSupplier() {
return this.supplier;
}
/**
* set the supplier - 涉及供应商.
*
* @param supplier - 涉及供应商
*/
public void setSupplier(String supplier) {
this.supplier = supplier;
}
/**
* get the competeUser - 竞争对手.
* @return the competeUser
*/
public String getCompeteUser() {
return this.competeUser;
}
/**
* set the competeUser - 竞争对手.
*
* @param competeUser - 竞争对手
*/
public void setCompeteUser(String competeUser) {
this.competeUser = competeUser;
}
/**
* get the surveyUser - 调查人员.
* @return the surveyUser
*/
public String getSurveyUser() {
return this.surveyUser;
}
/**
* set the surveyUser - 调查人员.
*
* @param surveyUser - 调查人员
*/
public void setSurveyUser(String surveyUser) {
this.surveyUser = surveyUser;
}
/**
* 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));
setSurveyDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SURVEY_DATE)), surveyDate));
setDistrict(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DISTRICT)), district));
setPolicyEnv(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_POLICY_ENV)), policyEnv));
setEconomyEnv(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ECONOMY_ENV)), economyEnv));
setSociCultureEnv(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SOCI_CULTURE_ENV)), sociCultureEnv));
setSupplier(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SUPPLIER)), supplier));
setCompeteUser(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPETE_USER)), competeUser));
setSurveyUser(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SURVEY_USER)), surveyUser));
}
/**
* 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_SURVEY_DATE, StringUtils.toString(surveyDate, eiMetadata.getMeta(FIELD_SURVEY_DATE)));
map.put(FIELD_DISTRICT, StringUtils.toString(district, eiMetadata.getMeta(FIELD_DISTRICT)));
map.put(FIELD_POLICY_ENV, StringUtils.toString(policyEnv, eiMetadata.getMeta(FIELD_POLICY_ENV)));
map.put(FIELD_ECONOMY_ENV, StringUtils.toString(economyEnv, eiMetadata.getMeta(FIELD_ECONOMY_ENV)));
map.put(FIELD_SOCI_CULTURE_ENV, StringUtils.toString(sociCultureEnv, eiMetadata.getMeta(FIELD_SOCI_CULTURE_ENV)));
map.put(FIELD_SUPPLIER, StringUtils.toString(supplier, eiMetadata.getMeta(FIELD_SUPPLIER)));
map.put(FIELD_COMPETE_USER, StringUtils.toString(competeUser, eiMetadata.getMeta(FIELD_COMPETE_USER)));
map.put(FIELD_SURVEY_USER, StringUtils.toString(surveyUser, eiMetadata.getMeta(FIELD_SURVEY_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:THpyx002.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 HPYX002 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_SURVEY_DATE = "surveyDate"; /* 调研日期*/
public static final String FIELD_DISTRICT = "district"; /* 区域*/
public static final String FIELD_CLIENT = "client"; /* 客户*/
public static final String FIELD_BUY_MOTIVE = "buyMotive"; /* 购买动机*/
public static final String FIELD_BUY_AMOUNT = "buyAmount"; /* 购买能力*/
public static final String FIELD_BUY_PRODUCTS = "buyProducts"; /* 经常购买产品*/
public static final String FIELD_SURVEY_USER = "surveyUser"; /* 调查人员*/
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_SURVEY_DATE = "SURVEY_DATE"; /* 调研日期*/
public static final String COL_DISTRICT = "DISTRICT"; /* 区域*/
public static final String COL_CLIENT = "CLIENT"; /* 客户*/
public static final String COL_BUY_MOTIVE = "BUY_MOTIVE"; /* 购买动机*/
public static final String COL_BUY_AMOUNT = "BUY_AMOUNT"; /* 购买能力*/
public static final String COL_BUY_PRODUCTS = "BUY_PRODUCTS"; /* 经常购买产品*/
public static final String COL_SURVEY_USER = "SURVEY_USER"; /* 调查人员*/
public static final String QUERY = "HPYX002.query";
public static final String COUNT = "HPYX002.count";
public static final String INSERT = "HPYX002.insert";
public static final String UPDATE = "HPYX002.update";
public static final String DELETE = "HPYX002.delete";
public static final String DELETE_FLAG = "HPYX002.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 surveyDate = " "; /* 调研日期*/
private String district = " "; /* 区域*/
private String client = " "; /* 客户*/
private String buyMotive = " "; /* 购买动机*/
private BigDecimal buyAmount = new BigDecimal(0.00); /* 购买能力*/
private String buyProducts = " "; /* 经常购买产品*/
private String surveyUser = " "; /* 调查人员*/
/**
* 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_SURVEY_DATE);
eiColumn.setDescName("调研日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DISTRICT);
eiColumn.setDescName("区域");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CLIENT);
eiColumn.setDescName("客户");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BUY_MOTIVE);
eiColumn.setDescName("购买动机");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BUY_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("购买能力");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BUY_PRODUCTS);
eiColumn.setDescName("经常购买产品");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SURVEY_USER);
eiColumn.setDescName("调查人员");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX002() {
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 surveyDate - 调研日期.
* @return the surveyDate
*/
public String getSurveyDate() {
return this.surveyDate;
}
/**
* set the surveyDate - 调研日期.
*
* @param surveyDate - 调研日期
*/
public void setSurveyDate(String surveyDate) {
this.surveyDate = surveyDate;
}
/**
* 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 client - 客户.
* @return the client
*/
public String getClient() {
return this.client;
}
/**
* set the client - 客户.
*
* @param client - 客户
*/
public void setClient(String client) {
this.client = client;
}
/**
* get the buyMotive - 购买动机.
* @return the buyMotive
*/
public String getBuyMotive() {
return this.buyMotive;
}
/**
* set the buyMotive - 购买动机.
*
* @param buyMotive - 购买动机
*/
public void setBuyMotive(String buyMotive) {
this.buyMotive = buyMotive;
}
/**
* get the buyAmount - 购买能力.
* @return the buyAmount
*/
public BigDecimal getBuyAmount() {
return this.buyAmount;
}
/**
* set the buyAmount - 购买能力.
*
* @param buyAmount - 购买能力
*/
public void setBuyAmount(BigDecimal buyAmount) {
this.buyAmount = buyAmount;
}
/**
* get the buyProducts - 经常购买产品.
* @return the buyProducts
*/
public String getBuyProducts() {
return this.buyProducts;
}
/**
* set the buyProducts - 经常购买产品.
*
* @param buyProducts - 经常购买产品
*/
public void setBuyProducts(String buyProducts) {
this.buyProducts = buyProducts;
}
/**
* get the surveyUser - 调查人员.
* @return the surveyUser
*/
public String getSurveyUser() {
return this.surveyUser;
}
/**
* set the surveyUser - 调查人员.
*
* @param surveyUser - 调查人员
*/
public void setSurveyUser(String surveyUser) {
this.surveyUser = surveyUser;
}
/**
* 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));
setSurveyDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SURVEY_DATE)), surveyDate));
setDistrict(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DISTRICT)), district));
setClient(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CLIENT)), client));
setBuyMotive(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BUY_MOTIVE)), buyMotive));
setBuyAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_BUY_AMOUNT)), buyAmount));
setBuyProducts(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BUY_PRODUCTS)), buyProducts));
setSurveyUser(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SURVEY_USER)), surveyUser));
}
/**
* 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_SURVEY_DATE, StringUtils.toString(surveyDate, eiMetadata.getMeta(FIELD_SURVEY_DATE)));
map.put(FIELD_DISTRICT, StringUtils.toString(district, eiMetadata.getMeta(FIELD_DISTRICT)));
map.put(FIELD_CLIENT, StringUtils.toString(client, eiMetadata.getMeta(FIELD_CLIENT)));
map.put(FIELD_BUY_MOTIVE, StringUtils.toString(buyMotive, eiMetadata.getMeta(FIELD_BUY_MOTIVE)));
map.put(FIELD_BUY_AMOUNT, StringUtils.toString(buyAmount, eiMetadata.getMeta(FIELD_BUY_AMOUNT)));
map.put(FIELD_BUY_PRODUCTS, StringUtils.toString(buyProducts, eiMetadata.getMeta(FIELD_BUY_PRODUCTS)));
map.put(FIELD_SURVEY_USER, StringUtils.toString(surveyUser, eiMetadata.getMeta(FIELD_SURVEY_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:THpyx003.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 HPYX003 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_SURVEY_DATE = "surveyDate"; /* 调研日期*/
public static final String FIELD_DISTRICT = "district"; /* 区域*/
public static final String FIELD_PRODUCT_NAME = "productName"; /* 产品名称*/
public static final String FIELD_QUANTITY = "quantity"; /* 产品数量*/
public static final String FIELD_PRICE = "price"; /* 价格*/
public static final String FIELD_QUALITY = "quality"; /* 质量*/
public static final String FIELD_SURVEY_USER = "surveyUser"; /* 调查人员*/
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_SURVEY_DATE = "SURVEY_DATE"; /* 调研日期*/
public static final String COL_DISTRICT = "DISTRICT"; /* 区域*/
public static final String COL_PRODUCT_NAME = "PRODUCT_NAME"; /* 产品名称*/
public static final String COL_QUANTITY = "QUANTITY"; /* 产品数量*/
public static final String COL_PRICE = "PRICE"; /* 价格*/
public static final String COL_QUALITY = "QUALITY"; /* 质量*/
public static final String COL_SURVEY_USER = "SURVEY_USER"; /* 调查人员*/
public static final String QUERY = "HPYX003.query";
public static final String COUNT = "HPYX003.count";
public static final String INSERT = "HPYX003.insert";
public static final String UPDATE = "HPYX003.update";
public static final String DELETE = "HPYX003.delete";
public static final String DELETE_FLAG = "HPYX003.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 surveyDate = " "; /* 调研日期*/
private String district = " "; /* 区域*/
private String productName = " "; /* 产品名称*/
private BigDecimal quantity = new BigDecimal("0"); /* 产品数量*/
private BigDecimal price = new BigDecimal("0"); /* 价格*/
private String quality = " "; /* 质量*/
private String surveyUser = " "; /* 调查人员*/
/**
* 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_SURVEY_DATE);
eiColumn.setDescName("调研日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DISTRICT);
eiColumn.setDescName("区域");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_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_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("价格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUALITY);
eiColumn.setDescName("质量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SURVEY_USER);
eiColumn.setDescName("调查人员");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX003() {
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 surveyDate - 调研日期.
* @return the surveyDate
*/
public String getSurveyDate() {
return this.surveyDate;
}
/**
* set the surveyDate - 调研日期.
*
* @param surveyDate - 调研日期
*/
public void setSurveyDate(String surveyDate) {
this.surveyDate = surveyDate;
}
/**
* 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 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 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 price - 价格.
* @return the price
*/
public BigDecimal getPrice() {
return this.price;
}
/**
* set the price - 价格.
*
* @param price - 价格
*/
public void setPrice(BigDecimal price) {
this.price = price;
}
/**
* get the quality - 质量.
* @return the quality
*/
public String getQuality() {
return this.quality;
}
/**
* set the quality - 质量.
*
* @param quality - 质量
*/
public void setQuality(String quality) {
this.quality = quality;
}
/**
* get the surveyUser - 调查人员.
* @return the surveyUser
*/
public String getSurveyUser() {
return this.surveyUser;
}
/**
* set the surveyUser - 调查人员.
*
* @param surveyUser - 调查人员
*/
public void setSurveyUser(String surveyUser) {
this.surveyUser = surveyUser;
}
/**
* 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));
setSurveyDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SURVEY_DATE)), surveyDate));
setDistrict(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DISTRICT)), district));
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_NAME)), productName));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setQuality(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_QUALITY)), quality));
setSurveyUser(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SURVEY_USER)), surveyUser));
}
/**
* 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_SURVEY_DATE, StringUtils.toString(surveyDate, eiMetadata.getMeta(FIELD_SURVEY_DATE)));
map.put(FIELD_DISTRICT, StringUtils.toString(district, eiMetadata.getMeta(FIELD_DISTRICT)));
map.put(FIELD_PRODUCT_NAME, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_PRODUCT_NAME)));
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_QUALITY, StringUtils.toString(quality, eiMetadata.getMeta(FIELD_QUALITY)));
map.put(FIELD_SURVEY_USER, StringUtils.toString(surveyUser, eiMetadata.getMeta(FIELD_SURVEY_USER)));
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:THpyx004.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 HPYX004 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_SURVEY_DATE = "surveyDate"; /* 调研日期*/
public static final String FIELD_DISTRICT = "district"; /* 区域*/
public static final String FIELD_PRODUCT_GOOD_BAD = "productGoodBad"; /* 产品优劣势*/
public static final String FIELD_PRICE_GOOD_BAD = "priceGoodBad"; /* 价格优劣势*/
public static final String FIELD_CHANNEL_EFFECT = "channelEffect"; /* 渠道效果*/
public static final String FIELD_PROMO_METHOD_GOOD_BAD = "promoMethodGoodBad"; /* 促销方式优劣势*/
public static final String FIELD_SURVEY_USER = "surveyUser"; /* 调查人员*/
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_SURVEY_DATE = "SURVEY_DATE"; /* 调研日期*/
public static final String COL_DISTRICT = "DISTRICT"; /* 区域*/
public static final String COL_PRODUCT_GOOD_BAD = "PRODUCT_GOOD_BAD"; /* 产品优劣势*/
public static final String COL_PRICE_GOOD_BAD = "PRICE_GOOD_BAD"; /* 价格优劣势*/
public static final String COL_CHANNEL_EFFECT = "CHANNEL_EFFECT"; /* 渠道效果*/
public static final String COL_PROMO_METHOD_GOOD_BAD = "PROMO_METHOD_GOOD_BAD"; /* 促销方式优劣势*/
public static final String COL_SURVEY_USER = "SURVEY_USER"; /* 调查人员*/
public static final String QUERY = "HPYX004.query";
public static final String COUNT = "HPYX004.count";
public static final String INSERT = "HPYX004.insert";
public static final String UPDATE = "HPYX004.update";
public static final String DELETE = "HPYX004.delete";
public static final String DELETE_FLAG = "HPYX004.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 surveyDate = " "; /* 调研日期*/
private String district = " "; /* 区域*/
private String productGoodBad = " "; /* 产品优劣势*/
private String priceGoodBad = " "; /* 价格优劣势*/
private String channelEffect = " "; /* 渠道效果*/
private String promoMethodGoodBad = " "; /* 促销方式优劣势*/
private String surveyUser = " "; /* 调查人员*/
/**
* 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_SURVEY_DATE);
eiColumn.setDescName("调研日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DISTRICT);
eiColumn.setDescName("区域");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_GOOD_BAD);
eiColumn.setDescName("产品优劣势");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE_GOOD_BAD);
eiColumn.setDescName("价格优劣势");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHANNEL_EFFECT);
eiColumn.setDescName("渠道效果");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROMO_METHOD_GOOD_BAD);
eiColumn.setDescName("促销方式优劣势");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SURVEY_USER);
eiColumn.setDescName("调查人员");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPYX004() {
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 surveyDate - 调研日期.
* @return the surveyDate
*/
public String getSurveyDate() {
return this.surveyDate;
}
/**
* set the surveyDate - 调研日期.
*
* @param surveyDate - 调研日期
*/
public void setSurveyDate(String surveyDate) {
this.surveyDate = surveyDate;
}
/**
* 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 productGoodBad - 产品优劣势.
* @return the productGoodBad
*/
public String getProductGoodBad() {
return this.productGoodBad;
}
/**
* set the productGoodBad - 产品优劣势.
*
* @param productGoodBad - 产品优劣势
*/
public void setProductGoodBad(String productGoodBad) {
this.productGoodBad = productGoodBad;
}
/**
* get the priceGoodBad - 价格优劣势.
* @return the priceGoodBad
*/
public String getPriceGoodBad() {
return this.priceGoodBad;
}
/**
* set the priceGoodBad - 价格优劣势.
*
* @param priceGoodBad - 价格优劣势
*/
public void setPriceGoodBad(String priceGoodBad) {
this.priceGoodBad = priceGoodBad;
}
/**
* get the channelEffect - 渠道效果.
* @return the channelEffect
*/
public String getChannelEffect() {
return this.channelEffect;
}
/**
* set the channelEffect - 渠道效果.
*
* @param channelEffect - 渠道效果
*/
public void setChannelEffect(String channelEffect) {
this.channelEffect = channelEffect;
}
/**
* get the promoMethodGoodBad - 促销方式优劣势.
* @return the promoMethodGoodBad
*/
public String getPromoMethodGoodBad() {
return this.promoMethodGoodBad;
}
/**
* set the promoMethodGoodBad - 促销方式优劣势.
*
* @param promoMethodGoodBad - 促销方式优劣势
*/
public void setPromoMethodGoodBad(String promoMethodGoodBad) {
this.promoMethodGoodBad = promoMethodGoodBad;
}
/**
* get the surveyUser - 调查人员.
* @return the surveyUser
*/
public String getSurveyUser() {
return this.surveyUser;
}
/**
* set the surveyUser - 调查人员.
*
* @param surveyUser - 调查人员
*/
public void setSurveyUser(String surveyUser) {
this.surveyUser = surveyUser;
}
/**
* 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));
setSurveyDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SURVEY_DATE)), surveyDate));
setDistrict(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DISTRICT)), district));
setProductGoodBad(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_GOOD_BAD)), productGoodBad));
setPriceGoodBad(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRICE_GOOD_BAD)), priceGoodBad));
setChannelEffect(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHANNEL_EFFECT)), channelEffect));
setPromoMethodGoodBad(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROMO_METHOD_GOOD_BAD)), promoMethodGoodBad));
setSurveyUser(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SURVEY_USER)), surveyUser));
}
/**
* 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_SURVEY_DATE, StringUtils.toString(surveyDate, eiMetadata.getMeta(FIELD_SURVEY_DATE)));
map.put(FIELD_DISTRICT, StringUtils.toString(district, eiMetadata.getMeta(FIELD_DISTRICT)));
map.put(FIELD_PRODUCT_GOOD_BAD, StringUtils.toString(productGoodBad, eiMetadata.getMeta(FIELD_PRODUCT_GOOD_BAD)));
map.put(FIELD_PRICE_GOOD_BAD, StringUtils.toString(priceGoodBad, eiMetadata.getMeta(FIELD_PRICE_GOOD_BAD)));
map.put(FIELD_CHANNEL_EFFECT, StringUtils.toString(channelEffect, eiMetadata.getMeta(FIELD_CHANNEL_EFFECT)));
map.put(FIELD_PROMO_METHOD_GOOD_BAD, StringUtils.toString(promoMethodGoodBad, eiMetadata.getMeta(FIELD_PROMO_METHOD_GOOD_BAD)));
map.put(FIELD_SURVEY_USER, StringUtils.toString(surveyUser, eiMetadata.getMeta(FIELD_SURVEY_USER)));
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.yx.domain.HPYX001;
import com.baosight.hpjx.hp.yx.domain.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
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 java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场调研-环境调研
*/
public class ServiceHPYX001 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.USER_BLOCK_ID
), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String surveyDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX003.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPYX001.QUERY,new HPYX001());
}
@OperationLogAnnotation(operModul = "市场调研-环境调研",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HPYX001.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "市场调研-环境调研",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPYX001 hpyx001 = new HPYX001();
hpyx001.fromMap(resultRow);
if (hpyx001.getId() == null || hpyx001.getId() == 0) {
this.add(hpyx001);
} else {
this.modify(hpyx001);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX001 hpyx001) {
DaoUtils.insert(HPYX001.INSERT, hpyx001);
}
/**
* 修改操作
*/
public void modify(HPYX001 hpyx001) {
DaoUtils.update(HPYX001.UPDATE, hpyx001);
}
}
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.HPYX002;
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 java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场调研-需求调研
*/
public class ServiceHPYX002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String surveyDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX003.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX002.QUERY, new HPYX002(),false,new HPYX002().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);
HPYX002 hgsb002 = new HPYX002();
hgsb002.fromMap(map);
DaoUtils.update(HPYX002.DELETE_FLAG, hgsb002.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) {
HPYX002 hpyx002 = new HPYX002();
hpyx002.fromMap(resultRow);
if (hpyx002.getId() == null || hpyx002.getId() == 0) {
this.add(hpyx002);
} else {
this.modify(hpyx002);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX002 hpyx002) {
DaoUtils.insert(HPYX002.INSERT, hpyx002);
}
/**
* 修改操作
*/
public void modify(HPYX002 hpyx002) {
DaoUtils.update(HPYX002.UPDATE, hpyx002);
}
}
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.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
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 java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/27
* @description 市场调研-产品调研
*/
public class ServiceHPYX003 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String surveyDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX003.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HPYX003.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX003.QUERY, new HPYX003(),false,new HPYX003().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);
HPYX003 hpyx003 = new HPYX003();
hpyx003.fromMap(map);
DaoUtils.update(HPYX003.DELETE_FLAG, hpyx003.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) {
HPYX003 hpyx003 = new HPYX003();
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(HPYX003 hpyx003) {
DaoUtils.insert(HPYX003.INSERT, hpyx003);
}
/**
* 修改操作
*/
public void modify(HPYX003 hpyx003) {
DaoUtils.update(HPYX003.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.HPYX002;
import com.baosight.hpjx.hp.yx.domain.HPYX003;
import com.baosight.hpjx.hp.yx.domain.HPYX004;
import com.baosight.hpjx.hp.yx.domain.HPYX004;
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 ServiceHPYX004 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
String surveyDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX004.FIELD_SURVEY_DATE);
if (!surveyDate.isEmpty()){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HPYX004.FIELD_SURVEY_DATE, DateUtils.formatShort(surveyDate));
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPYX004.QUERY, new HPYX004(),false,new HPYX004().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);
HPYX004 hpyx004 = new HPYX004();
hpyx004.fromMap(map);
DaoUtils.update(HPYX004.DELETE_FLAG, hpyx004.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) {
HPYX004 hpyx004 = new HPYX004();
hpyx004.fromMap(resultRow);
if (hpyx004.getId() == null || hpyx004.getId() == 0) {
this.add(hpyx004);
} else {
this.modify(hpyx004);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPYX004 hpyx004) {
DaoUtils.insert(HPYX004.INSERT, hpyx004);
}
/**
* 修改操作
*/
public void modify(HPYX004 hpyx004) {
DaoUtils.update(HPYX004.UPDATE, hpyx004);
}
}
<?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_HPYX001
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,
SURVEY_DATE VARCHAR,
DISTRICT VARCHAR,
POLICY_ENV VARCHAR,
ECONOMY_ENV VARCHAR,
SOCI_CULTURE_ENV VARCHAR,
SUPPLIER VARCHAR,
COMPETE_USER VARCHAR,
SURVEY_USER VARCHAR
-->
<sqlMap namespace="HPYX001">
<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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like concat('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="policyEnv">
POLICY_ENV = #policyEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="economyEnv">
ECONOMY_ENV = #economyEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sociCultureEnv">
SOCI_CULTURE_ENV = #sociCultureEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplier">
SUPPLIER = #supplier#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="competeUser">
COMPETE_USER = #competeUser#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX001">
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.是 -->
SURVEY_DATE as "surveyDate", <!-- 调研日期 -->
DISTRICT as "district", <!-- 区域 -->
POLICY_ENV as "policyEnv", <!-- 政策环境 -->
ECONOMY_ENV as "economyEnv", <!-- 经济环境 -->
SOCI_CULTURE_ENV as "sociCultureEnv", <!-- 社会文化环境 -->
SUPPLIER as "supplier", <!-- 涉及供应商 -->
COMPETE_USER as "competeUser", <!-- 竞争对手 -->
SURVEY_USER as "surveyUser" <!-- 调查人员 -->
FROM ${hpjxSchema}.T_HPYX001 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_HPYX001 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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="policyEnv">
POLICY_ENV = #policyEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="economyEnv">
ECONOMY_ENV = #economyEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sociCultureEnv">
SOCI_CULTURE_ENV = #sociCultureEnv#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplier">
SUPPLIER = #supplier#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="competeUser">
COMPETE_USER = #competeUser#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX001 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SURVEY_DATE, <!-- 调研日期 -->
DISTRICT, <!-- 区域 -->
POLICY_ENV, <!-- 政策环境 -->
ECONOMY_ENV, <!-- 经济环境 -->
SOCI_CULTURE_ENV, <!-- 社会文化环境 -->
SUPPLIER, <!-- 涉及供应商 -->
COMPETE_USER, <!-- 竞争对手 -->
SURVEY_USER <!-- 调查人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #surveyDate#, #district#, #policyEnv#, #economyEnv#, #sociCultureEnv#, #supplier#, #competeUser#, #surveyUser#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX001 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX001
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_HPYX001
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.是 -->
SURVEY_DATE = #surveyDate#, <!-- 调研日期 -->
DISTRICT = #district#, <!-- 区域 -->
POLICY_ENV = #policyEnv#, <!-- 政策环境 -->
ECONOMY_ENV = #economyEnv#, <!-- 经济环境 -->
SOCI_CULTURE_ENV = #sociCultureEnv#, <!-- 社会文化环境 -->
SUPPLIER = #supplier#, <!-- 涉及供应商 -->
COMPETE_USER = #competeUser#, <!-- 竞争对手 -->
SURVEY_USER = #surveyUser# <!-- 调查人员 -->
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_HPYX002
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,
SURVEY_DATE VARCHAR,
DISTRICT VARCHAR,
CLIENT VARCHAR,
BUY_MOTIVE VARCHAR,
BUY_AMOUNT DECIMAL,
BUY_PRODUCTS VARCHAR,
SURVEY_USER VARCHAR
-->
<sqlMap namespace="HPYX002">
<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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like concat('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="client">
CLIENT = #client#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyMotive">
BUY_MOTIVE = #buyMotive#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyAmount">
BUY_AMOUNT = #buyAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyProducts">
BUY_PRODUCTS = #buyProducts#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX002">
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.是 -->
SURVEY_DATE as "surveyDate", <!-- 调研日期 -->
DISTRICT as "district", <!-- 区域 -->
CLIENT as "client", <!-- 客户 -->
BUY_MOTIVE as "buyMotive", <!-- 购买动机 -->
BUY_AMOUNT as "buyAmount", <!-- 购买能力 -->
BUY_PRODUCTS as "buyProducts", <!-- 经常购买产品 -->
SURVEY_USER as "surveyUser" <!-- 调查人员 -->
FROM ${hpjxSchema}.T_HPYX002 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_HPYX002 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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="client">
CLIENT = #client#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyMotive">
BUY_MOTIVE = #buyMotive#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyAmount">
BUY_AMOUNT = #buyAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="buyProducts">
BUY_PRODUCTS = #buyProducts#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX002 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SURVEY_DATE, <!-- 调研日期 -->
DISTRICT, <!-- 区域 -->
CLIENT, <!-- 客户 -->
BUY_MOTIVE, <!-- 购买动机 -->
BUY_AMOUNT, <!-- 购买能力 -->
BUY_PRODUCTS, <!-- 经常购买产品 -->
SURVEY_USER <!-- 调查人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #surveyDate#, #district#, #client#, #buyMotive#, #buyAmount#, #buyProducts#, #surveyUser#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX002 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX002
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_HPYX002
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.是 -->
SURVEY_DATE = #surveyDate#, <!-- 调研日期 -->
DISTRICT = #district#, <!-- 区域 -->
CLIENT = #client#, <!-- 客户 -->
BUY_MOTIVE = #buyMotive#, <!-- 购买动机 -->
BUY_AMOUNT = #buyAmount#, <!-- 购买能力 -->
BUY_PRODUCTS = #buyProducts#, <!-- 经常购买产品 -->
SURVEY_USER = #surveyUser# <!-- 调查人员 -->
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_HPYX003
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,
SURVEY_DATE VARCHAR,
DISTRICT VARCHAR,
PRODUCT_NAME VARCHAR,
QUANTITY DECIMAL,
PRICE DECIMAL,
QUALITY VARCHAR,
SURVEY_USER VARCHAR
-->
<sqlMap namespace="HPYX003">
<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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like concat('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quality">
QUALITY = #quality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX003">
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.是 -->
SURVEY_DATE as "surveyDate", <!-- 调研日期 -->
DISTRICT as "district", <!-- 区域 -->
PRODUCT_NAME as "productName", <!-- 产品名称 -->
QUANTITY as "quantity", <!-- 产品数量 -->
PRICE as "price", <!-- 价格 -->
QUALITY as "quality", <!-- 质量 -->
SURVEY_USER as "surveyUser" <!-- 调查人员 -->
FROM ${hpjxSchema}.T_HPYX003 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_HPYX003 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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quality">
QUALITY = #quality#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX003 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SURVEY_DATE, <!-- 调研日期 -->
DISTRICT, <!-- 区域 -->
PRODUCT_NAME, <!-- 产品名称 -->
QUANTITY, <!-- 产品数量 -->
PRICE, <!-- 价格 -->
QUALITY, <!-- 质量 -->
SURVEY_USER <!-- 调查人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #surveyDate#, #district#, #productName#, #quantity#, #price#, #quality#, #surveyUser#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX003 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX003
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_HPYX003
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.是 -->
SURVEY_DATE = #surveyDate#, <!-- 调研日期 -->
DISTRICT = #district#, <!-- 区域 -->
PRODUCT_NAME = #productName#, <!-- 产品名称 -->
QUANTITY = #quantity#, <!-- 产品数量 -->
PRICE = #price#, <!-- 价格 -->
QUALITY = #quality#, <!-- 质量 -->
SURVEY_USER = #surveyUser# <!-- 调查人员 -->
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_HPYX004
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,
SURVEY_DATE VARCHAR,
DISTRICT VARCHAR,
PRODUCT_GOOD_BAD VARCHAR,
PRICE_GOOD_BAD VARCHAR,
CHANNEL_EFFECT VARCHAR,
PROMO_METHOD_GOOD_BAD VARCHAR,
SURVEY_USER VARCHAR
-->
<sqlMap namespace="HPYX004">
<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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT like concat('%',#district#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productGoodBad">
PRODUCT_GOOD_BAD = #productGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceGoodBad">
PRICE_GOOD_BAD = #priceGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelEffect">
CHANNEL_EFFECT = #channelEffect#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="promoMethodGoodBad">
PROMO_METHOD_GOOD_BAD = #promoMethodGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.yx.domain.HPYX004">
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.是 -->
SURVEY_DATE as "surveyDate", <!-- 调研日期 -->
DISTRICT as "district", <!-- 区域 -->
PRODUCT_GOOD_BAD as "productGoodBad", <!-- 产品优劣势 -->
PRICE_GOOD_BAD as "priceGoodBad", <!-- 价格优劣势 -->
CHANNEL_EFFECT as "channelEffect", <!-- 渠道效果 -->
PROMO_METHOD_GOOD_BAD as "promoMethodGoodBad", <!-- 促销方式优劣势 -->
SURVEY_USER as "surveyUser" <!-- 调查人员 -->
FROM ${hpjxSchema}.T_HPYX004 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_HPYX004 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="surveyDate">
SURVEY_DATE = #surveyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="district">
DISTRICT = #district#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productGoodBad">
PRODUCT_GOOD_BAD = #productGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceGoodBad">
PRICE_GOOD_BAD = #priceGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="channelEffect">
CHANNEL_EFFECT = #channelEffect#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="promoMethodGoodBad">
PROMO_METHOD_GOOD_BAD = #promoMethodGoodBad#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="surveyUser">
SURVEY_USER = #surveyUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPYX004 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SURVEY_DATE, <!-- 调研日期 -->
DISTRICT, <!-- 区域 -->
PRODUCT_GOOD_BAD, <!-- 产品优劣势 -->
PRICE_GOOD_BAD, <!-- 价格优劣势 -->
CHANNEL_EFFECT, <!-- 渠道效果 -->
PROMO_METHOD_GOOD_BAD, <!-- 促销方式优劣势 -->
SURVEY_USER <!-- 调查人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #surveyDate#, #district#, #productGoodBad#, #priceGoodBad#, #channelEffect#, #promoMethodGoodBad#, #surveyUser#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPYX004 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPYX004
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_HPYX004
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.是 -->
SURVEY_DATE = #surveyDate#, <!-- 调研日期 -->
DISTRICT = #district#, <!-- 区域 -->
PRODUCT_GOOD_BAD = #productGoodBad#, <!-- 产品优劣势 -->
PRICE_GOOD_BAD = #priceGoodBad#, <!-- 价格优劣势 -->
CHANNEL_EFFECT = #channelEffect#, <!-- 渠道效果 -->
PROMO_METHOD_GOOD_BAD = #promoMethodGoodBad#, <!-- 促销方式优劣势 -->
SURVEY_USER = #surveyUser# <!-- 调查人员 -->
WHERE
ID = #id#
</update>
</sqlMap>
$(function () {
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
/*pageable: {
input: true,
numeric: false,
pageSizes: [10, 50 , 100 , 200]
}*/
}
});
IPLATUI.EFGrid= {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
}
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="details(' + item.id + ',' + item.proApplyStatus + ')" >详情</a>';
}
return template;
}
}, {
field: "inquiryDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'
|| e.eiInfo.extAttr.methodName == 'approve'){
query();
}
}
}
}
$("#APPROVE").on("click",function () {
approveFuncs();
})
downKeyUp();
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let supplierName= item.get("supplierName");
if(isBlank(supplierName)){
message("选中的第"+(index+1)+"行\"供应商名称\",不能为空!");
flag = false;
return false;
}
let inquiryPerson= item.get("inquiryPerson");
if(isBlank(inquiryPerson)){
message("选中的第"+(index+1)+"行\"询价人员\",不能为空!");
flag = false;
return false;
}
let inquiryType= item.get("inquiryType");
if(isBlank(inquiryType)){
message("选中的第"+(index+1)+"行\"询价单类型\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCG004", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 提交
*/
function approveFuncs() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let proApplyStatus= item.get("proApplyStatus");
if(proApplyStatus=="1"){
message("选中的第"+(index+1)+"行\"数据已提交\",不能再次选中提交!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCG004", "approve", true);
}
});
}
}
/**
* 删除明细
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let status= item.get("proApplyStatus");
if(status=="1"){
message("选中的第"+(index+1)+"行记录已提交,不能删除!");
flag = false;
return false;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCG004", "delete", true,
function (e) {
query();
});
}
});
}
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPXT001A?methodName=initLoad&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
/**
* 显示详情清单
*
* @param id
*/
function details(id,proApplyStatus) {
JSColorbox.open({
href: "HPCG004A?methodName=initLoad&inqu_status-0-tHpjg004Id=" + id + "&inqu_status-0-proApplyStatus=" + proApplyStatus,
title: "<div style='text-align: center;'>询价详情</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/3/25
Time: 16:17
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" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="询价管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDateSpan startCname="询价日期(从)" endCname="至" blockId="inqu_status"
startName="inquiryDateFrom" endName="inquiryDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFInput cname="询价人" ename="inqu_status-0-inquiryPerson" colWidth="3"/>
<EF:EFInput cname="供应商名称" ename="inqu_status-0-supplierName" colWidth="3"/>
</div>
<%-- <div class="row">--%>
<%-- <EF:EFInput cname="产品名称" ename="inqu_status-0-inquiryPerson" colWidth="3"/>--%>
<%-- <EF:EFInput cname="产品规格" ename="inqu_status-0-inquiryPerson" colWidth="3"/>--%>
<%-- <EF:EFInput cname="规格" ename="inqu_status-0-inquiryPerson" colWidth="3"/>--%>
<%-- </div>--%>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inquiryDate" cname="询价日期" align="center" width="150" readonly="true" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="inquiryNumber" cname="询价单号" enable="false" width="130" align="center" />
<EF:EFComboColumn ename="supplierName" cname="供应商名称" blockName="supplier_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="inquiryPerson" cname="询价人员" width="140" align="center" required="true"/>
<EF:EFComboColumn ename="inquiryType" cname="询价单类型" width="80" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpcg.inquiryType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change",function(e){
var item = e.items[0];
if(e.field == "invoiceType"){
if(item.invoiceType ){
/*
折扣:discount,
单价:unitPrice,
数量:quantity,
税率:taxRate,
折后单价:discountedPrice,
含税单价:taxInclusivePrice,
含税折后单价:taxInclusiveDiscountedPrice,
不含税金额:nonTaxAmount,
税额:taxAmount,
含税金额:taxInclusiveAmount,
*/
//折后单价
let discountedPrice = item.unitPrice * item.discount;
//含税单价
let taxInclusivePrice = item.unitPrice * (item.taxRate / 100 + 1);
//含税折后单价
let taxInclusiveDiscountedPrice = taxInclusivePrice * item.discount;
//不含税金额
let nonTaxAmount = discountedPrice * item.quantity;
//含税金额
let taxInclusiveAmount = discountedPrice * item.quantity * (item.taxRate / 100 + 1);
//税额
let taxAmount = taxInclusiveAmount - nonTaxAmount;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
discountedPrice = Number(discountedPrice.toFixed(2));
// 使用toFixed方法四舍五入到两位小数,并转换为数字
taxInclusivePrice = Number(taxInclusivePrice.toFixed(2));
taxInclusiveDiscountedPrice = Number(taxInclusiveDiscountedPrice.toFixed(2));
nonTaxAmount = Number(nonTaxAmount.toFixed(2));
taxInclusiveAmount = Number(taxInclusiveAmount.toFixed(2));
taxAmount = Number(taxAmount.toFixed(2));
resultGrid.setCellValue(item,'discountedPrice',discountedPrice)
resultGrid.setCellValue(item,'taxInclusivePrice',taxInclusivePrice)
resultGrid.setCellValue(item,'taxInclusiveDiscountedPrice',taxInclusiveDiscountedPrice)
resultGrid.setCellValue(item,'nonTaxAmount',nonTaxAmount)
resultGrid.setCellValue(item,'taxInclusiveAmount',taxInclusiveAmount)
resultGrid.setCellValue(item,'taxAmount',taxAmount)
}
loadChange(grid,e,"price");
}
})
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveFunc(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
downKeyUp();
});
$(window).load(function () {
// 查
//query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let deliveryDate= item.get("deliveryDate");
let minPurchaseQuantity = item.get("minPurchaseQuantity");
let productCode= item.get("productCode");
let productName= item.get("productName");
let specification= item.get("specification");
let unit= item.get("unit");
let quantity= item.get("quantity");
let unitPrice= item.get("unitPrice");
let discount= item.get("discount");
let taxRate= item.get("taxRate");
let invoiceType= item.get("invoiceType");
if(isBlank(deliveryDate)){
message("选中的第"+(index+1)+"行\"交货日期\",不能为空!");
flag = false;
return false;
}
if(isBlank(minPurchaseQuantity)){
message("选中的第"+(index+1)+"行\"最小采购量\",不能为空!");
flag = false;
return false;
}
if(isBlank(productCode)){
message("选中的第"+(index+1)+"行\"产品编码\",不能为空!");
flag = false;
return false;
}
if(isBlank(productName)){
message("选中的第"+(index+1)+"行\"产品名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(specification)){
message("选中的第"+(index+1)+"行\"规格\",不能为空!");
flag = false;
return false;
}
if(isBlank(unit)){
message("选中的第"+(index+1)+"行\"单位\",不能为空!");
flag = false;
return false;
}
if(isBlank(quantity)){
message("选中的第"+(index+1)+"行\"数量\",不能为空!");
flag = false;
return false;
}
if(isBlank(unitPrice)){
message("选中的第"+(index+1)+"行\"单价\",不能为空!");
flag = false;
return false;
}
if(isBlank(discount)){
message("选中的第"+(index+1)+"行\"折扣\",不能为空!");
flag = false;
return false;
}
if(isBlank(taxRate)){
message("选中的第"+(index+1)+"行\"税率\",不能为空!");
flag = false;
return false;
}
if(isBlank(invoiceType)){
message("选中的第"+(index+1)+"行\"票据类型\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCG004A", "save", true,
function (e) {
//detailGrid.setEiInfo(e);
query();
});
}
});
}
}
/**
* 删除明细
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
let status= $("#inqu_status-0-proApplyStatus").val();
if(status=="1"){
message("记录已提交,不能删除!");
flag = false;
return false;
}
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCG004A", "delete", true,
function (e) {
query();
});
}
});
}
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="询价管理详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="proApplyStatus" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput ename="tHpjg004Id" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="产品编码" ename="productCode" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="产品名称" ename="productName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="规格" ename="specification" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="deliveryDate" cname="交货日期" align="center" width="150" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="minPurchaseQuantity" cname="最小采购量" width="100" enable="true" required="true" align="center"/>
<EF:EFColumn ename="productCode" cname="产品编码" width="100" enable="true" required="true" align="center" />
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="true" required="true" align="center" />
<EF:EFColumn ename="specification" cname="规格" width="70" enable="true" required="true" align="center"/>
<EF:EFColumn ename="unit" cname="单位" width="70" enable="true" required="true" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" format="{0:N0}" maxLength="20" width="70" align="right"
required="true" readonly="true"/>
<EF:EFColumn ename="unitPrice" cname="单价" width="70" enable="true" required="true" align="center"/>
<EF:EFColumn ename="discount" cname="折扣" width="70" enable="true" required="true" align="center"/>
<EF:EFComboColumn ename="taxRate" cname="税率" width="120" required="true" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true">
<EF:EFCodeOption codeName="hpjx.hpcw.taxPoints"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="invoiceType" cname="票据类型" width="120" required="true" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true">
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFComboColumn>
<EF:EFColumn ename="discountedPrice" cname="折后单价"
width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="taxInclusivePrice" cname="含税单价"
width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="taxInclusiveDiscountedPrice" cname="含税折后单价"
width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="nonTaxAmount" cname="不含税金额"
width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="taxAmount" cname="税额"
width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="taxInclusiveAmount" cname="含税金额"
width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function () {
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
/*pageable: {
input: true,
numeric: false,
pageSizes: [10, 50 , 100 , 200]
}*/
}
});
IPLATUI.EFGrid= {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
}
if (item.status==0){
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>';
}
return template;
}
}, {
field: "applyDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'
|| e.eiInfo.extAttr.methodName == 'approve'){
query();
}
}
}
}
$("#APPROVE").on("click",function () {
approveFuncs();
})
downKeyUp();
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let applyPersonnel= item.get("applyPersonnel");
if(isBlank(applyPersonnel)){
message("选中的第"+(index+1)+"行\"申请时人\",不能为空!");
flag = false;
return false;
}
let licensePlateCode= item.get("licensePlateCode");
if(isBlank(licensePlateCode)){
message("选中的第"+(index+1)+"行\"车牌号\",不能为空!");
flag = false;
return false;
}
let driver= item.get("driver");
if(isBlank(driver)){
message("选中的第"+(index+1)+"行\"司机\",不能为空!");
flag = false;
return false;
}
let startTime= item.get("startTime");
let endTime= item.get("endTime");
if (new Date(startTime) > new Date(endTime)){
message("开始时间\"不能大于\"\"结束时间\"!");
flag = false;
return false;
}
let destination= item.get("destination");
if(isBlank(destination)){
message("选中的第"+(index+1)+"行\"目的地\",不能为空!");
flag = false;
return false;
}
let mileage= item.get("mileage");
if(isBlank(mileage)){
message("选中的第"+(index+1)+"行\"里程\",不能为空!");
flag = false;
return false;
}
let status= item.get("proApplyStatus");
if(status=="1"){
message("选中的第"+(index+1)+"行记录已提交,不能修改!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT001", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 提交
*/
function approveFuncs() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let proApplyStatus= item.get("proApplyStatus");
if(proApplyStatus=="1"){
message("选中的第"+(index+1)+"行\"数据已提交\",不能再次选中提交!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT001", "approve", true);
}
});
}
}
/**
* 删除明细
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT001", "delete", true,
function (e) {
query();
});
}
});
}
}
function approveFunc(id) {
let rows = resultGrid.getDataItems();
if (rows.length < 1) {
message("请选择数据");
return;
}
let inEiInfo = new EiInfo();
inEiInfo.set("id", id);
EiCommunicator.send('HPXT001', 'returnStatus', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}
);
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPXT001A?methodName=initLoad&inqu_status-0-bizType=CLSQ&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/26
Time: 17:09
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" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="车辆申请">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDateSpan startCname="申请日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFInput cname="申请人" ename="inqu_status-0-applyPersonnel" colWidth="3"/>
</div>
<%--<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>--%>
<%--<div class="row">
<EF:EFInput cname="采购单号" ename="inqu_status-0-proApplyNo" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-factoryCode" cname="厂区" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>--%>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="applyPersonnel" cname="申请人" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="licensePlateCode" cname="车牌号" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="driver" cname="司机" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="endTime" cname="结束时间" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="destination" cname="目的地" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="mileage" cname="里程(km)" width="80" align="right" format="{0:N3}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" required="true"/>
<EF:EFColumn ename="reason" cname="事由" enable="true" width="130" align="center" />
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="返还状态" width="60" align="center"
textField="textField" valueField="valueField" readonly="true" >
<EF:EFOption label="未返还" value="0"/>
<EF:EFOption label="已返还" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 查询
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HPXT099?methodName=initLoad&inqu_status-0-bizType="+$("#inqu_status-0-bizType").val()+"&inqu_status-0-matId="+$("#inqu_status-0-matId").val(),
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", docId);
inEiInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
EiCommunicator.send('HPXT099', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT099", "delete", true);
}
})
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
/*pageable: {
input: true,
numeric: false,
pageSizes: [10, 50 , 100 , 200]
}*/
}
});
IPLATUI.EFGrid= {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
}
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="details(' + item.id + ')" >详情</a>';
}
return template;
}
}, {
field: "applyDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'
|| e.eiInfo.extAttr.methodName == 'approve'){
query();
}
}
}
}
// $("#APPROVE").on("click",function () {
// approveFuncs();
// })
downKeyUp();
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let applyPersonnel= item.get("applyPersonnel");
if(isBlank(applyPersonnel)){
message("选中的第"+(index+1)+"行\"申请时人\",不能为空!");
flag = false;
return false;
}
let licensePlateCode= item.get("licensePlateCode");
if(isBlank(licensePlateCode)){
message("选中的第"+(index+1)+"行\"车牌号\",不能为空!");
flag = false;
return false;
}
let applyNo= item.get("applyNo");
if(isBlank(applyNo)){
message("选中的第"+(index+1)+"行\"保险单号\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT002", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 提交
*/
// function approveFuncs() {
// let rows = resultGrid.getCheckedRows();
// if (rows.length < 1) {
// message("请选择数据");
// return;
// }
// let flag = true;
// $.each(rows, function(index, item) {
// let proApplyStatus= item.get("proApplyStatus");
// if(proApplyStatus=="1"){
// message("选中的第"+(index+1)+"行\"数据已提交\",不能再次选中提交!");
// flag = false;
// return false;
// }
// });
// if(flag) {
// JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
// ok: function () {
// JSUtils.submitGridsData("result", "HPXT001", "approve", true);
// }
// });
// }
// }
/**
* 删除明细
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let status= item.get("proApplyStatus");
if(status=="1"){
message("选中的第"+(index+1)+"行记录已提交,不能删除!");
flag = false;
return false;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT002", "delete", true,
function (e) {
query();
});
}
});
}
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPXT001A?methodName=initLoad&inqu_status-0-bizType=CLBX&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
/**
* 显示详情清单
*
* @param id
*/
function details(id) {
JSColorbox.open({
href: "HPXT002A?methodName=initLoad&inqu_status-0-tHpxt002Id=" + id,
title: "<div style='text-align: center;'>保险详情</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/26
Time: 17:09
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" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="车辆保险">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDateSpan startCname="投保日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFInput cname="申请人" ename="inqu_status-0-applyPersonnel" colWidth="3"/>
<EF:EFInput cname="车牌号" ename="inqu_status-0-licensePlateCode" colWidth="3"/>
</div>
<%--<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>--%>
<%--<div class="row">
<EF:EFInput cname="采购单号" ename="inqu_status-0-proApplyNo" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-factoryCode" cname="厂区" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>--%>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="保险单号" enable="true" width="130" align="center"/>
<EF:EFColumn ename="applyPersonnel" cname="申请人" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="licensePlateCode" cname="车牌号" enable="true" width="130" align="center" required="true"/>
<EF:EFComboColumn ename="proApplyStatus" cname="申请状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
/*pageable: {
input: true,
numeric: false,
pageSizes: [10, 50 , 100 , 200]
}*/
}
});
IPLATUI.EFGrid= {
"result": {
columns: [
// {
// field: "operator",
// template: function (item) {
// let template = '';
// if (item.id) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
// }
// return template;
// }
// }, {
// field: "applyDate",
// attributes: {
// class: "i-input-readonly"
// },
// defaultValue: function () {
// return currShortDate();
// }
// }
],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'
|| e.eiInfo.extAttr.methodName == 'approve'){
query();
}
}
}
}
// $("#APPROVE").on("click",function () {
// approveFuncs();
// })
downKeyUp();
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let insuranceType= item.get("insuranceType");
if(isBlank(insuranceType)){
message("选中的第"+(index+1)+"行\"车险险种\",不能为空!");
flag = false;
return false;
}
let licensePlateCode= item.get("licensePlateCode");
if(isBlank(licensePlateCode)){
message("选中的第"+(index+1)+"行\"车牌号\",不能为空!");
flag = false;
return false;
}
let insuranceCompany= item.get("insuranceCompany");
if(isBlank(insuranceCompany)){
message("选中的第"+(index+1)+"行\"保险公司\",不能为空!");
flag = false;
return false;
}
let insuranceAmount= item.get("insuranceAmount");
if(isBlank(insuranceAmount)){
message("选中的第"+(index+1)+"行\"保险金额\",不能为空!");
flag = false;
return false;
}
let insuranceStartDate= item.get("insuranceStartDate");
let insuranceEndDate= item.get("insuranceEndDate");
if (new Date(insuranceStartDate) > new Date(insuranceEndDate)){
message("投保时间\"不能大于\"\"结束时间\"!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT002A", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 提交
*/
// function approveFuncs() {
// let rows = resultGrid.getCheckedRows();
// if (rows.length < 1) {
// message("请选择数据");
// return;
// }
// let flag = true;
// $.each(rows, function(index, item) {
// let proApplyStatus= item.get("proApplyStatus");
// if(proApplyStatus=="1"){
// message("选中的第"+(index+1)+"行\"数据已提交\",不能再次选中提交!");
// flag = false;
// return false;
// }
// });
// if(flag) {
// JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
// ok: function () {
// JSUtils.submitGridsData("result", "HPXT001", "approve", true);
// }
// });
// }
// }
/**
* 删除明细
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT002A", "delete", true,
function (e) {
query();
});
}
});
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/26
Time: 17:09
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" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="保险详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<%-- <EF:EFDateSpan startCname="投保日期(从)" endCname="至" blockId="inqu_status"--%>
<%-- startName="createdDateFrom" endName="createdDateTo" row="0" role="date"--%>
<%-- format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">--%>
<%-- </EF:EFDateSpan>--%>
<%-- <EF:EFInput cname="申请人" ename="inqu_status-0-applyPersonnel" colWidth="3"/>--%>
<EF:EFInput cname="主表ID" ename="tHpxt002Id" blockId="inqu_status" row="0" type="hidden"/>
</div>
<%--<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>--%>
<%--<div class="row">
<EF:EFInput cname="采购单号" ename="inqu_status-0-proApplyNo" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-factoryCode" cname="厂区" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>--%>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<%-- <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>--%>
<EF:EFColumn ename="licensePlateCode" cname="车牌号" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="insuranceType" cname="车险险种" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="insuranceCompany" cname="保险公司" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="insuranceAmount" cname="保险金额(元)" width="80" align="right" format="{0:N3}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" required="true"/>
<EF:EFColumn ename="insuranceStartDate" cname="投保时间" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="insuranceEndDate" cname="结束时间" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFUpload = {
uploadFile: {
success: function(e) {
let docId = e.response.docId;
if (isBlank(docId)) {
return;
}
$("#fileDocId").val(docId);
NotificationUtil("附件上传成功");
console.log($("#fileDocId").val())
saveTemp(e);
try {
parent.JSColorbox.setValueCallback(docId);
} catch (e){
}
},
}
};
function saveTemp(e) {
let docId = e.response.docId;
let docName = e.response.docName;
let docSize = e.response.docSize;
let docTag = e.response.docTag;
let docUrl = e.response.docUrl;
let result = new EiInfo();
result.set("result-0-docId",docId);
result.set("result-0-docName",docName);
result.set("result-0-docSize",docSize);
result.set("result-0-docTag",docTag);
result.set("result-0-realPath",docUrl);
result.set("result-0-bizType",$("#inqu_status-0-bizType").val());
result.set("result-0-matId",$("#inqu_status-0-matId").val());
if(!isBlank($("#inqu_status-0-companyCode").val())){
result.set("result-0-companyCode",$("#inqu_status-0-companyCode").val());
}
EiCommunicator.send("HPDS002", "insert", result, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件上传">
<EF:EFInput cname="车辆ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="企业编码" ename="companyCode" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="hk_file11" path="A"/>
</EF:EFRegion>
<EF:EFInput ename="fileDocId" cname="" hidden="true"/>
</EF:EFPage>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
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 YX001 = "YX001";
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>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-1").on("click", function () {
grid.dataSource.page(1);
});
},
dataBound: function (e) {
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['surveyDate'] = 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();
}
},
},
"resultA": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let YX002 = "YX002";
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ',\''+YX002+'\')" >附件清单</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");
});
},
dataBound: function (e) {
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['surveyDate'] = currShortDate()
});
},
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 YX003 = "YX003";
let template = "";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ',\''+YX003+'\')" >附件清单</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");
});
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['surveyDate'] = currShortDate()
});
},
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 YX004 = "YX004";
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ',\''+YX004+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-4").on("click", function () {
grid.dataSource.page(1);
});
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['surveyDate'] = currShortDate()
});
},
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.district)){
message("选中的第"+(index+1)+"行\"区域\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.supplier)){
message("选中的第"+(index+1)+"行\"供应商\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.competeUser)){
message("选中的第"+(index+1)+"行\"竞争对手\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.surveyUser)){
message("选中的第"+(index+1)+"行\"调查人员\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPYX001", "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.district)){
message("选中的第"+(index+1)+"行\"区域\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.client)){
message("选中的第"+(index+1)+"行\"客户名称\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.surveyUser)){
message("选中的第"+(index+1)+"行\"调查人员\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("resultA", "HPYX002", "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.district)){
message("选中的第"+(index+1)+"行\"区域\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.surveyUser)){
message("选中的第"+(index+1)+"行\"调查人员\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("resultB", "HPYX003", "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.district)){
message("选中的第"+(index+1)+"行\"区域\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.surveyUser)){
message("选中的第"+(index+1)+"行\"调查人员\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("resultC", "HPYX004", "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="surveyDate" cname="日期"
role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="district" cname="区域" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="surveyUser" 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: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="surveyDate" cname="日期" width="120" enable="true" readonly="false" align="center" editType="date"
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="policyEnv" cname="政策环境" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="economyEnv" cname="经济环境" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="sociCultureEnv" cname="社会文化环境" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFComboColumn ename="supplier" cname="供应商名称" blockName="supplier_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="competeUser" cname="竞争对手" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFComboColumn ename="surveyUser" 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="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="HPYX002">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="surveyDate" cname="日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="district" cname="区域" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFComboColumn ename="client" cname="客户名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="buyMotive" cname="购买动机" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="buyAmount" 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 ename="buyProducts" cname="经常购买产品" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFComboColumn ename="surveyUser" 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="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="HPYX003">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="surveyDate" cname="日期" width="120" enable="true" readonly="false" align="center" editType="date"
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="price" 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="quality" cname="质量" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFComboColumn ename="surveyUser" 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="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="HPYX004">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="surveyDate" cname="日期" width="120" enable="true" readonly="false" align="center" editType="date"
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="productGoodBad" cname="产品优劣势" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="priceGoodBad" cname="价格优劣势" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="channelEffect" cname="渠道效果" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="promoMethodGoodBad" cname="促销方式优劣势" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFComboColumn ename="surveyUser" 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="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>
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