Commit b8dbb324 by yukang

Merge remote-tracking branch 'origin/dev' into dev

parents 6378a4bb ea4959bd
package com.baosight.hggp.hg.ds.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:SysOperationLog.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-03-04 15:58:48 create
*/
public class HGDS001 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_OPER_MODUL = "operModul"; /* 操作模块*/
public static final String FIELD_OPER_TYPE = "operType"; /* 操作类型*/
public static final String FIELD_OPER_DESC = "operDesc"; /* 操作说明*/
public static final String FIELD_OPER_CONTENT = "operContent"; /* 操作内容*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_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_OPER_MODUL = "OPER_MODUL"; /* 操作模块*/
public static final String COL_OPER_TYPE = "OPER_TYPE"; /* 操作类型*/
public static final String COL_OPER_DESC = "OPER_DESC"; /* 操作说明*/
public static final String COL_OPER_CONTENT = "OPER_CONTENT"; /* 操作内容*/
public static final String QUERY = "sys_operation_log.query";
public static final String COUNT = "sys_operation_log.count";
public static final String INSERT = "sys_operation_log.insert";
public static final String UPDATE = "sys_operation_log.update";
public static final String DELETE = "sys_operation_log.delete";
private Long id = new Long(0); /* 主键id*/
private String accountCode = " "; /* 企业编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String operModul = " "; /* 操作模块*/
private String operType = " "; /* 操作类型*/
private String operDesc = " "; /* 操作说明*/
private String operContent = " "; /* 操作内容*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_OPER_MODUL);
eiColumn.setDescName("操作模块");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OPER_TYPE);
eiColumn.setDescName("操作类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OPER_DESC);
eiColumn.setDescName("操作说明");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OPER_CONTENT);
eiColumn.setDescName("操作内容");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGDS001() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the 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 operModul - 操作模块.
* @return the operModul
*/
public String getOperModul() {
return this.operModul;
}
/**
* set the operModul - 操作模块.
*
* @param operModul - 操作模块
*/
public void setOperModul(String operModul) {
this.operModul = operModul;
}
/**
* get the operType - 操作类型.
* @return the operType
*/
public String getOperType() {
return this.operType;
}
/**
* set the operType - 操作类型.
*
* @param operType - 操作类型
*/
public void setOperType(String operType) {
this.operType = operType;
}
/**
* get the operDesc - 操作说明.
* @return the operDesc
*/
public String getOperDesc() {
return this.operDesc;
}
/**
* set the operDesc - 操作说明.
*
* @param operDesc - 操作说明
*/
public void setOperDesc(String operDesc) {
this.operDesc = operDesc;
}
/**
* get the operContent - 操作内容.
* @return the operContent
*/
public String getOperContent() {
return this.operContent;
}
/**
* set the operContent - 操作内容.
*
* @param operContent - 操作内容
*/
public void setOperContent(String operContent) {
this.operContent = operContent;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
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));
setOperModul(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OPER_MODUL)), operModul));
setOperType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OPER_TYPE)), operType));
setOperDesc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OPER_DESC)), operDesc));
setOperContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OPER_CONTENT)), operContent));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_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_OPER_MODUL, StringUtils.toString(operModul, eiMetadata.getMeta(FIELD_OPER_MODUL)));
map.put(FIELD_OPER_TYPE, StringUtils.toString(operType, eiMetadata.getMeta(FIELD_OPER_TYPE)));
map.put(FIELD_OPER_DESC, StringUtils.toString(operDesc, eiMetadata.getMeta(FIELD_OPER_DESC)));
map.put(FIELD_OPER_CONTENT, StringUtils.toString(operContent, eiMetadata.getMeta(FIELD_OPER_CONTENT)));
return map;
}
}
package com.baosight.hggp.hg.ds.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:TeudmTemp.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-03-06 16:14:16 create
*/
public class HGDS002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DOC_ID = "docId"; /* 文件标识*/
public static final String FIELD_DIR_ID = "dirId"; /* 目录标识*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名*/
public static final String FIELD_CHG_NAME = "chgName"; /* 物理文件名*/
public static final String FIELD_DOC_SIZE = "docSize"; /* 文件大小*/
public static final String FIELD_DOC_TAG = "docTag"; /* 文件标签*/
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_ARCHIVE_FLAG = "archiveFlag"; /* 同步标记*/
public static final String FIELD_REAL_PATH = "realPath"; /* 物理路径*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String FIELD_MAT_ID = "matId"; /* 业务类型*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String COL_COMPANY_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件标识*/
public static final String COL_DIR_ID = "DIR_ID"; /* 目录标识*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件名*/
public static final String COL_CHG_NAME = "CHG_NAME"; /* 物理文件名*/
public static final String COL_DOC_SIZE = "DOC_SIZE"; /* 文件大小*/
public static final String COL_DOC_TAG = "DOC_TAG"; /* 文件标签*/
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_ARCHIVE_FLAG = "ARCHIVE_FLAG"; /* 同步标记*/
public static final String COL_REAL_PATH = "REAL_PATH"; /* 物理路径*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String COL_MAT_ID = "MAT_ID"; /* 业务类型*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String QUERY = "HGDS002.query";
public static final String COUNT = "HGDS002.count";
public static final String INSERT = "HGDS002.insert";
public static final String UPDATE = "HGDS002.update";
public static final String DELETE = "HGDS002.delete";
public static final String DELETE_BATCH = "HGDS002.deleteByBatch";
private String accountCode = " "; /* 企业编码*/
private String docId = " "; /* 文件标识*/
private String dirId = " "; /* 目录标识*/
private String docName = " "; /* 文件名*/
private String chgName = " "; /* 物理文件名*/
private BigDecimal docSize = new BigDecimal(0); /* 文件大小*/
private String docTag = " "; /* 文件标签*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String archiveFlag = " "; /* 同步标记*/
private String realPath = " "; /* 物理路径*/
private String bizType = " "; /* 业务类型*/
private String matId = " "; /* 业务类型*/
private String depCode = " "; /* 部门编码 预留*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("文件标识");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DIR_ID);
eiColumn.setDescName("目录标识");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHG_NAME);
eiColumn.setDescName("物理文件名");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_SIZE);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(16);
eiColumn.setDescName("文件大小");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_TAG);
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_ARCHIVE_FLAG);
eiColumn.setDescName("同步标记");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REAL_PATH);
eiColumn.setDescName("物理路径");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BIZ_TYPE);
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGDS002() {
initMetaData();
}
/**
* 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 docId - 文件标识.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件标识.
*
* @param docId - 文件标识
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the dirId - 目录标识.
* @return the dirId
*/
public String getDirId() {
return this.dirId;
}
/**
* set the dirId - 目录标识.
*
* @param dirId - 目录标识
*/
public void setDirId(String dirId) {
this.dirId = dirId;
}
/**
* get the docName - 文件名.
* @return the docName
*/
public String getDocName() {
return this.docName;
}
/**
* set the docName - 文件名.
*
* @param docName - 文件名
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the chgName - 物理文件名.
* @return the chgName
*/
public String getChgName() {
return this.chgName;
}
/**
* set the chgName - 物理文件名.
*
* @param chgName - 物理文件名
*/
public void setChgName(String chgName) {
this.chgName = chgName;
}
/**
* get the docSize - 文件大小.
* @return the docSize
*/
public BigDecimal getDocSize() {
return this.docSize;
}
/**
* set the docSize - 文件大小.
*
* @param docSize - 文件大小
*/
public void setDocSize(BigDecimal docSize) {
this.docSize = docSize;
}
/**
* get the docTag - 文件标签.
* @return the docTag
*/
public String getDocTag() {
return this.docTag;
}
/**
* set the docTag - 文件标签.
*
* @param docTag - 文件标签
*/
public void setDocTag(String docTag) {
this.docTag = docTag;
}
/**
* 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 archiveFlag - 同步标记.
* @return the archiveFlag
*/
public String getArchiveFlag() {
return this.archiveFlag;
}
/**
* set the archiveFlag - 同步标记.
*
* @param archiveFlag - 同步标记
*/
@Override
public void setArchiveFlag(String archiveFlag) {
this.archiveFlag = archiveFlag;
}
/**
* get the realPath - 物理路径.
* @return the realPath
*/
public String getRealPath() {
return this.realPath;
}
/**
* set the realPath - 物理路径.
*
* @param realPath - 物理路径
*/
public void setRealPath(String realPath) {
this.realPath = realPath;
}
/**
* get the bizType - 业务类型.
* @return the bizType
*/
public String getBizType() {
return this.bizType;
}
/**
* set the bizType - 业务类型.
*
* @param bizType - 业务类型
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
public String getMatId() {
return matId;
}
public void setMatId(String matId) {
this.matId = matId;
}
public String getDepCode() {
return depCode;
}
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDirId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DIR_ID)), dirId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setChgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHG_NAME)), chgName));
setDocSize(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DOC_SIZE)), docSize));
setDocTag(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TAG)), docTag));
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));
setArchiveFlag(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ARCHIVE_FLAG)), archiveFlag));
setRealPath(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REAL_PATH)), realPath));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
setMatId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)),depCode));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DIR_ID, StringUtils.toString(dirId, eiMetadata.getMeta(FIELD_DIR_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CHG_NAME, StringUtils.toString(chgName, eiMetadata.getMeta(FIELD_CHG_NAME)));
map.put(FIELD_DOC_SIZE, StringUtils.toString(docSize, eiMetadata.getMeta(FIELD_DOC_SIZE)));
map.put(FIELD_DOC_TAG, StringUtils.toString(docTag, eiMetadata.getMeta(FIELD_DOC_TAG)));
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_ARCHIVE_FLAG, StringUtils.toString(archiveFlag, eiMetadata.getMeta(FIELD_ARCHIVE_FLAG)));
map.put(FIELD_REAL_PATH, StringUtils.toString(realPath, eiMetadata.getMeta(FIELD_REAL_PATH)));
map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DEP_CODE,StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
return map;
}
}
package com.baosight.hggp.hg.ds.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.HashMap;
/**
* Title: 历史数据清理 <br>
* @author LiuYang
* @version 1.0 2024/3/4
*/
public class ServiceHGDS001 extends ServiceEPBase {
@Override
@OperationLogAnnotation(operModul = "系统操作日志", operType = "页面初始化", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@OperationLogAnnotation(operModul = "系统操作日志", operType = "删除", operDesc = "删除6个月之前的历史数据")
public EiInfo deleteHistory(EiInfo inInfo) {
try {
this.dao.delete("HGDS001.deleteHistory",new HashMap<>());
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(0), I18nMessages.getText("label.delete", "删除")});
}catch (PlatException e){
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,0,e);
logError("删除失败", e.getMessage());
}
return inInfo;
}
}
package com.baosight.hggp.hg.ds.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.hg.pz.domain.HGPZ002A;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.HashMap;
import java.util.Map;
/**
* Title:文件备份 <br>
* @author LiuYang
* @version 1.0 2024/3/5
*/
public class ServiceHGDS002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return super.initLoad(inInfo);
}
@Override
public EiInfo query(EiInfo inInfo) {
return super.query(inInfo);
}
@Override
@OperationLogAnnotation(operModul = "文件备份", operType = "删除", operDesc = "删除文件备份数据")
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo);
}
@Override
@OperationLogAnnotation(operModul = "文件备份", operType = "修改", operDesc = "修改文件备份数据")
public EiInfo update(EiInfo inInfo) {
return super.update(inInfo);
}
@Override
@OperationLogAnnotation(operModul = "文件备份", operType = "新增", operDesc = "新增文件备份数据")
public EiInfo insert(EiInfo inInfo) {
try {
EiBlock block = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < block.getRowCount(); i++) {
Map<String, Object> map = new HashMap<String, Object>(1);
map.put(HGPZ002A.FIELD_DOC_ID, block.getCellStr(i, HGDS002.FIELD_DOC_ID));
//List<Map<String, Object>> list = this.dao.query("EUDM02.query", map);
HGDS002 hpds002 = new HGDS002();
hpds002.fromMap(block.getRow(i));
/*if (list.size() > 0) {
hpds002.setChgName(list.get(0).get("chgName").toString());
hpds002.setDirId(list.get(0).get("dirId").toString());
}*/
DaoUtils.insert(HGDS002.INSERT, hpds002);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + block.getRowCount() + "]条数据新增成功!");
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGDS001">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="operModul">
OPER_MODUL = #operModul#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="operType">
OPER_TYPE = #operType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="operDesc">
OPER_DESC = #operDesc#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="operContent">
OPER_CONTENT = #operContent#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.ds.domain.HGDS001">
SELECT
ID as "id", <!-- 主键id -->
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
OPER_MODUL as "operModul", <!-- 操作模块 -->
OPER_TYPE as "operType", <!-- 操作类型 -->
OPER_DESC as "operDesc", <!-- 操作说明 -->
OPER_CONTENT as "operContent" <!-- 操作内容 -->
FROM ${hggpSchema}.SYS_OPERATION_LOG WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.SYS_OPERATION_LOG 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="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="operModul">
OPER_MODUL = #operModul#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="operType">
OPER_TYPE = #operType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="operDesc">
OPER_DESC = #operDesc#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="operContent">
OPER_CONTENT = #operContent#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.SYS_OPERATION_LOG (ID, <!-- 主键id -->
ACCOUNT_CODE, <!-- 帐套编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
OPER_MODUL, <!-- 操作模块 -->
OPER_TYPE, <!-- 操作类型 -->
OPER_DESC, <!-- 操作说明 -->
OPER_CONTENT <!-- 操作内容 -->
)
VALUES (#id#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #operModul#, #operType#, #operDesc#, #operContent#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.SYS_OPERATION_LOG WHERE
ID = #id#
</delete>
<!--删除6个月以前的历史数据-->
<delete id="deleteHistory">
delete from ${hggpSchema}.SYS_OPERATION_LOG where left(CREATED_TIME,8) &lt;= DATE_FORMAT(DATE_SUB(CURDATE(), interval 6 month), '%Y%m%d')
</delete>
<update id="update">
UPDATE ${hggpSchema}.SYS_OPERATION_LOG
SET
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
OPER_MODUL = #operModul#, <!-- 操作模块 -->
OPER_TYPE = #operType#, <!-- 操作类型 -->
OPER_DESC = #operDesc#, <!-- 操作说明 -->
OPER_CONTENT = #operContent# <!-- 操作内容 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-03-06 16:14:16
Version : 1.0
schema : hpjx
tableName : TEUDM_TEMP
COMPANY_CODE VARCHAR NOT NULL primarykey,
DOC_ID VARCHAR NOT NULL primarykey,
DIR_ID VARCHAR NOT NULL,
DOC_NAME VARCHAR NOT NULL,
CHG_NAME VARCHAR NOT NULL,
DOC_SIZE DECIMAL NOT NULL,
DOC_TAG VARCHAR NOT NULL,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
ARCHIVE_FLAG VARCHAR NOT NULL,
REAL_PATH VARCHAR
-->
<sqlMap namespace="HGDS002">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docIds">
DOC_ID in $docIds$
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dirId">
DIR_ID = #dirId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docName">
DOC_NAME = #docName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="chgName">
CHG_NAME = #chgName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docSize">
DOC_SIZE = #docSize#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docTag">
DOC_TAG = #docTag#
</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="archiveFlag">
ARCHIVE_FLAG = #archiveFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="realPath">
REAL_PATH = #realPath#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.ds.domain.HGDS002">
SELECT
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
DOC_ID as "docId", <!-- 文件标识 -->
DIR_ID as "dirId", <!-- 目录标识 -->
DOC_NAME as "docName", <!-- 文件名 -->
CHG_NAME as "chgName", <!-- 物理文件名 -->
DOC_SIZE as "docSize", <!-- 文件大小 -->
DOC_TAG as "docTag", <!-- 文件标签 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
ARCHIVE_FLAG as "archiveFlag", <!-- 同步标记 -->
REAL_PATH as "realPath", <!-- 物理路径 -->
BIZ_TYPE as "bizType",
MAT_ID as "matId"
FROM ${hggpSchema}.TEUDM_TEMP WHERE 1=1
<include refid="authCondition"/>
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ACCOUNT_CODE asc,
DOC_ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.TEUDM_TEMP WHERE 1=1
<include refid="authCondition"/>
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dirId">
DIR_ID = #dirId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docName">
DOC_NAME = #docName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="chgName">
CHG_NAME = #chgName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docSize">
DOC_SIZE = #docSize#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docTag">
DOC_TAG = #docTag#
</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="archiveFlag">
ARCHIVE_FLAG = #archiveFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="realPath">
REAL_PATH = #realPath#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.TEUDM_TEMP (
ACCOUNT_CODE, <!-- 企业编码 -->
DOC_ID, <!-- 文件标识 -->
DIR_ID, <!-- 目录标识 -->
DOC_NAME, <!-- 文件名 -->
CHG_NAME, <!-- 物理文件名 -->
DOC_SIZE, <!-- 文件大小 -->
DOC_TAG, <!-- 文件标签 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
ARCHIVE_FLAG, <!-- 同步标记 -->
REAL_PATH, <!-- 物理路径 -->
BIZ_TYPE,
MAT_ID,
DEP_CODE
)
VALUES (#accountCode#, #docId#, #dirId#, #docName#, #chgName#, #docSize#, #docTag#, #createdBy#, #createdName#,
#createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #archiveFlag#, #realPath#, #bizType#, #matId#, #depCode#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.TEUDM_TEMP WHERE
ACCOUNT_CODE = #accountCode#
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docIds">
DOC_ID in $docIds$
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
</delete>
<update id="update">
UPDATE ${hggpSchema}.TEUDM_TEMP
SET
DIR_ID = #dirId#, <!-- 目录标识 -->
DOC_NAME = #docName#, <!-- 文件名 -->
CHG_NAME = #chgName#, <!-- 物理文件名 -->
DOC_SIZE = #docSize#, <!-- 文件大小 -->
DOC_TAG = #docTag#, <!-- 文件标签 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
ARCHIVE_FLAG = #archiveFlag#, <!-- 同步标记 -->
REAL_PATH = #realPath#, <!-- 物理路径 -->
BIZ_TYPE = #bizType#,
MAT_ID = #matId#,
DEP_CODE = #depCode#
WHERE
ACCOUNT_CODE = #accountCode# AND
DOC_ID = #docId#
<include refid="condition" />
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
</update>
</sqlMap>
package com.baosight.hggp.hg.pz.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:THpsc002a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-02-23 9:19:19 create
*/
public class HGPZ002A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改时间*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件文件*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改时间*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String QUERY = "HGPZ002A.query";
public static final String COUNT = "HGPZ002A.count";
public static final String INSERT = "HGPZ002A.insert";
public static final String UPDATE = "HGPZ002A.update";
public static final String DELETE = "HGPZ002A.delete";
private Long id; /* 主键ID*/
private String accountCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private Long matId; /* 物料ID*/
private String docId = " "; /* 文件ID*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String bizType = " "; /* 业务类型*/
private String docName = " "; /* 文件名称*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
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_BIZ_TYPE);
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGPZ002A() {
initMetaData();
}
/**
* get the id - 主键ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键ID.
*
* @param id - 主键ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码 预留.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码 预留.
*
* @param accountCode - 企业编码 预留
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码 预留.
*
* @param depCode - 部门编码 预留
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the matId - 物料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the docName - 文件名称.
* @return the docName
*/
public String getDocName() {
return this.getDocName();
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 修改人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 修改人.
*
* @param updatedBy - 修改人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 修改人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 修改人名称.
*
* @param updatedName - 修改人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 修改时间.
*
* @param updatedTime - 修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the bizType - 业务类型.
* @return the bizType
*/
public String getBizType() {
return this.bizType;
}
/**
* set the bizType - 业务类型.
*
* @param bizType - 业务类型
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
return map;
}
}
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.hg.pz.domain.HGPZ002A;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHGPZ002A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "物料清单-附件清单A-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
// 查询物料ID所对应的项目名称和部件名称
/* Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String bizType = inInfo.getString("inqu_status-0-bizType");
List<HPSC002> dbSc002s = new ArrayList<HPSC002>();
List<HPSC006> HPSC006 = new ArrayList<HPSC006>();
if (bizType.equals("WL")) {
dbSc002s = dao.query("HPSC002.query", queryMap);
} else if (bizType.equals("XL")) {
HPSC006 = dao.query("HPSC006.query", queryMap);
}
if (CollectionUtils.isNotEmpty(dbSc002s) || CollectionUtils.isNotEmpty(HPSC006)) {
inInfo.set("inqu_status-0-bizType", queryMap.get("bizType"));
inInfo.set("inqu_status-0-matId", queryMap.get("matId"));
}*/
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ002A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "物料清单-附件清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HGPZ002A.queryRun", new HGPZ002A());
} else {
inInfo = super.query(inInfo, "HGPZ002A.queryDev", new HGPZ002A());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "新增",operDesc = "物料清单-附件清单A-新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGPZ002A fSc002A = new HGPZ002A();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.insert(HGPZ002A.INSERT, fSc002A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "物料清单-附件清单A-删除操作")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGPZ002A fSc002A = new HGPZ002A();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.update(HGPZ002A.DELETE, fSc002A);
if (!fSc002A.getDocId().isEmpty()) {
this.delectDoc(fSc002A.getDocId());
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "删除附件文件")
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = this.dao.query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGPZ002A.FIELD_DOC_ID,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HGDS002.DELETE,map);
}
}
}
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
/**
*
*/
public class ServiceHGPZ099 extends ServiceBase {
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "附件上传",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
/**
* 附件上传.
*/
@OperationLogAnnotation(operModul = "附件上传",operType = "上传",operDesc = "附件上传")
public EiInfo form(EiInfo inInfo) {
return inInfo;
}
}
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
CUST_CODE = #custCode# CUST_CODE = #custCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custName"> <isNotEmpty prepend=" AND " property="custName">
CUST_NAME = #custName# CUST_NAME LIKE CONCAT('%', #custName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custClass"> <isNotEmpty prepend=" AND " property="custClass">
CUST_CLASS = #custClass# CUST_CLASS = #custClass#
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
HEAD_NAME = #headName# HEAD_NAME = #headName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="phoneName"> <isNotEmpty prepend=" AND " property="phoneName">
PHONE_NAME = #phoneName# PHONE_NAME LIKE CONCAT('%', #phoneName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="address"> <isNotEmpty prepend=" AND " property="address">
ADDRESS = #address# ADDRESS = #address#
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGPZ002A">
<sql id="column">
A.ID as "id",
A.ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.BIZ_TYPE as "bizType", <!-- 物料ID -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
A.BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
</sql>
<!-- 开发环境 -->
<sql id="conditionDev">
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql id="conditionRun">
AND A.DOC_ID = B.RES_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$order$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="queryDev" resultClass="com.baosight.hggp.hg.pz.domain.HGPZ002A">
SELECT
<include refid="columnDev"/>
FROM ${hggpSchema}.HGPZ002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
</select>
<select id="queryRun" resultClass="com.baosight.hggp.hg.pz.domain.HGPZ002A">
SELECT
<include refid="columnRun"/>
FROM ${hggpSchema}.HGPZ002A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countRun" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ002A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ002A (
ACCOUNT_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
BIZ_TYPE,
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#accountCode#, #depCode#, #bizType#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGPZ002A WHERE ID = #id#
</delete>
</sqlMap>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
SUP_CODE = #supCode# SUP_CODE = #supCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="supName"> <isNotEmpty prepend=" AND " property="supName">
SUP_NAME = #supName# SUP_NAME LIKE CONCAT('%', #supName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="headName"> <isNotEmpty prepend=" AND " property="headName">
HEAD_NAME = #headName# HEAD_NAME = #headName#
...@@ -284,8 +284,6 @@ ...@@ -284,8 +284,6 @@
<update id="update"> <update id="update">
UPDATE ${hggpSchema}.HGPZ003 UPDATE ${hggpSchema}.HGPZ003
SET SET
ACCOUNT_CODE = #accountCode#, <!-- 帐套编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
SUP_TYPE = #supType#, <!-- 供应商类型 1 材料供应商 ,2 劳务供应商,3加工供应商 --> SUP_TYPE = #supType#, <!-- 供应商类型 1 材料供应商 ,2 劳务供应商,3加工供应商 -->
SUP_CLASS = #supClass#, <!-- 供应商分类 1 钢材 ,2 网架及配件,3油漆 --> SUP_CLASS = #supClass#, <!-- 供应商分类 1 钢材 ,2 网架及配件,3油漆 -->
SUP_CODE = #supCode#, <!-- 供应商编码 --> SUP_CODE = #supCode#, <!-- 供应商编码 -->
...@@ -298,15 +296,7 @@ ...@@ -298,15 +296,7 @@
ACCOUNT_NUM = #accountNum#, <!-- 银行账号 --> ACCOUNT_NUM = #accountNum#, <!-- 银行账号 -->
ASS_LEVEL = #assLevel#, <!-- 评定等级 --> ASS_LEVEL = #assLevel#, <!-- 评定等级 -->
SCORE = #score#, <!-- 综合得分 --> SCORE = #score#, <!-- 综合得分 -->
FILE_PATH = #filePath#, <!-- 资质详情 --> STATUS = #status# <!-- 状态 0禁用 1启用 -->
STATUS = #status#, <!-- 状态 0禁用 1启用 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -14,9 +14,9 @@ $(function() { ...@@ -14,9 +14,9 @@ $(function() {
let filePath = item.filePath; let filePath = item.filePath;
let template = ''; let template = '';
// 资质详情 // 资质详情
if (filePath) { if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath + ')" >附件</a>'; + 'onclick="showUploadFile(' + item.id + ')" >资质详情</a>';
} }
return template return template
} }
...@@ -58,6 +58,10 @@ $(function() { ...@@ -58,6 +58,10 @@ $(function() {
$(window).load(function () { $(window).load(function () {
// 查询 // 查询
query(); query();
//开启校验
var validator1 = IPLAT.Validator({
id: "region1"
});
}); });
/** /**
...@@ -67,8 +71,8 @@ $(window).load(function () { ...@@ -67,8 +71,8 @@ $(window).load(function () {
*/ */
function showUploadFile(id) { function showUploadFile(id) {
JSColorbox.open({ JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-bizType=WL&inqu_status-0-id=" + id, href: "HGPZ002A?methodName=initLoad&inqu_status-0-bizType=KH&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>", title: "<div style='text-align: center;'>资质清单</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
}); });
...@@ -92,45 +96,22 @@ let save = function () { ...@@ -92,45 +96,22 @@ let save = function () {
} }
let flag = true; let flag = true;
$.each(rows, function(index, item) { $.each(rows, function(index, item) {
let supType= item.get("supType"); let custName= item.get("custName");
let supClass= item.get("supClass"); let custType= item.get("custType");
let supName= item.get("supName"); let custClass= item.get("custClass");
let headName= item.get("headName");
let phoneName= item.get("phoneName");
let address= item.get("address");
let openBankName= item.get("openBankName");
let accountNum= item.get("accountNum");
let openBankCode= item.get("openBankCode");
let assLevel= item.get("assLevel");
let score= item.get("score");
let status= item.get("status"); let status= item.get("status");
if(isBlank(supType)){ if(isBlank(custName)){
message("选中的第"+(index+1)+"行\"供应商类型\",不能为空!"); message("选中的第"+(index+1)+"行\"客户名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(supClass)){
message("选中的第"+(index+1)+"行\"供应商类别\",不能为空!");
flag = false;
return false;
}
if(isBlank(supName)){
message("选中的第"+(index+1)+"行\"供应商名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(headName)){
message("选中的第"+(index+1)+"行\"负责人\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
if(isBlank(phoneName)){ if(isBlank(custType)){
message("选中的第"+(index+1)+"行\"负责人联系方式\",不能为空!"); message("选中的第"+(index+1)+"行\"客户类型\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
if(isBlank(address)){ if(isBlank(custClass)){
message("选中的第"+(index+1)+"行\"地址\",不能为空!"); message("选中的第"+(index+1)+"行\"客户类别\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_type_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="customer_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput cname="联系人" ename="accountName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="联系人" ename="headName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="custClass" cname="客户类别" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="custClass" cname="客户类别" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgpz.custClass"/> <EF:EFCodeOption codeName="hggp.hgpz.custClass"/>
...@@ -33,14 +33,13 @@ ...@@ -33,14 +33,13 @@
<EF:EFComboColumn cname="客户类别" ename="custClass" width="100" align="center" required="true" defaultValue="1"> <EF:EFComboColumn cname="客户类别" ename="custClass" width="100" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hggp.hgpz.custClass"/> <EF:EFCodeOption codeName="hggp.hgpz.custClass"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn cname="统一社会信用代码" ename="taxRegisterCode" align="center" width="200" readonly="true" enable="false"/> <EF:EFColumn cname="统一社会信用代码" ename="taxRegisterCode" align="center" width="200" />
<EF:EFColumn cname="开户银行" ename="openBankName" align="center" width="200" readonly="true" enable="false"/> <EF:EFColumn cname="开户银行" ename="openBankName" align="center" width="200" />
<EF:EFColumn cname="银行账号" ename="accountNum" align="center" width="200" readonly="true" enable="false"/> <EF:EFColumn cname="银行账号" ename="accountNum" align="center" width="200" />
<EF:EFColumn cname="地址" ename="docIdPc" align="center" width="200" readonly="true" enable="false"/> <EF:EFColumn cname="地址" ename="docIdPc" align="center" width="200" />
<EF:EFColumn cname="联系人" ename="headName" align="center" width="200" readonly="true" enable="false"/> <EF:EFColumn cname="联系人" ename="headName" align="center" width="200" />
<EF:EFColumn cname="电话" ename="phoneName" align="center" width="200" readonly="true" enable="false" <EF:EFColumn cname="电话" ename="phoneName" align="center" width="200"
data-regex="/^1[345678]\d{9}$/" data-rules="mobile_phone"/>
data-errorprompt="请输入正确的手机号!"/>
<EF:EFComboColumn cname="状态" ename="status" width="90" align="center" required="true" defaultValue="1"> <EF:EFComboColumn cname="状态" ename="status" width="90" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 查询
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HGPZ099?methodName=initLoad&inqu_status-0-bizType="+$("#inqu_status-0-bizType").val()+"&inqu_status-0-matId="+$("#inqu_status-0-matId").val(),
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", docId);
inEiInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
EiCommunicator.send('HGPZ002A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HGPZ002A", "delete", true);
}
})
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() { $(function() {
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
//提交
$("#btn_upload").on("click", submit);
//关闭
$("#cancel").on("click", cancel);
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
copyToAdd: false,
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200] pageSizes: [10, 20, 30, 50, 100, 200]
}, },
toolbarConfig: {
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
// add: false, // 不显示新增按钮
//add: false, // 不显示取消按钮
// save: true, // 不显示保存按钮
//delete: false, // 显示删除按钮
cancel:false,
},
columns: [{ columns: [{
field: "operator",
template: function (item) {
let filePath = item.filePath;
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: "createdName", field: "createdName",
template: function (options) { template: function (options) {
return showUserName(options.createdBy, options.createdName); return showUserName(options.createdBy, options.createdName);
...@@ -25,10 +52,16 @@ $(function() { ...@@ -25,10 +52,16 @@ $(function() {
query(); query();
} }
}, },
onAdd: function (e) {
e.preventDefault();
$("#updateGroup_wnd_title").text("新增供应商");
add($("#updateGroup"));
},
onSave: function (e) { onSave: function (e) {
// 阻止后台保存请求,使用自定义保存 // 阻止后台保存请求,使用自定义保存
e.preventDefault(); e.preventDefault();
save(); update($("#updateGroup"));
//save();
}, },
onDelete: function (e) { onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除 // 阻止后台删除请求,使用自定义删除
...@@ -37,6 +70,7 @@ $(function() { ...@@ -37,6 +70,7 @@ $(function() {
} }
} }
downKeyUp(); downKeyUp();
}); });
/** /**
...@@ -45,6 +79,9 @@ $(function() { ...@@ -45,6 +79,9 @@ $(function() {
$(window).load(function () { $(window).load(function () {
// 查询 // 查询
query(); query();
var validator1 = IPLAT.Validator({
id: "saveResult"
});
}); });
/** /**
...@@ -54,6 +91,154 @@ let query = function () { ...@@ -54,6 +91,154 @@ let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
let cancel = function(){
$("#inqu_data-1-id").val('');
$("#inqu_data-1-supCode").val('');
IPLAT.EFSelect.value($("#inqu_data-1-supType"), '');
$("#inqu_data-1-supName").val('');
IPLAT.EFSelect.value($("#inqu_data-1-supClass"), '');
$("#inqu_data-1-headName").val('');
$("#inqu_data-1-phoneName").val('');
$("#inqu_data-1-address").val('');
$("#inqu_data-1-openBankName").val('');
$("#inqu_data-1-openBankCode").val('');
$("#inqu_data-1-assLevel").val('');
$("#inqu_data-1-score").val('');
IPLAT.EFSelect.value($("#inqu_data-1-status"), '');
// 关闭弹窗
$("#updateGroup").data("kendoWindow").close();
}
/**
* 上传文件
*/
let submit = function () {
let id = $("#inqu_data-1-id").val();
let supCode = $("#inqu_data-1-supCode").val();
let supType = $("#inqu_data-1-supType").val();
let supName = $("#inqu_data-1-supName").val();
let supClass = $("#inqu_data-1-supClass").val();
let headName = $("#inqu_data-1-headName").val();
let phoneName = $("#inqu_data-1-phoneName").val();
let address = $("#inqu_data-1-address").val();
let openBankName = $("#inqu_data-1-openBankName").val();
let openBankCode = $("#inqu_data-1-openBankCode").val();
let assLevel = $("#inqu_data-1-assLevel").val();
let score = $("#inqu_data-1-score").val();
let status = $("#inqu_data-1-status").val();
if(isBlank(supType)){
message("\"供应商类型\",不能为空!");
return false;
}
if(isBlank(supClass)){
message("\"供应商类别\",不能为空!");
return false;
}
if(isBlank(supName)){
message("\"供应商名称\",不能为空!");
return false;
}
if(isBlank(status)){
message("\"状态\",不能为空!");
return false;
}
if(!isBlank(phoneName)&&!isValidPhoneNumber(phoneName)){
message("请输入正确的\"手机号\"!");
return false;
}
var ei = new EiInfo();
ei.set("result-0-id", id);
ei.set("result-0-supCode", supCode);
ei.set("result-0-supType", supType);
ei.set("result-0-supName", supName);
ei.set("result-0-supClass", supClass);
ei.set("result-0-headName", headName);
ei.set("result-0-phoneName", phoneName);
ei.set("result-0-address", address);
ei.set("result-0-openBankName", openBankName);
ei.set("result-0-openBankCode", openBankCode);
ei.set("result-0-assLevel", assLevel);
ei.set("result-0-score", score);
ei.set("result-0-status", status);
// 调用请求 onSuccess 成功回掉函数
EiCommunicator.send("HGPZ003", "save", ei, {
onSuccess: function (ei) {
$("#updateGroup").data("kendoWindow").close();
// 清除上传队列
resultGrid.dataSource.page(1);
// onFail 表示失败回掉函数
}, onFail: function (ei) {
// 发生异常
NotificationUtil(ei);
}
});
}
/**
* 点击新增
*
* @param id
*/
function add(id) {
$("#inqu_data-1-id").val('');
$("#inqu_data-1-supCode").val('');
IPLAT.EFSelect.value($("#inqu_data-1-supType"), '');
$("#inqu_data-1-supName").val('');
IPLAT.EFSelect.value($("#inqu_data-1-supClass"), '');
$("#inqu_data-1-headName").val('');
$("#inqu_data-1-phoneName").val('');
$("#inqu_data-1-address").val('');
$("#inqu_data-1-openBankName").val('');
$("#inqu_data-1-openBankCode").val('');
$("#inqu_data-1-assLevel").val('');
$("#inqu_data-1-score").val('');
IPLAT.EFSelect.value($("#inqu_data-1-status"), '');
id.data("kendoWindow").open().center();
}
/**
* 点击修改
*
* @param id
*/
function update(id) {
//获取grid选中数据
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
$("#inqu_data-1-id").val(rows[0]["id"]);
$("#inqu_data-1-supCode").val(rows[0]["supCode"]);
IPLAT.EFSelect.value($("#inqu_data-1-supType"), rows[0]["supType"]);
$("#inqu_data-1-supName").val(rows[0]["supName"]);
IPLAT.EFSelect.value($("#inqu_data-1-supClass"), rows[0]["supClass"]);
$("#inqu_data-1-headName").val(rows[0]["headName"]);
$("#inqu_data-1-phoneName").val(rows[0]["phoneName"]);
$("#inqu_data-1-address").val(rows[0]["address"]);
$("#inqu_data-1-openBankName").val(rows[0]["openBankName"]);
$("#inqu_data-1-openBankCode").val(rows[0]["openBankCode"]);
$("#inqu_data-1-assLevel").val(rows[0]["assLevel"]);
$("#inqu_data-1-score").val(rows[0]["score"]);
IPLAT.EFSelect.value($("#inqu_data-1-status"), rows[0]["status"]);
//$("#inqu_status-1-supCode").removeAttr("type");
$("#updateGroup_wnd_title").text("修改企业管理");
id.data("kendoWindow").open().center();
}
/**
* 附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGPZ002A?methodName=initLoad&inqu_status-0-bizType=GYS&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>资质清单</div>",
width: "80%",
height: "80%",
});
}
/** /**
* 保存 * 保存
*/ */
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<EF:EFPage title="供应商档案"> <EF:EFPage title="供应商档案">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="供应商名称:" ename="supName" blockId="inqu_status" row="0"/> <EF:EFInput cname="供应商名称:" ename="supName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="供应商类型" ename="inqu_status-0-supType" colWidth="3" filter="contains"> <EF:EFSelect cname="供应商类型" ename="inqu_status-0-supType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="cust_type_block_id" textField="textField" valueField="valueField"/> <EF:EFCodeOption codeName="hggp.hgpz.supType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
...@@ -22,30 +22,34 @@ ...@@ -22,30 +22,34 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn cname="供应商类型" ename="supType" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn cname="供应商分类" ename="supClass" width="140" align="center" required="true"/> <EF:EFColumn cname="供应商编码" ename="supCode" width="120" align="center" enable="false" required="true"/>
<EF:EFColumn cname="供应商编码" ename="supCode" width="80" align="center" readonly="true"/> <EF:EFComboColumn cname="供应商类型" ename="supType" width="90" align="center" required="true" enable="false">
<EF:EFColumn cname="供应商名称" ename="supName" align="center" width="200" readonly="true" enable="false"/> <EF:EFCodeOption codeName="hggp.hgpz.supType"/>
<EF:EFColumn cname="联系人" ename="headName" align="center" width="200" readonly="true" </EF:EFComboColumn>
<EF:EFComboColumn cname="供应商分类" ename="supClass" width="90" align="center" required="true" enable="false">
<EF:EFCodeOption codeName="hggp.hgpz.supClass"/>
</EF:EFComboColumn>
<EF:EFColumn cname="供应商名称" ename="supName" align="center" width="120" readonly="true" enable="false"/>
<EF:EFColumn cname="联系人" ename="headName" align="center" width="120" readonly="true"
enable="false"/> enable="false"/>
<EF:EFColumn cname="联系人电话" ename="phoneName" align="center" width="200" readonly="true" <EF:EFColumn cname="联系人电话" ename="phoneName" align="center" width="120" readonly="true"
enable="false"/> enable="false"/>
<EF:EFColumn cname="地址" ename="address" align="center" width="200" readonly="true" <EF:EFColumn cname="地址" ename="address" align="center" width="200" readonly="true"
enable="false"/> enable="false"/>
<EF:EFColumn cname="开户行全称" ename="openBankName" align="center" width="200" readonly="true" <EF:EFColumn cname="开户行全称" ename="openBankName" align="center" width="200" readonly="true"
enable="false"/> enable="false"/>
<EF:EFColumn cname="开户行账号" ename="accountNum" align="center" width="200" readonly="true" <EF:EFColumn cname="开户行账号" ename="accountNum" align="center" width="120" readonly="true"
enable="false"/> enable="false"/>
<EF:EFColumn cname="银行行号" ename="openBankCode" align="center" width="200" readonly="true" <EF:EFColumn cname="银行行号" ename="openBankCode" align="center" width="120" readonly="true"
enable="false"/> enable="false"/>
<EF:EFColumn cname="评定等级" ename="assLevel" align="center" width="200" readonly="true" <EF:EFColumn cname="评定等级" ename="assLevel" align="center" width="80" readonly="true"
enable="false"/> enable="false"/>
<EF:EFColumn cname="综合得分" ename="score" align="center" width="200" readonly="true" <EF:EFColumn cname="综合得分" ename="score" align="center" width="80" readonly="true"
enable="false"/> enable="false"/>
<EF:EFComboColumn cname="状态" ename="status" width="90" align="center" required="true" defaultValue="1"> <EF:EFComboColumn cname="状态" ename="status" width="90" align="center" required="true" enable="false">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn cname="备注" ename="remark" width="150" editType="textarea"/>
<EF:EFColumn cname="创建人" ename="createdName" enable="false" align="center"/> <EF:EFColumn cname="创建人" ename="createdName" enable="false" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center" <EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
...@@ -57,79 +61,70 @@ ...@@ -57,79 +61,70 @@
</EF:EFPage> </EF:EFPage>
<EF:EFWindow id="insertGroup" title="企业管理" top="100px" left="280px" width="40%" height="70%">
<form> <EF:EFWindow id="updateGroup" title="新增供应商" width="50%" height="80%">
<div class="row"> <EF:EFRegion id="saveResult">
<label for="accountName" class="col-sm-2 col-form-label col-form-label-sm">企业名称</label> <div class="row"><%--type="hidden"--%>
<div class="col-sm-6"> <EF:EFInput blockId="inqu_data" row="1" ename="supCode" colWidth="6" cname="供应商编码" readonly="true"/>
<input type="text" class="form-control" id="accountName" placeholder="企业名称" aria-label="企业名称"
required="required">
</div> </div>
<div class="row">
<EF:EFInput blockId="inqu_data" row="1" ename="id" colWidth="6" cname="主键" type="hidden"/>
</div> </div>
<div class="form-group row"> <div class="row">
<label for="loginPrefix" class="col-sm-2 col-form-label col-form-label-sm">登录前缀</label> <EF:EFSelect blockId="inqu_data" row="1" ename="supType" cname="供应商类型" colWidth="6" filter="contains">
<div class="col-sm-6"> <EF:EFOption label="请选择" value=""/>
<input type="text" class="form-control" id="loginPrefix" placeholder="登录前缀" aria-label="登录前缀"> <EF:EFCodeOption codeName="hggp.hgpz.supType"/>
</EF:EFSelect>
</div> </div>
<div class="row">
<EF:EFInput blockId="inqu_data" row="1" ename="supName" colWidth="6" cname="供应商名称"/>
</div> </div>
<div class="form-group row"> <div class="row">
<label for="validFlag" class="col-sm-2 col-form-label col-form-label-sm">是否启用</label> <EF:EFSelect blockId="inqu_data" row="1" ename="supClass" cname="供应商分类" colWidth="6" filter="contains">
<div class="col-sm-6"> <EF:EFOption label="请选择" value=""/>
<select class="form-control" id="validFlag"> <EF:EFCodeOption codeName="hggp.hgpz.supClass"/>
<option value="1"></option> </EF:EFSelect>
<option value="0"></option>
</select>
</div> </div>
<div class="row">
<EF:EFInput blockId="inqu_data" row="1" ename="headName" colWidth="6" cname="联系人"/>
</div> </div>
<div class="form-group row">
<label for="docIdPc" class="col-sm-2 col-form-label">PC端log</label> <div class="row">
<div class="col-sm-6"> <EF:EFInput blockId="inqu_data" row="1" ename="phoneName" colWidth="6" cname="联系人电话" data-rules="mobile_phone"/>
<EF:EFUpload ename="docIdPc" cname="PC上传" docTag="hk_filePc" path="A"/>
<div class="side-header" id="pc-img" style="background-color: whitesmoke">
<img src="${ctx}/hpjx-logo.png" style="width:200px;height:55px;background-image: none;" alt="pc端log"/>
</div> </div>
<div class="row">
<EF:EFInput blockId="inqu_data" row="1" ename="address" colWidth="6" cname="地址"/>
</div> </div>
<input type="hidden" id="PCfileDocId" value="">
<div class="row">
<EF:EFInput blockId="inqu_data" row="1" ename="openBankName" colWidth="6" cname="开户行全称"/>
</div> </div>
<div class="form-group row">
<label for="docIdApp" class="col-sm-2 col-form-label">APP端log</label> <div class="row">
<div class="col-sm-6"> <EF:EFInput blockId="inqu_data" row="1" ename="accountNum" colWidth="6" cname="开户行账号"/>
<EF:EFUpload ename="docIdApp" cname="APP上传" docTag="hk_fileApp" path="A"/>
<div class="side-header" id="app-img" style="background-color: whitesmoke">
<img src="${ctx}/hpjx-logo.png" style="width:200px;height:55px;background-image: none;" alt="app端log"/>
</div> </div>
<div class="row">
<EF:EFInput blockId="inqu_data" row="1" ename="openBankCode" colWidth="6" cname="银行行号"/>
</div> </div>
<input type="hidden" id="APPfileDocId" value="">
<div class="row">
<EF:EFInput blockId="inqu_data" row="1" ename="assLevel" colWidth="6" cname="评定等级"/>
</div> </div>
<div class="form-group row"> <div class="row">
<label for="remark" class="col-sm-2 col-form-label col-form-label-sm">备注</label> <EF:EFInput blockId="inqu_data" row="1" ename="score" colWidth="6" cname="综合得分"/>
<div class="col-sm-6">
<textarea id="remark" class="form-control" placeholder="备注" aria-label="备注"></textarea>
</div> </div>
<div class="row">
<EF:EFSelect blockId="inqu_data" row="1" ename="status" cname="状态" colWidth="6" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</div> </div>
<input type="hidden" id="type" value="insert"> <div class="row">
<input type="hidden" id="id" value=""> <EF:EFButton ename="cancel" cname="取消" type="button" class="btn-align-right"/>
<input type="hidden" id="accountCode" value=""> <EF:EFButton ename="btn_upload" cname="确认" type="button" class="btn-align-right"/>
<div class="form-group col-md-6 col-sm-6 col-sm-offset-9">
<button type="button" onclick="save()" class="btn btn-primary">确认</button>
</div> </div>
</form>
</EF:EFWindow>
<EF:EFWindow id="updateGroup" top="100px" left="280px" width="58%" height="80%">
<EF:EFRegion id="updateResult">
<EF:EFInput ename="accountName" colWidth="6" cname="企业名称"/>
<EF:EFInput ename="loginPrefix" colWidth="6" cname="登录前缀"/>
<EF:EFSelect ename="validFlag" cname="是否启动"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#"
required="true" defaultValue="China"> <%--enable="false":不可下拉--%>
<EF:EFOptions blockId="made_country_block_id" textField="country_ch_name" valueField="country"/>
</EF:EFSelect>
<EF:EFUpload ename="uploadFilePc" cname="PC上传" docTag="hk_filePc" path="A"/>
<EF:EFUpload ename="uploadFileApp" cname="APP上传" docTag="hk_fileApp" path="A"/>
<EF:EFInput ename="remark" colWidth="6" cname="备注"/>
<EF:EFInput ename="PCfileDocId" cname="" hidden="true"/>
<EF:EFInput ename="APPfileDocId" cname="" hidden="true"/>
<EF:EFButton ename="update" cname="确认" layout="1" class="k-button"/>
</EF:EFRegion> </EF:EFRegion>
</EF:EFWindow> </EF:EFWindow>
$(function () {
IPLATUI.EFUpload = {
uploadFile: {
success: function(e) {
let docId = e.response.docId;
if (isBlank(docId)) {
return;
}
$("#fileDocId").val(docId);
NotificationUtil("附件上传成功");
console.log($("#fileDocId").val())
saveTemp(e);
try {
parent.JSColorbox.setValueCallback(docId);
} catch (e){
}
},
}
};
function saveTemp(e) {
let docId = e.response.docId;
let docName = e.response.docName;
let docSize = e.response.docSize;
let docTag = e.response.docTag;
let docUrl = e.response.docUrl;
let result = new EiInfo();
result.set("result-0-docId",docId);
result.set("result-0-docName",docName);
result.set("result-0-docSize",docSize);
result.set("result-0-docTag",docTag);
result.set("result-0-realPath",docUrl);
result.set("result-0-bizType",$("#inqu_status-0-bizType").val());
result.set("result-0-matId",$("#inqu_status-0-matId").val());
EiCommunicator.send("HGDS002", "insert", result, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件上传">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="hk_file11" path="A"/>
</EF:EFRegion>
<EF:EFInput ename="fileDocId" cname="" hidden="true"/>
</EF:EFPage>
...@@ -55,6 +55,20 @@ function isPositiveNumber(input) { ...@@ -55,6 +55,20 @@ function isPositiveNumber(input) {
} }
/** /**
* 手机号校验
*
* @param input
* @returns {boolean}
*/
function isValidPhoneNumber(input) {
var pattern = /^1[3-9]\d{9}$/;
if (pattern.test(input)) {
return true;
} else {
return false;
}
}
/**
* 消息提示 * 消息提示
* *
* @param msg * @param msg
......
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