Commit 3a50ec73 by 江和松

物料清单代码提交

parent 5f6cc8b7
......@@ -219,6 +219,13 @@ public enum DdynamicEnum {
*/
PROJ_RECORD_BLOCK_ID("proj_record_block_id", "projCode", "projName", "HGSC001.queryComboBox"),
/**
* 模块:蓝图
* 用途:蓝图下拉框
* 编写:jhs
*/
BLUEPRINT_BOX_BLOCK_ID("blueprint_box_block_id", "blueprintCode", "blueprintName", "HGSC003.queryComboBox"),
;
......
......@@ -211,4 +211,32 @@ public class HGConstant {
public static final Integer YS = 2;
}
/**
*
* 物料提交状态
* @author:songx
* @date:2024/5/15,15:18
*/
public static class MaterialStatus {
// 未提交
public static final Integer WTJ = 0;
// 部分提交
public static final Integer BFTJ = 1;
// 全部提交
public static final Integer QBTJ = 2;
}
/**
*
* 物料提交状态
* @author:songx
* @date:2024/5/15,15:18
*/
public static class ProductStatus {
// 未提交
public static final Integer WTJ = 0;
// 已提交
public static final Integer YTJ = 2;
}
}
package com.baosight.hggp.hg.sc.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:HGSC003A.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-16 14:38:47 create
*/
public class HGSC003A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_id = "id"; /* 主键*/
public static final String FIELD_company_code = "companyCode"; /* 公司编码*/
public static final String FIELD_company_name = "companyName"; /* 公司名称*/
public static final String FIELD_dep_code = "depCode"; /* 部门编号*/
public static final String FIELD_dep_name = "depName"; /* 部门名称*/
public static final String FIELD_blueprint_id = "blueprintId"; /* 蓝图id*/
public static final String FIELD_blueprint_code = "blueprintCode"; /* 蓝图编号*/
public static final String FIELD_blueprint_name = "blueprintName"; /* 蓝图名称*/
public static final String FIELD_proj_code = "projCode"; /* 项目编码*/
public static final String FIELD_proj_name = "projName"; /* 项目名称*/
public static final String FIELD_drawing_code = "drawingCode"; /* 图号*/
public static final String FIELD_drawing_name = "drawingName"; /* 图纸名称*/
public static final String FIELD_account_code = "accountCode"; /* 帐套*/
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 COL_id = "id"; /* 主键*/
public static final String COL_company_code = "company_code"; /* 公司编码*/
public static final String COL_company_name = "company_name"; /* 公司名称*/
public static final String COL_dep_code = "dep_code"; /* 部门编号*/
public static final String COL_dep_name = "dep_name"; /* 部门名称*/
public static final String COL_blueprint_id = "blueprint_id"; /* 蓝图id*/
public static final String COL_blueprint_code = "blueprint_code"; /* 蓝图编号*/
public static final String COL_blueprint_name = "blueprint_name"; /* 蓝图名称*/
public static final String COL_proj_code = "proj_code"; /* 项目编码*/
public static final String COL_proj_name = "proj_name"; /* 项目名称*/
public static final String COL_drawing_code = "drawing_code"; /* 图号*/
public static final String COL_drawing_name = "drawing_name"; /* 图纸名称*/
public static final String COL_account_code = "account_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 QUERY = "HGSC003A.query";
public static final String COUNT = "HGSC003A.count";
public static final String INSERT = "HGSC003A.insert";
public static final String UPDATE = "HGSC003A.update";
public static final String DELETE = "HGSC003A.delete";
public static final String BATCH_DELETE = "HGSC003.batchDelete";
private Long id = new Long(0); /* 主键*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String depCode = " "; /* 部门编号*/
private String depName = " "; /* 部门名称*/
private Long blueprintId = new Long(0); /* 蓝图id*/
private String blueprintCode = " "; /* 蓝图编号*/
private String blueprintName = " "; /* 蓝图名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String drawingCode = " "; /* 图号*/
private String drawingName = " "; /* 图纸名称*/
private String accountCode = " "; /* 帐套*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("主键");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_code);
eiColumn.setFieldLength(20);
eiColumn.setDescName("部门编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("部门名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_blueprint_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("蓝图id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_blueprint_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("蓝图编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_blueprint_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("蓝图名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_proj_code);
eiColumn.setFieldLength(20);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_proj_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_drawing_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("图号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_drawing_name);
eiColumn.setFieldLength(100);
eiColumn.setDescName("图纸名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_account_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("帐套");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_by);
eiColumn.setFieldLength(32);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_time);
eiColumn.setFieldLength(14);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_by);
eiColumn.setFieldLength(32);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_time);
eiColumn.setFieldLength(14);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSC003A() {
initMetaData();
}
/**
* get the id - 主键.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键.
*
* @param id - 主键
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the 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 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 depName - 部门名称.
* @return the depName
*/
public String getDepName() {
return this.depName;
}
/**
* set the depName - 部门名称.
*
* @param depName - 部门名称
*/
public void setDepName(String depName) {
this.depName = depName;
}
/**
* get the blueprintId - 蓝图id.
* @return the blueprintId
*/
public Long getBlueprintId() {
return this.blueprintId;
}
/**
* set the blueprintId - 蓝图id.
*
* @param blueprintId - 蓝图id
*/
public void setBlueprintId(Long blueprintId) {
this.blueprintId = blueprintId;
}
/**
* get the blueprintCode - 蓝图编号.
* @return the blueprintCode
*/
public String getBlueprintCode() {
return this.blueprintCode;
}
/**
* set the blueprintCode - 蓝图编号.
*
* @param blueprintCode - 蓝图编号
*/
public void setBlueprintCode(String blueprintCode) {
this.blueprintCode = blueprintCode;
}
/**
* get the blueprintName - 蓝图名称.
* @return the blueprintName
*/
public String getBlueprintName() {
return this.blueprintName;
}
/**
* set the blueprintName - 蓝图名称.
*
* @param blueprintName - 蓝图名称
*/
public void setBlueprintName(String blueprintName) {
this.blueprintName = blueprintName;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the drawingCode - 图号.
* @return the drawingCode
*/
public String getDrawingCode() {
return this.drawingCode;
}
/**
* set the drawingCode - 图号.
*
* @param drawingCode - 图号
*/
public void setDrawingCode(String drawingCode) {
this.drawingCode = drawingCode;
}
/**
* get the drawingName - 图纸名称.
* @return the drawingName
*/
public String getDrawingName() {
return this.drawingName;
}
/**
* set the drawingName - 图纸名称.
*
* @param drawingName - 图纸名称
*/
public void setDrawingName(String drawingName) {
this.drawingName = drawingName;
}
/**
* 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 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 value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_id)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_code)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_name)), companyName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_code)), depCode));
setDepName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_name)), depName));
setBlueprintId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_blueprint_id)), blueprintId));
setBlueprintCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_blueprint_code)), blueprintCode));
setBlueprintName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_blueprint_name)), blueprintName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name)), projName));
setDrawingCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_drawing_code)), drawingCode));
setDrawingName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_drawing_name)), drawingName));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_account_code)), accountCode));
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));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_id, StringUtils.toString(id, eiMetadata.getMeta(FIELD_id)));
map.put(FIELD_company_code, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_company_code)));
map.put(FIELD_company_name, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_company_name)));
map.put(FIELD_dep_code, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_dep_code)));
map.put(FIELD_dep_name, StringUtils.toString(depName, eiMetadata.getMeta(FIELD_dep_name)));
map.put(FIELD_blueprint_id, StringUtils.toString(blueprintId, eiMetadata.getMeta(FIELD_blueprint_id)));
map.put(FIELD_blueprint_code, StringUtils.toString(blueprintCode, eiMetadata.getMeta(FIELD_blueprint_code)));
map.put(FIELD_blueprint_name, StringUtils.toString(blueprintName, eiMetadata.getMeta(FIELD_blueprint_name)));
map.put(FIELD_proj_code, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_proj_code)));
map.put(FIELD_proj_name, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_proj_name)));
map.put(FIELD_drawing_code, StringUtils.toString(drawingCode, eiMetadata.getMeta(FIELD_drawing_code)));
map.put(FIELD_drawing_name, StringUtils.toString(drawingName, eiMetadata.getMeta(FIELD_drawing_name)));
map.put(FIELD_account_code, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_account_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)));
return map;
}
}
package com.baosight.hggp.hg.sc.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:Hgsc004.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-16 14:38:04 create
*/
public class HGSC004 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_id = "id"; /* 主键*/
public static final String FIELD_blueprint_id = "blueprintId"; /* 蓝图id*/
public static final String FIELD_company_code = "companyCode"; /* 公司编码*/
public static final String FIELD_company_name = "companyName"; /* 公司名称*/
public static final String FIELD_dep_code = "depCode"; /* 部门编号*/
public static final String FIELD_dep_name = "depName"; /* 部门名称*/
public static final String FIELD_blueprint_code = "blueprintCode"; /* 蓝图编号*/
public static final String FIELD_blueprint_name = "blueprintName"; /* 蓝图名称*/
public static final String FIELD_proj_code = "projCode"; /* 项目编码*/
public static final String FIELD_proj_name = "projName"; /* 项目名称*/
public static final String FIELD_material_status = "materialStatus"; /* 物料状态 0:未提交,1:部分提交,2:全部提交*/
public static final String FIELD_approval_status = "approvalStatus"; /* 审批状态\t0:待审;1:审核中;2:已审*/
public static final String FIELD_account_code = "accountCode"; /* 帐套*/
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 COL_id = "id"; /* 主键*/
public static final String COL_blueprint_id = "blueprint_id"; /* 蓝图id*/
public static final String COL_company_code = "company_code"; /* 公司编码*/
public static final String COL_company_name = "company_name"; /* 公司名称*/
public static final String COL_dep_code = "dep_code"; /* 部门编号*/
public static final String COL_dep_name = "dep_name"; /* 部门名称*/
public static final String COL_blueprint_code = "blueprint_code"; /* 蓝图编号*/
public static final String COL_blueprint_name = "blueprint_name"; /* 蓝图名称*/
public static final String COL_proj_code = "proj_code"; /* 项目编码*/
public static final String COL_proj_name = "proj_name"; /* 项目名称*/
public static final String COL_material_status = "material_status"; /* 物料状态 0:未提交,1:部分提交,2:全部提交*/
public static final String COL_approval_status = "approval_status"; /* 审批状态\t0:待审;1:审核中;2:已审*/
public static final String COL_account_code = "account_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 QUERY = "HGSC004.query";
public static final String COUNT = "HGSC004.count";
public static final String INSERT = "HGSC004.insert";
public static final String UPDATE = "HGSC004.update";
public static final String DELETE = "HGSC004.delete";
public static final String BATCH_DELETE = "HGSC004.batchDelete";
public static final String BATCH_SUBMIT = "HGSC004.batchSubmit";
private Long id = new Long(0); /* 主键*/
private Long blueprintId = new Long(0); /* 蓝图id*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String depCode = " "; /* 部门编号*/
private String depName = " "; /* 部门名称*/
private String blueprintCode = " "; /* 蓝图编号*/
private String blueprintName = " "; /* 蓝图名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private Integer materialStatus = new Integer(0); /* 物料状态 0:未提交,1:部分提交,2:全部提交*/
private Integer approvalStatus = new Integer(0); /* 审批状态\t0:待审;1:审核中;2:已审*/
private String accountCode = " "; /* 帐套*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("主键");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_blueprint_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("蓝图id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_code);
eiColumn.setFieldLength(20);
eiColumn.setDescName("部门编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("部门名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_blueprint_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("蓝图编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_blueprint_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("蓝图名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_proj_code);
eiColumn.setFieldLength(20);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_proj_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_material_status);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4);
eiColumn.setDescName("物料状态 0:未提交,1:部分提交,2:全部提交");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_approval_status);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4);
eiColumn.setDescName("审批状态\t0:待审;1:审核中;2:已审");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_account_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("帐套");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_by);
eiColumn.setFieldLength(32);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_time);
eiColumn.setFieldLength(14);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_by);
eiColumn.setFieldLength(32);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_time);
eiColumn.setFieldLength(14);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSC004() {
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 blueprintId - 蓝图id.
* @return the blueprintId
*/
public Long getBlueprintId() {
return this.blueprintId;
}
/**
* set the blueprintId - 蓝图id.
*
* @param blueprintId - 蓝图id
*/
public void setBlueprintId(Long blueprintId) {
this.blueprintId = blueprintId;
}
/**
* 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 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 depName - 部门名称.
* @return the depName
*/
public String getDepName() {
return this.depName;
}
/**
* set the depName - 部门名称.
*
* @param depName - 部门名称
*/
public void setDepName(String depName) {
this.depName = depName;
}
/**
* get the blueprintCode - 蓝图编号.
* @return the blueprintCode
*/
public String getBlueprintCode() {
return this.blueprintCode;
}
/**
* set the blueprintCode - 蓝图编号.
*
* @param blueprintCode - 蓝图编号
*/
public void setBlueprintCode(String blueprintCode) {
this.blueprintCode = blueprintCode;
}
/**
* get the blueprintName - 蓝图名称.
* @return the blueprintName
*/
public String getBlueprintName() {
return this.blueprintName;
}
/**
* set the blueprintName - 蓝图名称.
*
* @param blueprintName - 蓝图名称
*/
public void setBlueprintName(String blueprintName) {
this.blueprintName = blueprintName;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the materialStatus - 物料状态 0:未提交,1:部分提交,2:全部提交.
* @return the materialStatus
*/
public Integer getMaterialStatus() {
return this.materialStatus;
}
/**
* set the materialStatus - 物料状态 0:未提交,1:部分提交,2:全部提交.
*
* @param materialStatus - 物料状态 0:未提交,1:部分提交,2:全部提交
*/
public void setMaterialStatus(Integer materialStatus) {
this.materialStatus = materialStatus;
}
/**
* get the approvalStatus - 审批状态\t0:待审;1:审核中;2:已审.
* @return the approvalStatus
*/
public Integer getApprovalStatus() {
return this.approvalStatus;
}
/**
* set the approvalStatus - 审批状态\t0:待审;1:审核中;2:已审.
*
* @param approvalStatus - 审批状态\t0:待审;1:审核中;2:已审
*/
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
/**
* 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 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 value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_id)), id));
setBlueprintId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_blueprint_id)), blueprintId));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_code)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_name)), companyName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_code)), depCode));
setDepName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_name)), depName));
setBlueprintCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_blueprint_code)), blueprintCode));
setBlueprintName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_blueprint_name)), blueprintName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name)), projName));
setMaterialStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_material_status)), materialStatus));
setApprovalStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_approval_status)), approvalStatus));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_account_code)), accountCode));
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));
}
/**
* 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_blueprint_id, StringUtils.toString(blueprintId, eiMetadata.getMeta(FIELD_blueprint_id)));
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_dep_code, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_dep_code)));
map.put(FIELD_dep_name, StringUtils.toString(depName, eiMetadata.getMeta(FIELD_dep_name)));
map.put(FIELD_blueprint_code, StringUtils.toString(blueprintCode, eiMetadata.getMeta(FIELD_blueprint_code)));
map.put(FIELD_blueprint_name, StringUtils.toString(blueprintName, eiMetadata.getMeta(FIELD_blueprint_name)));
map.put(FIELD_proj_code, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_proj_code)));
map.put(FIELD_proj_name, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_proj_name)));
map.put(FIELD_material_status, StringUtils.toString(materialStatus, eiMetadata.getMeta(FIELD_material_status)));
map.put(FIELD_approval_status, StringUtils.toString(approvalStatus, eiMetadata.getMeta(FIELD_approval_status)));
map.put(FIELD_account_code, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_account_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)));
return map;
}
}
package com.baosight.hggp.hg.sc.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:Hgsc004a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-16 14:38:53 create
*/
public class HGSC004A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_id = "id"; /* 主键*/
public static final String FIELD_company_code = "companyCode"; /* 公司编码(预留)*/
public static final String FIELD_company_name = "companyName"; /* 公司名称(预留)*/
public static final String FIELD_dep_code = "depCode"; /* 部门编号(预留)*/
public static final String FIELD_dep_name = "depName"; /* 部门名称(预留)*/
public static final String FIELD_proj_code = "projCode"; /* 项目编码(预留)*/
public static final String FIELD_proj_name = "projName"; /* 项目名称(预留)*/
public static final String FIELD_parent_prod_code = "parentProdCode"; /* 父节点-产品编码*/
public static final String FIELD_parent_prod_name = "parentProdName"; /* 父节点-产品名称*/
public static final String FIELD_material_id = "materialId"; /* 物料清单id*/
public static final String FIELD_product_code = "productCode"; /* 产品编号*/
public static final String FIELD_product_name = "productName"; /* 产品名称*/
public static final String FIELD_product_status = "productStatus"; /* 产品状态 0:未提交,1:已提交*/
public static final String FIELD_change_type = "changeType"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String FIELD_quantity = "quantity"; /* 数量*/
public static final String FIELD_single_weight = "singleWeight"; /* 单重*/
public static final String FIELD_total_weight = "totalWeight"; /* 总重*/
public static final String FIELD_approval_status = "approvalStatus"; /* 审批状态\t0:待审;1:审核中;2:已审*/
public static final String FIELD_account_code = "accountCode"; /* 帐套*/
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 COL_id = "id"; /* 主键*/
public static final String COL_company_code = "company_code"; /* 公司编码(预留)*/
public static final String COL_company_name = "company_name"; /* 公司名称(预留)*/
public static final String COL_dep_code = "dep_code"; /* 部门编号(预留)*/
public static final String COL_dep_name = "dep_name"; /* 部门名称(预留)*/
public static final String COL_proj_code = "proj_code"; /* 项目编码(预留)*/
public static final String COL_proj_name = "proj_name"; /* 项目名称(预留)*/
public static final String COL_parent_prod_code = "parent_prod_code"; /* 父节点-产品编码*/
public static final String COL_parent_prod_name = "parent_prod_name"; /* 父节点-产品名称*/
public static final String COL_material_id = "material_id"; /* 物料清单id*/
public static final String COL_product_code = "product_code"; /* 产品编号*/
public static final String COL_product_name = "product_name"; /* 产品名称*/
public static final String COL_product_status = "product_status"; /* 产品状态 0:未提交,1:已提交*/
public static final String COL_change_type = "change_type"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String COL_quantity = "quantity"; /* 数量*/
public static final String COL_single_weight = "single_weight"; /* 单重*/
public static final String COL_total_weight = "total_weight"; /* 总重*/
public static final String COL_approval_status = "approval_status"; /* 审批状态\t0:待审;1:审核中;2:已审*/
public static final String COL_account_code = "account_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 QUERY = "HGSC004A.query";
public static final String COUNT = "HGSC004A.count";
public static final String INSERT = "HGSC004A.insert";
public static final String UPDATE = "HGSC004A.update";
public static final String DELETE = "HGSC004A.delete";
private Long id = new Long(0); /* 主键*/
private String companyCode = " "; /* 公司编码(预留)*/
private String companyName = " "; /* 公司名称(预留)*/
private String depCode = " "; /* 部门编号(预留)*/
private String depName = " "; /* 部门名称(预留)*/
private String projCode = " "; /* 项目编码(预留)*/
private String projName = " "; /* 项目名称(预留)*/
private String parentProdCode = " "; /* 父节点-产品编码*/
private String parentProdName = " "; /* 父节点-产品名称*/
private Long materialId = new Long(0); /* 物料清单id*/
private String productCode = " "; /* 产品编号*/
private String productName = " "; /* 产品名称*/
private Integer productStatus = new Integer(0); /* 产品状态 0:未提交,1:已提交*/
private Integer changeType = new Integer(0); /* 变更类型:默认0,1:增加,2:替换,3:删除*/
private Integer quantity = new Integer(0); /* 数量*/
private BigDecimal singleWeight = new BigDecimal(0.000); /* 单重*/
private BigDecimal totalWeight = new BigDecimal(0.000); /* 总重*/
private Integer approvalStatus = new Integer(0); /* 审批状态\t0:待审;1:审核中;2:已审*/
private String accountCode = " "; /* 帐套*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("主键");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("公司编码(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("公司名称(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_code);
eiColumn.setFieldLength(20);
eiColumn.setDescName("部门编号(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("部门名称(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_proj_code);
eiColumn.setFieldLength(20);
eiColumn.setDescName("项目编码(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_proj_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("项目名称(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_parent_prod_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("父节点-产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_parent_prod_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("父节点-产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_material_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("物料清单id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("产品编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_status);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4);
eiColumn.setDescName("产品状态 0:未提交,1:已提交");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_change_type);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4);
eiColumn.setDescName("变更类型:默认0,1:增加,2:替换,3:删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_quantity);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(8);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_single_weight);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_total_weight);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("总重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_approval_status);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4);
eiColumn.setDescName("审批状态\t0:待审;1:审核中;2:已审");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_account_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("帐套");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_by);
eiColumn.setFieldLength(32);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_time);
eiColumn.setFieldLength(14);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_by);
eiColumn.setFieldLength(32);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_time);
eiColumn.setFieldLength(14);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSC004A() {
initMetaData();
}
/**
* get the id - 主键.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键.
*
* @param id - 主键
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 公司编码(预留).
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码(预留).
*
* @param companyCode - 公司编码(预留)
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the 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 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 depName - 部门名称(预留).
* @return the depName
*/
public String getDepName() {
return this.depName;
}
/**
* set the depName - 部门名称(预留).
*
* @param depName - 部门名称(预留)
*/
public void setDepName(String depName) {
this.depName = depName;
}
/**
* get the projCode - 项目编码(预留).
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码(预留).
*
* @param projCode - 项目编码(预留)
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称(预留).
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称(预留).
*
* @param projName - 项目名称(预留)
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the parentProdCode - 父节点-产品编码.
* @return the parentProdCode
*/
public String getParentProdCode() {
return this.parentProdCode;
}
/**
* set the parentProdCode - 父节点-产品编码.
*
* @param parentProdCode - 父节点-产品编码
*/
public void setParentProdCode(String parentProdCode) {
this.parentProdCode = parentProdCode;
}
/**
* get the parentProdName - 父节点-产品名称.
* @return the parentProdName
*/
public String getParentProdName() {
return this.parentProdName;
}
/**
* set the parentProdName - 父节点-产品名称.
*
* @param parentProdName - 父节点-产品名称
*/
public void setParentProdName(String parentProdName) {
this.parentProdName = parentProdName;
}
/**
* get the materialId - 物料清单id.
* @return the materialId
*/
public Long getMaterialId() {
return this.materialId;
}
/**
* set the materialId - 物料清单id.
*
* @param materialId - 物料清单id
*/
public void setMaterialId(Long materialId) {
this.materialId = materialId;
}
/**
* 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 productStatus - 产品状态 0:未提交,1:已提交.
* @return the productStatus
*/
public Integer getProductStatus() {
return this.productStatus;
}
/**
* set the productStatus - 产品状态 0:未提交,1:已提交.
*
* @param productStatus - 产品状态 0:未提交,1:已提交
*/
public void setProductStatus(Integer productStatus) {
this.productStatus = productStatus;
}
/**
* get the changeType - 变更类型:默认0,1:增加,2:替换,3:删除.
* @return the changeType
*/
public Integer getChangeType() {
return this.changeType;
}
/**
* set the changeType - 变更类型:默认0,1:增加,2:替换,3:删除.
*
* @param changeType - 变更类型:默认0,1:增加,2:替换,3:删除
*/
public void setChangeType(Integer changeType) {
this.changeType = changeType;
}
/**
* get the quantity - 数量.
* @return the quantity
*/
public Integer getQuantity() {
return this.quantity;
}
/**
* set the quantity - 数量.
*
* @param quantity - 数量
*/
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
/**
* get the singleWeight - 单重.
* @return the singleWeight
*/
public BigDecimal getSingleWeight() {
return this.singleWeight;
}
/**
* set the singleWeight - 单重.
*
* @param singleWeight - 单重
*/
public void setSingleWeight(BigDecimal singleWeight) {
this.singleWeight = singleWeight;
}
/**
* get the totalWeight - 总重.
* @return the totalWeight
*/
public BigDecimal getTotalWeight() {
return this.totalWeight;
}
/**
* set the totalWeight - 总重.
*
* @param totalWeight - 总重
*/
public void setTotalWeight(BigDecimal totalWeight) {
this.totalWeight = totalWeight;
}
/**
* get the approvalStatus - 审批状态\t0:待审;1:审核中;2:已审.
* @return the approvalStatus
*/
public Integer getApprovalStatus() {
return this.approvalStatus;
}
/**
* set the approvalStatus - 审批状态\t0:待审;1:审核中;2:已审.
*
* @param approvalStatus - 审批状态\t0:待审;1:审核中;2:已审
*/
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
/**
* 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 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 value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_id)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_code)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_name)), companyName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_code)), depCode));
setDepName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_name)), depName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name)), projName));
setParentProdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_parent_prod_code)), parentProdCode));
setParentProdName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_parent_prod_name)), parentProdName));
setMaterialId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_material_id)), materialId));
setProductCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_code)), productCode));
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_name)), productName));
setProductStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_product_status)), productStatus));
setChangeType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_change_type)), changeType));
setQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_quantity)), quantity));
setSingleWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_single_weight)), singleWeight));
setTotalWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_total_weight)), totalWeight));
setApprovalStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_approval_status)), approvalStatus));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_account_code)), accountCode));
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));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_id, StringUtils.toString(id, eiMetadata.getMeta(FIELD_id)));
map.put(FIELD_company_code, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_company_code)));
map.put(FIELD_company_name, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_company_name)));
map.put(FIELD_dep_code, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_dep_code)));
map.put(FIELD_dep_name, StringUtils.toString(depName, eiMetadata.getMeta(FIELD_dep_name)));
map.put(FIELD_proj_code, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_proj_code)));
map.put(FIELD_proj_name, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_proj_name)));
map.put(FIELD_parent_prod_code, StringUtils.toString(parentProdCode, eiMetadata.getMeta(FIELD_parent_prod_code)));
map.put(FIELD_parent_prod_name, StringUtils.toString(parentProdName, eiMetadata.getMeta(FIELD_parent_prod_name)));
map.put(FIELD_material_id, StringUtils.toString(materialId, eiMetadata.getMeta(FIELD_material_id)));
map.put(FIELD_product_code, StringUtils.toString(productCode, eiMetadata.getMeta(FIELD_product_code)));
map.put(FIELD_product_name, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_product_name)));
map.put(FIELD_product_status, StringUtils.toString(productStatus, eiMetadata.getMeta(FIELD_product_status)));
map.put(FIELD_change_type, StringUtils.toString(changeType, eiMetadata.getMeta(FIELD_change_type)));
map.put(FIELD_quantity, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_quantity)));
map.put(FIELD_single_weight, StringUtils.toString(singleWeight, eiMetadata.getMeta(FIELD_single_weight)));
map.put(FIELD_total_weight, StringUtils.toString(totalWeight, eiMetadata.getMeta(FIELD_total_weight)));
map.put(FIELD_approval_status, StringUtils.toString(approvalStatus, eiMetadata.getMeta(FIELD_approval_status)));
map.put(FIELD_account_code, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_account_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)));
return map;
}
}
package com.baosight.hggp.hg.sc.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:Hgsc004b.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-16 14:38:56 create
*/
public class HGSC004B extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_id = "id"; /* 主键*/
public static final String FIELD_product_id = "productId"; /* 变更产品id*/
public static final String FIELD_company_code = "companyCode"; /* 公司编码(预留)*/
public static final String FIELD_company_name = "companyName"; /* 公司名称(预留)*/
public static final String FIELD_dep_code = "depCode"; /* 部门编号(预留)*/
public static final String FIELD_dep_name = "depName"; /* 部门名称(预留)*/
public static final String FIELD_proj_code = "projCode"; /* 项目编码(预留)*/
public static final String FIELD_proj_name = "projName"; /* 项目名称(预留)*/
public static final String FIELD_parent_prod_code = "parentProdCode"; /* 父节点-产品编码*/
public static final String FIELD_parent_prod_name = "parentProdName"; /* 父节点-产品名称*/
public static final String FIELD_material_id = "materialId"; /* 物料清单id*/
public static final String FIELD_product_code = "productCode"; /* 产品编号*/
public static final String FIELD_product_name = "productName"; /* 产品名称*/
public static final String FIELD_product_status = "productStatus"; /* 产品状态 0:未提交,1:已提交*/
public static final String FIELD_change_type = "changeType"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String FIELD_quantity = "quantity"; /* 数量*/
public static final String FIELD_single_weight = "singleWeight"; /* 单重*/
public static final String FIELD_total_weight = "totalWeight"; /* 总重*/
public static final String FIELD_approval_status = "approvalStatus"; /* 审批状态\t0:待审;1:审核中;2:已审*/
public static final String FIELD_account_code = "accountCode"; /* 帐套*/
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 COL_id = "id"; /* 主键*/
public static final String COL_product_id = "product_id"; /* 变更产品id*/
public static final String COL_company_code = "company_code"; /* 公司编码(预留)*/
public static final String COL_company_name = "company_name"; /* 公司名称(预留)*/
public static final String COL_dep_code = "dep_code"; /* 部门编号(预留)*/
public static final String COL_dep_name = "dep_name"; /* 部门名称(预留)*/
public static final String COL_proj_code = "proj_code"; /* 项目编码(预留)*/
public static final String COL_proj_name = "proj_name"; /* 项目名称(预留)*/
public static final String COL_parent_prod_code = "parent_prod_code"; /* 父节点-产品编码*/
public static final String COL_parent_prod_name = "parent_prod_name"; /* 父节点-产品名称*/
public static final String COL_material_id = "material_id"; /* 物料清单id*/
public static final String COL_product_code = "product_code"; /* 产品编号*/
public static final String COL_product_name = "product_name"; /* 产品名称*/
public static final String COL_product_status = "product_status"; /* 产品状态 0:未提交,1:已提交*/
public static final String COL_change_type = "change_type"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String COL_quantity = "quantity"; /* 数量*/
public static final String COL_single_weight = "single_weight"; /* 单重*/
public static final String COL_total_weight = "total_weight"; /* 总重*/
public static final String COL_approval_status = "approval_status"; /* 审批状态\t0:待审;1:审核中;2:已审*/
public static final String COL_account_code = "account_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 QUERY = "HGSC004B.query";
public static final String COUNT = "HGSC004B.count";
public static final String INSERT = "HGSC004B.insert";
public static final String UPDATE = "HGSC004B.update";
public static final String DELETE = "HGSC004B.delete";
private Long id = new Long(0); /* 主键*/
private Long productId = new Long(0); /* 变更产品id*/
private String companyCode = " "; /* 公司编码(预留)*/
private String companyName = " "; /* 公司名称(预留)*/
private String depCode = " "; /* 部门编号(预留)*/
private String depName = " "; /* 部门名称(预留)*/
private String projCode = " "; /* 项目编码(预留)*/
private String projName = " "; /* 项目名称(预留)*/
private String parentProdCode = " "; /* 父节点-产品编码*/
private String parentProdName = " "; /* 父节点-产品名称*/
private Long materialId = new Long(0); /* 物料清单id*/
private String productCode = " "; /* 产品编号*/
private String productName = " "; /* 产品名称*/
private Integer productStatus = new Integer(0); /* 产品状态 0:未提交,1:已提交*/
private Integer changeType = new Integer(0); /* 变更类型:默认0,1:增加,2:替换,3:删除*/
private Integer quantity = new Integer(0); /* 数量*/
private BigDecimal singleWeight = new BigDecimal(0.000); /* 单重*/
private BigDecimal totalWeight = new BigDecimal(0.000); /* 总重*/
private Integer approvalStatus = new Integer(0); /* 审批状态\t0:待审;1:审核中;2:已审*/
private String accountCode = " "; /* 帐套*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("主键");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("变更产品id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("公司编码(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_company_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("公司名称(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_code);
eiColumn.setFieldLength(20);
eiColumn.setDescName("部门编号(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_dep_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("部门名称(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_proj_code);
eiColumn.setFieldLength(20);
eiColumn.setDescName("项目编码(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_proj_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("项目名称(预留)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_parent_prod_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("父节点-产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_parent_prod_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("父节点-产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_material_id);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("物料清单id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("产品编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_name);
eiColumn.setFieldLength(50);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_status);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4);
eiColumn.setDescName("产品状态 0:未提交,1:已提交");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_change_type);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4);
eiColumn.setDescName("变更类型:默认0,1:增加,2:替换,3:删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_quantity);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(8);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_single_weight);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_total_weight);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("总重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_approval_status);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4);
eiColumn.setDescName("审批状态\t0:待审;1:审核中;2:已审");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_account_code);
eiColumn.setFieldLength(32);
eiColumn.setDescName("帐套");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_by);
eiColumn.setFieldLength(32);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_time);
eiColumn.setFieldLength(14);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_by);
eiColumn.setFieldLength(32);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_name);
eiColumn.setFieldLength(32);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_time);
eiColumn.setFieldLength(14);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSC004B() {
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 productId - 变更产品id.
* @return the productId
*/
public Long getProductId() {
return this.productId;
}
/**
* set the productId - 变更产品id.
*
* @param productId - 变更产品id
*/
public void setProductId(Long productId) {
this.productId = productId;
}
/**
* 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 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 depName - 部门名称(预留).
* @return the depName
*/
public String getDepName() {
return this.depName;
}
/**
* set the depName - 部门名称(预留).
*
* @param depName - 部门名称(预留)
*/
public void setDepName(String depName) {
this.depName = depName;
}
/**
* get the projCode - 项目编码(预留).
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码(预留).
*
* @param projCode - 项目编码(预留)
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称(预留).
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称(预留).
*
* @param projName - 项目名称(预留)
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the parentProdCode - 父节点-产品编码.
* @return the parentProdCode
*/
public String getParentProdCode() {
return this.parentProdCode;
}
/**
* set the parentProdCode - 父节点-产品编码.
*
* @param parentProdCode - 父节点-产品编码
*/
public void setParentProdCode(String parentProdCode) {
this.parentProdCode = parentProdCode;
}
/**
* get the parentProdName - 父节点-产品名称.
* @return the parentProdName
*/
public String getParentProdName() {
return this.parentProdName;
}
/**
* set the parentProdName - 父节点-产品名称.
*
* @param parentProdName - 父节点-产品名称
*/
public void setParentProdName(String parentProdName) {
this.parentProdName = parentProdName;
}
/**
* get the materialId - 物料清单id.
* @return the materialId
*/
public Long getMaterialId() {
return this.materialId;
}
/**
* set the materialId - 物料清单id.
*
* @param materialId - 物料清单id
*/
public void setMaterialId(Long materialId) {
this.materialId = materialId;
}
/**
* 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 productStatus - 产品状态 0:未提交,1:已提交.
* @return the productStatus
*/
public Integer getProductStatus() {
return this.productStatus;
}
/**
* set the productStatus - 产品状态 0:未提交,1:已提交.
*
* @param productStatus - 产品状态 0:未提交,1:已提交
*/
public void setProductStatus(Integer productStatus) {
this.productStatus = productStatus;
}
/**
* get the changeType - 变更类型:默认0,1:增加,2:替换,3:删除.
* @return the changeType
*/
public Integer getChangeType() {
return this.changeType;
}
/**
* set the changeType - 变更类型:默认0,1:增加,2:替换,3:删除.
*
* @param changeType - 变更类型:默认0,1:增加,2:替换,3:删除
*/
public void setChangeType(Integer changeType) {
this.changeType = changeType;
}
/**
* get the quantity - 数量.
* @return the quantity
*/
public Integer getQuantity() {
return this.quantity;
}
/**
* set the quantity - 数量.
*
* @param quantity - 数量
*/
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
/**
* get the singleWeight - 单重.
* @return the singleWeight
*/
public BigDecimal getSingleWeight() {
return this.singleWeight;
}
/**
* set the singleWeight - 单重.
*
* @param singleWeight - 单重
*/
public void setSingleWeight(BigDecimal singleWeight) {
this.singleWeight = singleWeight;
}
/**
* get the totalWeight - 总重.
* @return the totalWeight
*/
public BigDecimal getTotalWeight() {
return this.totalWeight;
}
/**
* set the totalWeight - 总重.
*
* @param totalWeight - 总重
*/
public void setTotalWeight(BigDecimal totalWeight) {
this.totalWeight = totalWeight;
}
/**
* get the approvalStatus - 审批状态\t0:待审;1:审核中;2:已审.
* @return the approvalStatus
*/
public Integer getApprovalStatus() {
return this.approvalStatus;
}
/**
* set the approvalStatus - 审批状态\t0:待审;1:审核中;2:已审.
*
* @param approvalStatus - 审批状态\t0:待审;1:审核中;2:已审
*/
public void setApprovalStatus(Integer approvalStatus) {
this.approvalStatus = approvalStatus;
}
/**
* 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 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 value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_id)), id));
setProductId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_product_id)), productId));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_code)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_name)), companyName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_code)), depCode));
setDepName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_name)), depName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name)), projName));
setParentProdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_parent_prod_code)), parentProdCode));
setParentProdName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_parent_prod_name)), parentProdName));
setMaterialId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_material_id)), materialId));
setProductCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_code)), productCode));
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_name)), productName));
setProductStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_product_status)), productStatus));
setChangeType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_change_type)), changeType));
setQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_quantity)), quantity));
setSingleWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_single_weight)), singleWeight));
setTotalWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_total_weight)), totalWeight));
setApprovalStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_approval_status)), approvalStatus));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_account_code)), accountCode));
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));
}
/**
* 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_product_id, StringUtils.toString(productId, eiMetadata.getMeta(FIELD_product_id)));
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_dep_code, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_dep_code)));
map.put(FIELD_dep_name, StringUtils.toString(depName, eiMetadata.getMeta(FIELD_dep_name)));
map.put(FIELD_proj_code, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_proj_code)));
map.put(FIELD_proj_name, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_proj_name)));
map.put(FIELD_parent_prod_code, StringUtils.toString(parentProdCode, eiMetadata.getMeta(FIELD_parent_prod_code)));
map.put(FIELD_parent_prod_name, StringUtils.toString(parentProdName, eiMetadata.getMeta(FIELD_parent_prod_name)));
map.put(FIELD_material_id, StringUtils.toString(materialId, eiMetadata.getMeta(FIELD_material_id)));
map.put(FIELD_product_code, StringUtils.toString(productCode, eiMetadata.getMeta(FIELD_product_code)));
map.put(FIELD_product_name, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_product_name)));
map.put(FIELD_product_status, StringUtils.toString(productStatus, eiMetadata.getMeta(FIELD_product_status)));
map.put(FIELD_change_type, StringUtils.toString(changeType, eiMetadata.getMeta(FIELD_change_type)));
map.put(FIELD_quantity, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_quantity)));
map.put(FIELD_single_weight, StringUtils.toString(singleWeight, eiMetadata.getMeta(FIELD_single_weight)));
map.put(FIELD_total_weight, StringUtils.toString(totalWeight, eiMetadata.getMeta(FIELD_total_weight)));
map.put(FIELD_approval_status, StringUtils.toString(approvalStatus, eiMetadata.getMeta(FIELD_approval_status)));
map.put(FIELD_account_code, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_account_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)));
return map;
}
}
......@@ -60,7 +60,6 @@ public class ServiceHGSC003 extends ServiceBase {
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC003.FIELD_id);
DaoUtils.update(HGSC003.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
// HGSCTools.THGSC003A.deleteByProIds(ids);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
......@@ -121,7 +120,11 @@ public class ServiceHGSC003 extends ServiceBase {
map.put("projCode",hgsc003.getProjCode());
List<HGSC003> oldHgsc003List = this.dao.query(HGSC003.QUERY,map);
for(HGSC003 o : oldHgsc003List){
if(Objects.nonNull(hgsc003.getId())&&hgsc003.getId()>0){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc003.getId().intValue()),"已存在此项目号的蓝图!");
}else{
AssertUtils.isTrue(Objects.nonNull(o),"已存在此项目号的蓝图!");
}
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
......@@ -178,5 +181,22 @@ public class ServiceHGSC003 extends ServiceBase {
}
/**
* 蓝图查询下拉框
* @param inInfo
* @return
*/
public EiInfo blueprintComboBox(EiInfo inInfo){
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String companyCode = MapUtils.getString(queryMap, HGSC003.FIELD_company_code);
String blueprintStatus = MapUtils.getString(queryMap, HGSC003.FIELD_blueprint_status);
Map map = new HashMap();
map.put(HGSC003.FIELD_account_code, UserSessionUtils.getAccountCode());
map.put(HGSC003.FIELD_company_code, companyCode);
map.put(HGSC003.FIELD_blueprint_status, blueprintStatus);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.BLUEPRINT_BOX_BLOCK_ID), map,false);
return inInfo;
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC003A;
import com.baosight.hggp.util.*;
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.*;
/**
* @Author jhs
* @Date 2024/5/14 14:46
*/
public class ServiceHGSC003A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC003A.QUERY, new HGSC003A());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC003A.QUERY, new HGSC003A());
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC003A.FIELD_id);
DaoUtils.update(HGSC003A.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
public EiInfo save(EiInfo inInfo){
try {
Map resultMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
HGSC003A hgsc003a = new HGSC003A();
hgsc003a.fromMap(resultMap);
//查询蓝图
HGSC003 hgsc003 = (HGSC003) super.dao.get(HGSC003.QUERY,HGSC003.FIELD_id,hgsc003a.getBlueprintId());
//复制蓝图基本信息
hgsc003a.setCompanyCode(hgsc003.getCompanyCode());
hgsc003a.setCompanyName(hgsc003.getCompanyName());
hgsc003a.setDepCode(hgsc003.getDepCode());
hgsc003a.setDepName(hgsc003.getDepName());
hgsc003a.setProjCode(hgsc003.getProjCode());
hgsc003a.setProjName(hgsc003.getProjName());
this.checkSaveData(hgsc003a,hgsc003);
if(Objects.nonNull(hgsc003a.getId())&&hgsc003a.getId()!=0){
DaoUtils.update(HGSC003A.UPDATE, hgsc003a);
}else {
DaoUtils.insert(HGSC003A.INSERT, hgsc003a);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param hgsc003a
*/
private void checkSaveData(HGSC003A hgsc003a,HGSC003 hgsc003) {
if(Objects.nonNull(hgsc003a.getId())&&hgsc003a.getId()>0){
AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!");
}
AssertUtils.isEmpty(hgsc003a.getDrawingCode(), "请填写图号!");
AssertUtils.isEmpty(hgsc003a.getDrawingName(), "请填写图纸名称!");
Map<String,Object> map = new HashMap<>();
map.put("blueprintId",hgsc003a.getBlueprintId());
map.put("drawingCode",hgsc003a.getDrawingCode());
List<HGSC003A> oldhgsc003aList = this.dao.query(HGSC003A.QUERY,map);
for(HGSC003A o : oldhgsc003aList){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc003a.getId().intValue()),"当前图号已存在!");
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(hgsc003a.getCompanyCode(), "请选择公司!");
AssertUtils.isEmpty(hgsc003a.getProjCode(), "请填写项目编号!");
AssertUtils.isEmpty(hgsc003a.getProjName(), "请填写项目名称!");
AssertUtils.isEmpty(hgsc003a.getBlueprintName(), "请填写蓝图名称!");
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.util.*;
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.*;
/**
* @Author jhs
* @Date 2024/5/14 14:46
*/
public class ServiceHGSC004 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC004.QUERY, new HGSC004());
Map map = new HashMap();
map.put(HGSC004.FIELD_account_code, UserSessionUtils.getAccountCode());
map.put(HGSC003.FIELD_blueprint_status, HGConstant.EnablingStatus.QY);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.BLUEPRINT_BOX_BLOCK_ID),map,false
);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC004.QUERY, new HGSC004());
Map map = new HashMap();
map.put(HGSC004.FIELD_account_code, UserSessionUtils.getAccountCode());
map.put(HGSC003.FIELD_blueprint_status, HGConstant.EnablingStatus.QY);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.BLUEPRINT_BOX_BLOCK_ID),map,false
);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC004.FIELD_id);
DaoUtils.update(HGSC004.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
public EiInfo batchSubmit(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, "id");
DaoUtils.update(HGSC004.BATCH_SUBMIT, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据停用成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
public EiInfo save(EiInfo inInfo){
try {
Map resultMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
HGSC004 hgsc004 = new HGSC004();
hgsc004.fromMap(resultMap);
HGSC003 hgsc003 = (HGSC003) super.dao.get(HGSC003.QUERY,HGSC004.FIELD_blueprint_code,hgsc004.getBlueprintCode());
hgsc004.setBlueprintId(hgsc003.getId());
this.checkSaveData(hgsc004,hgsc003);
if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()!=0){
DaoUtils.update(HGSC004.UPDATE, hgsc004);
}else {
hgsc004.setMaterialStatus(HGConstant.MaterialStatus.WTJ);
DaoUtils.insert(HGSC004.INSERT, hgsc004);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param hgsc004
*/
private void checkSaveData(HGSC004 hgsc004,HGSC003 hgsc003) {
if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()>0){
AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!");
}
Map<String,Object> map = new HashMap<>();
map.put("blueprintId",hgsc004.getBlueprintId());
List<HGSC004> hgsc004List = this.dao.query(HGSC004.QUERY,map);
for(HGSC004 o : hgsc004List){
if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()>0){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc004.getId().intValue()),"当前蓝图已存在!");
}else{
AssertUtils.isTrue(Objects.nonNull(o),"当前蓝图已存在!");
}
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(hgsc004.getCompanyCode(), "请选择公司!");
AssertUtils.isEmpty(hgsc004.getProjCode(), "请填写项目编号!");
AssertUtils.isEmpty(hgsc004.getProjName(), "请填写项目名称!");
AssertUtils.isEmpty(hgsc004.getBlueprintName(), "请填写蓝图名称!");
}
}
package com.baosight.hggp.hg.sc.service;
import cn.hutool.core.bean.BeanUtil;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.*;
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 com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.*;
/**
* @Author jhs
* @Date 2024/5/14 14:46
*/
public class ServiceHGSC004A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC004A.QUERY, new HGSC004A());
Map map = new HashMap();
map.put(HGSC004A.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID),map,false
);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC004A.QUERY, new HGSC004A());
Map map = new HashMap();
map.put(HGSC004A.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID),map,false
);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGSC004A.FIELD_id);
// DaoUtils.update(HGSC004A.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
public EiInfo batchSubmit(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
List<Long> ids = ObjectUtils.listKey(resultRows, "id");
// DaoUtils.update(HGSC004A.BATCH_SUBMIT, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据停用成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
public EiInfo save(EiInfo inInfo){
try {
Map resultMap = EiInfoUtils.getFirstRow(inInfo,EiConstant.resultBlock);
HGSC004A hgsc004a = new HGSC004A();
hgsc004a.fromMap(resultMap);
HGSC003 hgsc003 = (HGSC003) super.dao.get(HGSC003.QUERY,HGSC004A.FIELD_id,hgsc004a.getId());
this.checkSaveData(hgsc004a,hgsc003);
if(Objects.nonNull(hgsc004a.getId())&&hgsc004a.getId()!=0){
DaoUtils.update(HGSC004A.UPDATE, hgsc004a);
}else {
hgsc004a.setProductStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGSC004A.INSERT, hgsc004a);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param hgsc004a
*/
private void checkSaveData(HGSC004A hgsc004a,HGSC003 hgsc003) {
if(Objects.nonNull(hgsc004a.getId())&&hgsc004a.getId()>0){
AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!");
}
AssertUtils.isEmpty(UserSessionUtils.getAccountCode(), "当前用户未绑定公司,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
AssertUtils.isEmpty(hgsc004a.getCompanyCode(), "请选择公司!");
AssertUtils.isEmpty(hgsc004a.getProjCode(), "请填写项目编号!");
AssertUtils.isEmpty(hgsc004a.getProjName(), "请填写项目名称!");
}
/**
* 指定树节点
* @param inInfo
* @return
*/
public EiInfo queryTreeRoot(EiInfo inInfo) {
String orgEname = StringUtils.toString(inInfo.get("orgEname"));
Map queryMap = new HashMap();
String root = "";
if (orgEname != null) {
Map map = new HashMap();
map.put("orgEname", orgEname);
map.put("orgType", OrgTypeEnum.COMPANY.getCode());
Org org = (Org) dao.get("HGSC004A.queryCompany", "id",orgEname);
root = org.getOrgEname() + ":" + org.getOrgCname();
}
inInfo.set("root",root);
return inInfo;
}
//树查询服务
public EiInfo queryTreeNode(EiInfo inInfo) {
//1 获取参数
String pEname = inInfo.getCellStr(EiConstant.queryBlock, 0, "node");
if(org.apache.commons.lang.StringUtils.equals("$",pEname)){
pEname = "root";
}
Long projId = NumberUtils.toLong(inInfo.get("projId"));
String orgEname = StringUtils.toString(inInfo.get("orgEname"));
Map queryMap = new HashMap();
queryMap.put("companyCode", pEname);
if (orgEname != null) {
Map map = new HashMap();
map.put("orgEname", orgEname);
List list = dao.query("HGSC004A.queryCompany", map);
if (list.size() > 0) {
queryMap.put("orgEname", orgEname);
}
}
//2 查询节点
List rows = dao.query("HGSC004A.query", queryMap);
//3 增加节点block块
EiInfo outInfo = new EiInfo();
EiBlock outBlock = outInfo.addBlock(BeanUtil.isEmpty(pEname) ? "" : pEname);
outBlock.addRows(rows);
return outInfo;
}
/**
* 修改父级节点的LEAF状态为1
*
* @param id
*/
public void checkTreeNodeLeaf(Long id) {
EiInfo eiInfo = new EiInfo();
//1 获取参数
Map queryMap = new HashMap();
queryMap.put("id", id);
// List rows = this.dao.query("HPSC002.queryTreeNodeByParentPrtdCode", queryMap);
// if(rows.size() > 0){
// queryMap.put("leaf", "0");
// }else{
// queryMap.put("leaf", "1");
// }
// DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
}
}
......@@ -114,13 +114,12 @@
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC003 WHERE
DELETE FROM ${hggpSchema}.HGSC003 WHERE id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC003
SET
id = #id#, <!-- 主键 -->
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编码 -->
......@@ -138,7 +137,7 @@
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE
WHERE id = #id#
</update>
<delete id="batchDelete">
......@@ -167,4 +166,30 @@
WHERE
ID = #id#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
BLUEPRINT_CODE as "blueprintCode", <!-- 蓝图编号 -->
BLUEPRINT_NAME as "blueprintName" <!-- 蓝图名称 -->
FROM ${hggpSchema}.HGSC003
WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintStatus">
BLUEPRINT_STATUS = #blueprintStatus#
</isNotEmpty>
ORDER BY BLUEPRINT_CODE
</select>
</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">
<sqlMap namespace="HGSC003A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintId">
blueprint_id = #blueprintId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
blueprint_name = #blueprintName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="drawingCode">
drawing_code like ('%$drawingCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="drawingName">
drawing_name like ('%$drawingName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC003A">
SELECT
id as "id", <!-- 主键 -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
dep_code as "depCode", <!-- 部门编号 -->
dep_name as "depName", <!-- 部门名称 -->
blueprint_id as "blueprintId", <!-- 蓝图id -->
blueprint_code as "blueprintCode", <!-- 蓝图编号 -->
blueprint_name as "blueprintName", <!-- 蓝图名称 -->
proj_code as "projCode", <!-- 项目编码 -->
proj_name as "projName", <!-- 项目名称 -->
drawing_code as "drawingCode", <!-- 图号 -->
drawing_name as "drawingName", <!-- 图纸名称 -->
account_code as "accountCode", <!-- 帐套 -->
created_by as "createdBy", <!-- 创建人 -->
created_name as "createdName", <!-- 创建人名称 -->
created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更新人 -->
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC003A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC003A WHERE 1=1
<include refid="condition" />
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC003A (id, <!-- 主键 -->
company_code, <!-- 公司编码 -->
company_name, <!-- 公司名称 -->
dep_code, <!-- 部门编号 -->
dep_name, <!-- 部门名称 -->
blueprint_id, <!-- 蓝图id -->
blueprint_code, <!-- 蓝图编号 -->
blueprint_name, <!-- 蓝图名称 -->
proj_code, <!-- 项目编码 -->
proj_name, <!-- 项目名称 -->
drawing_code, <!-- 图号 -->
drawing_name, <!-- 图纸名称 -->
account_code, <!-- 帐套 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #blueprintId#, #blueprintCode#, #blueprintName#, #projCode#, #projName#, #drawingCode#, #drawingName#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC003A WHERE id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC003A
SET
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编号 -->
dep_name = #depName#, <!-- 部门名称 -->
blueprint_id = #blueprintId#, <!-- 蓝图id -->
blueprint_code = #blueprintCode#, <!-- 蓝图编号 -->
blueprint_name = #blueprintName#, <!-- 蓝图名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
drawing_code = #drawingCode#, <!-- 图号 -->
drawing_name = #drawingName#, <!-- 图纸名称 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
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">
<sqlMap namespace="HGSC004">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintId">
blueprint_id = #blueprintId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
blueprint_name like ('%$blueprintName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
material_status = #materialStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC004">
SELECT
id as "id", <!-- 主键 -->
blueprint_id as "blueprintId", <!-- 蓝图id -->
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName", <!-- 公司名称 -->
dep_code as "depCode", <!-- 部门编号 -->
dep_name as "depName", <!-- 部门名称 -->
blueprint_code as "blueprintCode", <!-- 蓝图编号 -->
blueprint_name as "blueprintName", <!-- 蓝图名称 -->
proj_code as "projCode", <!-- 项目编码 -->
proj_name as "projName", <!-- 项目名称 -->
material_status as "materialStatus", <!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
approval_status as "approvalStatus", <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code as "accountCode", <!-- 帐套 -->
created_by as "createdBy", <!-- 创建人 -->
created_name as "createdName", <!-- 创建人名称 -->
created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更新人 -->
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC004 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC004 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintId">
blueprint_id = #blueprintId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
blueprint_name = #blueprintName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
material_status = #materialStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC004 (id, <!-- 主键 -->
blueprint_id, <!-- 蓝图id -->
company_code, <!-- 公司编码 -->
company_name, <!-- 公司名称 -->
dep_code, <!-- 部门编号 -->
dep_name, <!-- 部门名称 -->
blueprint_code, <!-- 蓝图编号 -->
blueprint_name, <!-- 蓝图名称 -->
proj_code, <!-- 项目编码 -->
proj_name, <!-- 项目名称 -->
material_status, <!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
approval_status, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code, <!-- 帐套 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #blueprintId#, #companyCode#, #companyName#, #depCode#, #depName#, #blueprintCode#, #blueprintName#, #projCode#, #projName#, #materialStatus#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC004 WHERE id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC004
SET
blueprint_id = #blueprintId#, <!-- 蓝图id -->
company_code = #companyCode#, <!-- 公司编码 -->
company_name = #companyName#, <!-- 公司名称 -->
dep_code = #depCode#, <!-- 部门编号 -->
dep_name = #depName#, <!-- 部门名称 -->
blueprint_code = #blueprintCode#, <!-- 蓝图编号 -->
blueprint_name = #blueprintName#, <!-- 蓝图名称 -->
proj_code = #projCode#, <!-- 项目编码 -->
proj_name = #projName#, <!-- 项目名称 -->
material_status = #materialStatus#, <!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
approval_status = #approvalStatus#, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE id = #id#
</update>
<delete id="batchDelete">
DELETE FROM ${hggpSchema}.HGSC004 WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</delete>
</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">
<sqlMap namespace="HGSC004A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdCode">
parent_prod_code = #parentProdCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdName">
parent_prod_name = #parentProdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialId">
material_id = #materialId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productStatus">
product_status = #productStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="changeType">
change_type = #changeType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC004A">
SELECT
id as "id", <!-- 主键 -->
company_code as "companyCode", <!-- 公司编码(预留) -->
company_name as "companyName", <!-- 公司名称(预留) -->
dep_code as "depCode", <!-- 部门编号(预留) -->
dep_name as "depName", <!-- 部门名称(预留) -->
proj_code as "projCode", <!-- 项目编码(预留) -->
proj_name as "projName", <!-- 项目名称(预留) -->
parent_prod_code as "parentProdCode", <!-- 父节点-产品编码 -->
parent_prod_name as "parentProdName", <!-- 父节点-产品名称 -->
material_id as "materialId", <!-- 物料清单id -->
product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 -->
product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 -->
change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity as "quantity", <!-- 数量 -->
single_weight as "singleWeight", <!-- 单重 -->
total_weight as "totalWeight", <!-- 总重 -->
approval_status as "approvalStatus", <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code as "accountCode", <!-- 帐套 -->
created_by as "createdBy", <!-- 创建人 -->
created_name as "createdName", <!-- 创建人名称 -->
created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更新人 -->
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC004A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC004A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdCode">
parent_prod_code = #parentProdCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdName">
parent_prod_name = #parentProdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialId">
material_id = #materialId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productStatus">
product_status = #productStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="changeType">
change_type = #changeType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC004A (id, <!-- 主键 -->
company_code, <!-- 公司编码(预留) -->
company_name, <!-- 公司名称(预留) -->
dep_code, <!-- 部门编号(预留) -->
dep_name, <!-- 部门名称(预留) -->
proj_code, <!-- 项目编码(预留) -->
proj_name, <!-- 项目名称(预留) -->
parent_prod_code, <!-- 父节点-产品编码 -->
parent_prod_name, <!-- 父节点-产品名称 -->
material_id, <!-- 物料清单id -->
product_code, <!-- 产品编号 -->
product_name, <!-- 产品名称 -->
product_status, <!-- 产品状态 0:未提交,1:已提交 -->
change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity, <!-- 数量 -->
single_weight, <!-- 单重 -->
total_weight, <!-- 总重 -->
approval_status, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code, <!-- 帐套 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #parentProdCode#, #parentProdName#, #materialId#, #productCode#, #productName#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC004A WHERE id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC004A
SET
company_code = #companyCode#, <!-- 公司编码(预留) -->
company_name = #companyName#, <!-- 公司名称(预留) -->
dep_code = #depCode#, <!-- 部门编号(预留) -->
dep_name = #depName#, <!-- 部门名称(预留) -->
proj_code = #projCode#, <!-- 项目编码(预留) -->
proj_name = #projName#, <!-- 项目名称(预留) -->
parent_prod_code = #parentProdCode#, <!-- 父节点-产品编码 -->
parent_prod_name = #parentProdName#, <!-- 父节点-产品名称 -->
material_id = #materialId#, <!-- 物料清单id -->
product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 -->
product_status = #productStatus#, <!-- 产品状态 0:未提交,1:已提交 -->
change_type = #changeType#, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity = #quantity#, <!-- 数量 -->
single_weight = #singleWeight#, <!-- 单重 -->
total_weight = #totalWeight#, <!-- 总重 -->
approval_status = #approvalStatus#, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE id = #id#
</update>
<!--查询公司树-->
<select id="queryCompany" parameterClass="java.util.HashMap" resultClass="com.baosight.hggp.hg.xs.domain.Org">
select
a.ORG_ENAME as "orgEname",
a.ORG_CNAME as "orgCname"
from iplat_hggp.txsog01 a
left join iplat_hggp.txsog02 b on a.ORG_ID = b.ORG_ID
where
a.ACCOUNT_CODE = #accountCode#
and a.ORG_TYPE = #orgType#
<isNotEmpty prepend=" AND " property="orgEname">
a.ORG_ENAME = #orgEname#
</isNotEmpty>
</select>
</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">
<sqlMap namespace="HGSC004B">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productId">
product_id = #productId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdCode">
parent_prod_code = #parentProdCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdName">
parent_prod_name = #parentProdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialId">
material_id = #materialId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productStatus">
product_status = #productStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="changeType">
change_type = #changeType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC004B">
SELECT
id as "id", <!-- 主键 -->
product_id as "productId", <!-- 变更产品id -->
company_code as "companyCode", <!-- 公司编码(预留) -->
company_name as "companyName", <!-- 公司名称(预留) -->
dep_code as "depCode", <!-- 部门编号(预留) -->
dep_name as "depName", <!-- 部门名称(预留) -->
proj_code as "projCode", <!-- 项目编码(预留) -->
proj_name as "projName", <!-- 项目名称(预留) -->
parent_prod_code as "parentProdCode", <!-- 父节点-产品编码 -->
parent_prod_name as "parentProdName", <!-- 父节点-产品名称 -->
material_id as "materialId", <!-- 物料清单id -->
product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 -->
product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 -->
change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity as "quantity", <!-- 数量 -->
single_weight as "singleWeight", <!-- 单重 -->
total_weight as "totalWeight", <!-- 总重 -->
approval_status as "approvalStatus", <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code as "accountCode", <!-- 帐套 -->
created_by as "createdBy", <!-- 创建人 -->
created_name as "createdName", <!-- 创建人名称 -->
created_time as "createdTime", <!-- 创建时间 -->
updated_by as "updatedBy", <!-- 更新人 -->
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC004B WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC004B WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productId">
product_id = #productId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdCode">
parent_prod_code = #parentProdCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdName">
parent_prod_name = #parentProdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialId">
material_id = #materialId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
product_name = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productStatus">
product_status = #productStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="changeType">
change_type = #changeType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC004B (id, <!-- 主键 -->
product_id, <!-- 变更产品id -->
company_code, <!-- 公司编码(预留) -->
company_name, <!-- 公司名称(预留) -->
dep_code, <!-- 部门编号(预留) -->
dep_name, <!-- 部门名称(预留) -->
proj_code, <!-- 项目编码(预留) -->
proj_name, <!-- 项目名称(预留) -->
parent_prod_code, <!-- 父节点-产品编码 -->
parent_prod_name, <!-- 父节点-产品名称 -->
material_id, <!-- 物料清单id -->
product_code, <!-- 产品编号 -->
product_name, <!-- 产品名称 -->
product_status, <!-- 产品状态 0:未提交,1:已提交 -->
change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity, <!-- 数量 -->
single_weight, <!-- 单重 -->
total_weight, <!-- 总重 -->
approval_status, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code, <!-- 帐套 -->
created_by, <!-- 创建人 -->
created_name, <!-- 创建人名称 -->
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
)
VALUES (#id#, #productId#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #parentProdCode#, #parentProdName#, #materialId#, #productCode#, #productName#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC004B WHERE id = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC004B
SET
product_id = #productId#, <!-- 变更产品id -->
company_code = #companyCode#, <!-- 公司编码(预留) -->
company_name = #companyName#, <!-- 公司名称(预留) -->
dep_code = #depCode#, <!-- 部门编号(预留) -->
dep_name = #depName#, <!-- 部门名称(预留) -->
proj_code = #projCode#, <!-- 项目编码(预留) -->
proj_name = #projName#, <!-- 项目名称(预留) -->
parent_prod_code = #parentProdCode#, <!-- 父节点-产品编码 -->
parent_prod_name = #parentProdName#, <!-- 父节点-产品名称 -->
material_id = #materialId#, <!-- 物料清单id -->
product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 -->
product_status = #productStatus#, <!-- 产品状态 0:未提交,1:已提交 -->
change_type = #changeType#, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity = #quantity#, <!-- 数量 -->
single_weight = #singleWeight#, <!-- 单重 -->
total_weight = #totalWeight#, <!-- 总重 -->
approval_status = #approvalStatus#, <!-- 审批状态 0:待审;1:审核中;2:已审 -->
account_code = #accountCode#, <!-- 帐套 -->
created_by = #createdBy#, <!-- 创建人 -->
created_name = #createdName#, <!-- 创建人名称 -->
created_time = #createdTime#, <!-- 创建时间 -->
updated_by = #updatedBy#, <!-- 更新人 -->
updated_name = #updatedName#, <!-- 修改人名称 -->
updated_time = #updatedTime# <!-- 更新时间 -->
WHERE id = #id#
</update>
</sqlMap>
......@@ -30,7 +30,7 @@ $(function (){
let template = '';
if (item.id){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id +'\')" >蓝图详情</a>';
+ 'onclick="showDetail(' + item.id +',\''+item.blueprintCode+'\',\''+item.blueprintName+'\',\''+item.companyName+'\')" >蓝图详情</a>';
if (status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateBlueprintStatus(' + item.id + ',1)" >启用</a>';
......@@ -137,14 +137,6 @@ $(function (){
},
onRowClick: function (e) {
},
exportGrid : {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "工艺流程_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls",
exportBlockId: "result",
}
}
}
......@@ -231,10 +223,10 @@ function deactivate() {
/**
* 显示详情
*/
function showDetail(id,factoryCode,flowCode,flowName) {
function showDetail(id,blueprintCode,blueprintName,companyName) {
JSColorbox.open({
href: "HGSC003A?methodName=initLoad&inqu_status-0-parendId=" + id+
"&inqu_status-0-flowCode="+flowCode+"&inqu_status-0-flowName="+flowName+"&inqu_status-0-factoryCode="+factoryCode,
href: "HGSC003A?methodName=initLoad&inqu_status-0-blueprintId=" + id +"&inqu_status-0-blueprintCode="+ blueprintCode
+"&inqu_status-0-blueprintName="+blueprintName+"&inqu_status-0-companyName="+companyName,
title: "<div style='text-align: center;'>蓝图清单详情</div>",
width: "80%",
height: "80%",
......
......@@ -25,7 +25,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
$(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,
}
});
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100],
},
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let template = '';
if (item.id){
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showUploadFile(' + item.id + ')" >附件详情</a>';
}
return template;
}
},
{
field: "companyName",
template: function (item) {
item['companyName'] =$("#inqu_status-0-companyName").val();
return $("#inqu_status-0-companyName").val();
}
},{
field: "blueprintId",
template: function (item) {
item['blueprintId'] =$("#inqu_status-0-blueprintId").val();
return $("#inqu_status-0-blueprintId").val();
}
},{
field: "blueprintCode",
template: function (item) {
item['blueprintCode'] =$("#inqu_status-0-blueprintCode").val();
return $("#inqu_status-0-blueprintCode").val();
}
},{
field: "blueprintName",
template: function (item) {
item['blueprintName'] =$("#inqu_status-0-blueprintName").val();
return $("#inqu_status-0-blueprintName").val();
}
}
],
loadComplete: function(grid) {
},
afterEdit:function (e) {
},
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') {
query();
}
},
onRowClick: function (e) {
},
}
}
downKeyUp();
})
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC003A", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 显示详情
*/
function showDetail(id,factoryCode,flowCode,flowName) {
JSColorbox.open({
href: "HGSC003AA?methodName=initLoad&inqu_status-0-parendId=" + id+
"&inqu_status-0-flowCode="+flowCode+"&inqu_status-0-flowName="+flowName+"&inqu_status-0-factoryCode="+factoryCode,
title: "<div style='text-align: center;'>蓝图清单详情</div>",
width: "80%",
height: "80%",
});
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGSC099?methodName=initLoad&inqu_status-0-bizType=LTXQ&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>",
width: "80%",
height: "80%",
});
}
<!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}"/>
<script>
var ctx = "${ctx}";
</script>
<head>
</head>
<EF:EFPage title="蓝图清单详情">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="inqu_status-0-blueprintId" cname="蓝图id" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-blueprintCode" cname="蓝图编号" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-blueprintName" cname="蓝图名称" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3" type="hidden"/>
<div class="row">
<EF:EFInput ename="inqu_status-0-drawingCode" cname="图号" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-drawingName" cname="图纸名称" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="blueprintId" cname="蓝图id" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="blueprintName" cname="蓝图名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="drawingCode" cname="图号" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="drawingName" cname="图纸名称" enable="true" width="120" align="center" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function (){
var companyCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var projCodes = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
var blueprintCodes = __eiInfo.getBlock("blueprint_box_block_id").getMappedRows();
$(".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,
}
});
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100],
},
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let status = item.blueprintStatus;
let template = '';
if (item.id){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id +',\''+item.blueprintCode+'\',\''+item.blueprintName+'\',\''+item.companyName+'\')" >物料清单</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showUploadFile(' + item.id + ')" >附件</a>';
}
return template;
}
},{
field: "companyCode",
template: function (dataItem) {
for (let i = 0; i < companyCodes.length; i++) {
if (companyCodes[i]['valueField'] === dataItem['companyCode']){
dataItem['companyName'] = companyCodes[i]['textField']
return companyCodes[i]['textField'];
}
}
return dataItem["companyCode"];
}
}, {
field: "projCode",
template: function (item) {
let template = "";
if(item.projCode){
for(let i=0;i<projCodes.length;i++){
if(item.projCode === projCodes[i]['valueField']){
item['projName'] = projCodes[i]['textField'];
template = projCodes[i]['valueField'];
}
}
}
return template;
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
inInfo.set("inqu_status-0-approvalStatus", 2);
inInfo.set("field", options.field);
let dataSource;
EiCommunicator.send("HGSC003", "projComboBox", inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("proj_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: dataSource,
minLength: 0,
dataTextField: "textField",
dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#",
valueTemplate: "[#:valueField#]#:textField#",
template: "[#:valueField#]#:textField#",
filter: "contains"
});
}
}, {
field: "blueprintCode",
template: function (item) {
let template = "";
if(item.blueprintCode){
for(let i=0;i<blueprintCodes.length;i++){
if(item.blueprintCode === blueprintCodes[i]['valueField']){
item['blueprintName'] = blueprintCodes[i]['textField'];
template = blueprintCodes[i]['valueField'];
}
}
}
return template;
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
inInfo.set("inqu_status-0-blueprintStatus", 1);
inInfo.set("inqu_status-0-projCode", options.model["projCode"]);
inInfo.set("field", options.field);
let dataSource;
EiCommunicator.send("HGSC003", "blueprintComboBox", inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("blueprint_box_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: dataSource,
minLength: 0,
dataTextField: "textField",
dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#",
valueTemplate: "[#:valueField#]#:textField#",
template: "[#:valueField#]#:textField#",
filter: "contains"
});
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field == "blueprintCode") {
loadChange(grid,e,"blueprintName");
}
if (e.field == "projCode") {
e.items[0].blueprintCode = "";
e.items[0].blueprintNmae = "";
loadChange(grid,e,"projName");
}
if (e.field == "companyCode") {
e.items[0].projCode = "";
e.items[0].projName = "";
e.items[0].blueprintCode = "";
e.items[0].blueprintNmae = "";
loadChange(grid,e,"projCode");
}
});
},
afterEdit:function (e) {
},
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') {
query();
}
},
onRowClick: function (e) {
},
}
}
downKeyUp();
})
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC004", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 显示详情
*/
function showDetail(id) {
JSColorbox.open({
href: "HGSC004A?methodName=initLoad&inqu_status-0-materialId=" + id,
title: "<div style='text-align: center;'>蓝图清单详情</div>",
width: "80%",
height: "80%",
});
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGSC099?methodName=initLoad&inqu_status-0-bizType=WLQD&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>",
width: "80%",
height: "80%",
});
}
function loadChange(grid,e,field) {
var cell_label = field,that = grid;
// locked 表示是否为固定列
var locked = that.isCellLocked(cell_label);
// tr 表示 locked 和非 locked 的行,index 表示此行的第几列
var tr,index;
// 获取此 model 元素信息
var item = e.items[0];
var _uid = item.uid;
if (locked) {
tr = $(".k-grid-content-locked tr[data-uid="+ _uid +"]");
index = $("th[data-field='"+cell_label+"']").data("index");
} else {
tr = $(".k-grid-content tr[data-uid="+ _uid +"]");
index = parseInt($("th[data-field='"+cell_label+"']").data("index")) - that.lockedHeader.find("th").length;
}
// 获取子 cell(td)
var td = tr.children("td:eq("+index+")");
// 触发 td.click 事件,
td.trigger("click");
}
<!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}"/>
<script>
var ctx = "${ctx}";
</script>
<head>
</head>
<EF:EFPage title="物料清单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-blueprintName" cname="蓝图名称" colWidth="3"/>
<EF:EFSelect cname="提交状态" ename="inqu_status-0-materialStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.sc.materialStatus" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="true" width="120" align="center"/>
<EF:EFColumn ename="blueprintName" cname="蓝图名称" enable="false" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="materialStatus" cname="提交状态" width="80" align="center" enable="false" required="false" readonly="true">
<EF:EFCodeOption codeName="hggp.sc.materialStatus" />
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
var inventNameGlobalData = [];
// 传递参数 将附件ID与当前记录ID进行绑定
// let rowId = '';
let parentId = '';
let projCode = '';
var strs;
var url = location.search; //获取url中"?"符后的字串
if (url.indexOf("?") != -1) { //判断是否有参数
var str = url.substr(1); //从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串
strs = str.split("="); //用等号进行分隔 (因为知道只有一个参数 所以直接用等号进分隔 如果有多个参数 要用&号分隔 再用等号进行分隔)
// console.log('strs=' + strs) //直接弹出第一个参数 (如果有多个参数 还要进行循环的)
}
$(function () {
IPLATUI.EFTree = {
"materialTree": {
ROOT: "root:公司列表",
/**
* 树加载完成后的回调函数
* @param options: 树的配置项
*/
query: function (postEiInfo, model) {
postEiInfo.set("companyCode",strs?strs[1] : null);
return postEiInfo;
},
loadComplete: function (options) {
// 保持结点展开状态
var expanded = Cookies.get('expanded');
if (expanded) {
Cookies.remove('expanded');
expanded = JSON.parse(expanded);
$("#menu").data("kendoTreeView").expandPath(_.keys(expanded));
}
},
/**
* 选中树结点时触发的事件,注意点击树 折叠/展开 的图标不会触发此事件
*
* @param e
* e.sender kendoTree对象, tree01Tree(EFTree的id + "Tree")
* e.node 点击的节点DOM元素
*/
select: function (e) {
var nodeData = this.dataItem(e.node);
IPLATUI.EFTree.materialTree.selectTreeNode.nodeId = nodeData.nodeId;
IPLATUI.EFTree.materialTree.selectTreeNode.prdtCode = nodeData.prdtCode;
IPLATUI.EFTree.materialTree.selectTreeNode.projCode = nodeData.projCode;
IPLATUI.EFTree.materialTree.selectTreeNode.prdtName = nodeData.prdtName;
IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName;
// 重新查询EFGrid
parentId = nodeData.nodeId;
query();
},
selectTreeNode: {}
}
};
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
result: {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100,200],
},
loadComplete: function (grid) { // 在Grid加载完成后,才能给Grid上的按钮绑定事件
$("#SC02").on("click", function () {
if (grid.getCheckedBlockData().rows.length === 0) {
IPLAT.alert({
message: '<b>请勾选一项</b>',
okFn: function (e) {
},
title: '提示'
});
} else {
console.log(grid.getCheckedBlockData().rows[0][10]);
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'){
query();
}
},
query: function () {
var ei = new EiInfo();
ei.set("inqu_status-0-prdtType",$("#inqu_status-0-prdtType").val());
ei.set("inqu_status-0-prdtCode",$("#inqu_status-0-prdtCode").val());
ei.set("inqu_status-0-status",$("#inqu_status-0-status").val());
ei.set("inqu_status-0-parentId",parentId? parentId : strs[1]);
// ei.set("inqu_status-0-parentId",-1);
return ei;
},
/**
* 点击行首checkbox,勾选行时触发的事件
* @param e kendo的Event对象
* e.sender kendoGrid对象,resultGrid
* e.fake 用于区分是手动点击的事件还是模拟的事件
* e.checked 用于区分是勾选还是取消勾选
* e.model 勾选或取消勾选的行数据,kendo.data.Model
* e.row 当前行的行号
* e.tr 行的tr,包括固定列和数据列 jquery对象
*/
onCheckRow: function (e) {
if (e.checked) {
console.log('选中');
}
},
/**
* EFGrid新增行之前触发的事件,可以根据业务逻辑控制是否进行新增
* @param e 事件对象
* e.sender Grid对象
* e.preventDefault 阻止事件发生
*/
beforeAdd: function (e) {
var logic = IPLATUI.EFTree.materialTree.selectTreeNode.nodeId ? false : true;
if (logic) { // 通过业务逻辑判断, 控制是否进行新增
IPLAT.alert({
message: '<b>请选择项目列表</b>',
okFn: function (e) {
},
title: '提示'
});
e.preventDefault();
}
},
/**
* EFGrid新增行时触发的事件,此时数据行tr元素还未渲染
* @param e 事件对象
* e.sender Grid对象
* e.preventDefault 不会触发dataBound,不渲染tr
* e.index 插入的行号
* e.items 将要插入的数据行数组([Model,Model, ...])
*/
onAdd: function (e) {
// 动态设置默认邮箱
let selectTreeNode = IPLATUI.EFTree.materialTree.selectTreeNode;
$.each(e.items, function (index, item) {
item['projCode'] = selectTreeNode.projCode;
item['projName'] = selectTreeNode.projName;
item['parentId'] = selectTreeNode.nodeId;
item['parentPrdtName'] = selectTreeNode.prdtName;
});
},
/**
* 点击Grid保存按钮时触发的事件
* @param e 事件对象
* e.sender Grid对象
*/
onSave: function (e) {
// 不向后台保存
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HGSC004A", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
}
});
},
/**
* 点击Grid删除按钮时触发的事件
* @param e 事件对象
* e.sender Grid对象
*/
onDelete: function (e) {
// 不向后台保存
console.log(e)
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HGSC004A", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
}
});
},
toolbarConfig: {
hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
// add: false, // 不显示新增按钮
// cancel: false, // 不显示取消按钮
// save: false, // 不显示保存按钮
delete: true, // 显示删除按钮
},
columns: [
{
field: "operator",
template: function (item) {
console.log(item)
let auditStatus = item.status;
let leaf = item.leaf
let template = '';
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
if (leaf === '1') {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',1)" >审核</a>';
} else {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',0)" >反审</a>';
}
}
return template;
}
}
],
loadComplete: function (grid) {
}
},
};
// 关闭事件
IPLATUI.EFWindow = {
"uploadFile": {
close: function (e) {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo();
// inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-filePath1", uploadFile);
EiCommunicator.send('HGSC004A', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
}
);
},
}
};
//产品类型下拉联动
$('input[name="inqu_status-0-prdtType"]').change(function () {
var inInfo=new EiInfo();
var prdtType=$("#inqu_status-0-prdtType").val();
inInfo.set("inventType",prdtType);
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
var input=$("#inqu_status-0-prdtCode");
dataEdition=ei.getBlock("invent_name_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataEdition,
template: "#=textField#"
});
}, onFail: function (ei) {
}
}, {async: false});
});
});
$(window).load(function () {
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function openUploadFile(id) {
uploadFileWindow.open().center();
// rowId = id;
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGSC004AA?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
function check(id, auditStatus) {
const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", auditStatus);
EiCommunicator.send('HGSC004A', 'check', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
}
);
}
<!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>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="物料清单详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-productName" cname="产品名称" colWidth="3"/>
<EF:EFSelect cname="变更类型" ename="inqu_status-0-changeType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.sc.changeType" />
</EF:EFSelect>
<EF:EFSelect cname="提交状态" ename="inqu_status-0-productStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<div id="splitter" class="i-fit-height" style="display: inline">
<div id="left-pane" class="i-fit-height" style="width: 20%;float:left;">
<EF:EFRegion id="companyTree" title="BOM结构图" fitHeight="true">
<EF:EFTree id="materialTree"
valueField="label"
textField="text"
hasChildren="leaf"
serviceName="HGSC004A"
methodName="queryTreeNode">
</EF:EFTree>
</EF:EFRegion>
</div>
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="no" checkMode="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" required="true" cname="产品名称"/>
<EF:EFColumn ename="prdtCode" required="true" cname="产品编码" hidden="true"/>
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级产品名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/>
<EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="总重"/>
<EF:EFComboColumn enable="false" ename="status" align="center"
columnTemplate="#=textField#" optionLabel=" "
itemTemplate="#=textField#" textField="textField"
valueField="valueField" cname="审核状态">
<EF:EFOption label="未审核" value="0"></EF:EFOption>
<EF:EFOption label="已审核" value="1"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
</div>
</div>
</EF:EFPage>
<script>
let ctx="${ctx}";
</script>
<script src="${ctx}/HP/SC/HGSC004A.js"></script>
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