Commit 17abfe03 by liuyang

2024-10-08 办公用品入库

parent 47a0bb58
package com.baosight.hpjx.hp.bg.domain;
import com.baosight.hpjx.util.DateUtils;
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:THpbg002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-28 21:30:54 create
*/
public class HPBG002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_DEPOSIT_DATE = "depositDate"; /* 入库日期*/
public static final String FIELD_DEPOSIT_CODE = "depositCode"; /* 入库单号*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_DEPOSIT_USER = "depositUser"; /* 入库人员*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_DEPOSIT_DATE = "DEPOSIT_DATE"; /* 入库日期*/
public static final String COL_DEPOSIT_CODE = "DEPOSIT_CODE"; /* 入库单号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_DEPOSIT_USER = "DEPOSIT_USER"; /* 入库人员*/
public static final String QUERY = "HPBG002.query";
public static final String COUNT = "HPBG002.count";
public static final String INSERT = "HPBG002.insert";
public static final String UPDATE = "HPBG002.update";
public static final String DELETE = "HPBG002.delete";
public static final String DELETE_FLAG = "HPBG002.deleteFlag";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private String depositDate = " "; /* 入库日期*/
private String depositCode = " "; /* 入库单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String depositUser = " "; /* 入库人员*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_DATE);
eiColumn.setDescName("入库日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_CODE);
eiColumn.setDescName("入库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_CODE);
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_NAME);
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_USER);
eiColumn.setDescName("入库人员");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPBG002() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the depositDate - 入库日期.
* @return the depositDate
*/
public String getDepositDate() {
return this.depositDate;
}
/**
* set the depositDate - 入库日期.
*
* @param depositDate - 入库日期
*/
public void setDepositDate(String depositDate) {
this.depositDate = depositDate;
}
/**
* get the depositCode - 入库单号.
* @return the depositCode
*/
public String getDepositCode() {
return this.depositCode;
}
/**
* set the depositCode - 入库单号.
*
* @param depositCode - 入库单号
*/
public void setDepositCode(String depositCode) {
this.depositCode = depositCode;
}
/**
* get the whCode - 仓库编码.
* @return the whCode
*/
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码.
*
* @param whCode - 仓库编码
*/
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/**
* get the whName - 仓库名称.
* @return the whName
*/
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称.
*
* @param whName - 仓库名称
*/
public void setWhName(String whName) {
this.whName = whName;
}
/**
* get the depositUser - 入库人员.
* @return the depositUser
*/
public String getDepositUser() {
return this.depositUser;
}
/**
* set the depositUser - 入库人员.
*
* @param depositUser - 入库人员
*/
public void setDepositUser(String depositUser) {
this.depositUser = depositUser;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setDepositDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_DEPOSIT_DATE))), depositDate));
setDepositCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPOSIT_CODE)), depositCode));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setDepositUser(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPOSIT_USER)), depositUser));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_DEPOSIT_DATE, StringUtils.toString(depositDate, eiMetadata.getMeta(FIELD_DEPOSIT_DATE)));
map.put(FIELD_DEPOSIT_CODE, StringUtils.toString(depositCode, eiMetadata.getMeta(FIELD_DEPOSIT_CODE)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
map.put(FIELD_DEPOSIT_USER, StringUtils.toString(depositUser, eiMetadata.getMeta(FIELD_DEPOSIT_USER)));
return map;
}
}
package com.baosight.hpjx.hp.bg.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:THpbg002a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-28 21:30:54 create
*/
public class HPBG002A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_ITEM_TYPE = "itemType"; /* 用品分类*/
public static final String FIELD_ITEM_CODE = "itemCode"; /* 用品编码*/
public static final String FIELD_ITEM_NAME = "itemName"; /* 用品名称*/
public static final String FIELD_ITEM_MODEL = "itemModel"; /* 用品型号*/
public static final String FIELD_ITEM_UNIT = "itemUnit"; /* 用品单位*/
public static final String FIELD_INV_QTY = "invQty"; /* 入库数量*/
public static final String FIELD_STATUS = "status"; /* 审批状态0.未审核1.已审核*/
public static final String FIELD_PARENT_ID = "parentId"; /* 父级ID*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_ITEM_TYPE = "ITEM_TYPE"; /* 用品分类*/
public static final String COL_ITEM_CODE = "ITEM_CODE"; /* 用品编码*/
public static final String COL_ITEM_NAME = "ITEM_NAME"; /* 用品名称*/
public static final String COL_ITEM_MODEL = "ITEM_MODEL"; /* 用品型号*/
public static final String COL_ITEM_UNIT = "ITEM_UNIT"; /* 用品单位*/
public static final String COL_INV_QTY = "INV_QTY"; /* 入库数量*/
public static final String COL_STATUS = "STATUS"; /* 审批状态0.未审核1.已审核*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 父级ID*/
public static final String QUERY = "HPBG002A.query";
public static final String COUNT = "HPBG002A.count";
public static final String INSERT = "HPBG002A.insert";
public static final String UPDATE = "HPBG002A.update";
public static final String UPDATE_BY_STATUS = "HPBG002A.updateBystatus";
public static final String DELETE = "HPBG002A.delete";
public static final String DELETE_FLAG = "HPBG002.deleteFlag";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer itemType = 0; /* 用品分类*/
private String itemCode = " "; /* 用品编码*/
private String itemName = " "; /* 用品名称*/
private String itemModel = " "; /* 用品型号*/
private String itemUnit = " "; /* 用品单位*/
private BigDecimal invQty = new BigDecimal(0.00); /* 入库数量*/
private Integer status = 0; /* 审批状态0.未审核1.已审核*/
private Long parentId = new Long(0); /* 父级ID*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ITEM_TYPE);
eiColumn.setDescName("用品分类");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ITEM_CODE);
eiColumn.setDescName("用品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ITEM_NAME);
eiColumn.setDescName("用品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ITEM_MODEL);
eiColumn.setDescName("用品型号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ITEM_UNIT);
eiColumn.setDescName("用品单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INV_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("审批状态0.未审核1.已审核");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("父级ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPBG002A() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the itemType - 用品分类.
* @return the itemType
*/
public Integer getItemType() {
return this.itemType;
}
/**
* set the itemType - 用品分类.
*
* @param itemType - 用品分类
*/
public void setItemType(Integer itemType) {
this.itemType = itemType;
}
/**
* get the itemCode - 用品编码.
* @return the itemCode
*/
public String getItemCode() {
return this.itemCode;
}
/**
* set the itemCode - 用品编码.
*
* @param itemCode - 用品编码
*/
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
/**
* get the itemName - 用品名称.
* @return the itemName
*/
public String getItemName() {
return this.itemName;
}
/**
* set the itemName - 用品名称.
*
* @param itemName - 用品名称
*/
public void setItemName(String itemName) {
this.itemName = itemName;
}
/**
* get the itemModel - 用品型号.
* @return the itemModel
*/
public String getItemModel() {
return this.itemModel;
}
/**
* set the itemModel - 用品型号.
*
* @param itemModel - 用品型号
*/
public void setItemModel(String itemModel) {
this.itemModel = itemModel;
}
/**
* get the itemUnit - 用品单位.
* @return the itemUnit
*/
public String getItemUnit() {
return this.itemUnit;
}
/**
* set the itemUnit - 用品单位.
*
* @param itemUnit - 用品单位
*/
public void setItemUnit(String itemUnit) {
this.itemUnit = itemUnit;
}
/**
* get the invQty - 入库数量.
* @return the invQty
*/
public BigDecimal getInvQty() {
return this.invQty;
}
/**
* set the invQty - 入库数量.
*
* @param invQty - 入库数量
*/
public void setInvQty(BigDecimal invQty) {
this.invQty = invQty;
}
/**
* get the status - 审批状态0.未审核1.已审核.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 审批状态0.未审核1.已审核.
*
* @param status - 审批状态0.未审核1.已审核
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* get the parentId - 父级ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 父级ID.
*
* @param parentId - 父级ID
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setItemType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_ITEM_TYPE)), itemType));
setItemCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ITEM_CODE)), itemCode));
setItemName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ITEM_NAME)), itemName));
setItemModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ITEM_MODEL)), itemModel));
setItemUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ITEM_UNIT)), itemUnit));
setInvQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INV_QTY)), invQty));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_ITEM_TYPE, StringUtils.toString(itemType, eiMetadata.getMeta(FIELD_ITEM_TYPE)));
map.put(FIELD_ITEM_CODE, StringUtils.toString(itemCode, eiMetadata.getMeta(FIELD_ITEM_CODE)));
map.put(FIELD_ITEM_NAME, StringUtils.toString(itemName, eiMetadata.getMeta(FIELD_ITEM_NAME)));
map.put(FIELD_ITEM_MODEL, StringUtils.toString(itemModel, eiMetadata.getMeta(FIELD_ITEM_MODEL)));
map.put(FIELD_ITEM_UNIT, StringUtils.toString(itemUnit, eiMetadata.getMeta(FIELD_ITEM_UNIT)));
map.put(FIELD_INV_QTY, StringUtils.toString(invQty, eiMetadata.getMeta(FIELD_INV_QTY)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
return map;
}
}
package com.baosight.hpjx.hp.bg.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.bg.domain.HPBG002;
import com.baosight.hpjx.hp.bg.domain.HPBG002A;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/28
* @description 办公用品入库
*/
public class ServiceHPBG002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.WH_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPBG002().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPBG002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPBG002.QUERY,new HPBG002());
}
@OperationLogAnnotation(operModul = "办公用品入库",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HPBG002.DELETE_FLAG);
}
@OperationLogAnnotation(operModul = "办公用品入库",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
Map resultRow = EiInfoUtils.getFirstRow(inInfo, EiConstant.resultBlock);
HPBG002 hpbg002 = new HPBG002();
hpbg002.fromMap(resultRow);
if (hpbg002.getId() == null || hpbg002.getId() == 0){
this.add(hpbg002);
}else {
this.modify(hpbg002);
}
List<Map> detailRows = inInfo.getBlock(CommonConstant.Field.DETAIL).getRows();
// 写入数据
for (Map detailRow : detailRows) {
HPBG002A hpbg002a = new HPBG002A();
hpbg002a.fromMap(detailRow);
if (hpbg002a.getId() == null || hpbg002a.getId() == 0) {
hpbg002a.setParentId(hpbg002.getId());
DaoUtils.insert(HPBG002A.INSERT, hpbg002a);
} else {
DaoUtils.update(HPBG002A.UPDATE, hpbg002a);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + detailRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPBG002 hpbg002) {
hpbg002.setDepositCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPBG002_DEPOSIT_CODE));
DaoUtils.insert(HPBG002.INSERT, hpbg002);
}
/**
* 修改操作
*/
public void modify(HPBG002 hpbg002) {
DaoUtils.update(HPBG002.UPDATE, hpbg002);
}
}
package com.baosight.hpjx.hp.bg.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ReviewStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.bg.domain.HPBG001;
import com.baosight.hpjx.hp.bg.domain.HPBG002A;
import com.baosight.hpjx.hp.bg.domain.HPBG004;
import com.baosight.hpjx.hp.bg.tools.HPBGTools;
import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author LiuYang
* @version 1.0 2024/9/28
* @description 办公用品入库明细
*/
public class ServiceHPBG002A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.WH_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPBG002A().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPBG002A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HPBG002A.QUERY,new HPBG002A());
}
@OperationLogAnnotation(operModul = "办公用品入库",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(CommonConstant.Field.DETAIL).getRows();
for (Map resultRow: resultRows) {
HPBG002A hpbg002a = new HPBG002A();
hpbg002a.fromMap(resultRow);
hpbg002a.setDeleteFlag(CommonConstant.YesNo.YES_1);
if (hpbg002a.getId() == null || hpbg002a.getId() == 0) {
continue;
}
AssertUtils.isTrue(hpbg002a.getStatus().equals(ReviewStatusEnum.SUBMITTED.getCode()), "数据已提交,无法删除!");
DaoUtils.update(HPBG002A.DELETE, hpbg002a);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "办公用品入库",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPBG002A hpbg002a = new HPBG002A();
hpbg002a.fromMap(resultRow);
if (hpbg002a.getId() == null || hpbg002a.getId() == 0) {
this.add(hpbg002a);
} else {
this.modify(hpbg002a);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPBG002A hpbg002a) {
DaoUtils.insert(HPBG002A.INSERT, hpbg002a);
}
/**
* 修改操作
*/
public void modify(HPBG002A hpbg002a) {
DaoUtils.update(HPBG002A.UPDATE, hpbg002a);
}
@OperationLogAnnotation(operModul = "办公用品入库",operType = "提交",operDesc = "提交操作")
public EiInfo submit(EiInfo inInfo) {
try {
List<HPBG002A> resultRows = MapUtils.toDaoEPBases(inInfo,HPBG002A.class);
List<String> itemCodes = ObjectUtils.listEpKey(resultRows, HPBG002A.FIELD_ITEM_CODE);
List<HPBG001> hpbg001s = HPBGTools.HpBg001.getByItemCode(itemCodes);
// 写入数据
for (HPBG002A hpbg002A : resultRows) {
AssertUtils.isTrue(hpbg002A.getStatus().equals(ReviewStatusEnum.SUBMITTED.getCode()), "数据已提交,无法重复提交!");
Map<String,HPBG001> hpbg001Map = hpbg001s.stream().filter(item -> item.getItemCode().equals(hpbg002A.getItemCode())).collect(Collectors.toMap(HPBG001::getItemCode, item -> item));
if (!hpbg001Map.isEmpty()){
HPBG001 hpbg001 = hpbg001Map.get(hpbg002A.getItemCode());
BigDecimal invQty = hpbg001.getInvQty().add(hpbg002A.getInvQty());
hpbg001.setInvQty(invQty.compareTo(BigDecimal.ZERO) < 0?BigDecimal.ZERO:invQty);
DaoUtils.update(HPBG001.UPDATE, hpbg001);
}
hpbg002A.setStatus(ReviewStatusEnum.SUBMITTED.getCode());
DaoUtils.update(HPBG002A.UPDATE_BY_STATUS, hpbg002A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.bg.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.bg.domain.HPBG002;
import com.baosight.hpjx.hp.bg.domain.HPBG002A;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/10/8
* @description
*/
public class ServiceHPBG002B extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.WH_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID,
DdynamicEnum.ITEM_CODE_BLOCK_ID
), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.bg.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ReviewStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.hp.bg.domain.HPBG002;
import com.baosight.hpjx.hp.bg.domain.HPBG002A;
import com.baosight.hpjx.hp.bg.tools.HPBGTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiBlockMeta;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/10/8
* @description
*/
public class ServiceHPBG002C extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
Map<String,String> params = EiInfoUtils.getFirstRow(inInfo);
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.WH_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID,
DdynamicEnum.ITEM_CODE_BLOCK_ID
), null, false);
Long id = Long.parseLong(params.get(HPBG002.FIELD_ID));
HPBG002 hpbg002 = HPBGTools.HpBg002.get(id);
List<HPBG002A> hpbg002As = HPBGTools.HpBg002a.getByParentId(id,ReviewStatusEnum.UNSUBMITTED.getCode());
EiBlock resultBlock =new EiBlock(EiConstant.resultBlock);
resultBlock.setBlockMeta(new HPBG002().eiMetadata);
resultBlock.setRows(Collections.singletonList(hpbg002));
EiBlock detailBlock =new EiBlock(CommonConstant.Field.DETAIL);
detailBlock.setBlockMeta(new HPBG002A().eiMetadata);
detailBlock.setRows(hpbg002As);
inInfo.setBlock(resultBlock);
inInfo.setBlock(detailBlock);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPBG002A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPBG002A.FIELD_STATUS, ReviewStatusEnum.UNSUBMITTED.getCode());
return super.query(inInfo, HPBG002A.QUERY,new HPBG002A(),false,new EiBlockMeta(),EiConstant.queryBlock,CommonConstant.Field.DETAIL,CommonConstant.Field.DETAIL);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-09-28 21:30:54
Version : 1.0
schema : hpjx
tableName : T_HPBG002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
DEPOSIT_DATE VARCHAR,
DEPOSIT_CODE VARCHAR,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
DEPOSIT_USER VARCHAR
-->
<sqlMap namespace="HPBG002">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate">
DEPOSIT_DATE = #depositDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositCode">
DEPOSIT_CODE = #depositCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositUser">
DEPOSIT_USER = #depositUser#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.bg.domain.HPBG002">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
DEPOSIT_DATE as "depositDate", <!-- 入库日期 -->
DEPOSIT_CODE as "depositCode", <!-- 入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
DEPOSIT_USER as "depositUser" <!-- 入库人员 -->
FROM ${hpjxSchema}.T_HPBG002 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
DEPOSIT_DATE DESC, ID desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPBG002 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate">
DEPOSIT_DATE = #depositDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositCode">
DEPOSIT_CODE = #depositCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositUser">
DEPOSIT_USER = #depositUser#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPBG002 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
DEPOSIT_DATE, <!-- 入库日期 -->
DEPOSIT_CODE, <!-- 入库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
DEPOSIT_USER <!-- 入库人员 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#depositDate#, #depositCode#, #whCode#, #whName#, #depositUser#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG002
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPBG002 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPBG002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPBG002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
DEPOSIT_DATE = #depositDate#, <!-- 入库日期 -->
DEPOSIT_CODE = #depositCode#, <!-- 入库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
DEPOSIT_USER = #depositUser# <!-- 入库人员 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-09-28 21:30:54
Version : 1.0
schema : hpjx
tableName : T_HPBG002A
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
ITEM_TYPE TINYINT,
ITEM_CODE VARCHAR,
ITEM_NAME VARCHAR,
ITEM_MODEL VARCHAR,
ITEM_UNIT VARCHAR,
INV_QTY DECIMAL,
STATUS TINYINT,
PARENT_ID BIGINT
-->
<sqlMap namespace="HPBG002A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemType">
ITEM_TYPE = #itemType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemCode">
ITEM_CODE = #itemCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemName">
ITEM_NAME like concat('%', #itemName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemModel">
ITEM_MODEL like concat('%', #itemModel#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemUnit">
ITEM_UNIT = #itemUnit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.bg.domain.HPBG002A">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
ITEM_TYPE as "itemType", <!-- 用品分类 -->
ITEM_CODE as "itemCode", <!-- 用品编码 -->
ITEM_NAME as "itemName", <!-- 用品名称 -->
ITEM_MODEL as "itemModel", <!-- 用品型号 -->
ITEM_UNIT as "itemUnit", <!-- 用品单位 -->
INV_QTY as "invQty", <!-- 入库数量 -->
STATUS as "status", <!-- 审批状态0.未审核1.已审核 -->
PARENT_ID as "parentId" <!-- 父级ID -->
FROM ${hpjxSchema}.T_HPBG002A WHERE 1=1
<include refid="condition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPBG002A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemType">
ITEM_TYPE = #itemType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemCode">
ITEM_CODE = #itemCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemName">
ITEM_NAME = #itemName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemModel">
ITEM_MODEL = #itemModel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemUnit">
ITEM_UNIT = #itemUnit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPBG002A (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
ITEM_TYPE, <!-- 用品分类 -->
ITEM_CODE, <!-- 用品编码 -->
ITEM_NAME, <!-- 用品名称 -->
ITEM_MODEL, <!-- 用品型号 -->
ITEM_UNIT, <!-- 用品单位 -->
INV_QTY, <!-- 入库数量 -->
STATUS, <!-- 审批状态0.未审核1.已审核 -->
PARENT_ID <!-- 父级ID -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#itemType#, #itemCode#, #itemName#, #itemModel#, #itemUnit#, #invQty#, #status#, #parentId#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPBG002A WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPBG002A
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = 1 <!-- 是否删除0.否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPBG002A
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
ITEM_TYPE = #itemType#, <!-- 用品分类 -->
ITEM_CODE = #itemCode#, <!-- 用品编码 -->
ITEM_NAME = #itemName#, <!-- 用品名称 -->
ITEM_MODEL = #itemModel#, <!-- 用品型号 -->
ITEM_UNIT = #itemUnit#, <!-- 用品单位 -->
INV_QTY = #invQty#, <!-- 入库数量 -->
STATUS = #status#, <!-- 审批状态0.未审核1.已审核 -->
PARENT_ID = #parentId# <!-- 父级ID -->
WHERE
ID = #id#
</update>
<update id="updateBystatus">
UPDATE ${hpjxSchema}.T_HPBG002A
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
STATUS = #status# <!-- 审批状态0.未审核1.已审核 -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -2,13 +2,13 @@ package com.baosight.hpjx.hp.bg.tools; ...@@ -2,13 +2,13 @@ package com.baosight.hpjx.hp.bg.tools;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.bg.domain.HPBG001; import com.baosight.hpjx.hp.bg.domain.HPBG001;
import com.baosight.hpjx.hp.bg.domain.HPBG002;
import com.baosight.hpjx.hp.bg.domain.HPBG002A;
import com.baosight.hpjx.util.AssertUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author LiuYang * @author LiuYang
...@@ -30,4 +30,24 @@ public class HPBGTools { ...@@ -30,4 +30,24 @@ public class HPBGTools {
return CollectionUtils.isEmpty(list)?new ArrayList<>():list; return CollectionUtils.isEmpty(list)?new ArrayList<>():list;
} }
} }
public static class HpBg002 {
public static HPBG002 get(Long id){
AssertUtils.isTrue(Objects.isNull(id)||id<=0, "委外入库单ID不能为空!");
HPBG002 hpbg002 = (HPBG002) DaoBase.getInstance().get(HPBG002.QUERY,HPBG002.FIELD_ID, id);
return hpbg002;
}
}
public static class HpBg002a {
public static List<HPBG002A> getByParentId(Long parentId,Integer status){
AssertUtils.isTrue(Objects.isNull(parentId)||parentId<=0, "委外入库单ID不能为空!");
Map params = new HashMap();
params.put("parentId", parentId);
params.put("status", status);
params.put("deleteFlag", 0);
List<HPBG002A> list = DaoBase.getInstance().query(HPBG002A.QUERY,params);
return CollectionUtils.isEmpty(list)?new ArrayList<>():list;
}
}
} }
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result": {
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let BG002 = "BG002";
let template = "";
if (item.id) {
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="detailFunc(' + item.id + ')">详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px"'
+ ' onclick="uploadFile(' + item.id + ',\''+BG002+'\')" >附件清单</a>';
}
return template;
}
}
],
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
$("#BTN_INSERT").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc);
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
item['depositDate'] = currShortDate()
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
function detailFunc(id) {
JSColorbox.open({
href: "HPBG002A?methodName=initLoad&id=" + id + "&efParentFormEname=HPBG002",
title: "<div style='text-align: center;'>办公入库详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
/**
* 新增
*/
function addFunc() {
JSColorbox.open({
href: "HPBG002B?methodName=initLoad&efParentFormEname=HPBG002",
title: "<div style='text-align: center;'>新增办公入库</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
/**
* 修改
*/
function updateFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].reviewStatus == "3") {
message("已经提交的数据不能进行修改!");
return;
}
JSColorbox.open({
href: "HPBG002C?methodName=initLoad&inqu_status-0-id=" + rows[0].id + "&efParentFormEname=HPBG002",
title: "<div style='text-align: center;'>修改办公入库</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function btnSaveFunc(btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
let flag = true;
rows.forEach(function (item,index){
if (isBlank(item.depositDate)){
message("选中的第"+(index+1)+"行\"入库日期\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.whCode)){
message("选中的第"+(index+1)+"行\"仓库名称\",不能为空!");
flag = false;
return false;
}
if (isBlank(item.depositUser)){
message("选中的第"+(index+1)+"行\"入库人员\",不能为空!");
flag = false;
return false;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPBG002", "save", true,
function (e) {
var status = e.getStatus();
if (status !== -1) {
NotificationUtil(e.msg);
query();
}else {
NotificationUtil(e.msg, "error");
}
btnNode.attr("disabled", false);
}
);
}
});
}
}
/**
* 文件上传
*
* @param id 业务主键
* @param bizType 业务类型
*/
function uploadFile(id,bizType) {
JSColorbox.open({
href: "HPSB099?methodName=initLoad&inqu_status-0-matId="+id+"&inqu_status-0-bizType="+bizType,
title: "<div style='text-align: center;'>附件清单</div>",
width: "60%",
height: "50%",
//callbackName: uploadFileCallback
});
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/28
Time: 21:48
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<EF:EFPage title="办公用品入库">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="sellDate" cname="入库日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="clientName" cname="仓库名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="sellUser" cname="入库人员" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="depositDate" cname="入库日期" width="120" enable="true" readonly="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="depositCode" cname="入库单号" width="100" enable="false" readonly="true" align="center" required="false"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="100" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whName" cname="仓库名称" hidden="true"/>
<EF:EFComboColumn ename="depositUser" cname="入库人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="100" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="140" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result": {
columns: [
],
loadComplete: function(grid) {
// 此 grid 对象
$("#QUERY").on("click", function () {
grid.dataSource.page(1);
});
$("#SUBMIT").on("click", submitFunc)
},
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
grid.closeCell();
}
})
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
function submitFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let status= item.get("status");
if(isBlank(status) || status == 3){
message("选中的第"+(index+1)+"行\"已审批\",不能重复审批!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPBG002A", "submit", true,
function (ei) {
if (ei.getStatus() != -1){
query();
}
});
}
});
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/28
Time: 21:48
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script type="text/javascript" src="${ctx}/common/js/dayjs.min.js"></script>
<EF:EFPage title="办公用品入库明细">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="itemName" cname="用品名称" placeholder="模糊查询用品名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="itemModel" cname="用品型号" placeholder="模糊查询用品型号" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审批状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="itemCode" cname="用品编码" width="100" enable="false" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="itemName" cname="用品名称" width="160" enable="true" readonly="false" align="center" required="true"/>
<EF:EFComboColumn ename="itemType" cname="用品分类" width="80" align="center" readonly="false" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpbg.itemType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="itemModel" cname="用品型号" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="itemUnit" cname="用品单位" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="invQty" cname="入库数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
var itemCodeBox = __eiInfo.getBlock("itemCode_block_id").getMappedRows();
$("#result-0-depositDate").val(currShortDate());
$("#result-0-whCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-whCode"));
$("#result-0-whName").val(textField);
})
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
{
field: "itemCode",
filter: function (options) {
let whCode = $("#result-0-whCode").val();
if (whCode){
return _.filter(itemCodeBox, function (item) {
return item["param5Field"]==whCode ;
})
}
return options.values;
},
template: function (item) {
for (let i = 0; i < itemCodeBox.length; i++) {
if (itemCodeBox[i]['valueField'] === item['itemCode']){
return itemCodeBox[i]['textField'].split("-")[0];
}
}
return item["itemCode"]
}
}
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
let item = e.items[0];
if (e.field === "itemCode") {
for (let i = 0; i < itemCodeBox.length; i++) {
if (itemCodeBox[i]['valueField'] === item['itemCode']) {
detailGrid.setCellValue(item,"itemName",itemCodeBox[i]['textField'].split("-")[0]);
detailGrid.setCellValue(item,"itemModel",itemCodeBox[i]['param1Field']);
detailGrid.setCellValue(item,"itemType",itemCodeBox[i]['param2Field']);
detailGrid.setCellValue(item,"itemUnit",itemCodeBox[i]['param3Field']);
break;
}
}
}
});
},
onAdd: function (e) {
let whCode = $("#result-0-whCode").val();
if (isBlank(whCode)) {
message("请选择仓库名称!");
e.preventDefault();
}
},
onSave: function (e) {
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFileFunc();
}
}
$("#DELETE_FILE").on("click", function () {
deleteFileFunc();
});
/**
* 下拉框事件
*/
IPLATUI.EFSelect = {
"result-0-whCode": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'];
$("#result-0-whCode").val(valueField);
$("#result-0-whName").val(textField);
}
}
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.close();
}
function btnSaveFunc() {
let flag = true;
flag = fieldValidation();
if(flag)
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail", "HPBG002", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detailGrid.removeRows([row.rowNo]);// 刷新行号
})
refreshRowNo();
}
let refreshRowNo = function () {
let allRows = detailGrid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detailGrid.setCellValue(i, "rowNo", i);
detailGrid.refresh();
}
}
function fieldValidation() {
var depositDate = $("#result-0-depositDate").val();
if (isBlank(depositDate)) {
message("请选择入库日期!");
return false;
}
var whCode = $("#result-0-whCode").val();
if (isBlank(whCode)) {
message("请选择仓库名称!");
return false;
}
var depositUser = $("#result-0-depositUser").val();
if (isBlank(depositUser)) {
message("入库人员不能为空!");
return false;
}
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请添加数据");
return false;
}
$.each(rows, function(index, item) {
let itemCode= item.get("itemCode");
if(isBlank(itemCode)){
message("选中的第"+(index+1)+"行\"用品名称\"不能为空!");
return false;
}
let invQty= item.get("invQty");
if(isBlank(invQty) || !isNumber(invQty) || invQty <= 0){
message("选中的第"+(index+1)+"行\"入库数量\"不能为0!");
return false;
}
})
return true;
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/28
Time: 13:31
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="新增办公用品入库">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
<EF:EFDatePicker ename="result-0-depositDate" cname="入库日期" colWidth="3" required="true"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFSelect cname="仓库名称" ename="result-0-whCode" colWidth="3" required="true" filter="contains">
<EF:EFOption label="请选择仓库" value=""/>
<EF:EFOptions blockId="wh_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-whName" cname="仓库名称" colWidth="3" readonly="true" type="hidden"/>
<EF:EFInput ename="result-0-depositCode" cname="入库单号" colWidth="3" readonly="true" defaultValue="0"/>
<EF:EFSelect ename="result-0-depositUser" cname="入库人员" colWidth="3" filter="contains"
required="true" defaultValue="${loginName}">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail" title="记录详情">
<EF:EFGrid blockId="detail" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="itemCode" cname="用品名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="itemCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="itemName" cname="用品名称" hidden="true"/>
<EF:EFComboColumn ename="itemType" cname="用品分类" width="80" enable="false" align="center" readonly="false">
<EF:EFCodeOption codeName="hpjx.hpbg.itemType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="itemModel" cname="用品型号" width="120" enable="false" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="itemUnit" cname="用品单位" width="120" enable="false" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="invQty" cname="入库数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2" hidden="true">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
$(function() {
var itemCodeBox = __eiInfo.getBlock("itemCode_block_id").getMappedRows();
$("#result-0-whCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-whCode"));
$("#result-0-whName").val(textField);
})
$("#result-0-sellDate").val(currShortDate())
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
{
field: "itemCode",
filter: function (options) {
let whCode = $("#result-0-whCode").val();
if (whCode){
return _.filter(itemCodeBox, function (item) {
return item["param5Field"]==whCode ;
})
}
return options.values;
},
template: function (item) {
for (let i = 0; i < itemCodeBox.length; i++) {
if (itemCodeBox[i]['valueField'] === item['itemCode']){
return itemCodeBox[i]['textField'].split("-")[0];
}
}
return item["itemCode"]
}
}
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
let item = e.items[0];
if (e.field === "itemCode") {
for (let i = 0; i < itemCodeBox.length; i++) {
if (itemCodeBox[i]['valueField'] === item['itemCode']) {
detailGrid.setCellValue(item,"itemName",itemCodeBox[i]['textField'].split("-")[0]);
detailGrid.setCellValue(item,"itemModel",itemCodeBox[i]['param1Field']);
detailGrid.setCellValue(item,"itemType",itemCodeBox[i]['param2Field']);
detailGrid.setCellValue(item,"itemUnit",itemCodeBox[i]['param3Field']);
break;
}
}
}
});
},
onAdd: function (e) {
let whCode = $("#result-0-whCode").val();
if (isBlank(whCode)) {
message("请选择仓库名称!");
e.preventDefault();
}
},
onSave: function (e) {
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
}
}
$("#DELETE_FILE").on("click", function () {
deleteFileFunc();
});
/**
* 下拉框事件
*/
IPLATUI.EFSelect = {
"result-0-whCode": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'];
$("#result-0-whCode").val(valueField);
$("#result-0-whName").val(textField);
}
}
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
let flag = true;
flag = fieldValidation();
if(flag)
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail", "HPBG002", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detailGrid.removeRows([row.rowNo]);// 刷新行号
})
refreshRowNo();
}
let refreshRowNo = function () {
let allRows = detailGrid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detailGrid.setCellValue(i, "rowNo", i);
detailGrid.refresh();
}
}
function deleteResult1Func() {
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
flag = fieldValidation();
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("detail", "HPBG002A", "delete", true,
function (ei) {
if (ei.getStatus() >= 0) {
detailGrid.dataSource.page(1);
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
})
}
});
}
}
function fieldValidation() {
var depositDate = $("#result-0-depositDate").val();
if (isBlank(depositDate)) {
message("请选择入库日期!");
return false;
}
var whCode = $("#result-0-whCode").val();
if (isBlank(whCode)) {
message("请选择仓库名称!");
return false;
}
var depositUser = $("#result-0-depositUser").val();
if (isBlank(depositUser)) {
message("入库人员不能为空!");
return false;
}
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请添加数据");
return false;
}
$.each(rows, function(index, item) {
let itemCode= item.get("itemCode");
if(isBlank(itemCode)){
message("选中的第"+(index+1)+"行\"用品名称\"不能为空!");
return false;
}
let invQty= item.get("invQty");
if(isBlank(invQty) || !isNumber(invQty) || invQty <= 0){
message("选中的第"+(index+1)+"行\"入库数量\"不能为0!");
return false;
}
let status= item.get("status");
if(status == 3){
message("选中的第"+(index+1)+"行\"审批状态\"已提交,无法操作");
return false;
}
})
return true;
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/29
Time: 10:05
To change this template use File | Settings | File Templates.
--%>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="修改办公用品入库">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
<EF:EFInput ename="result-0-id" cname="id" type="hidden"/>
<EF:EFDatePicker ename="result-0-depositDate" cname="入库日期" colWidth="4" required="true"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput ename="result-0-depositCode" cname="入库单号" colWidth="4" readonly="true" defaultValue="0"/>
<EF:EFSelect cname="仓库名称" ename="result-0-whCode" colWidth="4" required="true" filter="contains">
<EF:EFOption label="请选择仓库" value=""/>
<EF:EFOptions blockId="wh_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-whName" cname="仓库名称" colWidth="4" readonly="true" type="hidden"/>
<EF:EFSelect ename="result-0-depositUser" cname="入库人员" colWidth="4" filter="contains"
required="true" defaultValue="${loginName}">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail" title="记录详情">
<EF:EFGrid blockId="detail" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="itemCode" cname="用品名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="itemCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="itemName" cname="用品名称" hidden="true"/>
<EF:EFComboColumn ename="itemType" cname="用品分类" width="80" align="center" readonly="false" required="true">
<EF:EFCodeOption codeName="hpjx.hpbg.itemType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="itemModel" cname="用品型号" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="itemUnit" cname="用品单位" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="invQty" cname="入库数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
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