Commit efe0e78a by liuyang

2024/03/12 新增设计图管理

parent b1fcae15
package com.baosight.hpjx.hp.xs.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.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* 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 HPXS002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
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_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String COL_COMPANY_CODE = "COMPANY_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 QUERY = "HPXS002.query";
public static final String COUNT = "HPXS002.count";
public static final String INSERT = "HPXS002.insert";
public static final String UPDATE = "HPXS002.update";
public static final String DELETE = "HPXS002.delete";
public static final String DELETE_BATCH = "HPXS002.deleteByBatch";
private String companyCode = " "; /* 企业编码*/
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 projName = " "; /* 项目名称*/
private Integer prdtType; /* 产品类型*/
private String prdtName = " "; /* 产品名称*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_COMPANY_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_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_TYPE);
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_NAME);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPXS002() {
initMetaData();
}
/**
* 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 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 getProjName() {
return projName;
}
public void setProjName(String projName) {
this.projName = projName;
}
public Integer getPrdtType() {
return prdtType;
}
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
public String getPrdtName() {
return prdtName;
}
public void setPrdtName(String prdtName) {
this.prdtName = prdtName;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
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));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_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_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME)));
return map;
}
}
...@@ -8,6 +8,8 @@ import com.baosight.hpjx.core.security.UserSessionUtils; ...@@ -8,6 +8,8 @@ import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC003; import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.xs.domain.HPXS001; import com.baosight.hpjx.hp.xs.domain.HPXS001;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -41,7 +43,16 @@ public class ServiceHPXS001 extends ServiceEPBase { ...@@ -41,7 +43,16 @@ public class ServiceHPXS001 extends ServiceEPBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
return super.query(inInfo,HPXS001.QUERY); EiBlock block = inInfo.getBlock(EiConstant.queryBlock);
String startDate = block.getCellStr(ACConstants.ROW_CODE_0,"createdDateFrom");
String endDate = block.getCellStr(ACConstants.ROW_CODE_0,"createdDateTo");
if (!endDate.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,"createdDateTo", StringUtil.removeHorizontalLine(endDate));
}
if (!startDate.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"createdDateFrom",StringUtil.removeHorizontalLine(startDate));
}
return super.query(inInfo,HPXS001.QUERY,new HPXS001());
} }
@OperationLogAnnotation(operModul = "报工管理",operType = "删除",operDesc = "删除操作") @OperationLogAnnotation(operModul = "报工管理",operType = "删除",operDesc = "删除操作")
......
package com.baosight.hpjx.hp.xs.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.xs.domain.HPXS002;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/3/11
*/
public class ServiceHPXS002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo, new HPXS002());
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
EiBlock block = inInfo.getBlock(EiConstant.queryBlock);
String startDate = block.getCellStr(ACConstants.ROW_CODE_0,"createdDateFrom");
String endDate = block.getCellStr(ACConstants.ROW_CODE_0,"createdDateTo");
if (!endDate.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,"createdDateTo",StringUtil.removeHorizontalLine(endDate));
}
if (!startDate.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"createdDateFrom",StringUtil.removeHorizontalLine(startDate));
}
return super.query(inInfo,HPXS002.QUERY,new HPXS002());
}
}
...@@ -85,6 +85,12 @@ ...@@ -85,6 +85,12 @@
<isNotEmpty prepend=" AND " property="updatedName"> <isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName# UPDATED_NAME = #updatedName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
REGISTER_DATE >= #createdDateFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
REGISTER_DATE &lt;= #createdDateTo#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -255,7 +261,7 @@ ...@@ -255,7 +261,7 @@
SELECT DISTINCT SELECT DISTINCT
FACTORY_CODE as "factoryCode", FACTORY_CODE as "factoryCode",
FACTORY_NAME as "factoryName" FACTORY_NAME as "factoryName"
FROM ${hpjxSchema}.T_HPPZ014 WHERE 1=1 FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -275,7 +281,7 @@ ...@@ -275,7 +281,7 @@
GROUP_CODE as "groupCode", GROUP_CODE as "groupCode",
GROUP_NAME as "groupName", GROUP_NAME as "groupName",
FACTORY_CODE AS factoryCode FACTORY_CODE AS factoryCode
FROM ${hpjxSchema}.T_HPPZ014 WHERE 1=1 FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -297,7 +303,7 @@ ...@@ -297,7 +303,7 @@
SELECT DISTINCT SELECT DISTINCT
USER_ID as "userId", USER_ID as "userId",
USER_NAME as "userName" USER_NAME as "userName"
FROM ${hpjxSchema}.T_HPPZ014 WHERE 1=1 FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1 and STATUS = '1'
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
<?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="HPXS002">
<sql id="condition">
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</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.hpjx.hp.xs.domain.HPXS002">
SELECT
A.COMPANY_CODE as "companyCode", <!-- 企业编码 -->
A.DOC_ID as "docId", <!-- 文件标识 -->
A.DIR_ID as "dirId", <!-- 目录标识 -->
B.PROJ_NAME AS "projName", <!-- 项目名称 -->
B.PRDT_TYPE AS "prdtType", <!-- 产品类型 -->
B.PRDT_NAME AS "prdtName", <!-- 产品名称 -->
substr(A.DOC_NAME,1,INSTR(A.DOC_NAME,'.')-1) as "docName", <!-- 文件名 -->
A.CHG_NAME as "chgName", <!-- 物理文件名 -->
A.DOC_SIZE as "docSize", <!-- 文件大小 -->
A.DOC_TAG as "docTag", <!-- 文件标签 -->
A.CREATED_BY as "createdBy", <!-- 记录创建者 -->
CONCAT(A.CREATED_BY, '-', A.CREATED_NAME) as "createdName", <!-- 记录创建名称 -->
A.CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
A.REAL_PATH as "realPath", <!-- 物理路径 -->
A.BIZ_TYPE as "bizType",
A.MAT_ID as "matId"
FROM ${hpjxSchema}.TEUDM_TEMP AS A
INNER JOIN ${hpjxSchema}.T_HPSC002 AS B ON A.MAT_ID = B.ID AND A.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
B.PROJ_CODE LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
B.PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
B.PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docName">
A.DOC_NAME LIKE CONCAT('%',#docName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME >= #createdDateFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= #createdDateTo#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
A.COMPANY_CODE asc,
A.CREATED_TIME asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.TEUDM_TEMP AS A
INNER JOIN ${hpjxSchema}.T_HPSC002 AS B ON A.MAT_ID = B.ID AND A.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
B.PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
B.PRDT_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
B.PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docName">
A.DOC_NAME = #docName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME >= #createdDateFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= #createdDateTo#
</isNotEmpty>
</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 ${hpjxSchema}.TEUDM_TEMP (
COMPANY_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
)
VALUES (#companyCode#, #docId#, #dirId#, #docName#, #chgName#, #docSize#, #docTag#, #createdBy#, #createdName#,
#createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #archiveFlag#, #realPath#, #bizType#, #matId#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.TEUDM_TEMP WHERE
COMPANY_CODE = #companyCode#
<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 ${hpjxSchema}.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#
WHERE
COMPANY_CODE = #companyCode# AND
DOC_ID = #docId#
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
</update>
</sqlMap>
$(function () {
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200],
},
columns: [/*{
field: "operator",
template: function (item) {
console.log(item)
let auditStatus = item.status;
let template = '';
if (item.matId != null) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.matId + ')" >附件清单</a>';
}
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\')" >提交</a>';
}
/!*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>';
}*!/
return template;
}
},*//*{
field: "registerDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
},*/{
field: "docName",
title: "文件名称",
template: function (item) {
let docName = item.docName
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.docId
+ '" >'+docName+'</a>';
return template;
}
}],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field == "factoryCode") {
// cell_label 表示子级节点 ,that 表示此 grid
var cell_label = "groupCode",that = grid;
// locked 表示是否为固定列
var locked = that.isCellLocked(cell_label);
// tr 表示 locked 和非 locked 的行,index 表示此行的第几列
var tr,index;
// 获取此 model 元素信息
var item = e.items[0];
var _uid = item.uid;
if (locked) {
tr = $(".k-grid-content-locked tr[data-uid="+ _uid +"]");
index = $("th[data-field='"+cell_label+"']").data("index");
} else {
tr = $(".k-grid-content tr[data-uid="+ _uid +"]");
index = parseInt($("th[data-field='"+cell_label+"']").data("index")) - that.lockedHeader.find("th").length;
}
// 获取子 cell(td)
var td = tr.children("td:eq("+index+")");
// 触发 td.click 事件,
td.trigger("click");
}
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
//e.preventDefault();
//let btnNode = $(this);
//禁用按钮
//btnNode.attr("disabled", true);
//saveResult(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'update'
|| e.eiInfo.extAttr.methodName == 'insert') {
query();
}
},
onRowClick: function (e) {
/*var block = detailGrid.getEiBlock();
if (block != null) {
block.setRows([]);
detailGrid.setEiBlock(block);
}
var info = new EiInfo()
var parentId = e.model['planInfoNo'];
info.set("parentId", parentId);
EiCommunicator.send("HPSC004", "queryDetail", info, {
onSuccess: function (ei) {//返回结果集
detailGrid.setEiInfo(ei);
}, onFail: function (ei) {
}
}, {async: false});*/
},
}
}
$("#EXPORT").on("click",function () {
const checkedRows = resultGrid.getCheckedRows();
let docId = "";
if (checkedRows.length <= 0) {
NotificationUtil("请至少选中一条数据", "info");
} else {
for (let i = 0, length = checkedRows.length; i < length; i++) {
docId += checkedRows[i]["docId"];
docId += ","
}
docId = docId.substr(0, docId.lastIndexOf(','));
window.location.href = IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM14.jsp?docIds=' + docId
}
})
//工厂类型下拉联动
$('input[name="inqu_status-0-factoryCode"]').change(function () {
var inInfo=new EiInfo();
var factoryCode=$("#inqu_status-0-factoryCode").val();
inInfo.set("factoryCode",factoryCode);
EiCommunicator.send("HPXS001", "queryComboBox", inInfo, {
onSuccess: function (ei) {
var input=$("#inqu_status-0-groupCode");
dataEdition=ei.getBlock("productionGroupCode_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataEdition,
template: "#=textField#"
});
}, onFail: function (ei) {
}
}, {async: false});
});
});
let query = function () { resultGrid.dataSource.page(1);}
/**
* 日期判断
* @param model 当前数据map
* @param rows 数据集合list
* @returns {boolean} 结束时间是否大于开始时间
*/
function check_time(model,rows){
for (var i=0;i<rows.length;i++){
if (model.planInfoNo == rows[i][5]) {
var start_time = rows[i][22];
var end_time = rows[i][23];
if (end_time < start_time) {
return false;
}
}
}
return true;
}
\ No newline at end of file
...@@ -6,11 +6,58 @@ ...@@ -6,11 +6,58 @@
To change this template use File | Settings | File Templates. To change this template use File | Settings | File Templates.
--%> --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<head> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<title>Title</title>
</head>
<body>
</body> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
</html>
<EF:EFPage title="设计图管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<%--<EF:EFAutoComplete ename="inqu_status-0-node_ename" dataField="node_ename" cname="项目名称" queryMethod="queryA"
serviceName="EEDM6001" resultId="blockA">
</EF:EFAutoComplete>--%>
<EF:EFSelect cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"
filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%--<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/>--%>
<EF:EFSelect cname="产品类型" ename="inqu_status-0-prdtType" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<%--<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>--%>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4','7')"/>
</EF:EFSelect>
<EF:EFInput cname="产品名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/>
<EF:EFInput cname="文件名称" blockId="inqu_status" ename="docName" row="0" colWidth="3"/>
<EF:EFDateSpan startCname="上传日期" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<%--<EF:EFSelect cname="是否删除" ename="deleteFlag" blockId="inqu_status" row="0" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>--%>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="matId" primaryKey="true" cname="物料清单ID" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="realPath" cname="物理路径" hidden="true"/>
<EF:EFColumn cname="项目名称" ename="projName" align="center" width="150" readonly="true" required="false" enable="false"/>
<EF:EFComboColumn ename="prdtType" cname="产品类型" enable="false" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4','7')"/>
</EF:EFComboColumn>
<EF:EFColumn cname="产品名称" ename="prdtName" align="center" width="150" readonly="true" required="false" enable="false"/>
<EF:EFColumn cname="文件名称" ename="docName" align="center" width="150" readonly="true" required="false" enable="false"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="150" 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="150" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment