Commit 18a227f3 by wancheng

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

parents 884ede8d c4082276
...@@ -79,6 +79,7 @@ public enum DdynamicEnum { ...@@ -79,6 +79,7 @@ public enum DdynamicEnum {
WH_RECORD_BLOCK_ID("wh_record_block_id","whCode","whName","HPPZ007.queryComboBox"), WH_RECORD_BLOCK_ID("wh_record_block_id","whCode","whName","HPPZ007.queryComboBox"),
/** /**
* (废弃)
* 模块:存货类型 * 模块:存货类型
* 用途:存货类型下拉框 * 用途:存货类型下拉框
* 编写:yk * 编写:yk
......
...@@ -44,6 +44,14 @@ public class HPConstant { ...@@ -44,6 +44,14 @@ public class HPConstant {
public static final String OTHER_ENTER_NO = "OTHER_ENTER_NO"; public static final String OTHER_ENTER_NO = "OTHER_ENTER_NO";
// 其他出库单号 // 其他出库单号
public static final String OTHER_OUTER_NO = "OTHER_OUTER_NO"; public static final String OTHER_OUTER_NO = "OTHER_OUTER_NO";
//生产计划单
public static final String HPSC003_PROD_NO = "HPSC003_PROD_NO";
//生产订单
public static final String HPSC005_PROD_NO = "HPSC005_PROD_NO";
} }
/** /**
......
...@@ -68,6 +68,8 @@ public class HPSqlConstant { ...@@ -68,6 +68,8 @@ public class HPSqlConstant {
public static final String QUERY_SUM = "HPKC005.querySum"; public static final String QUERY_SUM = "HPKC005.querySum";
// 锁 // 锁
public static final String LOCK = "HPKC005.lock"; public static final String LOCK = "HPKC005.lock";
// 统计
public static final String STAT_DATE = "HPKC005.statDate";
} }
/** /**
...@@ -114,6 +116,8 @@ public class HPSqlConstant { ...@@ -114,6 +116,8 @@ public class HPSqlConstant {
public static final String DELETE_BY_TIME = "HPKC009.deleteByTime"; public static final String DELETE_BY_TIME = "HPKC009.deleteByTime";
// 查询 // 查询
public static final String QUERY = "HPKC009.query"; public static final String QUERY = "HPKC009.query";
// 查询统计
public static final String QUERY_SUM = "HPKC009.querySum";
} }
/** /**
...@@ -129,6 +133,20 @@ public class HPSqlConstant { ...@@ -129,6 +133,20 @@ public class HPSqlConstant {
} }
/** /**
* HPKC010A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HPKC010A {
// 按日期删除
public static final String DELETE_BY_TIME = "HPKC009.deleteByTime";
// 备份数量
public static final String BACKUP = "HPKC010A.backup";
}
/**
* HPPZ010 SQL 定义 * HPPZ010 SQL 定义
* *
* @author:songx * @author:songx
......
...@@ -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);
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.time.LocalDate;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,18:49
*/
public class ServiceHPKC010A extends ServiceBase {
/**
* 备份数据
*
* @param inInfo
* @return
*/
public EiInfo backup(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("dateProc", LocalDate.now().minusDays(1).format(DateUtils.SHORT_DATE));
// 清除数据
dao.delete(HPSqlConstant.HPKC010A.DELETE_BY_TIME, queryMap);
// 备份数据
dao.insert(HPSqlConstant.HPKC010A.BACKUP, queryMap);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("备份数据成功");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
}
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -83,6 +82,9 @@ ...@@ -83,6 +82,9 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -97,6 +99,12 @@ ...@@ -97,6 +99,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#) INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual> </isNotEqual>
</isNotEmpty> </isNotEmpty>
<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>
<sql id="order"> <sql id="order">
...@@ -216,4 +224,23 @@ ...@@ -216,4 +224,23 @@
</isNotEmpty> </isNotEmpty>
</update> </update>
<!-- 统计库存 -->
<select id="statDate" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC005">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(DIFF_AMOUNT), 0) AS "diffAmount",
COALESCE(SUM(DIFF_WEIGHT), 0) AS "diffWeight"
FROM ${hpjxSchema}.T_HPKC005
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap> </sqlMap>
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -62,6 +61,9 @@ ...@@ -62,6 +61,9 @@
<isNotEmpty prepend=" AND " property="inventRecordId"> <isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId# INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -79,6 +81,12 @@ ...@@ -79,6 +81,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#) INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual> </isNotEqual>
</isNotEmpty> </isNotEmpty>
<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>
<sql id="order"> <sql id="order">
...@@ -191,6 +199,7 @@ ...@@ -191,6 +199,7 @@
WH_CODE AS "whCode", WH_CODE AS "whCode",
INVENT_TYPE AS "inventType", INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode", INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(AMOUNT), 0) AS "amount", COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight" COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC006 FROM ${hpjxSchema}.T_HPKC006
...@@ -198,7 +207,7 @@ ...@@ -198,7 +207,7 @@
<isNotEmpty prepend=" AND " property="createdTimeFrom"> <isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo# CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty> </isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select> </select>
</sqlMap> </sqlMap>
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -63,6 +62,9 @@ ...@@ -63,6 +62,9 @@
<isNotEmpty prepend=" AND " property="oldOuterNo"> <isNotEmpty prepend=" AND " property="oldOuterNo">
OLD_OUTER_NO = #oldOuterNo# OLD_OUTER_NO = #oldOuterNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -77,6 +79,12 @@ ...@@ -77,6 +79,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#) INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual> </isNotEqual>
</isNotEmpty> </isNotEmpty>
<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>
<sql id="order"> <sql id="order">
...@@ -185,14 +193,15 @@ ...@@ -185,14 +193,15 @@
WH_CODE AS "whCode", WH_CODE AS "whCode",
INVENT_TYPE AS "inventType", INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode", INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(AMOUNT), 0) AS "amount", COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight" COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC004 FROM ${hpjxSchema}.T_HPKC007
WHERE 1=1 WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom"> <isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo# CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty> </isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select> </select>
</sqlMap> </sqlMap>
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
KC_TYPE as "kcType", <!-- 库存类型:CG:采购,SC:生产,QT:其他 -->
DATE_TYPE as "dateType", <!-- 日期类型:DAY:天,MONTH:月 --> DATE_TYPE as "dateType", <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC as "dateProc", <!-- 日期 --> DATE_PROC as "dateProc", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 --> WH_CODE as "whCode", <!-- 仓库编码 -->
...@@ -17,10 +16,24 @@ ...@@ -17,10 +16,24 @@
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID --> INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
INIT_AMOUNT as "initAmount", <!-- 期初数量 --> INIT_AMOUNT as "initAmount", <!-- 期初数量 -->
INIT_WEIGHT as "initWeight", <!-- 期初重量 --> INIT_WEIGHT as "initWeight", <!-- 期初重量 -->
CG_ENTER_AMOUNT as "cgEnterAmount", <!-- 采购入库数量 -->
CG_ENTER_WEIGHT as "cgEnterWeight", <!-- 采购入库重量 -->
SC_ENTER_AMOUNT as "scEnterAmount", <!-- 生产入库数量 -->
SC_ENTER_WEIGHT as "scEnterWeight", <!-- 生产入库重量 -->
QT_ENTER_AMOUNT as "qtEnterAmount", <!-- 其它入库数量 -->
QT_ENTER_WEIGHT as "qtEnterWeight", <!-- 其它入库重量 -->
ENTER_AMOUNT as "enterAmount", <!-- 入库数量 --> ENTER_AMOUNT as "enterAmount", <!-- 入库数量 -->
ENTER_WEIGHT as "enterWeight", <!-- 入库重量 --> ENTER_WEIGHT as "enterWeight", <!-- 入库重量 -->
SC_OUTER_AMOUNT as "scOuterAmount", <!-- 生产领料数量 -->
SC_OUTER_WEIGHT as "scOuterWeight", <!-- 生产领料重量 -->
XS_OUTER_AMOUNT as "xsOuterAmount", <!-- 销售出库数量 -->
XS_OUTER_WEIGHT as "xsOuterWeight", <!-- 销售出库重量 -->
QT_OUTER_AMOUNT as "qtOuterAmount", <!-- 其它出库数量 -->
QT_OUTER_WEIGHT as "qtOuterWeight", <!-- 其它出库重量 -->
OUTER_AMOUNT as "outerAmount", <!-- 出库数量 --> OUTER_AMOUNT as "outerAmount", <!-- 出库数量 -->
OUTER_WEIGHT as "outerWeight", <!-- 出库重量 --> OUTER_WEIGHT as "outerWeight", <!-- 出库重量 -->
PD_DIFF_AMOUNT as "pdDiffAmount", <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT as "pdDiffWeight", <!-- 盘点差异重量 -->
END_AMOUNT as "endAmount", <!-- 期末数量 --> END_AMOUNT as "endAmount", <!-- 期末数量 -->
END_WEIGHT as "endWeight", <!-- 期末重量 --> END_WEIGHT as "endWeight", <!-- 期末重量 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
...@@ -41,9 +54,6 @@ ...@@ -41,9 +54,6 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="kcType">
KC_TYPE = #kcType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateType"> <isNotEmpty prepend=" AND " property="dateType">
DATE_TYPE = #dateType# DATE_TYPE = #dateType#
</isNotEmpty> </isNotEmpty>
...@@ -76,7 +86,7 @@ ...@@ -76,7 +86,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
...@@ -101,10 +111,24 @@ ...@@ -101,10 +111,24 @@
SELECT SELECT
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount", <!-- 期初数量 --> COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount", <!-- 期初数量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight", <!-- 期初重量 --> COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight", <!-- 期初重量 -->
COALESCE(SUM(CG_ENTER_AMOUNT), 0) AS "cgEnterAmount", <!-- 采购入库数量 -->
COALESCE(SUM(CG_ENTER_WEIGHT), 0) AS "cgEnterWeight", <!-- 采购入库重量 -->
COALESCE(SUM(SC_ENTER_AMOUNT), 0) AS "scEnterAmount", <!-- 生产入库数量 -->
COALESCE(SUM(SC_ENTER_WEIGHT), 0) AS "scEnterWeight", <!-- 生产入库重量 -->
COALESCE(SUM(QT_ENTER_AMOUNT), 0) AS "qtEnterAmount", <!-- 其它入库数量 -->
COALESCE(SUM(QT_ENTER_WEIGHT), 0) AS "qtEnterWeight", <!-- 其它入库重量 -->
COALESCE(SUM(ENTER_AMOUNT), 0) AS "enterAmount", <!-- 入库数量 --> COALESCE(SUM(ENTER_AMOUNT), 0) AS "enterAmount", <!-- 入库数量 -->
COALESCE(SUM(ENTER_WEIGHT), 0) AS "enterWeight", <!-- 入库重量 --> COALESCE(SUM(ENTER_WEIGHT), 0) AS "enterWeight", <!-- 入库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount", <!-- 差异数量 --> COALESCE(SUM(SC_OUTER_AMOUNT), 0) AS "scOuterAmount", <!-- 生产领料数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight", <!-- 差异重量 --> COALESCE(SUM(SC_OUTER_WEIGHT), 0) AS "scOuterWeight", <!-- 生产领料重量 -->
COALESCE(SUM(XS_OUTER_AMOUNT), 0) AS "xsOuterAmount", <!-- 销售出库数量 -->
COALESCE(SUM(XS_OUTER_WEIGHT), 0) AS "xsOuterWeight", <!-- 销售出库重量 -->
COALESCE(SUM(QT_OUTER_AMOUNT), 0) AS "qtOuterAmount", <!-- 其它出库数量 -->
COALESCE(SUM(QT_OUTER_WEIGHT), 0) AS "qtOuterWeight", <!-- 其它出库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount", <!-- 出库数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight", <!-- 出库重量 -->
COALESCE(SUM(PD_DIFF_AMOUNT), 0) AS "pdDiffAmount", <!-- 盘点差异数量 -->
COALESCE(SUM(PD_DIFF_WEIGHT), 0) AS "pdDiffWeight", <!-- 盘点差异重量 -->
COALESCE(SUM(END_AMOUNT), 0) AS "endAmount", <!-- 期末数量 --> COALESCE(SUM(END_AMOUNT), 0) AS "endAmount", <!-- 期末数量 -->
COALESCE(SUM(END_WEIGHT), 0) AS "endWeight" <!-- 期末重量 --> COALESCE(SUM(END_WEIGHT), 0) AS "endWeight" <!-- 期末重量 -->
FROM ${hpjxSchema}.T_HPKC009 FROM ${hpjxSchema}.T_HPKC009
...@@ -116,7 +140,6 @@ ...@@ -116,7 +140,6 @@
INSERT INTO ${hpjxSchema}.T_HPKC009 ( INSERT INTO ${hpjxSchema}.T_HPKC009 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
KC_TYPE, <!-- 库存类型:CG:采购,SC:生产,QT:其他 -->
DATE_TYPE, <!-- 日期类型:DAY:天,MONTH:月 --> DATE_TYPE, <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC, <!-- 日期 --> DATE_PROC, <!-- 日期 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
...@@ -127,21 +150,37 @@ ...@@ -127,21 +150,37 @@
INVENT_RECORD_ID, <!-- 规格ID --> INVENT_RECORD_ID, <!-- 规格ID -->
INIT_AMOUNT, <!-- 期初数量 --> INIT_AMOUNT, <!-- 期初数量 -->
INIT_WEIGHT, <!-- 期初重量 --> INIT_WEIGHT, <!-- 期初重量 -->
CG_ENTER_AMOUNT, <!-- 采购入库数量 -->
CG_ENTER_WEIGHT, <!-- 采购入库重量 -->
SC_ENTER_AMOUNT, <!-- 生产入库数量 -->
SC_ENTER_WEIGHT, <!-- 生产入库重量 -->
QT_ENTER_AMOUNT, <!-- 其它入库数量 -->
QT_ENTER_WEIGHT, <!-- 其它入库重量 -->
ENTER_AMOUNT, <!-- 入库数量 --> ENTER_AMOUNT, <!-- 入库数量 -->
ENTER_WEIGHT, <!-- 入库重量 --> ENTER_WEIGHT, <!-- 入库重量 -->
SC_OUTER_AMOUNT, <!-- 生产领料数量 -->
SC_OUTER_WEIGHT, <!-- 生产领料重量 -->
XS_OUTER_AMOUNT, <!-- 销售出库数量 -->
XS_OUTER_WEIGHT, <!-- 销售出库重量 -->
QT_OUTER_AMOUNT, <!-- 其它出库数量 -->
QT_OUTER_WEIGHT, <!-- 其它出库重量 -->
OUTER_AMOUNT, <!-- 出库数量 --> OUTER_AMOUNT, <!-- 出库数量 -->
OUTER_WEIGHT, <!-- 出库重量 --> OUTER_WEIGHT, <!-- 出库重量 -->
PD_DIFF_AMOUNT, <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT, <!-- 盘点差异重量 -->
END_AMOUNT, <!-- 期末数量 --> END_AMOUNT, <!-- 期末数量 -->
END_WEIGHT, <!-- 期末重量 --> END_WEIGHT, <!-- 期末重量 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 --> CREATED_TIME <!-- 创建时间 -->
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #kcType#, #dateType#, #dateProc#, #whCode#, #companyCode#, #depCode#, #dateType#, #dateProc#, #whCode#, #whName#,
#whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #initAmount#,
#initAmount#, #initWeight#, #enterAmount#, #enterWeight#, #outerAmount#, #initWeight#, #cgEnterAmount#, #cgEnterWeight#, #scEnterAmount#, #scEnterWeight#,
#outerWeight#, #endAmount#, #endWeight#, #createdBy#, #createdName#, #qtEnterAmount#, #qtEnterWeight#, #enterAmount#, #enterWeight#, #scOuterAmount#,
#createdTime# #scOuterWeight#, #xsOuterAmount#, #xsOuterWeight#, #qtOuterAmount#, #qtOuterWeight#,
#outerAmount#, #outerWeight#, #pdDiffAmount#, #pdDiffWeight#, #endAmount#,
#endWeight#, #createdBy#, #createdName#, #createdTime#
) )
</insert> </insert>
......
...@@ -4,20 +4,23 @@ ...@@ -4,20 +4,23 @@
<sql id="column"> <sql id="column">
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
WH_CODE as "whCode", <!-- 仓库编码 --> WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 --> WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 --> INVENT_TYPE as "inventType", <!-- 物料类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 --> INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 --> INVENT_NAME as "inventName", <!-- 物料名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 --> AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 --> WEIGHT as "weight", <!-- 重量 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
VERSION as "version" VERSION as "version" <!-- 版本号 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -114,6 +117,7 @@ ...@@ -114,6 +117,7 @@
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPKC010 ( INSERT INTO hpjx.T_HPKC010 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 --> WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 --> INVENT_TYPE, <!-- 存货类型 -->
...@@ -128,7 +132,7 @@ ...@@ -128,7 +132,7 @@
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
VERSION VERSION
) VALUES ( ) VALUES (
#companyCode#, #whCode#, #whName#, #inventType#, #companyCode#, #depCode#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#, #inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#createdBy#, #createdTime#, #updatedBy#, #createdBy#, #createdTime#, #updatedBy#,
#updatedTime#, #version# #updatedTime#, #version#
......
<?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="HPKC010A">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
DATE_PROC as "dateProc", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 物料类型 -->
INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 物料名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
VERSION as "version" <!-- 版本号 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateProc">
DATE_PROC = #dateProc#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</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="version">
VERSION = #version#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC010A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPKC010A
WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC010A WHERE 1=1
<include refid="condition"/>
</select>
<!-- 按时间删除数据 -->
<delete id="deleteByTime">
DELETE FROM ${hpjxSchema}.T_HPKC010A WHERE DATE_PROC = #dateProc#
</delete>
<!-- 备份数据 -->
<insert id="backup">
INSERT INTO ${hpjxSchema}.T_HPKC010A (
COMPANY_CODE, DEP_CODE, DATE_PROC, WH_CODE, WH_NAME, INVENT_TYPE,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
)
SELECT
COMPANY_CODE, DEP_CODE, #dateProc#, WH_CODE, WH_NAME, INVENT_TYPE,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
FROM ${hpjxSchema}.T_HPKC010
</insert>
</sqlMap>
...@@ -61,7 +61,7 @@ public class HPPZTools { ...@@ -61,7 +61,7 @@ public class HPPZTools {
} }
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("inventCodes", inventCodes); queryMap.put("inventCodes", inventCodes);
return DaoBase.getInstance().query("HPPZ004.query", queryMap); return DaoBase.getInstance().query(HPPZ004.QUERY, queryMap);
} }
/** /**
......
...@@ -8,7 +8,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -8,7 +8,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class THPSC001 extends DaoEPBase { public class HPSC001 extends DaoEPBase {
private Long id = 0L; private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
...@@ -26,6 +26,8 @@ public class THPSC001 extends DaoEPBase { ...@@ -26,6 +26,8 @@ public class THPSC001 extends DaoEPBase {
private String updatedTime ; /* 更新时间*/ private String updatedTime ; /* 更新时间*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private Integer materialStatus = 0; /* 物料审核状态0-未审核,1部分审核,2全部审核*/
/** /**
* initialize the metadata * initialize the metadata
*/ */
...@@ -97,12 +99,14 @@ public class THPSC001 extends DaoEPBase { ...@@ -97,12 +99,14 @@ public class THPSC001 extends DaoEPBase {
eiColumn.setDescName("备注"); eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialStatus");
eiColumn.setDescName("物料审核状态0-未审核,1部分审核,2全部审核");
eiMetadata.addMeta(eiColumn);
} }
/** /**
* the constructor * the constructor
*/ */
public THPSC001() { public HPSC001() {
initMetaData(); initMetaData();
} }
...@@ -321,6 +325,19 @@ public class THPSC001 extends DaoEPBase { ...@@ -321,6 +325,19 @@ public class THPSC001 extends DaoEPBase {
this.remark = remark; this.remark = remark;
} }
/** /**
* set the materialStatus - 物料审核状态0-未审核,1部分审核,2全部审核
*/
public void setMaterialStatus(Integer materialStatus) {
this.materialStatus = materialStatus;
}
/**
* get the materialStatus - 物料审核状态0-未审核,1部分审核,2全部审核
* @return the materialStatus
*/
public Integer getMaterialStatus() {
return this.materialStatus;
}
/**
* get the value from Map * get the value from Map
*/ */
public void fromMap(Map map) { public void fromMap(Map map) {
...@@ -341,6 +358,8 @@ public class THPSC001 extends DaoEPBase { ...@@ -341,6 +358,8 @@ public class THPSC001 extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark));
setMaterialStatus(NumberUtils.toInteger(StringUtils.toString(map.get("materialStatus")), materialStatus));
} }
/** /**
...@@ -365,6 +384,7 @@ public class THPSC001 extends DaoEPBase { ...@@ -365,6 +384,7 @@ public class THPSC001 extends DaoEPBase {
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime"))); map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode"))); map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
map.put("remark",StringUtils.toString(remark, eiMetadata.getMeta("remark"))); map.put("remark",StringUtils.toString(remark, eiMetadata.getMeta("remark")));
map.put("materialStatus",StringUtils.toString(materialStatus, eiMetadata.getMeta("materialStatus")));
return map; return map;
......
...@@ -8,10 +8,6 @@ import com.baosight.iplat4j.core.util.NumberUtils; ...@@ -8,10 +8,6 @@ import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.util.DateUtils;
import java.sql.Timestamp;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
...@@ -24,7 +20,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -24,7 +20,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* THpsc002 * THpsc002
* *
*/ */
public class THPSC002 extends DaoEPBase { public class HPSC002 extends DaoEPBase {
private Long id = 0L; private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
...@@ -37,6 +33,7 @@ public class THPSC002 extends DaoEPBase { ...@@ -37,6 +33,7 @@ public class THPSC002 extends DaoEPBase {
private String leaf = "1"; /* 是否有叶子节点*/ private String leaf = "1"; /* 是否有叶子节点*/
private String sort = " "; /* 排序字段*/ private String sort = " "; /* 排序字段*/
private String icon = " "; /* 图片地址*/ private String icon = " "; /* 图片地址*/
private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/ private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/ private String prdtName = " "; /* 产品名称*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/ private BigDecimal num = new BigDecimal(0.000); /* 数量*/
...@@ -106,6 +103,10 @@ public class THPSC002 extends DaoEPBase { ...@@ -106,6 +103,10 @@ public class THPSC002 extends DaoEPBase {
eiColumn.setDescName("图片地址"); eiColumn.setDescName("图片地址");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtType");
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtCode"); eiColumn = new EiColumn("prdtCode");
eiColumn.setDescName("产品编码"); eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -186,7 +187,7 @@ public class THPSC002 extends DaoEPBase { ...@@ -186,7 +187,7 @@ public class THPSC002 extends DaoEPBase {
/** /**
* the constructor * the constructor
*/ */
public THPSC002() { public HPSC002() {
initMetaData(); initMetaData();
} }
...@@ -356,6 +357,21 @@ public class THPSC002 extends DaoEPBase { ...@@ -356,6 +357,21 @@ public class THPSC002 extends DaoEPBase {
} }
/** /**
* get the prdtType - 产品类型
* @return the prdtType
*/
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtType - 产品类型
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
/**
* get the prdtCode - 产品编码 * get the prdtCode - 产品编码
* @return the prdtCode * @return the prdtCode
*/ */
...@@ -626,6 +642,7 @@ public class THPSC002 extends DaoEPBase { ...@@ -626,6 +642,7 @@ public class THPSC002 extends DaoEPBase {
setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("leaf")), leaf)); setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("leaf")), leaf));
setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("sort")), sort)); setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("sort")), sort));
setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("icon")), icon)); setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("icon")), icon));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get("prdtType")), prdtType));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtCode")), prdtCode)); setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtCode")), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtName")), prdtName)); setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtName")), prdtName));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("num")), num)); setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("num")), num));
...@@ -662,6 +679,7 @@ public class THPSC002 extends DaoEPBase { ...@@ -662,6 +679,7 @@ public class THPSC002 extends DaoEPBase {
map.put("leaf", StringUtils.toString(leaf, eiMetadata.getMeta("leaf"))); map.put("leaf", StringUtils.toString(leaf, eiMetadata.getMeta("leaf")));
map.put("sort", StringUtils.toString(sort, eiMetadata.getMeta("sort"))); map.put("sort", StringUtils.toString(sort, eiMetadata.getMeta("sort")));
map.put("icon", StringUtils.toString(icon, eiMetadata.getMeta("icon"))); map.put("icon", StringUtils.toString(icon, eiMetadata.getMeta("icon")));
map.put("prdtType", StringUtils.toString(prdtType, eiMetadata.getMeta("prdtType")));
map.put("prdtCode", StringUtils.toString(prdtCode, eiMetadata.getMeta("prdtCode"))); map.put("prdtCode", StringUtils.toString(prdtCode, eiMetadata.getMeta("prdtCode")));
map.put("prdtName", StringUtils.toString(prdtName, eiMetadata.getMeta("prdtName"))); map.put("prdtName", StringUtils.toString(prdtName, eiMetadata.getMeta("prdtName")));
map.put("num", StringUtils.toString(num, eiMetadata.getMeta("num"))); map.put("num", StringUtils.toString(num, eiMetadata.getMeta("num")));
......
...@@ -27,6 +27,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -27,6 +27,7 @@ public class HPSC003 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_PLAN_INFO_NO = "planInfoNo"; /* 生产计划单号*/ public static final String FIELD_PLAN_INFO_NO = "planInfoNo"; /* 生产计划单号*/
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"; /* 计划完成日期*/
...@@ -45,6 +46,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -45,6 +46,7 @@ public class HPSC003 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_PLAN_INFO_NO = "PLAN_INFO_NO"; /* 生产计划单号*/ public static final String COL_PLAN_INFO_NO = "PLAN_INFO_NO"; /* 生产计划单号*/
public static final String COL_PRDT_TYPE = "PROJ_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"; /* 计划完成日期*/
...@@ -68,6 +70,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -68,6 +70,7 @@ public class HPSC003 extends DaoEPBase {
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String planInfoNo = " "; /* 生产计划单号*/ private String planInfoNo = " "; /* 生产计划单号*/
private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/ private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/ private String prdtName = " "; /* 产品名称*/
private String planCompletionDate = " "; /* 计划完成日期*/ private String planCompletionDate = " "; /* 计划完成日期*/
...@@ -112,6 +115,10 @@ public class HPSC003 extends DaoEPBase { ...@@ -112,6 +115,10 @@ public class HPSC003 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);
...@@ -259,6 +266,18 @@ public class HPSC003 extends DaoEPBase { ...@@ -259,6 +266,18 @@ public class HPSC003 extends DaoEPBase {
public void setPlanInfoNo(String planInfoNo) { public void setPlanInfoNo(String planInfoNo) {
this.planInfoNo = planInfoNo; this.planInfoNo = planInfoNo;
} }
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
/** /**
* get the prdtCode - 产品编码. * get the prdtCode - 产品编码.
* @return the prdtCode * @return the prdtCode
...@@ -433,6 +452,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -433,6 +452,7 @@ public class HPSC003 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));
setPlanInfoNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_INFO_NO)), planInfoNo)); setPlanInfoNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_INFO_NO)), planInfoNo));
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));
...@@ -461,6 +481,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -461,6 +481,7 @@ public class HPSC003 extends DaoEPBase {
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_PLAN_INFO_NO, StringUtils.toString(planInfoNo, eiMetadata.getMeta(FIELD_PLAN_INFO_NO))); map.put(FIELD_PLAN_INFO_NO, StringUtils.toString(planInfoNo, eiMetadata.getMeta(FIELD_PLAN_INFO_NO)));
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_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
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)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
......
...@@ -34,6 +34,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -34,6 +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_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"; /* 数量*/
...@@ -61,6 +62,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -61,6 +62,7 @@ public class HPSC004 extends DaoEPBase {
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/ public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/
public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目编码*/
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_PARENT_PRDT_CODE = "PARENT_PRDT_CODE"; /* 父节点-产品编码*/ public static final String COL_PARENT_PRDT_CODE = "PARENT_PRDT_CODE"; /* 父节点-产品编码*/
...@@ -69,6 +71,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -69,6 +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_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"; /* 数量*/
...@@ -110,6 +113,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -110,6 +113,7 @@ public class HPSC004 extends DaoEPBase {
private String leaf = "1"; /* 是否有叶子节点*/ private String leaf = "1"; /* 是否有叶子节点*/
private String sort = " "; /* 排序字段*/ private String sort = " "; /* 排序字段*/
private String icon = " "; /* 图片地址*/ private String icon = " "; /* 图片地址*/
private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/ private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/ private String prdtName = " "; /* 产品名称*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/ private BigDecimal num = new BigDecimal(0.000); /* 数量*/
...@@ -185,6 +189,10 @@ public class HPSC004 extends DaoEPBase { ...@@ -185,6 +189,10 @@ public class HPSC004 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);
...@@ -476,6 +484,22 @@ public class HPSC004 extends DaoEPBase { ...@@ -476,6 +484,22 @@ public class HPSC004 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;
} }
...@@ -859,6 +883,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -859,6 +883,7 @@ public class HPSC004 extends DaoEPBase {
setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEAF)), leaf)); setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEAF)), leaf));
setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SORT)), sort)); setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SORT)), sort));
setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ICON)), icon)); setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ICON)), icon));
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));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num)); setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num));
...@@ -902,6 +927,7 @@ public class HPSC004 extends DaoEPBase { ...@@ -902,6 +927,7 @@ public class HPSC004 extends DaoEPBase {
map.put(FIELD_LEAF, StringUtils.toString(leaf, eiMetadata.getMeta(FIELD_LEAF))); map.put(FIELD_LEAF, StringUtils.toString(leaf, eiMetadata.getMeta(FIELD_LEAF)));
map.put(FIELD_SORT, StringUtils.toString(sort, eiMetadata.getMeta(FIELD_SORT))); map.put(FIELD_SORT, StringUtils.toString(sort, eiMetadata.getMeta(FIELD_SORT)));
map.put(FIELD_ICON, StringUtils.toString(icon, eiMetadata.getMeta(FIELD_ICON))); map.put(FIELD_ICON, StringUtils.toString(icon, eiMetadata.getMeta(FIELD_ICON)));
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_NUM, StringUtils.toString(num, eiMetadata.getMeta(FIELD_NUM))); map.put(FIELD_NUM, StringUtils.toString(num, eiMetadata.getMeta(FIELD_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; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.THPSC002;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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;
import com.baosight.iplat4j.core.exception.PlatException; 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.service.soa.XLocalManager; import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.THPSC001;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
...@@ -27,9 +27,13 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -27,9 +27,13 @@ public class ServiceHPSC001 extends ServiceBase {
* 画面初始化. * 画面初始化.
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
THPSC001 hpsc001 = new THPSC001(); try {
EiInfo outInfo = super.initLoad(inInfo, hpsc001); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hpsc001.eiMetadata); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -40,7 +44,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -40,7 +44,7 @@ public class ServiceHPSC001 extends ServiceBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new THPSC001()); EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
return outInfo; return outInfo;
} }
...@@ -51,7 +55,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -51,7 +55,7 @@ public class ServiceHPSC001 extends ServiceBase {
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
THPSC001 hpsc001 = new THPSC001(); HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
...@@ -79,7 +83,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -79,7 +83,7 @@ public class ServiceHPSC001 extends ServiceBase {
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
THPSC001 hpsc001 = new THPSC001(); HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
...@@ -102,7 +106,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -102,7 +106,7 @@ public class ServiceHPSC001 extends ServiceBase {
* 删除操作. * 删除操作.
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
THPSC001 hpsc001 = new THPSC001(); HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
...@@ -129,7 +133,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -129,7 +133,7 @@ public class ServiceHPSC001 extends ServiceBase {
* 审核 反审. * 审核 反审.
*/ */
public EiInfo check(EiInfo eiInfo) { public EiInfo check(EiInfo eiInfo) {
THPSC001 hpsc001 = new THPSC001(); HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
...@@ -158,7 +162,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -158,7 +162,7 @@ public class ServiceHPSC001 extends ServiceBase {
public void buildHPSC002(EiInfo eiInfo) { public void buildHPSC002(EiInfo eiInfo) {
THPSC001 hpsc001 = new THPSC001(); HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
List rows = new ArrayList(); List rows = new ArrayList();
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC002;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
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.ed.util.SequenceGenerator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPSC002A 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 HPSC002A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSC002A.QUERY, new HPSC002A());
} 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++) {
HPSC002A fSc002A = new HPSC002A();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.insert(HPSC002A.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++) {
HPSC002A fSc002A = new HPSC002A();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.update(HPSC002A.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;
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());
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.hp.sc.domain.THPSC001; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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;
import com.baosight.iplat4j.core.exception.PlatException; 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.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
/** /**
...@@ -22,9 +21,13 @@ public class ServiceHPSC011 extends ServiceBase { ...@@ -22,9 +21,13 @@ public class ServiceHPSC011 extends ServiceBase {
* 画面初始化. * 画面初始化.
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
THPSC001 hpsc001 = new THPSC001(); try {
EiInfo outInfo = super.initLoad(inInfo, hpsc001); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hpsc001.eiMetadata); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -36,7 +39,7 @@ public class ServiceHPSC011 extends ServiceBase { ...@@ -36,7 +39,7 @@ public class ServiceHPSC011 extends ServiceBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
inInfo.setCell(EiConstant.queryBlock, 0, "status", 1); inInfo.setCell(EiConstant.queryBlock, 0, "status", 1);
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new THPSC001()); EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
return outInfo; return outInfo;
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<sqlMap namespace="HPSC001"> <sqlMap namespace="HPSC001">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC001"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC001">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1 FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -43,12 +44,24 @@ ...@@ -43,12 +44,24 @@
<isNotEmpty prepend=" AND " property="projType"> <isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType# PROJ_TYPE = #projType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%') PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isEmpty property="orderBy"> <isEmpty property="orderBy">
CREATED_TIME desc CREATED_TIME desc
...@@ -63,6 +76,27 @@ ...@@ -63,6 +76,27 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
</select> </select>
<!-- <!--
...@@ -116,13 +150,14 @@ ...@@ -116,13 +150,14 @@
PRINC1, <!-- 本公司项目负责人 --> PRINC1, <!-- 本公司项目负责人 -->
PRINC2, <!-- 客户项目负责人 --> PRINC2, <!-- 客户项目负责人 -->
STATUS, <!-- 状态 0-未审核,1-已审核 --> STATUS, <!-- 状态 0-未审核,1-已审核 -->
MATERIAL_STATUS,
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 --> UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 --> DEP_CODE <!-- 部门编码 -->
) )
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#) VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, 0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -139,7 +174,8 @@ ...@@ -139,7 +174,8 @@
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PRINC1 = #princ1#, <!-- 本公司项目负责人 --> PRINC1 = #princ1#, <!-- 本公司项目负责人 -->
PRINC2 = #princ2#, <!-- 客户项目负责人 --> PRINC2 = #princ2#, <!-- 客户项目负责人 -->
STATUS = #status#, <!-- 状态 0-未审核,1-已审核 --> STATUS = #status#, <!-- 状态 0-未审核,1-已审核 -->
MATERIAL_STATUS = #materialStatus#,
CREATED_BY = #createdBy#, <!-- 创建人 --> CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
...@@ -168,9 +204,13 @@ ...@@ -168,9 +204,13 @@
UPDATE hpjx.t_hpsc001 SET status = #status# WHERE ID = #id# UPDATE hpjx.t_hpsc001 SET status = #status# WHERE ID = #id#
</update> </update>
<update id="checkByProjCode">
UPDATE hpjx.t_hpsc001 SET MATERIAL_STATUS = #materialStatus# WHERE PROJ_CODE = #projCode#
</update>
<select id="queryDomainById" parameterClass="java.util.HashMap" <select id="queryDomainById" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC001"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC001">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<sqlMap namespace="HPSC002"> <sqlMap namespace="HPSC002">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC002"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 --> SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 --> ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 --> NUM as "num", <!-- 数量 -->
...@@ -68,12 +69,19 @@ ...@@ -68,12 +69,19 @@
REMARK as "remark" <!-- 备注 --> REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE 1=1 FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_PRDT_CODE NOT IN ('root') AND PARENT_PRDT_CODE NOT IN ('root')
AND DEL_STATUS = 1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentPrdtCode">
PARENT_PRDT_CODE = #parentPrdtCode# PARENT_PRDT_CODE = #parentPrdtCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$#prdtName#$%') PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty> </isNotEmpty>
...@@ -93,12 +101,29 @@ ...@@ -93,12 +101,29 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_PRDT_CODE NOT IN ('root')
AND DEL_STATUS = 1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode"> <isNotEmpty prepend=" AND " property="parentPrdtCode">
PARENT_PRDT_CODE = #parentPrdtCode# PARENT_PRDT_CODE = #parentPrdtCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</select> </select>
<!-- <!--
...@@ -200,6 +225,7 @@ ...@@ -200,6 +225,7 @@
LEAF, <!-- 是否有叶子节点 --> LEAF, <!-- 是否有叶子节点 -->
SORT, <!-- 排序字段 --> SORT, <!-- 排序字段 -->
ICON, <!-- 图片地址 --> ICON, <!-- 图片地址 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
NUM, <!-- 数量 --> NUM, <!-- 数量 -->
...@@ -218,7 +244,7 @@ ...@@ -218,7 +244,7 @@
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
REMARK <!-- 备注 --> REMARK <!-- 备注 -->
) )
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#) VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -239,7 +265,8 @@ ...@@ -239,7 +265,8 @@
LEAF = #leaf#, <!-- 是否有叶子节点 --> LEAF = #leaf#, <!-- 是否有叶子节点 -->
SORT = #sort#, <!-- 排序字段 --> SORT = #sort#, <!-- 排序字段 -->
ICON = #icon#, <!-- 图片地址 --> ICON = #icon#, <!-- 图片地址 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_TYPE = #prdtType#,
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
NUM = #num#, <!-- 数量 --> NUM = #num#, <!-- 数量 -->
UNIT_WT = #unitWt#, <!-- 单重 --> UNIT_WT = #unitWt#, <!-- 单重 -->
...@@ -264,6 +291,7 @@ ...@@ -264,6 +291,7 @@
<select id="queryTree" resultClass="java.util.HashMap"> <select id="queryTree" resultClass="java.util.HashMap">
SELECT SELECT
ID as "nodeId", ID as "nodeId",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 项目编码 --> PRDT_CODE as "prdtCode", <!-- 项目编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PRDT_name as "prdtName", <!-- 项目编码 --> PRDT_name as "prdtName", <!-- 项目编码 -->
...@@ -301,6 +329,43 @@ ...@@ -301,6 +329,43 @@
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 --> SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 --> ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE PARENT_PRDT_CODE = #id#
</select>
<select id="queryEntityByParentPrtdCode" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_PRDT_CODE as "parentPrdtCode", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 --> NUM as "num", <!-- 数量 -->
...@@ -334,6 +399,25 @@ ...@@ -334,6 +399,25 @@
</update> </update>
<select id="checkExamineNum1" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002
WHERE 1 = 1
AND PARENT_PRDT_CODE != 'root'
AND `STATUS` = 0
<isNotEmpty prepend=" AND " property="parentPrdtCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="checkExamineNum1Count" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002
WHERE 1 = 1
AND PARENT_PRDT_CODE != 'root'
<isNotEmpty prepend=" AND " property="parentPrdtCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="checkExamineNum" resultClass="int"> <select id="checkExamineNum" resultClass="int">
SELECT COUNT(1) FROM hpjx.t_hpsc002 SELECT COUNT(1) FROM hpjx.t_hpsc002
WHERE LEAF = '1' WHERE LEAF = '1'
......
<?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="HPSC002A">
<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(#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">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC002A 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_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC002A (
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_HPSC002A WHERE ID = #id#
</delete>
</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">
<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>
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
<isNotEmpty prepend=" AND " property="planInfoNo"> <isNotEmpty prepend=" AND " property="planInfoNo">
PLAN_INFO_NO = #planInfoNo# PLAN_INFO_NO = #planInfoNo#
</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>
...@@ -83,6 +86,7 @@ ...@@ -83,6 +86,7 @@
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 --> PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 -->
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", <!-- 计划完成日期 -->
...@@ -174,6 +178,7 @@ ...@@ -174,6 +178,7 @@
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PLAN_INFO_NO, <!-- 生产计划单号 --> PLAN_INFO_NO, <!-- 生产计划单号 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
PLAN_COMPLETION_DATE, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
...@@ -185,7 +190,7 @@ ...@@ -185,7 +190,7 @@
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
REMARK <!-- 备注 --> REMARK <!-- 备注 -->
) )
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#) VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -201,6 +206,7 @@ ...@@ -201,6 +206,7 @@
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目编码 --> PROJ_NAME = #projName#, <!-- 项目编码 -->
PLAN_INFO_NO = #planInfoNo#, <!-- 生产计划单号 --> PLAN_INFO_NO = #planInfoNo#, <!-- 生产计划单号 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
......
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
<isNotEmpty prepend=" AND " property="icon"> <isNotEmpty prepend=" AND " property="icon">
ICON = #icon# ICON = #icon#
</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>
...@@ -159,6 +162,7 @@ ...@@ -159,6 +162,7 @@
LEAF as "leaf", <!-- 是否有叶子节点 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 --> SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 --> ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 --> NUM as "num", <!-- 数量 -->
...@@ -313,6 +317,7 @@ ...@@ -313,6 +317,7 @@
LEAF, <!-- 是否有叶子节点 --> LEAF, <!-- 是否有叶子节点 -->
SORT, <!-- 排序字段 --> SORT, <!-- 排序字段 -->
ICON, <!-- 图片地址 --> ICON, <!-- 图片地址 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
NUM, <!-- 数量 --> NUM, <!-- 数量 -->
...@@ -336,7 +341,7 @@ ...@@ -336,7 +341,7 @@
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
REMARK <!-- 备注 --> REMARK <!-- 备注 -->
) )
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#) VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -357,6 +362,7 @@ ...@@ -357,6 +362,7 @@
LEAF = #leaf#, <!-- 是否有叶子节点 --> LEAF = #leaf#, <!-- 是否有叶子节点 -->
SORT = #sort#, <!-- 排序字段 --> SORT = #sort#, <!-- 排序字段 -->
ICON = #icon#, <!-- 图片地址 --> ICON = #icon#, <!-- 图片地址 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
NUM = #num#, <!-- 数量 --> NUM = #num#, <!-- 数量 -->
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO like CONCAT('%', #productionOrderNo#, '%') PRODUCTION_ORDER_NO like CONCAT('%', #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#, <!-- 计划完成日期 -->
......
...@@ -21,21 +21,22 @@ ...@@ -21,21 +21,22 @@
<sqlMap namespace="HPSC001"> <sqlMap namespace="HPSC001">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC001"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC001">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 --> PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PRINC1 as "princ1", <!-- 本公司项目负责人 --> PRINC1 as "princ1", <!-- 本公司项目负责人 -->
PRINC2 as "princ2", <!-- 客户项目负责人 --> PRINC2 as "princ2", <!-- 客户项目负责人 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 --> STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1 FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -43,12 +44,24 @@ ...@@ -43,12 +44,24 @@
<isNotEmpty prepend=" AND " property="projType"> <isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType# PROJ_TYPE = #projType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%') PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isEmpty property="orderBy"> <isEmpty property="orderBy">
CREATED_TIME desc CREATED_TIME desc
...@@ -63,6 +76,27 @@ ...@@ -63,6 +76,27 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
</select> </select>
<!-- <!--
......
...@@ -4,13 +4,12 @@ import com.baosight.hpjx.common.DdynamicEnum; ...@@ -4,13 +4,12 @@ import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC008; import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.hpjx.hp.sc.domain.THPSC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.zl.domain.HPZL001; import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
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;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
...@@ -73,7 +72,7 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -73,7 +72,7 @@ public class ServiceHPZL001 extends ServiceBase {
// 项目名称 // 项目名称
Map params1 = new HashMap<>(); Map params1 = new HashMap<>();
params1.put("itemCode", fZl001.getItemCode()); params1.put("itemCode", fZl001.getItemCode());
List<THPSC001> query1 = dao.query("HPSC001.query", params1); List<HPSC001> query1 = dao.query("HPSC001.query", params1);
fZl001.setItemName(query1.get(0).getProjName()); fZl001.setItemName(query1.get(0).getProjName());
// 生成单据号 // 生成单据号
fZl001.setChkBillno(SequenceGenerator.getNextSequence( fZl001.setChkBillno(SequenceGenerator.getNextSequence(
...@@ -106,7 +105,7 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -106,7 +105,7 @@ public class ServiceHPZL001 extends ServiceBase {
// 项目名称 // 项目名称
Map params1 = new HashMap<>(); Map params1 = new HashMap<>();
params1.put("itemCode", fZl001.getItemCode()); params1.put("itemCode", fZl001.getItemCode());
List<THPSC001> query1 = dao.query("HPSC001.query", params1); List<HPSC001> query1 = dao.query("HPSC001.query", params1);
fZl001.setItemName(query1.get(0).getProjName()); fZl001.setItemName(query1.get(0).getProjName());
DaoUtils.update("HPZL001.update", fZl001); DaoUtils.update("HPZL001.update", fZl001);
} }
......
...@@ -25,7 +25,7 @@ public class LogUtils { ...@@ -25,7 +25,7 @@ public class LogUtils {
* @param title 标题 * @param title 标题
* @return * @return
*/ */
public static void setDetailMsg(EiInfo inInfo, Exception e, String title) { public static void setDetailMsg(EiInfo inInfo, Throwable e, String title) {
title = StringUtils.isEmpty(title) ? "服务异常" : title; title = StringUtils.isEmpty(title) ? "服务异常" : title;
// 打印日志 // 打印日志
print(e, title); print(e, title);
...@@ -58,7 +58,7 @@ public class LogUtils { ...@@ -58,7 +58,7 @@ public class LogUtils {
* @param title 标题 * @param title 标题
* @return * @return
*/ */
public static void setMsg(EiInfo inInfo, Exception e, String title) { public static void setMsg(EiInfo inInfo, Throwable e, String title) {
title = StringUtils.isEmpty(title) ? "服务异常" : title; title = StringUtils.isEmpty(title) ? "服务异常" : title;
// 打印日志 // 打印日志
print(e, title); print(e, title);
...@@ -86,7 +86,7 @@ public class LogUtils { ...@@ -86,7 +86,7 @@ public class LogUtils {
* @param e 异常堆栈 * @param e 异常堆栈
* @param title 标题 * @param title 标题
*/ */
private static void print(Exception e, String title) { private static void print(Throwable e, String title) {
if (e != null) { if (e != null) {
logger.error(title.concat(":{}"), e.getMessage(), e); logger.error(title.concat(":{}"), e.getMessage(), e);
} }
......
...@@ -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']"/>
......
...@@ -29,6 +29,14 @@ ...@@ -29,6 +29,14 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<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>
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -58,7 +66,7 @@ ...@@ -58,7 +66,7 @@
align="right" sumType="all" readonly="true"/> align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" readonly="true"/> <EF:EFColumn ename="remark" cname="备注" width="150" readonly="true"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid> </EF:EFGrid>
<p class="text-info"><span style='color: red;'>注:差异数量=实物数量-账面数量;差异重量=实物重量-账面重量 </span></p> <p class="text-info"><span style='color: red;'>注:差异数量=实物数量-账面数量;差异重量=实物重量-账面重量 </span></p>
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
<EF:EFPage title="库存查询"> <EF:EFPage title="库存查询">
<EF:EFRegion id="inqu" title="查询区域" type="query"> <EF:EFRegion id="inqu" title="查询区域" type="query">
<div class="row"> <div class="row">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-receiptDate" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains"> <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
...@@ -22,8 +20,6 @@ ...@@ -22,8 +20,6 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains"> <EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
......
...@@ -29,6 +29,16 @@ ...@@ -29,6 +29,16 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<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>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -50,8 +60,8 @@ ...@@ -50,8 +60,8 @@
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="100" align="right" <EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="100" align="right"
sumType="all" required="true" readonly="true"/> sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255" readonly="true"/> <EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255" readonly="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -29,6 +29,16 @@ ...@@ -29,6 +29,16 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<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>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -59,7 +69,7 @@ ...@@ -59,7 +69,7 @@
align="right" sumType="all" required="true"/> align="right" sumType="all" required="true"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
<EF:EFPage title="库存查询"> <EF:EFPage title="库存查询">
<EF:EFRegion id="inqu" title="查询区域" type="query"> <EF:EFRegion id="inqu" title="查询区域" type="query">
<div class="row"> <div class="row">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-receiptDate" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains"> <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2', '5')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2', '5')"/>
...@@ -22,8 +20,6 @@ ...@@ -22,8 +20,6 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains"> <EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
......
...@@ -34,37 +34,65 @@ ...@@ -34,37 +34,65 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override"> <EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn cname="库存类型" ename="kcType" enable="false" width="80" align="center"> <EF:EFColumn ename="dateProc" cname="日期" enable="false" width="90" align="center"/>
<EF:EFCodeOption codeName="hpjx.hpkc.kcType"/> <EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="90" align="center">
</EF:EFComboColumn>
<EF:EFColumn cname="日期" ename="dateProc" enable="false" width="90" align="center"/>
<EF:EFComboColumn cname="存货类型" ename="inventType" enable="false" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn cname="仓库名称" ename="whCode" enable="false" width="100" align="center" <EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="100" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField" blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn cname="存货名称" ename="inventCode" enable="false" width="100" align="center" <EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="100" align="center"
blockName="invent_name_block_id" textField="textField" valueField="valueField" blockName="invent_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn cname="规格" ename="spec" enable="false" width="120"/> <EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="120" align="center"
<EF:EFColumn cname="期初数量" ename="initAmount" enable="false" width="90" align="right" format="{0:N3}" blockName="invent_spec_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="initAmount" cname="期初数量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="initWeight" cname="期初重量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterAmount" cname="采购入库数量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterWeight" cname="采购入库重量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scEnterAmount" cname="生产入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scEnterWeight" cname="生产入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterAmount" cname="其它入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterWeight" cname="其它入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterAmount" cname="入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterWeight" cname="入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterAmount" cname="生产领料数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterWeight" cname="生产领料重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="xsOuterAmount" cname="销售出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="xsOuterWeight" cname="销售出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtOuterAmount" cname="其它出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="期初重量" ename="initWeight" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="qtOuterWeight" cname="其它出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="入库数量" ename="stockinAmount" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="outerAmount" cname="出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="入库重量" ename="stockinWeight" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="outerWeight" cname="出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="出库数量" ename="stockoutAmount" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="pdDiffAmount" cname="盘点差异数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="出库重量" ename="stockoutWeight" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="pdDiffWeight" cname="盘点差异重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="期末数量" ename="endAmount" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="endAmount" cname="期末数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="期末重量" ename="endWeight" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="endWeight" cname="期末重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -36,11 +36,10 @@ ...@@ -36,11 +36,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="生产组"/>
......
...@@ -20,10 +20,11 @@ $(function () { ...@@ -20,10 +20,11 @@ $(function () {
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >审核</a>'; 'onclick="check(' + item.id + ',1)" >审核</a>';
} else {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >反审</a>';
} }
// else if (auditStatus == 1) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
// 'onclick="check(' + item.id + ',0)" >反审</a>';
// }
return template; return template;
} }
} }
......
...@@ -17,11 +17,20 @@ ...@@ -17,11 +17,20 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/> <EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/> <EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFSelect cname="单据状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0"> <EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect cname="单据状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未审核" value="0"/> <EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/> <EF:EFOption label="已审核" value="1"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="项目负责人" ename="inqu_status-0-princ1" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="客户负责人" ename="inqu_status-0-princ2" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%> <%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
...@@ -30,18 +39,26 @@ ...@@ -30,18 +39,26 @@
<EF:EFGrid blockId="result" autoDraw="no"> <EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true" <EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/> <EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="projCode" enable="false" cname="项目编码"/> <EF:EFColumn ename="projCode" enable="false" cname="项目编码" readonly="true"/>
<EF:EFColumn required="true" ename="projName" cname="项目名称"/> <EF:EFColumn required="true" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFColumn required="true" ename="princ1" cname="本公司项目负责人"/> <EF:EFComboColumn ename="princ1" cname="本公司项目负责人" width="120" align="center" required="true"
<EF:EFColumn required="true" ename="princ2" cname="客户项目负责人"/> blockName="user_block_id" textField="textField" valueField="valueField"
<EF:EFComboColumn required="true" align="center" ename="status" cname="状态" defaultValue="0"> columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ2" cname="客户项目负责人" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态" readonly="true">
<EF:EFOption label="未审核" value="0"/> <EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/> <EF:EFOption label="已审核" value="1"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注"/> <EF:EFColumn ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
let inventNameGlobalData = [];
// 传递参数 将附件ID与当前记录ID进行绑定 // 传递参数 将附件ID与当前记录ID进行绑定
let rowId = ''; let rowId = '';
let parentPrdtCode = ''; let parentPrdtCode = '';
...@@ -45,15 +46,14 @@ $(function () { ...@@ -45,15 +46,14 @@ $(function () {
IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName; IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName;
// 重新查询EFGrid // 重新查询EFGrid
parentPrdtCode = nodeData.nodeId; parentPrdtCode = nodeData.nodeId;
resultGrid.dataSource.page(1); query();
}, },
selectTreeNode: {} selectTreeNode: {}
} }
}; };
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
query();
resultGrid.dataSource.page(1);
}); });
...@@ -80,10 +80,11 @@ $(function () { ...@@ -80,10 +80,11 @@ $(function () {
}, },
query: function () { query: function () {
var ei = new EiInfo(); var ei = new EiInfo();
ei.set("inqu_status-0-projName",$("#inqu_status-0-projName").val()); ei.set("inqu_status-0-prdtType",$("#inqu_status-0-prdtType").val());
ei.set("inqu_status-0-prdtName",$("#inqu_status-0-prdtName").val()); ei.set("inqu_status-0-prdtCode",$("#inqu_status-0-prdtCode").val());
ei.set("inqu_status-0-status",$("#inqu_status-0-status").val()); ei.set("inqu_status-0-status",$("#inqu_status-0-status").val());
ei.set("inqu_status-0-parentPrdtCode",parentPrdtCode); ei.set("inqu_status-0-parentPrdtCode",parentPrdtCode? parentPrdtCode : strs[1]);
return ei; return ei;
}, },
/** /**
...@@ -108,7 +109,7 @@ $(function () { ...@@ -108,7 +109,7 @@ $(function () {
* e.preventDefault 阻止事件发生 * e.preventDefault 阻止事件发生
*/ */
beforeAdd: function (e) { beforeAdd: function (e) {
var logic = Object.keys(IPLATUI.EFTree.materialTree.selectTreeNode).length === 0; var logic = IPLATUI.EFTree.materialTree.selectTreeNode.nodeId ? false : true;
if (logic) { // 通过业务逻辑判断, 控制是否进行新增 if (logic) { // 通过业务逻辑判断, 控制是否进行新增
IPLAT.alert({ IPLAT.alert({
message: '<b>请选择项目列表</b>', message: '<b>请选择项目列表</b>',
...@@ -181,18 +182,14 @@ $(function () { ...@@ -181,18 +182,14 @@ $(function () {
template: function (item) { template: function (item) {
console.log(item) console.log(item)
let auditStatus = item.status; let auditStatus = item.status;
let filePath1 = item.filePath1;
let leaf = item.leaf let leaf = item.leaf
let template = ''; let template = '';
if (filePath1 === ' ') { // 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="openUploadFile(' + item.id + ',1)" >附件上传</a>';
'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>'; template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
} else { + 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + if (leaf === '1') {
'href="'+ctx+'/EU/DM/EUDM06.jsp?docId=' + filePath1 + '" >下载</a>'; if (auditStatus == 0) {
}
if (leaf === '1') {
if (auditStatus == 0) {
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="check(' + item.id + ',1)" >审核</a>'; 'onclick="check(' + item.id + ',1)" >审核</a>';
} else { } else {
...@@ -202,6 +199,42 @@ $(function () { ...@@ -202,6 +199,42 @@ $(function () {
} }
return template; return template;
} }
},{
field: "prdtCode",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['prdtCode']) {
return inventNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var cellIndex = grid.cellIndex(container);
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
let eiInfo = new EiInfo();
eiInfo.set("inventType", options.model["prdtType"]);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
inventNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#"
});
}
} }
], ],
}, },
...@@ -214,12 +247,15 @@ $(function () { ...@@ -214,12 +247,15 @@ $(function () {
let $iframe = uploadFileWindow.element.children("iframe"); let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象 let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val(); let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", rowId); inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-filePath1", uploadFile); inEiInfo.set("result-0-filePath1", uploadFile);
EiCommunicator.send('HPSC002', 'bindDocIdById', inEiInfo, { EiCommunicator.send('HPSC002', 'bindDocIdById', inEiInfo, {
onSuccess(response) { onSuccess(response) {
resultGrid.dataSource.page(1); query();
}, },
onFail(errorMessage, status, e) { onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error"); NotificationUtil("执行失败!", "error");
...@@ -232,13 +268,68 @@ $(function () { ...@@ -232,13 +268,68 @@ $(function () {
}, },
} }
}; };
//产品类型下拉联动
$('input[name="inqu_status-0-prdtType"]').change(function () {
var inInfo=new EiInfo();
var prdtType=$("#inqu_status-0-prdtType").val();
inInfo.set("inventType",prdtType);
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
var input=$("#inqu_status-0-prdtCode");
dataEdition=ei.getBlock("invent_name_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataEdition,
template: "#=textField#"
});
}, onFail: function (ei) {
}
}, {async: false});
});
});
$(window).load(function () {
// 存货名称
let inInfo = new EiInfo();
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查
query();
}); });
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function openUploadFile(id) { function openUploadFile(id) {
uploadFileWindow.open().center(); uploadFileWindow.open().center();
rowId = id; rowId = id;
} }
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002A?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
function check(id, auditStatus) { function check(id, auditStatus) {
const inEiInfo = new EiInfo(); const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id); inEiInfo.set("result-0-id", id);
...@@ -246,7 +337,7 @@ function check(id, auditStatus) { ...@@ -246,7 +337,7 @@ function check(id, auditStatus) {
EiCommunicator.send('HPSC002', 'check', inEiInfo, { EiCommunicator.send('HPSC002', 'check', inEiInfo, {
onSuccess(response) { onSuccess(response) {
NotificationUtil(response.msg); NotificationUtil(response.msg);
resultGrid.dataSource.page(1); query();
}, },
onFail(errorMessage, status, e) { onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error"); NotificationUtil("执行失败!", "error");
...@@ -256,4 +347,4 @@ function check(id, auditStatus) { ...@@ -256,4 +347,4 @@ function check(id, auditStatus) {
async: false async: false
} }
); );
} }
\ No newline at end of file
...@@ -10,14 +10,21 @@ ...@@ -10,14 +10,21 @@
<EF:EFPage title="物料清单"> <EF:EFPage title="物料清单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="projName" cname="项目名称" blockId="inqu_status" row="0"/> <EF:EFSelect ename="inqu_status-0-prdtType" cname="产品类型" colWidth="3" filter="contains"
<EF:EFInput ename="prdtName" cname="产品名称" blockId="inqu_status" row="0"/> template="#=textField#" valueTemplate="#=textField#">
<EF:EFSelect cname="状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0"> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-prdtCode" cname="产品名称" filter="contains" required="false"
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未审核" value="0"/> <EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/> <EF:EFOption label="已审核" value="1"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<EF:EFInput ename="parentPrdtCode" blockId="inqu_status" hidden="true"/>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%> <%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
<div id="splitter" class="i-fit-height" style="display: inline"> <div id="splitter" class="i-fit-height" style="display: inline">
...@@ -39,8 +46,11 @@ ...@@ -39,8 +46,11 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<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 ename="prdtCode" required="true" cname="产品编码"/> <EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center">
<EF:EFColumn ename="prdtName" required="true" cname="产品名称"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="prdtCode" required="true" cname="产品名称"/>
<%-- <EF:EFColumn ename="prdtName" required="true" cname="产品名称"/>--%>
<EF:EFColumn enable="false" ename="parentPrdtCode" hidden="true" cname="上级产品名称"/> <EF:EFColumn enable="false" ename="parentPrdtCode" hidden="true" cname="上级产品名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/> <EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/> <EF:EFColumn ename="num" required="true" cname="数量"/>
...@@ -53,13 +63,6 @@ ...@@ -53,13 +63,6 @@
<EF:EFOption label="未审核" value="0"></EF:EFOption> <EF:EFOption label="未审核" value="0"></EF:EFOption>
<EF:EFOption label="已审核" value="1"></EF:EFOption> <EF:EFOption label="已审核" value="1"></EF:EFOption>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn enable="false" ename="delStatus" align="center"
columnTemplate="#=textField#" optionLabel=" "
itemTemplate="#=textField#" textField="textField"
valueField="valueField" cname="删除标识">
<EF:EFOption label="未删除" value="1"></EF:EFOption>
<EF:EFOption label="删除" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
$(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.docId
+ '" >附件下载</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: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "70%",
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);
EiCommunicator.send('HPSC002A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
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>
</EF:EFPage>
$(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>
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
<EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true"/> <EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" readonly="true"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true"/> <EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true"/>
<EF:EFComboColumn ename="prdtType" cname="产品类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="产品编码" readonly="true"/> <EF:EFColumn enable="false" ename="prdtCode" cname="产品编码" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="产品名称" readonly="true"/> <EF:EFColumn enable="false" ename="prdtName" cname="产品名称" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
...@@ -47,6 +50,9 @@ ...@@ -47,6 +50,9 @@
<EF:EFRegion id="detail" title="明细信息"> <EF:EFRegion id="detail" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no"> <EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" required='true' cname="部件编码"/> <EF:EFColumn enable="false" ename="prdtCode" required='true' cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="部件名称"/> <EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="部件名称"/>
<EF:EFComboColumn enable="false" ename="delStatus" cname="状态"> <EF:EFComboColumn enable="false" ename="delStatus" cname="状态">
......
...@@ -25,6 +25,6 @@ $(function () { ...@@ -25,6 +25,6 @@ $(function () {
}); });
function jump(id) { function jump(id) {
var herf= ctx + "\\web\\"+ "HPSC002?id=" + id; var herf= ctx + "\\web\\"+ "HPSC002?inqu_status-0-parentPrdtCode=" + id;
window.open(herf); window.open(herf);
} }
...@@ -21,7 +21,21 @@ ...@@ -21,7 +21,21 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/> <EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/> <EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect cname="物料审核状态" optionLabel="全部" ename="inqu_status-0-materialStatus" colWidth="3">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="部分审核" value="1"/>
<EF:EFOption label="全部审核" value="2"/>
</EF:EFSelect>
<EF:EFSelect cname="项目负责人" ename="inqu_status-0-princ1" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="客户负责人" ename="inqu_status-0-princ2" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%> <%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
...@@ -37,10 +51,12 @@ ...@@ -37,10 +51,12 @@
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="princ1" cname="本公司项目负责人"/> <EF:EFColumn enable="false" ename="princ1" cname="本公司项目负责人"/>
<EF:EFColumn enable="false" ename="princ2" cname="客户项目负责人"/> <EF:EFColumn enable="false" ename="princ2" cname="客户项目负责人"/>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态"> <EF:EFComboColumn required="true" align="center" ename="materialStatus" cname="物料审核状态" defaultValue="0">
<EF:EFOption label="未审核" value="0"/> <EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/> <EF:EFOption label="部分审核" value="1"/>
<EF:EFOption label="全部审核" value="2"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn enable="false" ename="remark" cname="备注"/> <EF:EFColumn enable="false" ename="remark" cname="备注"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -7,7 +7,11 @@ $(function () { ...@@ -7,7 +7,11 @@ $(function () {
$("#fileDocId").val(e.response.docId); $("#fileDocId").val(e.response.docId);
NotificationUtil("附件上传成功"); NotificationUtil("附件上传成功");
console.log($("#fileDocId").val()) console.log($("#fileDocId").val())
try {
parent.JSColorbox.setValueCallback(e.response.docId);
} catch (e){
}
}, },
} }
}; };
}); });
\ No newline at end of file
let rowId;
$(function() { $(function() {
// 查询 // 查询
...@@ -43,30 +42,6 @@ $(function() { ...@@ -43,30 +42,6 @@ $(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-id", rowId);
inEiInfo.set("result-0-affix", uploadFile);
EiCommunicator.send('HPZL001', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
},
}
};
}); });
/** /**
...@@ -75,8 +50,29 @@ $(function() { ...@@ -75,8 +50,29 @@ $(function() {
* @param id * @param id
*/ */
function openUploadFile(id) { function openUploadFile(id) {
uploadFileWindow.open().center(); JSColorbox.open({
rowId = id; href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "70%",
callbackName: function (docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-affix", docId);
EiCommunicator.send('HPZL001', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
});
} }
/** /**
......
...@@ -60,7 +60,4 @@ ...@@ -60,7 +60,4 @@
hidden="true"/> hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</EF:EFPage> </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