Commit e33fad0b by YG8429

询价管理、车辆管理优化

parent 96f4abf0
package com.baosight.hggp.hg.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:HGCG005.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-10-10 14:27:43 create
*/
public class HGCG005 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_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_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_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 = "HGCG005.query";
public static final String COUNT = "HGCG005.count";
public static final String INSERT = "HGCG005.insert";
public static final String UPDATE = "HGCG005.update";
public static final String DELETE = "HGCG005.delete";
public static final String DELETE_FLAG = "HGCG005.deleteFlag";
public static final String UPDATE_PRO_APPLY_STATUS = "HGCG005.updateProApplyStatus";
private Long id = new Long(0); /* 主键id*/
private String accountCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String inquiryDate = " "; /* 询价日期*/
private String inquiryNumber = " "; /* 询价单号*/
private String supplierName = " "; /* 供应商名称*/
private String inquiryType = " "; /* 询价单类型*/
private String inquiryPerson = " "; /* 询价单申请人*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer proApplyStatus = 0; /* 申请状态*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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 HGCG005() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码 预留.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码 预留.
*
* @param accountCode - 企业编码 预留
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* 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));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_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.hggp.hg.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:HGCG005A.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-10-10 14:27:43 create
*/
public class HGCG005A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_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"; /* 是否删除0.否1.是*/
public static final String FIELD_HGCG005_ID = "hgcg005Id"; /* 主表ID*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_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_HGCG005_ID = "T_HGCG005_ID"; /* 主表ID*/
public static final String QUERY = "HGCG005A.query";
public static final String COUNT = "HGCG005A.count";
public static final String INSERT = "HGCG005A.insert";
public static final String UPDATE = "HGCG005A.update";
public static final String DELETE = "HGCG005A.delete";
public static final String DELETE_FLAG = "HGCG005A.deleteFlag";
private Long id = new Long(0); /* 主键id*/
private String accountCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private 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 hgcg005Id = new Long(0); /* 主表ID*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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);
eiColumn = new EiColumn(FIELD_HGCG005_ID);
eiColumn.setDescName("主表ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCG005A() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码 预留.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码 预留.
*
* @param accountCode - 企业编码 预留
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* 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;
}
/**
* get the t_hgcg005Id - 主表ID.
* @return the t_hgcg005Id
*/
public Long getHgcg005Id() {
return this.hgcg005Id;
}
/**
* set the hgcg005Id - 主表ID.
*
* @param hgcg005Id - 主表ID
*/
public void setHgcg005Id(Long hgcg005Id) {
this.hgcg005Id = hgcg005Id;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
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));
setHgcg005Id(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_HGCG005_ID)), hgcg005Id));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_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_HGCG005_ID, StringUtils.toString(hgcg005Id, eiMetadata.getMeta(FIELD_HGCG005_ID)));
return map;
}
}
package com.baosight.hggp.hg.cg.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cg.domain.HGCG005;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.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.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGCG005 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG005().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCG005.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGCG005.QUERY, new HGCG005());
// 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 {
HGCG005 hpcg005 = new HGCG005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpcg005.fromMap(map);
hpcg005.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGCG005.DELETE_FLAG, hpcg005);
}
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();
// 写入数据
List<HGCG005> list = new ArrayList<>();
for (Map resultRow : resultRows) {
HGCG005 hpcg005 = new HGCG005();
hpcg005.fromMap(resultRow);
if (hpcg005.getId() == null || hpcg005.getId() == 0) {
hpcg005.setDeleteFlag(CommonConstant.YesNo.NO_0);
this.add(hpcg005);
} else {
this.modify(hpcg005);
}
list.add(hpcg005);
}
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGCG005 hpcg005) {
this.setBaseInfo(hpcg005);
//生成采购询价单号
hpcg005.setInquiryNumber(SequenceGenerator.getNextSequence(HGConstant.SequenceId.INQUIRY_NUMBER));
DaoUtils.insert(HGCG005.INSERT, hpcg005);
}
/**
* 设置基础信息
*
* @param hpcg005
*/
private void setBaseInfo(HGCG005 hpcg005) {
// 去除日期字符串中的-
hpcg005.setInquiryDate(StringUtil.removeHorizontalLine(hpcg005.getInquiryDate()));
}
/**
* 修改操作
*/
public void modify(HGCG005 hpcg005) {
DaoUtils.update(HGCG005.UPDATE, hpcg005);
}
@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) {
HGCG005 hpcg005 = new HGCG005();
hpcg005.fromMap(resultRow);
hpcg005.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGCG005.UPDATE_PRO_APPLY_STATUS,hpcg005);
}
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.hggp.hg.cg.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cg.domain.HGCG005A;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.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.ArrayList;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGCG005A 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, HGCG005A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGCG005A.QUERY, new HGCG005A());
// 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 {
HGCG005A hgcg005A = new HGCG005A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgcg005A.fromMap(map);
hgcg005A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGCG005A.DELETE_FLAG, hgcg005A);
}
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();
// 写入数据
List<HGCG005A> list = new ArrayList<>();
for (Map resultRow : resultRows) {
HGCG005A hgcg005A = new HGCG005A();
hgcg005A.fromMap(resultRow);
if (hgcg005A.getId() == null || hgcg005A.getId() == 0) {
String hgcg005Id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCG005A.FIELD_HGCG005_ID);
hgcg005A.setHgcg005Id(Long.valueOf(hgcg005Id));
this.add(hgcg005A);
} else {
this.modify(hgcg005A);
}
list.add(hgcg005A);
}
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGCG005A hgcg005A) {
this.setBaseInfo(hgcg005A);
//生成采购询价单号
DaoUtils.insert(HGCG005A.INSERT, hgcg005A);
}
/**
* 设置基础信息
*
* @param hgcg005A
*/
private void setBaseInfo(HGCG005A hgcg005A) {
// 去除日期字符串中的-
hgcg005A.setDeliveryDate(StringUtil.removeHorizontalLine(hgcg005A.getDeliveryDate()));
}
/**
* 修改操作
*/
public void modify(HGCG005A hpcg004a) {
DaoUtils.update(HGCG005A.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-10-10 14:27:43
Version : 1.0
schema : hggp
tableName : HGCG005
ID BIGINT NOT NULL primarykey,
ACCOUNT_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="HGCG005">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cg.domain.HGCG005">
SELECT
ID as "id", <!-- 主键id -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
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 ${hggpSchema}.HGCG005 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 ${hggpSchema}.HGCG005 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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 ${hggpSchema}.HGCG005 (ID, <!-- 主键id -->
ACCOUNT_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#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #inquiryDate#, #inquiryNumber#, #supplierName#, #inquiryType#, #inquiryPerson#, #deleteFlag#, #proApplyStatus#)
<selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGCG005
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCG005 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGCG005
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<!--修改提交状态-->
<update id="updateProApplyStatus">
UPDATE ${hggpSchema}.HGCG005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
PRO_APPLY_STATUS = #proApplyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGCG005
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 预留 -->
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-10-10 14:27:43
Version : 1.0
schema : hggp
tableName : HGCG005A
ID BIGINT NOT NULL primarykey,
ACCOUNT_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,
T_HGCG005_ID BIGINT
-->
<sqlMap namespace="HGCG005A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="hgcg005Id">
HGCG005_ID = #hgcg005Id#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cg.domain.HGCG005A">
SELECT
ID as "id", <!-- 主键id -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
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.是 -->
HGCG005_ID as "hgcg005Id" <!-- 主表ID -->
FROM ${hggpSchema}.HGCG005A 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 ${hggpSchema}.HGCG005A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="t_hgcg005Id">
T_HGCG005_ID = #t_hgcg005Id#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCG005A (ID, <!-- 主键id -->
ACCOUNT_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.是 -->
HGCG005_ID <!-- 主表ID -->
)
VALUES (#id#, #accountCode#, #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#, #hgcg005Id#)
<selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGCG005A
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCG005A WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGCG005A
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGCG005A
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 预留 -->
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.是 -->
HGCG005_ID = #hgcg005Id# <!-- 主表ID -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -193,6 +193,8 @@ public class HGConstant { ...@@ -193,6 +193,8 @@ public class HGConstant {
//办公用品领用单号 //办公用品领用单号
public static final String HGBG003_RECEIVE_CODE = "HGBG003_RECEIVE_CODE"; public static final String HGBG003_RECEIVE_CODE = "HGBG003_RECEIVE_CODE";
//采购询价单号
public static final String INQUIRY_NUMBER = "INQUIRY_NUMBER";
} }
/** /**
......
...@@ -37,6 +37,7 @@ public class HGXT002 extends DaoEPBase { ...@@ -37,6 +37,7 @@ public class HGXT002 extends DaoEPBase {
public static final String FIELD_LICENSE_PLATE_CODE = "licensePlateCode"; /* 车牌号*/ public static final String FIELD_LICENSE_PLATE_CODE = "licensePlateCode"; /* 车牌号*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_APPLY_STATUS = "applyStatus"; /* 申请状态*/ public static final String FIELD_APPLY_STATUS = "applyStatus"; /* 申请状态*/
public static final String FIELD_INSURANCE_COMPANY = "insuranceCompany";
public static final String COL_ID = "ID"; /* 主键id*/ public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
...@@ -53,6 +54,7 @@ public class HGXT002 extends DaoEPBase { ...@@ -53,6 +54,7 @@ public class HGXT002 extends DaoEPBase {
public static final String COL_LICENSE_PLATE_CODE = "LICENSE_PLATE_CODE"; /* 车牌号*/ 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_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_APPLY_STATUS = "APPLY_STATUS"; /* 申请状态*/ public static final String COL_APPLY_STATUS = "APPLY_STATUS"; /* 申请状态*/
public static final String COL_INSURANCE_COMPANY = "INSURANCE_COMPANY";
public static final String QUERY = "HGXT002.query"; public static final String QUERY = "HGXT002.query";
public static final String COUNT = "HGXT002.count"; public static final String COUNT = "HGXT002.count";
...@@ -78,6 +80,7 @@ public class HGXT002 extends DaoEPBase { ...@@ -78,6 +80,7 @@ public class HGXT002 extends DaoEPBase {
private String licensePlateCode = " "; /* 车牌号*/ private String licensePlateCode = " "; /* 车牌号*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/ private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer applyStatus = 0; /* 申请状态*/ private Integer applyStatus = 0; /* 申请状态*/
private String insuranceCompany = " "; /* 保险公司*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -146,6 +149,10 @@ public class HGXT002 extends DaoEPBase { ...@@ -146,6 +149,10 @@ public class HGXT002 extends DaoEPBase {
eiColumn.setDescName("申请状态"); eiColumn.setDescName("申请状态");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INSURANCE_COMPANY);
eiColumn.setDescName("保险公司");
eiMetadata.addMeta(eiColumn);
} }
...@@ -396,6 +403,15 @@ public class HGXT002 extends DaoEPBase { ...@@ -396,6 +403,15 @@ public class HGXT002 extends DaoEPBase {
public void setApplyStatus(Integer applyStatus) { public void setApplyStatus(Integer applyStatus) {
this.applyStatus = applyStatus; this.applyStatus = applyStatus;
} }
public String getInsuranceCompany() {
return insuranceCompany;
}
public void setInsuranceCompany(String insuranceCompany) {
this.insuranceCompany = insuranceCompany;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -419,6 +435,7 @@ public class HGXT002 extends DaoEPBase { ...@@ -419,6 +435,7 @@ public class HGXT002 extends DaoEPBase {
setLicensePlateCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE_CODE)), licensePlateCode)); setLicensePlateCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE_CODE)), licensePlateCode));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_APPLY_STATUS)), applyStatus)); setApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_APPLY_STATUS)), applyStatus));
setInsuranceCompany(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSURANCE_COMPANY)), insuranceCompany));
} }
/** /**
...@@ -443,6 +460,7 @@ public class HGXT002 extends DaoEPBase { ...@@ -443,6 +460,7 @@ public class HGXT002 extends DaoEPBase {
map.put(FIELD_LICENSE_PLATE_CODE, StringUtils.toString(licensePlateCode, eiMetadata.getMeta(FIELD_LICENSE_PLATE_CODE))); 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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_APPLY_STATUS, StringUtils.toString(applyStatus, eiMetadata.getMeta(FIELD_APPLY_STATUS))); map.put(FIELD_APPLY_STATUS, StringUtils.toString(applyStatus, eiMetadata.getMeta(FIELD_APPLY_STATUS)));
map.put(FIELD_INSURANCE_COMPANY, StringUtils.toString(insuranceCompany, eiMetadata.getMeta(FIELD_INSURANCE_COMPANY)));
return map; return map;
} }
......
package com.baosight.hggp.hg.xt.service; package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.bg.domain.HGBG002;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.xt.domain.HGXT001; import com.baosight.hggp.hg.xt.domain.HGXT001;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils; import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil; import com.baosight.hggp.util.StringUtil;
...@@ -17,6 +20,8 @@ import com.baosight.iplat4j.core.resource.I18nMessages; ...@@ -17,6 +20,8 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -29,7 +34,14 @@ public class ServiceHGXT001 extends ServiceEPBase { ...@@ -29,7 +34,14 @@ public class ServiceHGXT001 extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXT001().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -77,6 +89,7 @@ public class ServiceHGXT001 extends ServiceEPBase { ...@@ -77,6 +89,7 @@ public class ServiceHGXT001 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HGXT001> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGXT001 hpxt001 = new HGXT001(); HGXT001 hpxt001 = new HGXT001();
hpxt001.fromMap(resultRow); hpxt001.fromMap(resultRow);
...@@ -85,7 +98,9 @@ public class ServiceHGXT001 extends ServiceEPBase { ...@@ -85,7 +98,9 @@ public class ServiceHGXT001 extends ServiceEPBase {
} else { } else {
this.modify(hpxt001); this.modify(hpxt001);
} }
list.add(hpxt001);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
package com.baosight.hggp.hg.xt.service; package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.xt.domain.HGXT001; import com.baosight.hggp.hg.xt.domain.HGXT001;
import com.baosight.hggp.hg.xt.domain.HGXT002; import com.baosight.hggp.hg.xt.domain.HGXT002;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils; import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil; import com.baosight.hggp.util.StringUtil;
...@@ -16,6 +18,8 @@ import com.baosight.iplat4j.core.exception.PlatException; ...@@ -16,6 +18,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages; import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -28,7 +32,14 @@ public class ServiceHGXT002 extends ServiceEPBase { ...@@ -28,7 +32,14 @@ public class ServiceHGXT002 extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXT002().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -51,13 +62,13 @@ public class ServiceHGXT002 extends ServiceEPBase { ...@@ -51,13 +62,13 @@ public class ServiceHGXT002 extends ServiceEPBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
int i = 0; int i = 0;
try { try {
HGXT002 HGXT002 = new HGXT002(); HGXT002 hgxt002 = new HGXT002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) { for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HGXT002.fromMap(map); hgxt002.fromMap(map);
HGXT002.setDeleteFlag(CommonConstant.YesNo.YES_1); hgxt002.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT002.DELETE_FLAG, HGXT002); DaoUtils.update(HGXT002.DELETE_FLAG, hgxt002);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
...@@ -76,15 +87,18 @@ public class ServiceHGXT002 extends ServiceEPBase { ...@@ -76,15 +87,18 @@ public class ServiceHGXT002 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HGXT002> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGXT002 HGXT002 = new HGXT002(); HGXT002 hgxt002 = new HGXT002();
HGXT002.fromMap(resultRow); hgxt002.fromMap(resultRow);
if (HGXT002.getId() == null || HGXT002.getId() == 0) { if (hgxt002.getId() == null || hgxt002.getId() == 0) {
this.add(HGXT002); this.add(hgxt002);
} else { } else {
this.modify(HGXT002); this.modify(hgxt002);
} }
list.add(hgxt002);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -104,20 +118,20 @@ public class ServiceHGXT002 extends ServiceEPBase { ...@@ -104,20 +118,20 @@ public class ServiceHGXT002 extends ServiceEPBase {
/** /**
* 设置基础信息 * 设置基础信息
* *
* @param HGXT002 * @param hgxt002
*/ */
private void setBaseInfo(HGXT002 HGXT002) { private void setBaseInfo(HGXT002 hgxt002) {
// 去除日期字符串中的- // 去除日期字符串中的-
HGXT002.setApplyDate(StringUtil.removeHorizontalLine(HGXT002.getApplyDate())); hgxt002.setApplyDate(StringUtil.removeHorizontalLine(hgxt002.getApplyDate()));
HGXT002.setApplyStatus(CommonConstant.YesNo.NO_0); hgxt002.setApplyStatus(CommonConstant.YesNo.NO_0);
} }
/** /**
* 修改操作 * 修改操作
*/ */
public void modify(HGXT002 HGXT002) { public void modify(HGXT002 hgxt002) {
DaoUtils.update(HGXT002.UPDATE, HGXT002); DaoUtils.update(HGXT002.UPDATE, hgxt002);
} }
@OperationLogAnnotation(operModul = "车辆申请",operType = "提交",operDesc = "提交审批操作") @OperationLogAnnotation(operModul = "车辆申请",operType = "提交",operDesc = "提交审批操作")
......
...@@ -17,6 +17,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages; ...@@ -17,6 +17,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -52,13 +53,13 @@ public class ServiceHGXT003 extends ServiceEPBase { ...@@ -52,13 +53,13 @@ public class ServiceHGXT003 extends ServiceEPBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
int i = 0; int i = 0;
try { try {
HGXT003 HGXT003 = new HGXT003(); HGXT003 hgxt003 = new HGXT003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) { for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HGXT003.fromMap(map); hgxt003.fromMap(map);
HGXT003.setDeleteFlag(CommonConstant.YesNo.YES_1); hgxt003.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT003.DELETE_FLAG, HGXT003); DaoUtils.update(HGXT003.DELETE_FLAG, hgxt003);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
...@@ -77,15 +78,18 @@ public class ServiceHGXT003 extends ServiceEPBase { ...@@ -77,15 +78,18 @@ public class ServiceHGXT003 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HGXT003> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGXT003 HGXT003 = new HGXT003(); HGXT003 hgxt003 = new HGXT003();
HGXT003.fromMap(resultRow); hgxt003.fromMap(resultRow);
if (HGXT003.getId() == null || HGXT003.getId() == 0) { if (hgxt003.getId() == null || hgxt003.getId() == 0) {
this.add(HGXT003); this.add(hgxt003);
} else { } else {
this.modify(HGXT003); this.modify(hgxt003);
} }
list.add(hgxt003);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
package com.baosight.hggp.hg.xt.service; package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.xt.domain.HGXT004; import com.baosight.hggp.hg.xt.domain.HGXT004;
import com.baosight.hggp.util.ErrorCodeUtils; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -17,6 +16,8 @@ import com.baosight.iplat4j.core.resource.I18nMessages; ...@@ -17,6 +16,8 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -29,7 +30,14 @@ public class ServiceHGXT004 extends ServiceEPBase { ...@@ -29,7 +30,14 @@ public class ServiceHGXT004 extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXT004().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -52,13 +60,13 @@ public class ServiceHGXT004 extends ServiceEPBase { ...@@ -52,13 +60,13 @@ public class ServiceHGXT004 extends ServiceEPBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
int i = 0; int i = 0;
try { try {
HGXT004 HGXT004 = new HGXT004(); HGXT004 hgxt004 = new HGXT004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) { for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HGXT004.fromMap(map); hgxt004.fromMap(map);
HGXT004.setDeleteFlag(CommonConstant.YesNo.YES_1); hgxt004.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.DELETE_FLAG, HGXT004); DaoUtils.update(HGXT004.DELETE_FLAG, hgxt004);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
...@@ -77,15 +85,18 @@ public class ServiceHGXT004 extends ServiceEPBase { ...@@ -77,15 +85,18 @@ public class ServiceHGXT004 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HGXT004> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004(); HGXT004 hgxt004 = new HGXT004();
HGXT004.fromMap(resultRow); hgxt004.fromMap(resultRow);
if (HGXT004.getId() == null || HGXT004.getId() == 0) { if (hgxt004.getId() == null || hgxt004.getId() == 0) {
this.add(HGXT004); this.add(hgxt004);
} else { } else {
this.modify(HGXT004); this.modify(hgxt004);
} }
list.add(hgxt004);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -97,31 +108,31 @@ public class ServiceHGXT004 extends ServiceEPBase { ...@@ -97,31 +108,31 @@ public class ServiceHGXT004 extends ServiceEPBase {
/** /**
* 新增操作 * 新增操作
*/ */
public void add(HGXT004 HGXT004) { public void add(HGXT004 hgxt004) {
this.setBaseInfo(HGXT004); this.setBaseInfo(hgxt004);
//生成会议室管理申请 //生成会议室管理申请
HGXT004.setApplyNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CONFERENCE_APPLY_NO)); hgxt004.setApplyNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CONFERENCE_APPLY_NO));
DaoUtils.insert(HGXT004.INSERT, HGXT004); DaoUtils.insert(HGXT004.INSERT, hgxt004);
} }
/** /**
* 设置基础信息 * 设置基础信息
* *
* @param HGXT004 * @param hgxt004
*/ */
private void setBaseInfo(HGXT004 HGXT004) { private void setBaseInfo(HGXT004 hgxt004) {
// 去除日期字符串中的- // 去除日期字符串中的-
HGXT004.setApplyDate(StringUtil.removeHorizontalLine(HGXT004.getApplyDate())); hgxt004.setApplyDate(StringUtil.removeHorizontalLine(hgxt004.getApplyDate()));
HGXT004.setStartTime(StringUtil.removeHorizontalLine(HGXT004.getStartTime())); hgxt004.setStartTime(DateUtils.formatShort(hgxt004.getStartTime()));
HGXT004.setEndTime(StringUtil.removeHorizontalLine(HGXT004.getEndTime())); hgxt004.setEndTime(DateUtils.formatShort(hgxt004.getEndTime()));
} }
/** /**
* 修改操作 * 修改操作
*/ */
public void modify(HGXT004 HGXT004) { public void modify(HGXT004 hgxt004) {
DaoUtils.update(HGXT004.UPDATE, HGXT004); DaoUtils.update(HGXT004.UPDATE, hgxt004);
} }
@OperationLogAnnotation(operModul = "会议室管理",operType = "提交",operDesc = "提交审批操作") @OperationLogAnnotation(operModul = "会议室管理",operType = "提交",operDesc = "提交审批操作")
public EiInfo approve(EiInfo inInfo){ public EiInfo approve(EiInfo inInfo){
...@@ -129,10 +140,10 @@ public class ServiceHGXT004 extends ServiceEPBase { ...@@ -129,10 +140,10 @@ public class ServiceHGXT004 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004(); HGXT004 hgxt004 = new HGXT004();
HGXT004.fromMap(resultRow); hgxt004.fromMap(resultRow);
HGXT004.setProApplyStatus(CommonConstant.YesNo.YES_1); hgxt004.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.UPDATE_PRO_APPLY_STATUS, HGXT004); DaoUtils.update(HGXT004.UPDATE_PRO_APPLY_STATUS, hgxt004);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")});
...@@ -154,10 +165,10 @@ public class ServiceHGXT004 extends ServiceEPBase { ...@@ -154,10 +165,10 @@ public class ServiceHGXT004 extends ServiceEPBase {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004(); HGXT004 hgxt004 = new HGXT004();
HGXT004.fromMap(resultRow); hgxt004.fromMap(resultRow);
HGXT004.setStatus(CommonConstant.YesNo.YES_1); hgxt004.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.UPDATE_STATUS, HGXT004); DaoUtils.update(HGXT004.UPDATE_STATUS, hgxt004);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.returnStatus", "返还")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.returnStatus", "返还")});
......
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -241,6 +241,9 @@ ...@@ -241,6 +241,9 @@
STATUS <!-- 返还状态 0-未返还 1-已返还 --> STATUS <!-- 返还状态 0-未返还 1-已返还 -->
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #driver#, #startTime#, #endTime#, #destination#, #mileage#, #reason#, #deleteFlag#, #proApplyStatus#, #status#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #driver#, #startTime#, #endTime#, #destination#, #mileage#, #reason#, #deleteFlag#, #proApplyStatus#, #status#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT001
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
APPLY_DATE as "applyDate", <!-- 申请日期 --> APPLY_DATE as "applyDate", <!-- 申请日期 -->
APPLY_NO as "applyNo", <!-- 保险单号 --> APPLY_NO as "applyNo", <!-- 保险单号 -->
INSURANCE_COMPANY as "insuranceCompany", <!-- 保险公司 -->
APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 --> APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 -->
LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 --> LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
...@@ -101,7 +102,7 @@ ...@@ -101,7 +102,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -175,9 +176,13 @@ ...@@ -175,9 +176,13 @@
APPLY_PERSONNEL, <!-- 申请人 --> APPLY_PERSONNEL, <!-- 申请人 -->
LICENSE_PLATE_CODE, <!-- 车牌号 --> LICENSE_PLATE_CODE, <!-- 车牌号 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 --> DELETE_FLAG, <!-- 是否删除0.否1.是 -->
APPLY_STATUS <!-- 申请状态 --> APPLY_STATUS, <!-- 申请状态 -->
INSURANCE_COMPANY
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #deleteFlag#, #applyStatus#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #deleteFlag#, #applyStatus#, #insuranceCompany#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT002
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -224,7 +229,8 @@ ...@@ -224,7 +229,8 @@
APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 --> APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 -->
LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 --> LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 --> DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
APPLY_STATUS = #applyStatus# <!-- 申请状态 --> APPLY_STATUS = #applyStatus#, <!-- 申请状态 -->
INSURANCE_COMPANY = #insuranceCompany#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -186,6 +186,9 @@ ...@@ -186,6 +186,9 @@
T_HPXT002_ID T_HPXT002_ID
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #licensePlateCode#, #insuranceType#, #insuranceCompany#, #insuranceStartDate#, #insuranceEndDate#, #insuranceAmount#, #deleteFlag#, #tHpxt002Id# ) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #licensePlateCode#, #insuranceType#, #insuranceCompany#, #insuranceStartDate#, #insuranceEndDate#, #insuranceAmount#, #deleteFlag#, #tHpxt002Id# )
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT002A
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -190,6 +190,9 @@ ...@@ -190,6 +190,9 @@
DELETE_FLAG <!-- 删除标记 --> DELETE_FLAG <!-- 删除标记 -->
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #maintenanceDate#, #maintenanceNumber#, #maintenanceType#, #licensePlate#, #handler#, #maintenanceCost#, #maintenanceReason#, #deleteFlag#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #maintenanceDate#, #maintenanceNumber#, #maintenanceType#, #licensePlate#, #handler#, #maintenanceCost#, #maintenanceReason#, #deleteFlag#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT003
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -232,6 +232,9 @@ ...@@ -232,6 +232,9 @@
STATUS <!-- 返还状态 0-未返还 1-已返还 --> STATUS <!-- 返还状态 0-未返还 1-已返还 -->
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #meetingRoom#, #meetingSubject#, #meetingNature#, #importanceLevel#, #startTime#, #endTime#, #deleteFlag#, #proApplyStatus#, #status#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #meetingRoom#, #meetingSubject#, #meetingNature#, #importanceLevel#, #startTime#, #endTime#, #deleteFlag#, #proApplyStatus#, #status#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT004
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
$(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", "HGCG005", "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", "HGCG005", "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", "HGCG005", "delete", true,
function (e) {
query();
});
}
});
}
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGXT001A?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: "HGCG005A?methodName=initLoad&inqu_status-0-hgcg005Id=" + 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:EFComboColumn ename="inquiryPerson" cname="询价人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="140" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="inquiryType" cname="询价类型" width="80" align="center" readonly="true">
<EF:EFCodeOption codeName="hggp.hgcg.inquiryType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgxt.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", "HGCG005A", "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", "HGCG005A", "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="hgcg005Id" 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="hggp.cw.taxPoints"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="invoiceType" cname="票据类型" width="120" required="true" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true">
<EF:EFCodeOption codeName="hggp.cw.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>
...@@ -24,7 +24,7 @@ $(function () { ...@@ -24,7 +24,7 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
} }
if (item.status==0 && item.id){ if (item.status == 0 && item.proApplyStatus == 1 && item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>'; 'onclick="approveFunc(' + item.id + ')" >返还</a>';
} }
......
...@@ -55,7 +55,12 @@ ...@@ -55,7 +55,12 @@
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date" <EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/> <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:EFComboColumn ename="applyPersonnel" cname="申请人" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="130" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="licensePlateCode" 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="driver" cname="司机" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date" <EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date"
......
...@@ -99,18 +99,18 @@ let save = function (btnNode) { ...@@ -99,18 +99,18 @@ let save = function (btnNode) {
flag = false; flag = false;
return false; return false;
} }
let licensePlateCode= item.get("licensePlateCode"); // let licensePlateCode= item.get("licensePlateCode");
if(isBlank(licensePlateCode)){ // if(isBlank(licensePlateCode)){
message("选中的第"+(index+1)+"行\"车牌号\",不能为空!"); // message("选中的第"+(index+1)+"行\"车牌号\",不能为空!");
flag = false; // flag = false;
return false; // return false;
} // }
let applyNo= item.get("applyNo"); // let applyNo= item.get("applyNo");
if(isBlank(applyNo)){ // if(isBlank(applyNo)){
message("选中的第"+(index+1)+"行\"保险单号\",不能为空!"); // message("选中的第"+(index+1)+"行\"保险单号\",不能为空!");
flag = false; // flag = false;
return false; // return false;
} // }
}); });
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
...@@ -55,9 +55,13 @@ ...@@ -55,9 +55,13 @@
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date" <EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="保险单号" enable="true" width="130" align="center"/> <EF:EFComboColumn ename="applyPersonnel" cname="申请人" columnTemplate="#=textField#" itemTemplate="#=textField#"
<EF:EFColumn ename="applyPersonnel" cname="申请人" enable="true" width="130" align="center" required="true"/> textField="textField" valueField="valueField" defaultValue="${loginName}"
<EF:EFColumn ename="licensePlateCode" cname="车牌号" enable="true" width="130" align="center" required="true"/> maxLength="16" width="130" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="insuranceCompany" cname="保险公司" enable="true" width="130" align="center" required="true"/>
<EF:EFComboColumn ename="applyStatus" cname="申请状态" width="80" align="center" enable="false" defaultValue="0"> <EF:EFComboColumn ename="applyStatus" cname="申请状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgxt.proApplyStatus"/> <EF:EFCodeOption codeName="hggp.hgxt.proApplyStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -103,12 +103,12 @@ let save = function (btnNode) { ...@@ -103,12 +103,12 @@ let save = function (btnNode) {
flag = false; flag = false;
return false; return false;
} }
let insuranceCompany= item.get("insuranceCompany"); // let insuranceCompany= item.get("insuranceCompany");
if(isBlank(insuranceCompany)){ // if(isBlank(insuranceCompany)){
message("选中的第"+(index+1)+"行\"保险公司\",不能为空!"); // message("选中的第"+(index+1)+"行\"保险公司\",不能为空!");
flag = false; // flag = false;
return false; // return false;
} // }
let insuranceAmount= item.get("insuranceAmount"); let insuranceAmount= item.get("insuranceAmount");
if(isBlank(insuranceAmount)){ if(isBlank(insuranceAmount)){
...@@ -119,7 +119,7 @@ let save = function (btnNode) { ...@@ -119,7 +119,7 @@ let save = function (btnNode) {
let insuranceStartDate= item.get("insuranceStartDate"); let insuranceStartDate= item.get("insuranceStartDate");
let insuranceEndDate= item.get("insuranceEndDate"); let insuranceEndDate= item.get("insuranceEndDate");
if (new Date(insuranceStartDate) > new Date(insuranceEndDate)){ if (new Date(insuranceStartDate) > new Date(insuranceEndDate)){
message("投保时间\"不能大于\"\"结束时间\"!"); message("投保开始时间\"不能大于\"\"结束时间\"!");
flag = false; flag = false;
return false; return false;
} }
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
<%-- <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>--%> <%-- <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="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="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}" <EF:EFColumn ename="insuranceAmount" cname="保险金额(元)" width="80" align="right" format="{0:N3}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" required="true"/> data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" required="true"/>
......
...@@ -24,10 +24,10 @@ $(function () { ...@@ -24,10 +24,10 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
} }
if (item.id && item.status==0){ // if (item.id && item.status==0){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + // template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>'; // 'onclick="approveFunc(' + item.id + ')" >返还</a>';
} // }
return template; return template;
} }
}, { }, {
......
...@@ -30,7 +30,12 @@ ...@@ -30,7 +30,12 @@
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date" <EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/> <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:EFComboColumn ename="applyPersonnel" cname="申请人" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="130" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="meetingRoom" cname="会议室" enable="true" width="130" align="center" required="true"/> <EF:EFColumn ename="meetingRoom" cname="会议室" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="meetingSubject" cname="会议主题" enable="true" width="130" align="center" required="true"/> <EF:EFColumn ename="meetingSubject" cname="会议主题" enable="true" width="130" align="center" required="true"/>
<EF:EFComboColumn ename="meetingNature" cname="会议性质" width="130" align="center" enable="true" required="true"> <EF:EFComboColumn ename="meetingNature" cname="会议性质" width="130" align="center" enable="true" required="true">
...@@ -39,18 +44,18 @@ ...@@ -39,18 +44,18 @@
<EF:EFComboColumn ename="importanceLevel" cname="重要程度" width="130" align="center" enable="true" required="true"> <EF:EFComboColumn ename="importanceLevel" cname="重要程度" width="130" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hggp.hgxt.importanceLevel"/> <EF:EFCodeOption codeName="hggp.hgxt.importanceLevel"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date" <EF:EFColumn ename="startTime" cname="开始时间" parseFormats="['yyyyMMddHHmmss']" align="center" editType="datetime"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd HH:mm:ss" width="140" required="true"/>
<EF:EFColumn ename="endTime" cname="结束时间" width="110" align="center" editType="date" <EF:EFColumn ename="endTime" cname="结束时间" parseFormats="['yyyyMMddHHmmss']" align="center" editType="datetime"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd HH:mm:ss" width="140" required="true"/>
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0"> <EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgxt.proApplyStatus"/> <EF:EFCodeOption codeName="hggp.hgxt.proApplyStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="返还状态" width="80" align="center" <%-- <EF:EFComboColumn ename="status" cname="返还状态" width="80" align="center"--%>
textField="textField" valueField="valueField" readonly="true" defaultValue="0"> <%-- textField="textField" valueField="valueField" readonly="true" defaultValue="0">--%>
<EF:EFOption label="未返还" value="0"/> <%-- <EF:EFOption label="未返还" value="0"/>--%>
<EF:EFOption label="已返还" value="1"/> <%-- <EF:EFOption label="已返还" value="1"/>--%>
</EF:EFComboColumn> <%-- </EF:EFComboColumn>--%>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </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