Commit c25455c1 by YG8429

费用归集,费用归集详情

parent 3a1735bc
package com.baosight.hggp.hg.cw.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:HGCW051.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-26 15:09:24 create
*/
public class HGCW051 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建�称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 记录修改者*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 记录修改�称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公�编�*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公��称*/
public static final String FIELD_YEAR = "year"; /* 年份*/
public static final String FIELD_MONTH = "month"; /* 月份*/
public static final String FIELD_AMOUNT = "amount"; /* 费用金�*/
public static final String COL_ID = "ID";
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建�称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 记录修改者*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改�称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公�编�*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公��称*/
public static final String COL_YEAR = "YEAR"; /* 年份*/
public static final String COL_MONTH = "MONTH"; /* 月份*/
public static final String COL_AMOUNT = "AMOUNT"; /* 费用金�*/
public static final String QUERY = "HGCW051.query";
public static final String COUNT = "HGCW051.count";
public static final String INSERT = "HGCW051.insert";
public static final String UPDATE = "HGCW051.update";
public static final String DELETE = "HGCW051.delete";
private Long id = new Long(0);
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建�称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改�称*/
private String updatedTime = " "; /* 记录修改时间*/
private Boolean deleteFlag; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公�编�*/
private String companyName = " "; /* 公��称*/
private String year = " "; /* 年份*/
private String month = " "; /* 月份*/
private BigDecimal amount = new BigDecimal("0"); /* 费用金�*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("记录创建者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("记录创建�称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("记录创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("记录修改者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("记录修改�称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("记录修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公�编�");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公��称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_YEAR);
eiColumn.setDescName("年份");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MONTH);
eiColumn.setDescName("月份");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("费用金�");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCW051() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 记录创建�称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建�称.
*
* @param createdName - 记录创建�称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 记录修改�称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改�称.
*
* @param updatedName - 记录修改�称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Boolean getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Boolean deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the companyCode - 公�编�.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公�编�.
*
* @param companyCode - 公�编�
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公��称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公��称.
*
* @param companyName - 公��称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the year - 年份.
* @return the year
*/
public String getYear() {
return this.year;
}
/**
* set the year - 年份.
*
* @param year - 年份
*/
public void setYear(String year) {
this.year = year;
}
/**
* get the month - 月份.
* @return the month
*/
public String getMonth() {
return this.month;
}
/**
* set the month - 月份.
*
* @param month - 月份
*/
public void setMonth(String month) {
this.month = month;
}
/**
* get the amount - 费用金�.
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 费用金�.
*
* @param amount - 费用金�
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_YEAR)), year));
setMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MONTH)), month));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
}
/**
* 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_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_YEAR, StringUtils.toString(year, eiMetadata.getMeta(FIELD_YEAR)));
map.put(FIELD_MONTH, StringUtils.toString(month, eiMetadata.getMeta(FIELD_MONTH)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
return map;
}
}
package com.baosight.hggp.hg.cw.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:HGCW052.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-26 15:09:39 create
*/
public class HGCW052 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建�称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 记录修改者*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 记录修改�称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公�编�*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公��称*/
public static final String FIELD_YEAR = "year"; /* 年份*/
public static final String FIELD_MONTH = "month"; /* 月份*/
public static final String FIELD_AMOUNT = "amount"; /* 费用金�*/
public static final String FIELD_HGCW051_ID = "hgcw051Id"; /* 主表ID*/
public static final String FIELD_COST_TYPE = "costType"; /* 费用类型*/
public static final String FIELD_COST_ITEM = "costItem"; /* 费用项*/
public static final String FIELD_ITEM_NAME = "itemName"; /* 项目�称*/
public static final String FIELD_ITEM_CODE = "itemCode"; /* 项目编�*/
public static final String FIELD_IS_SHARE = "isShare"; /* 是�分摊费用*/
public static final String COL_ID = "ID";
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建�称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 记录修改者*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改�称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公�编�*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公��称*/
public static final String COL_YEAR = "YEAR"; /* 年份*/
public static final String COL_MONTH = "MONTH"; /* 月份*/
public static final String COL_AMOUNT = "AMOUNT"; /* 费用金�*/
public static final String COL_HGCW051_ID = "HGCW051_ID"; /* 主表ID*/
public static final String COL_COST_TYPE = "COST_TYPE"; /* 费用类型*/
public static final String COL_COST_ITEM = "COST_ITEM"; /* 费用项*/
public static final String COL_ITEM_NAME = "ITEM_NAME"; /* 项目�称*/
public static final String COL_ITEM_CODE = "ITEM_CODE"; /* 项目编�*/
public static final String COL_IS_SHARE = "IS_SHARE"; /* 是�分摊费用*/
public static final String QUERY = "HGCW052.query";
public static final String COUNT = "HGCW052.count";
public static final String INSERT = "HGCW052.insert";
public static final String UPDATE = "HGCW052.update";
public static final String DELETE = "HGCW052.delete";
private Long id = new Long(0);
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建�称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改�称*/
private String updatedTime = " "; /* 记录修改时间*/
private Boolean deleteFlag; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公�编�*/
private String companyName = " "; /* 公��称*/
private String year = " "; /* 年份*/
private String month = " "; /* 月份*/
private BigDecimal amount = new BigDecimal("0"); /* 费用金�*/
private Long hgcw051Id = new Long(0); /* 主表ID*/
private String costType = " "; /* 费用类型*/
private String costItem = " "; /* 费用项*/
private String itemName = " "; /* 项目�称*/
private String itemCode = " "; /* 项目编�*/
private String isShare = " "; /* 是�分摊费用*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("记录创建者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("记录创建�称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("记录创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("记录修改者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("记录修改�称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("记录修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公�编�");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公��称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_YEAR);
eiColumn.setDescName("年份");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MONTH);
eiColumn.setDescName("月份");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("费用金�");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_HGCW051_ID);
eiColumn.setDescName("主表ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COST_TYPE);
eiColumn.setDescName("费用类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COST_ITEM);
eiColumn.setDescName("费用项");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ITEM_NAME);
eiColumn.setDescName("项目�称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ITEM_CODE);
eiColumn.setDescName("项目编�");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_IS_SHARE);
eiColumn.setDescName("是�分摊费用");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCW052() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 记录创建�称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建�称.
*
* @param createdName - 记录创建�称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 记录修改�称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改�称.
*
* @param updatedName - 记录修改�称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Boolean getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Boolean deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the companyCode - 公�编�.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公�编�.
*
* @param companyCode - 公�编�
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公��称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公��称.
*
* @param companyName - 公��称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the year - 年份.
* @return the year
*/
public String getYear() {
return this.year;
}
/**
* set the year - 年份.
*
* @param year - 年份
*/
public void setYear(String year) {
this.year = year;
}
/**
* get the month - 月份.
* @return the month
*/
public String getMonth() {
return this.month;
}
/**
* set the month - 月份.
*
* @param month - 月份
*/
public void setMonth(String month) {
this.month = month;
}
/**
* get the amount - 费用金�.
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 费用金�.
*
* @param amount - 费用金�
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the hgcw051Id - 主表ID.
* @return the hgcw051Id
*/
public Long getHgcw051Id() {
return this.hgcw051Id;
}
/**
* set the hgcw051Id - 主表ID.
*
* @param hgcw051Id - 主表ID
*/
public void setHgcw051Id(Long hgcw051Id) {
this.hgcw051Id = hgcw051Id;
}
/**
* get the costType - 费用类型.
* @return the costType
*/
public String getCostType() {
return this.costType;
}
/**
* set the costType - 费用类型.
*
* @param costType - 费用类型
*/
public void setCostType(String costType) {
this.costType = costType;
}
/**
* get the costItem - 费用项.
* @return the costItem
*/
public String getCostItem() {
return this.costItem;
}
/**
* set the costItem - 费用项.
*
* @param costItem - 费用项
*/
public void setCostItem(String costItem) {
this.costItem = costItem;
}
/**
* get the itemName - 项目�称.
* @return the itemName
*/
public String getItemName() {
return this.itemName;
}
/**
* set the itemName - 项目�称.
*
* @param itemName - 项目�称
*/
public void setItemName(String itemName) {
this.itemName = itemName;
}
/**
* get the itemCode - 项目编�.
* @return the itemCode
*/
public String getItemCode() {
return this.itemCode;
}
/**
* set the itemCode - 项目编�.
*
* @param itemCode - 项目编�
*/
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
/**
* get the isShare - 是�分摊费用.
* @return the isShare
*/
public String getIsShare() {
return this.isShare;
}
/**
* set the isShare - 是�分摊费用.
*
* @param isShare - 是�分摊费用
*/
public void setIsShare(String isShare) {
this.isShare = isShare;
}
/**
* 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));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_YEAR)), year));
setMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MONTH)), month));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setHgcw051Id(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_HGCW051_ID)), hgcw051Id));
setCostType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COST_TYPE)), costType));
setCostItem(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COST_ITEM)), costItem));
setItemName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ITEM_NAME)), itemName));
setItemCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ITEM_CODE)), itemCode));
setIsShare(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_IS_SHARE)), isShare));
}
/**
* 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_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_YEAR, StringUtils.toString(year, eiMetadata.getMeta(FIELD_YEAR)));
map.put(FIELD_MONTH, StringUtils.toString(month, eiMetadata.getMeta(FIELD_MONTH)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_HGCW051_ID, StringUtils.toString(hgcw051Id, eiMetadata.getMeta(FIELD_HGCW051_ID)));
map.put(FIELD_COST_TYPE, StringUtils.toString(costType, eiMetadata.getMeta(FIELD_COST_TYPE)));
map.put(FIELD_COST_ITEM, StringUtils.toString(costItem, eiMetadata.getMeta(FIELD_COST_ITEM)));
map.put(FIELD_ITEM_NAME, StringUtils.toString(itemName, eiMetadata.getMeta(FIELD_ITEM_NAME)));
map.put(FIELD_ITEM_CODE, StringUtils.toString(itemCode, eiMetadata.getMeta(FIELD_ITEM_CODE)));
map.put(FIELD_IS_SHARE, StringUtils.toString(isShare, eiMetadata.getMeta(FIELD_IS_SHARE)));
return map;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW051;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW051 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集主表",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW051().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW051.QUERY, new HGCW051());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW051.delete", resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW052;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
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.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW052 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW052().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW052.QUERY, new HGCW052());
Map inqu_status_map = inInfo.getRow("inqu_status", 0);
Map map = new HashMap();
map.put("companyCode",inqu_status_map.get("companyCode"));
map.put("updateTime",inqu_status_map.get("month"));
List list = dao.query("HGCW052.query1",map,0,-999999);
EiBlock eiBlock1 = inInfo.addBlock("projName");
eiBlock1.setBlockMeta(new HGCW052().eiMetadata);
eiBlock1.setRows(list);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
Map map = inInfo.getRow("inqu_status", 0);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGCW052 hgcw052 = new HGCW052();
hgcw052.fromMap(resultRows.get(i));
hgcw052.setHgcw051Id(Long.parseLong((String)map.get("hgcw051Id")));
hgcw052.setCompanyCode((String) map.get("companyCode"));
hgcw052.setCompanyName((String) map.get("companyName"));
hgcw052.setMonth((String) map.get("month"));
hgcw052.setYear((String) map.get("year"));
if (hgcw052.getId() == null || hgcw052.getId() == 0) {
this.add(hgcw052);
} else {
this.modify(hgcw052);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param hgcw052
* @return
*/
public void add(HGCW052 hgcw052) {
DaoUtils.insert("HGCW052.insert", hgcw052);
}
/**
* 修改操作
*
* @param HGCW052
* @return
*/
public void modify(HGCW052 HGCW052) {
DaoUtils.update("HGCW052.update", HGCW052);
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "新增",operDesc = "新增")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HGCW052 HGCW052 = new HGCW052();
HGCW052.fromMap(resultRows.get(i));
DaoUtils.insert("HGCW052.insert", HGCW052);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW052 HGCW052 = new HGCW052();
HGCW052.fromMap(resultRows.get(i));
DaoUtils.update("HGCW052.update", HGCW052);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW052.delete", resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-26 15:09:24
Version : 1.0
schema : hggp
tableName : HGCW051
ID BIGINT NOT NULL primarykey,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
YEAR VARCHAR NOT NULL,
MONTH VARCHAR NOT NULL,
AMOUNT DECIMAL
-->
<sqlMap namespace="HGCW051">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="year">
YEAR = #year#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW051">
select A.COMPANY_CODE AS "companyCode",
A.COMPANY_NAME AS "companyName",
A.YEAR AS "year",
A.MONTH as "month",
A.ID AS "id",
SUM(B.AMOUNT) AS "amount"
from ${hggpSchema}.HGCW051 a,
${hggpSchema}.HGCW052 b
WHERE A.ID = B.HGCW051_ID
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
GROUP BY A.COMPANY_CODE,A.COMPANY_NAME,A.YEAR, A.MONTH,A.ID
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW051 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="year">
YEAR = #year#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW051 (ID,
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建�称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改�称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公�编� -->
COMPANY_NAME, <!-- 公��称 -->
YEAR, <!-- 年份 -->
MONTH, <!-- 月份 -->
AMOUNT <!-- 费用金� -->
)
VALUES (#id#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #year#, #month#, #amount#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW051 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW051
SET
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建�称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改�称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公�编� -->
COMPANY_NAME = #companyName#, <!-- 公��称 -->
YEAR = #year#, <!-- 年份 -->
MONTH = #month#, <!-- 月份 -->
AMOUNT = #amount# <!-- 费用金� -->
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-06-26 15:09:39
Version : 1.0
schema : hggp
tableName : HGCW052
ID BIGINT NOT NULL primarykey,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
YEAR VARCHAR NOT NULL,
MONTH VARCHAR NOT NULL,
AMOUNT DECIMAL,
HGCW051_ID BIGINT,
COST_TYPE VARCHAR,
COST_ITEM VARCHAR,
ITEM_NAME VARCHAR,
ITEM_CODE VARCHAR,
IS_SHARE VARCHAR
-->
<sqlMap namespace="HGCW052">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="year">
YEAR = #year#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="hgcw051Id">
HGCW051_ID = #hgcw051Id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="costType">
COST_TYPE = #costType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="costItem">
COST_ITEM = like '%'||#costItem#||'%'
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemName">
ITEM_NAME = #itemName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemCode">
ITEM_CODE = #itemCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isShare">
IS_SHARE = #isShare#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW052">
SELECT
ID as "id",
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建�称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改�称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公�编� -->
COMPANY_NAME as "companyName", <!-- 公��称 -->
YEAR as "year", <!-- 年份 -->
MONTH as "month", <!-- 月份 -->
AMOUNT as "amount", <!-- 费用金� -->
HGCW051_ID as "hgcw051Id", <!-- 主表ID -->
COST_TYPE as "costType", <!-- 费用类型 -->
COST_ITEM as "costItem", <!-- 费用项 -->
ITEM_NAME as "itemName", <!-- 项目�称 -->
ITEM_CODE as "itemCode", <!-- 项目编� -->
IS_SHARE as "isShare" <!-- 是�分摊费用 -->
FROM ${hggpSchema}.HGCW052 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="query1" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT PROJ_NAME AS projName,
PROJ_CODE AS projCode
FROM hggp.hgsc001
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
AND PROJ_STATUS = '0'
OR
(
SUBSTR(UPDATED_TIME,1,6) = #updateTime#
AND PROJ_STATUS = '1'
)
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW052 WHERE 1=1
<include refid="condition"/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="year">
YEAR = #year#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="hgcw051Id">
HGCW051_ID = #hgcw051Id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="costType">
COST_TYPE = #costType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="costItem">
COST_ITEM = #costItem#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemName">
ITEM_NAME = #itemName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemCode">
ITEM_CODE = #itemCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isShare">
IS_SHARE = #isShare#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW052 (ID,
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建�称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改�称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公�编� -->
COMPANY_NAME, <!-- 公��称 -->
YEAR, <!-- 年份 -->
MONTH, <!-- 月份 -->
AMOUNT, <!-- 费用金� -->
HGCW051_ID, <!-- 主表ID -->
COST_TYPE, <!-- 费用类型 -->
COST_ITEM, <!-- 费用项 -->
ITEM_NAME, <!-- 项目�称 -->
ITEM_CODE, <!-- 项目编� -->
IS_SHARE <!-- 是�分摊费用 -->
)
VALUES (#id#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#,
#deleteFlag#, #companyCode#, #companyName#, #year#, #month#, #amount#, #hgcw051Id#, #costType#, #costItem#,
#itemName#, #itemCode#, #isShare#)
</insert>
<delete id="delete">
DELETE
FROM ${hggpSchema}.HGCW052
WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW052
SET
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建�称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改�称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公�编� -->
COMPANY_NAME = #companyName#, <!-- 公��称 -->
YEAR = #year#, <!-- 年份 -->
MONTH = #month#, <!-- 月份 -->
AMOUNT = #amount#, <!-- 费用金� -->
HGCW051_ID = #hgcw051Id#, <!-- 主表ID -->
COST_TYPE = #costType#, <!-- 费用类型 -->
COST_ITEM = #costItem#, <!-- 费用项 -->
ITEM_NAME = #itemName#, <!-- 项目�称 -->
ITEM_CODE = #itemCode#, <!-- 项目编� -->
IS_SHARE = #isShare# <!-- 是�分摊费用 -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -652,4 +652,19 @@ public class HGCWTools { ...@@ -652,4 +652,19 @@ public class HGCWTools {
} }
} }
public static class HgCw051{
public static void save(List<Map> rows, UserVO userVO) {
// AssertUtils.isNull(contractNumber, "合同号不能为空!");
rows.forEach(row -> {
HGCW051 hgcw051 = new HGCW051();
hgcw051.fromMap(row);
hgcw051.setCompanyCode(userVO.getUsercode());
hgcw051.setCompanyName(userVO.getUsername());
DaoUtils.insert(HGCW051.INSERT, hgcw051);
});
}
}
} }
$(function () {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200],
},
columns: [
{
field: "button",
title: "操作",
template: '<input value="费用详情" class="i-btn-sm" type="button" align="center" onclick="openButtonDetail(\'#:id#\',\'#:month#\',\'#:companyCode#\',\'#:year#\',\'#:companyName#\')" >'
,
width: 100
}
],
}
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
function openButtonDetail(id, month,companyCode,year,companyName) {
//设置url
var url = "HGCW052?methodName=query&inqu_status-0-hgcw051Id=" + id + '&inqu_status-0-month=' + month + '&inqu_status-0-companyCode=' + companyCode + '&inqu_status-0-year=' + year + '&inqu_status-0-companyName=' + companyName;
// window.open(url);
JSColorbox.open({
href: url,
title: "<div style='text-align: center;'>费用归集详情</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
<!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:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker cname="月份" blockId="inqu_status" ename="month" row="0" colWidth="3"
format="yyyyMM" start="year" depth="year"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="button" cname="操作" width="100" enable="false" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称" width="110" align="center"
filter="contains" readonly="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" align="center" hidden="true"
/>
<EF:EFColumn ename="year" cname="年份" width="120" align="center" start="decade" depth="decade"
editType="date" dateFormat="yyyy" parseFormats="['yyyy']"/>
<EF:EFColumn ename="month" cname="月份" width="120" align="center"
/>
<EF:EFColumn ename="amount" cname="费用金额" width="120" enable="false" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="window" url="" height="100%" width="100%" left="2%">
</EF:EFWindow>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW051.js"></script>
\ No newline at end of file
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
}
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/**
* 保存
*/
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let itemCode= item.get("itemCode");
let isShare= item.get("isShare");
let costType= item.get("costType");
let costItem= item.get("costItem");
let amount= item.get("amount");
if(isBlank(itemCode)){
message("选中的第"+(index+1)+"行\"项目名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(isShare)){
message("选中的第"+(index+1)+"行\"是否分摊到工序\",不能为空!");
flag = false;
return false;
}
if(isBlank(costType)){
message("选中的第"+(index+1)+"行\"费用类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(costItem)){
message("选中的第"+(index+1)+"行\"费用项\",不能为空!");
flag = false;
return false;
}
if(isBlank(amount)){
message("选中的第"+(index+1)+"行\"费用金额\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.set("inqu_status-0-hgcw051Id", $('#inqu_status-0-hgcw051Id').val());
info.set("inqu_status-0-companyCode", $('#inqu_status-0-companyCode').val());
info.set("inqu_status-0-companyName", $('#inqu_status-0-companyName').val());
info.set("inqu_status-0-month", $('#inqu_status-0-month').val());
info.set("inqu_status-0-year", $('#inqu_status-0-year').val());
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW052", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
}
/**
* 删除
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let accountPeriodStatus= item.get("accountPeriodStatus");
if(accountPeriodStatus === "1"){
message("选中的第"+(index+1)+"行记录为开账状态,不能删除!");
flag = false;
return false;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW001", "delete", true);
}
});
}
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="费用归集详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-hgcw051Id" cname="hgcw051Id" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyCode" cname="公司编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3" readonly="true"/>
<EF:EFInput ename="inqu_status-0-year" cname="year" colWidth="3" type="hidden"/>
<EF:EFDatePicker cname="月份" blockId="inqu_status" ename="month" row="0" colWidth="3"
format="yyyyMM" start="year" depth="year" readonly="true"/>
<EF:EFSelect cname="费用类型" ename="inqu_status-0-costType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.costType" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="itemCode" cname="项目名称" width="150" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" filter="contains" required="true">
<EF:EFOptions blockId="projName" valueField="projCode" textField="projName"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="isShare" cname="是否分摊到工序" width="80" align="center" required="true"
readonly="true">
<EF:EFOption label="是" value="0"/>
<EF:EFOption label="否" value="1"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="costType" cname="费用类型" width="80" align="center" required="true"
readonly="true">
<EF:EFCodeOption codeName="hggp.cw.costType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="costItem" cname="费用项" width="120" align="center" required="true"
/>
<EF:EFColumn ename="amount" cname="费用金额" width="120" align="center" data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW052.js"></script>
\ No newline at end of file
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