Commit f9207f51 by yukang

生产入库单 HPKC003 / 附件查看公共代码

parent 4944c97d
...@@ -48,6 +48,10 @@ public class HPConstant { ...@@ -48,6 +48,10 @@ public class HPConstant {
//生产计划单 //生产计划单
public static final String HPSC003_PROD_NO = "HPSC003_PROD_NO"; public static final String HPSC003_PROD_NO = "HPSC003_PROD_NO";
//生产订单
public static final String HPSC005_PROD_NO = "HPSC005_PROD_NO";
} }
/** /**
......
...@@ -150,7 +150,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -150,7 +150,7 @@ public class ServiceHPKC003 extends ServiceBase {
//生产一条负数量和产量的红冲记录 //生产一条负数量和产量的红冲记录
hpkc003.setAmount(hpkc003.getAmount().multiply(new BigDecimal(-1.000))); hpkc003.setAmount(hpkc003.getAmount().multiply(new BigDecimal(-1.000)));
hpkc003.setWeight(hpkc003.getWeight().multiply(new BigDecimal(-1.000))); hpkc003.setWeight(hpkc003.getWeight().multiply(new BigDecimal(-1.000)));
hpkc003.setDeleteFlag(0); hpkc003.setDeleteFlag(1);
hpkc003.setProdNoOld(hpkc003.getProdNo()); hpkc003.setProdNoOld(hpkc003.getProdNo());
hpkc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO)); hpkc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", hpkc003); DaoUtils.insert("HPKC003.insert", hpkc003);
......
...@@ -34,7 +34,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -34,7 +34,7 @@ public class HPSC004 extends DaoEPBase {
public static final String FIELD_LEAF = "leaf"; /* 是否有叶子节点*/ public static final String FIELD_LEAF = "leaf"; /* 是否有叶子节点*/
public static final String FIELD_SORT = "sort"; /* 排序字段*/ public static final String FIELD_SORT = "sort"; /* 排序字段*/
public static final String FIELD_ICON = "icon"; /* 图片地址*/ public static final String FIELD_ICON = "icon"; /* 图片地址*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品编码*/ public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品编码*/ public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品编码*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/ public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_NUM = "num"; /* 数量*/ public static final String FIELD_NUM = "num"; /* 数量*/
...@@ -71,7 +71,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -71,7 +71,7 @@ public class HPSC004 extends DaoEPBase {
public static final String COL_LEAF = "LEAF"; /* 是否有叶子节点*/ public static final String COL_LEAF = "LEAF"; /* 是否有叶子节点*/
public static final String COL_SORT = "SORT"; /* 排序字段*/ public static final String COL_SORT = "SORT"; /* 排序字段*/
public static final String COL_ICON = "ICON"; /* 图片地址*/ public static final String COL_ICON = "ICON"; /* 图片地址*/
public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 项目类型*/ public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/
public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/ public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/
public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/ public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/
public static final String COL_NUM = "NUM"; /* 数量*/ public static final String COL_NUM = "NUM"; /* 数量*/
......
...@@ -27,6 +27,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -27,6 +27,7 @@ public class HPSC005 extends DaoEPBase {
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/ public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品编码*/ public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品编码*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/ public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_PLAN_COMPLETION_DATE = "planCompletionDate"; /* 计划完成日期*/ public static final String FIELD_PLAN_COMPLETION_DATE = "planCompletionDate"; /* 计划完成日期*/
...@@ -51,6 +52,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -51,6 +52,7 @@ public class HPSC005 extends DaoEPBase {
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/ public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/ public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/
public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/
public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/ public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/
public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/ public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/
public static final String COL_PLAN_COMPLETION_DATE = "PLAN_COMPLETION_DATE"; /* 计划完成日期*/ public static final String COL_PLAN_COMPLETION_DATE = "PLAN_COMPLETION_DATE"; /* 计划完成日期*/
...@@ -82,6 +84,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -82,6 +84,7 @@ public class HPSC005 extends DaoEPBase {
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String productionOrderNo = " "; /* 生产订单号*/ private String productionOrderNo = " "; /* 生产订单号*/
private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/ private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/ private String prdtName = " "; /* 产品名称*/
private String planCompletionDate = " "; /* 计划完成日期*/ private String planCompletionDate = " "; /* 计划完成日期*/
...@@ -128,6 +131,10 @@ public class HPSC005 extends DaoEPBase { ...@@ -128,6 +131,10 @@ public class HPSC005 extends DaoEPBase {
eiColumn.setDescName("生产订单号"); eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_TYPE);
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_CODE); eiColumn = new EiColumn(FIELD_PRDT_CODE);
eiColumn.setDescName("产品编码"); eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -299,6 +306,22 @@ public class HPSC005 extends DaoEPBase { ...@@ -299,6 +306,22 @@ public class HPSC005 extends DaoEPBase {
* get the prdtCode - 产品编码. * get the prdtCode - 产品编码.
* @return the prdtCode * @return the prdtCode
*/ */
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
/**
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public String getPrdtCode() { public String getPrdtCode() {
return this.prdtCode; return this.prdtCode;
} }
...@@ -613,6 +636,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -613,6 +636,7 @@ public class HPSC005 extends DaoEPBase {
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo)); setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode)); setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName)); setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setPlanCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMPLETION_DATE)), planCompletionDate)); setPlanCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMPLETION_DATE)), planCompletionDate));
...@@ -646,6 +670,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -646,6 +670,7 @@ public class HPSC005 extends DaoEPBase {
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO))); map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO)));
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE))); map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE)));
map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME))); map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME)));
map.put(FIELD_PLAN_COMPLETION_DATE, StringUtils.toString(planCompletionDate, eiMetadata.getMeta(FIELD_PLAN_COMPLETION_DATE))); map.put(FIELD_PLAN_COMPLETION_DATE, StringUtils.toString(planCompletionDate, eiMetadata.getMeta(FIELD_PLAN_COMPLETION_DATE)));
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC002B;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPSC002B extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
// 查询物料ID所对应的项目名称和产品名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap);
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002B().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSC002B.QUERY, new HPSC002B());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPSC002B fSc002A = new HPSC002B();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.insert(HPSC002B.INSERT, fSc002A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPSC002B fSc002A = new HPSC002B();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.update(HPSC002B.DELETE, fSc002A);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.HPConstants; import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC003; import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
...@@ -11,6 +12,7 @@ import com.baosight.iplat4j.core.exception.PlatException; ...@@ -11,6 +12,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.DateUtil; import com.baosight.iplat4j.core.util.DateUtil;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -195,10 +197,11 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -195,10 +197,11 @@ public class ServiceHPSC003 extends ServiceBase {
for (int i = 0; i < list.size(); i ++) { for (int i = 0; i < list.size(); i ++) {
HPSC004 HPSC004 = (HPSC004) list.get(i); HPSC004 HPSC004 = (HPSC004) list.get(i);
HPSC005 HPSC005 = new HPSC005(); HPSC005 HPSC005 = new HPSC005();
String SCDD = "SCDD" + DateUtil.getDateTime("yyyMMddHHmmss",new Date()) + generateFixedLengthRandomNumber(4); String SCDD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
HPSC005.setProjCode(HPSC003.getProjCode()); HPSC005.setProjCode(HPSC003.getProjCode());
HPSC005.setProjName(HPSC003.getProjName()); HPSC005.setProjName(HPSC003.getProjName());
HPSC005.setProductionOrderNo(SCDD); HPSC005.setProductionOrderNo(SCDD);
HPSC005.setPrdtType(HPSC004.getPrdtType());
HPSC005.setPrdtCode(HPSC004.getPrdtCode()); HPSC005.setPrdtCode(HPSC004.getPrdtCode());
HPSC005.setPrdtName(HPSC004.getPrdtName()); HPSC005.setPrdtName(HPSC004.getPrdtName());
HPSC005.setPlanCompletionDate(HPSC004.getPlanCompletionDate()); HPSC005.setPlanCompletionDate(HPSC004.getPlanCompletionDate());
......
<?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="HPSC002B">
<sql id="column">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
B.DOC_NAME as "docName", <!-- 文件名称 -->
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="condition">
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
A.DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#depositDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#depositDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002B">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC002B A, ${platSchema}.TEUDM02 B
WHERE 1=1
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002B A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC002B (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #deptCode#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC002B WHERE ID = #id#
</delete>
</sqlMap>
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo# PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode"> <isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode# PRDT_CODE = #prdtCode#
</isNotEmpty> </isNotEmpty>
...@@ -114,6 +117,7 @@ ...@@ -114,6 +117,7 @@
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 --> PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 --> PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
...@@ -217,6 +221,7 @@ ...@@ -217,6 +221,7 @@
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PRODUCTION_ORDER_NO, <!-- 生产订单号 --> PRODUCTION_ORDER_NO, <!-- 生产订单号 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
PLAN_COMPLETION_DATE, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
...@@ -237,7 +242,7 @@ ...@@ -237,7 +242,7 @@
FILE_PATH4, <!-- 文件地址4 --> FILE_PATH4, <!-- 文件地址4 -->
FILE_PATH5 <!-- 文件地址5 --> FILE_PATH5 <!-- 文件地址5 -->
) )
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#, #prdtCode#, #prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#) VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -252,6 +257,7 @@ ...@@ -252,6 +257,7 @@
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 --> PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
......
...@@ -103,8 +103,11 @@ let productionOrderQueryCallback = function (row) { ...@@ -103,8 +103,11 @@ let productionOrderQueryCallback = function (row) {
var rowsdata = resultGrid.getCheckedRows(); var rowsdata = resultGrid.getCheckedRows();
resultGrid.setCellValue(0, "productionOrderNo", row[i]["productionOrderNo"]); resultGrid.setCellValue(0, "productionOrderNo", row[i]["productionOrderNo"]);
resultGrid.setCellValue(0, "amount", row[i]["numRK"]); resultGrid.setCellValue(0, "amount", row[i]["num"]);
resultGrid.setCellValue(0, "weight", row[i]["totalWtRK"]); resultGrid.setCellValue(0, "weight", row[i]["totalWt"]);
resultGrid.setCellValue(0, "inventType", row[i]["prdtType"]);
resultGrid.setCellValue(0, "inventCode", row[i]["prdtCode"]);
resultGrid.setCellValue(0, "inventName", row[i]["prdtName"]);
lists[i] = i; lists[i] = i;
} }
resultGrid.setCheckedRows(lists); resultGrid.setCheckedRows(lists);
......
...@@ -27,22 +27,23 @@ ...@@ -27,22 +27,23 @@
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="prodNo" cname="生产入库单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="prodNo" cname="生产入库单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" <EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn cname="仓库名称" ename="whCode" columnTemplate="#=textField#" <EF:EFComboColumn cname="仓库名称" ename="whCode" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id" itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField" textField="textField" valueField="valueField" readonly="true"
align="center" filter="contains" width="100"> align="center" filter="contains" width="100">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn cname="存货名称" ename="inventCode" width="120" align="center"/>
<EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}" enable="false" <EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}" enable="false"
sumType="all"/> sumType="all" readonly="true"/>
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}" enable="false" <EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}" enable="false"
sumType="all"/> sumType="all" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea"/> <EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn cname="存货代码" ename="inventCode" width="120" align="center" enable="false"/>
<EF:EFColumn cname="存货名称" ename="inventName" width="120" align="center" enable="false"/>
<EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea" readonly="true"/>
<EF:EFColumn cname="创建人名称" ename="createdName" enable="false" width="120" align="center"/> <EF:EFColumn cname="创建人名称" ename="createdName" enable="false" width="120" 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']"/>
......
...@@ -30,11 +30,10 @@ ...@@ -30,11 +30,10 @@
<EF:EFColumn enable="false" ename="projCode" cname="项目号" /> <EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/> <EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/>
<EF:EFColumn enable="false" ename="prdtType" cname="部件类型"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/> <EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/> <EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/>
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/> <EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/>
<EF:EFColumn ename="numRK" cname="入库数量" format="{0:N3}"/>
<EF:EFColumn ename="totalWtRK" cname="入库重量" format="{0:N3}"/>
<EF:EFColumn enable="false" ename="num" cname="计划数量"/> <EF:EFColumn enable="false" ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/> <EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/>
<EF:EFColumn enable="false" ename="orgName" cname="生产组"/> <EF:EFColumn enable="false" ename="orgName" cname="生产组"/>
......
$(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="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.filePath
+ '" >附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
// 关闭事件
IPLATUI.EFWindow = {
"uploadFile": {
close: function (e) {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", uploadFile);
EiCommunicator.send('HPSC002A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
}
};
$("#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);
}
/**
* 文件上传
*
*/
function uploadFile() {
uploadFileWindow.open().center();
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC002A", "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"/>
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="产品名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<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>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment