Commit b2b1c9c9 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents db39ec9a e2774f72
...@@ -60,6 +60,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -60,6 +60,7 @@ public class HGCG001 extends DaoEPBase {
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/ public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String FIELD_MATERIAL_PLAN_ID = "materialPlanId"; /*材料计划id*/ public static final String FIELD_MATERIAL_PLAN_ID = "materialPlanId"; /*材料计划id*/
public static final String FIELD_SOURCE = "source"; /* 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -96,12 +97,14 @@ public class HGCG001 extends DaoEPBase { ...@@ -96,12 +97,14 @@ public class HGCG001 extends DaoEPBase {
public static final String COL_AUDIT_USER_ID = "AUDIT_USER_ID"; /* 审核人ID*/ public static final String COL_AUDIT_USER_ID = "AUDIT_USER_ID"; /* 审核人ID*/
public static final String COL_AUDIT_USER_NAME = "AUDIT_USER_NAME"; /* 审核人名称*/ public static final String COL_AUDIT_USER_NAME = "AUDIT_USER_NAME"; /* 审核人名称*/
public static final String COL_AUDIT_REASON = "AUDIT_REASON"; /* 审核原因*/ public static final String COL_AUDIT_REASON = "AUDIT_REASON"; /* 审核原因*/
public static final String COL_SOURCE = "SOURCE"; /* 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入*/
public static final String QUERY = "HGCG001.query"; public static final String QUERY = "HGCG001.query";
public static final String COUNT = "HGCG001.count"; public static final String COUNT = "HGCG001.count";
public static final String INSERT = "HGCG001.insert"; public static final String INSERT = "HGCG001.insert";
public static final String UPDATE = "HGCG001.update"; public static final String UPDATE = "HGCG001.update";
public static final String DELETE = "HGCG001.delete"; public static final String DELETE = "HGCG001.delete";
public static final String MAX_ID = "HGCG001.maxId";
private Long id = new Long(0); private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/ private String accountCode = " "; /* 企业编码*/
...@@ -140,6 +143,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -140,6 +143,7 @@ public class HGCG001 extends DaoEPBase {
private String auditReason = " "; /* 审核原因*/ private String auditReason = " "; /* 审核原因*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/ private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
private Long materialPlanId = new Long(0); /*材料计划id*/ private Long materialPlanId = new Long(0); /*材料计划id*/
private Integer source; /* 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -322,6 +326,10 @@ public class HGCG001 extends DaoEPBase { ...@@ -322,6 +326,10 @@ public class HGCG001 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_MATERIAL_PLAN_ID); eiColumn = new EiColumn(FIELD_MATERIAL_PLAN_ID);
eiColumn.setDescName("存货类型明细"); eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SOURCE);
eiColumn.setDescName("数据来源");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -908,6 +916,14 @@ public class HGCG001 extends DaoEPBase { ...@@ -908,6 +916,14 @@ public class HGCG001 extends DaoEPBase {
this.materialPlanId = materialPlanId; this.materialPlanId = materialPlanId;
} }
public Integer getSource() {
return source;
}
public void setSource(Integer source) {
this.source = source;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -953,6 +969,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -953,6 +969,7 @@ public class HGCG001 extends DaoEPBase {
setAuditReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_REASON)), auditReason)); setAuditReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_REASON)), auditReason));
setMaterialPlanId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MATERIAL_PLAN_ID)), materialPlanId)); setMaterialPlanId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MATERIAL_PLAN_ID)), materialPlanId));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail)); setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SOURCE)), source));
} }
/** /**
...@@ -999,6 +1016,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -999,6 +1016,7 @@ public class HGCG001 extends DaoEPBase {
map.put(FIELD_AUDIT_REASON, StringUtils.toString(auditReason, eiMetadata.getMeta(FIELD_AUDIT_REASON))); map.put(FIELD_AUDIT_REASON, StringUtils.toString(auditReason, eiMetadata.getMeta(FIELD_AUDIT_REASON)));
map.put(FIELD_MATERIAL_PLAN_ID,StringUtils.toString(materialPlanId, eiMetadata.getMeta(FIELD_MATERIAL_PLAN_ID))); map.put(FIELD_MATERIAL_PLAN_ID,StringUtils.toString(materialPlanId, eiMetadata.getMeta(FIELD_MATERIAL_PLAN_ID)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL))); map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_SOURCE, StringUtils.toString(source, eiMetadata.getMeta(FIELD_SOURCE)));
return map; return map;
} }
} }
...@@ -63,6 +63,8 @@ public class HGCG002 extends DaoEPBase { ...@@ -63,6 +63,8 @@ public class HGCG002 extends DaoEPBase {
public static final String FIELD_AUDIT_REASON = "auditReason"; /* 审核原因*/ public static final String FIELD_AUDIT_REASON = "auditReason"; /* 审核原因*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/ public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String FIELD_SOURCE = "source"; /* 数据来源 根据采购数据来源小代码 目前0默认采购计划,1手动录入*/
public static final String FIELD_PRICE = "price"; /* 单价*/ public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额(不含税金额)*/ public static final String FIELD_AMOUNT = "amount"; /* 金额(不含税金额)*/
public static final String FIELD_TAX_INCLUDE_AMOUNT = "taxIncludeAmount"; /* 含税金额*/ public static final String FIELD_TAX_INCLUDE_AMOUNT = "taxIncludeAmount"; /* 含税金额*/
...@@ -167,7 +169,7 @@ public class HGCG002 extends DaoEPBase { ...@@ -167,7 +169,7 @@ public class HGCG002 extends DaoEPBase {
private BigDecimal taxIncludeAmount = new BigDecimal(0.000); /* 含税金额*/ private BigDecimal taxIncludeAmount = new BigDecimal(0.000); /* 含税金额*/
private BigDecimal taxAmount = new BigDecimal(0.000); /* 税额*/ private BigDecimal taxAmount = new BigDecimal(0.000); /* 税额*/
private BigDecimal taxRate = new BigDecimal(0.000); /* 税率*/ private BigDecimal taxRate = new BigDecimal(0.000); /* 税率*/
private Integer source; /* 数据来源 根据采购数据来源小代码 目前0默认采购计划,1手动录入*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
...@@ -393,6 +395,10 @@ public class HGCG002 extends DaoEPBase { ...@@ -393,6 +395,10 @@ public class HGCG002 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL); eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细"); eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SOURCE);
eiColumn.setDescName("数据来源");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -1075,6 +1081,14 @@ public class HGCG002 extends DaoEPBase { ...@@ -1075,6 +1081,14 @@ public class HGCG002 extends DaoEPBase {
this.inventTypeDetail = inventTypeDetail; this.inventTypeDetail = inventTypeDetail;
} }
public Integer getSource() {
return source;
}
public void setSource(Integer source) {
this.source = source;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1128,6 +1142,7 @@ public class HGCG002 extends DaoEPBase { ...@@ -1128,6 +1142,7 @@ public class HGCG002 extends DaoEPBase {
setTaxAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_AMOUNT)), taxAmount)); setTaxAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_AMOUNT)), taxAmount));
setTaxRate(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_RATE)), taxRate)); setTaxRate(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_RATE)), taxRate));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail)); setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SOURCE)), source));
} }
/** /**
...@@ -1182,6 +1197,7 @@ public class HGCG002 extends DaoEPBase { ...@@ -1182,6 +1197,7 @@ public class HGCG002 extends DaoEPBase {
map.put(FIELD_TAX_AMOUNT, StringUtils.toString(taxAmount, eiMetadata.getMeta(FIELD_TAX_AMOUNT))); map.put(FIELD_TAX_AMOUNT, StringUtils.toString(taxAmount, eiMetadata.getMeta(FIELD_TAX_AMOUNT)));
map.put(FIELD_TAX_RATE, StringUtils.toString(taxRate, eiMetadata.getMeta(FIELD_TAX_RATE))); map.put(FIELD_TAX_RATE, StringUtils.toString(taxRate, eiMetadata.getMeta(FIELD_TAX_RATE)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL))); map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_SOURCE, StringUtils.toString(source, eiMetadata.getMeta(FIELD_SOURCE)));
return map; return map;
} }
......
...@@ -63,6 +63,8 @@ public class HGCG003 extends DaoEPBase { ...@@ -63,6 +63,8 @@ public class HGCG003 extends DaoEPBase {
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/ public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String FIELD_IS_INVOICING = "isInvoicing"; /*是否开票 0否 1是*/ public static final String FIELD_IS_INVOICING = "isInvoicing"; /*是否开票 0否 1是*/
public static final String FIELD_SOURCE = "source"; /* 数据来源 根据采购数据来源小代码 目前0默认采购合同,1手动录入*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
...@@ -148,6 +150,7 @@ public class HGCG003 extends DaoEPBase { ...@@ -148,6 +150,7 @@ public class HGCG003 extends DaoEPBase {
private BigDecimal amount = new BigDecimal(0.000); /* 金额*/ private BigDecimal amount = new BigDecimal(0.000); /* 金额*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/ private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
private Integer isInvoicing = 0; private Integer isInvoicing = 0;
private Integer source; /* 数据来源 根据采购数据来源小代码 目前0默认采购合同,1手动录入*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -345,6 +348,10 @@ public class HGCG003 extends DaoEPBase { ...@@ -345,6 +348,10 @@ public class HGCG003 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_IS_INVOICING); eiColumn = new EiColumn(FIELD_IS_INVOICING);
eiColumn.setDescName("是否开票"); eiColumn.setDescName("是否开票");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SOURCE);
eiColumn.setDescName("数据来源");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -963,6 +970,14 @@ public class HGCG003 extends DaoEPBase { ...@@ -963,6 +970,14 @@ public class HGCG003 extends DaoEPBase {
this.isInvoicing = isInvoicing; this.isInvoicing = isInvoicing;
} }
public Integer getSource() {
return source;
}
public void setSource(Integer source) {
this.source = source;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1011,6 +1026,7 @@ public class HGCG003 extends DaoEPBase { ...@@ -1011,6 +1026,7 @@ public class HGCG003 extends DaoEPBase {
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount)); setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail)); setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setIsInvoicing(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_INVOICING)), isInvoicing)); setIsInvoicing(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_INVOICING)), isInvoicing));
setSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SOURCE)), source));
} }
/** /**
...@@ -1060,6 +1076,7 @@ public class HGCG003 extends DaoEPBase { ...@@ -1060,6 +1076,7 @@ public class HGCG003 extends DaoEPBase {
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT))); map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL))); map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_IS_INVOICING,StringUtils.toString(isInvoicing, eiMetadata.getMeta(FIELD_IS_INVOICING))); map.put(FIELD_IS_INVOICING,StringUtils.toString(isInvoicing, eiMetadata.getMeta(FIELD_IS_INVOICING)));
map.put(FIELD_SOURCE, StringUtils.toString(source, eiMetadata.getMeta(FIELD_SOURCE)));
return map; return map;
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 --> AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 -->
AUDIT_REASON as "auditReason", <!-- 审核原因 --> AUDIT_REASON as "auditReason", <!-- 审核原因 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型明细 --> INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型明细 -->
SOURCE as "source", <!-- 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入 -->
MATERIAL_PLAN_ID as "materialPlanId" <!-- 材料计划id --> MATERIAL_PLAN_ID as "materialPlanId" <!-- 材料计划id -->
</sql> </sql>
...@@ -86,6 +87,9 @@ ...@@ -86,6 +87,9 @@
<isNotEmpty prepend=" AND " property="materialPlanId"> <isNotEmpty prepend=" AND " property="materialPlanId">
MATERIAL_PLAN_ID = #materialPlanId# MATERIAL_PLAN_ID = #materialPlanId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
</sql> </sql>
<sql id="idCondition"> <sql id="idCondition">
...@@ -142,6 +146,7 @@ ...@@ -142,6 +146,7 @@
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCG001 ( INSERT INTO ${hggpSchema}.HGCG001 (
ID,
ACCOUNT_CODE, <!-- 企业编码 --> ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 --> CREATED_BY, <!-- 记录创建者 -->
...@@ -165,12 +170,13 @@ ...@@ -165,12 +170,13 @@
PLAN_WEIGHT, <!-- 计划重量 --> PLAN_WEIGHT, <!-- 计划重量 -->
STATUS, <!-- 状态:0-未审批,1-审核通过,2-审核未通过 --> STATUS, <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
INVENT_TYPE_DETAIL, <!-- 存货类型明细 --> INVENT_TYPE_DETAIL, <!-- 存货类型明细 -->
MATERIAL_PLAN_ID <!-- 材料计划id --> MATERIAL_PLAN_ID, <!-- 材料计划id -->
SOURCE <!-- 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入 -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #id#,#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#companyCode#, #companyName#, #planDate#, #planNo#, #inventCode#, #inventName#, #companyCode#, #companyName#, #planDate#, #planNo#, #inventCode#, #inventName#,
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#planQty#, #planUnitWeight#, #planWeight#, #status#, #inventTypeDetail#, #materialPlanId# #planQty#, #planUnitWeight#, #planWeight#, #status#, #inventTypeDetail#, #materialPlanId#, #source#
) )
</insert> </insert>
...@@ -195,7 +201,6 @@ ...@@ -195,7 +201,6 @@
UPDATE ${hggpSchema}.HGCG001 UPDATE ${hggpSchema}.HGCG001
SET SET
PUR_QTY = #purQty#, <!-- 采购数量 --> PUR_QTY = #purQty#, <!-- 采购数量 -->
PUR_UNIT_WEIGHT = #purUnitWeight#, <!-- 采购单重 -->
PUR_WEIGHT = #purWeight#, <!-- 采购重量 --> PUR_WEIGHT = #purWeight#, <!-- 采购重量 -->
<include refid="updateRevise"/> <include refid="updateRevise"/>
WHERE PLAN_NO = #planNo# WHERE PLAN_NO = #planNo#
...@@ -223,4 +228,8 @@ ...@@ -223,4 +228,8 @@
WHERE PLAN_NO = #planNo# WHERE PLAN_NO = #planNo#
</update> </update>
<select id="maxId" resultClass="long">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCG001
</select>
</sqlMap> </sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGCG001A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planDate">
PLAN_DATE = #planDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planNo">
PLAN_NO = #planNo#
</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="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planQty">
PLAN_QTY = #planQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planUnitWeight">
PLAN_UNIT_WEIGHT = #planUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planWeight">
PLAN_WEIGHT = #planWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purQty">
PUR_QTY = #purQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purUnitWeight">
PUR_UNIT_WEIGHT = #purUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purWeight">
PUR_WEIGHT = #purWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialPlanId">
MATERIAL_PLAN_ID = #materialPlanId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="primaryId">
PRIMARY_ID = #primaryId#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate open="(" close=")" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cg.domain.HGCG001A">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PLAN_DATE as "planDate", <!-- 计划日期 -->
PLAN_NO as "planNo", <!-- 计划单号 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PLAN_QTY as "planQty", <!-- 计划数量 -->
PLAN_UNIT_WEIGHT as "planUnitWeight", <!-- 计划单重 -->
PLAN_WEIGHT as "planWeight", <!-- 计划重量 -->
PUR_QTY as "purQty", <!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight", <!-- 采购单重 -->
PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
MATERIAL_PLAN_ID as "materialPlanId", <!-- 材料计划id -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型大类 -->
PRIMARY_ID as "primaryId" <!-- 主表id -->
FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include refid="condition" />
<include refid="idCondition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include refid="condition" />
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCG001A (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PLAN_DATE, <!-- 计划日期 -->
PLAN_NO, <!-- 计划单号 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
PLAN_QTY, <!-- 计划数量 -->
PLAN_UNIT_WEIGHT, <!-- 计划单重 -->
PLAN_WEIGHT, <!-- 计划重量 -->
PUR_QTY, <!-- 采购数量 -->
PUR_UNIT_WEIGHT, <!-- 采购单重 -->
PUR_WEIGHT, <!-- 采购重量 -->
MATERIAL_PLAN_ID, <!-- 材料计划id -->
INVENT_TYPE_DETAIL, <!-- 存货类型大类 -->
PRIMARY_ID <!-- 主表id -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #planDate#, #planNo#, #inventType#, #inventCode#, #inventName#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #planQty#, #planUnitWeight#, #planWeight#, #purQty#, #purUnitWeight#, #purWeight#, #materialPlanId#, #inventTypeDetail#, #primaryId#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCG001A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCG001A
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PLAN_DATE = #planDate#, <!-- 计划日期 -->
PLAN_NO = #planNo#, <!-- 计划单号 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
MATERIAL = #material#, <!-- 材质 -->
UNIT = #unit#, <!-- 单位 -->
LENGTH = #length#, <!-- 长度 -->
WIDTH = #width#, <!-- 宽度 -->
THICK = #thick#, <!-- 厚度 -->
PLAN_QTY = #planQty#, <!-- 计划数量 -->
PLAN_UNIT_WEIGHT = #planUnitWeight#, <!-- 计划单重 -->
PLAN_WEIGHT = #planWeight#, <!-- 计划重量 -->
PUR_QTY = #purQty#, <!-- 采购数量 -->
PUR_UNIT_WEIGHT = #purUnitWeight#, <!-- 采购单重 -->
PUR_WEIGHT = #purWeight#, <!-- 采购重量 -->
MATERIAL_PLAN_ID = #materialPlanId#, <!-- 材料计划id -->
INVENT_TYPE_DETAIL = #inventTypeDetail#, <!-- 存货类型大类 -->
PRIMARY_ID = #primaryId# <!-- 主表id -->
WHERE
ID = #id#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hggpSchema}.HGCG001A
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
</sqlMap>
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
AUDIT_USER_ID as "auditUserId", <!-- 审核人ID --> AUDIT_USER_ID as "auditUserId", <!-- 审核人ID -->
AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 --> AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 -->
AUDIT_REASON as "auditReason", <!-- 审核原因 --> AUDIT_REASON as "auditReason", <!-- 审核原因 -->
SOURCE as "source", <!-- 数据来源 根据采购数据来源小代码 目前默认0采购计划,1手工录入 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" <!-- 存货类型明细 --> INVENT_TYPE_DETAIL as "inventTypeDetail" <!-- 存货类型明细 -->
</sql> </sql>
...@@ -116,6 +117,9 @@ ...@@ -116,6 +117,9 @@
<isNotEmpty prepend=" AND " property="inventTypeDetails"> <isNotEmpty prepend=" AND " property="inventTypeDetails">
INVENT_TYPE_DETAIL IN <iterate close=")" open="(" conjunction="," property="inventTypeDetails">#inventTypeDetails[]#</iterate> INVENT_TYPE_DETAIL IN <iterate close=")" open="(" conjunction="," property="inventTypeDetails">#inventTypeDetails[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
</sql> </sql>
<sql id="idCondition"> <sql id="idCondition">
...@@ -172,6 +176,7 @@ ...@@ -172,6 +176,7 @@
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCG002 ( INSERT INTO ${hggpSchema}.HGCG002 (
ID,
ACCOUNT_CODE, <!-- 企业编码 --> ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 --> CREATED_BY, <!-- 记录创建者 -->
...@@ -205,14 +210,15 @@ ...@@ -205,14 +210,15 @@
TAX_INCLUDE_AMOUNT, <!-- 含税金额 --> TAX_INCLUDE_AMOUNT, <!-- 含税金额 -->
TAX_AMOUNT, <!-- 税额 --> TAX_AMOUNT, <!-- 税额 -->
TAX_RATE, <!-- 税率 --> TAX_RATE, <!-- 税率 -->
INVENT_TYPE_DETAIL INVENT_TYPE_DETAIL,
SOURCE <!-- 数据来源 根据采购数据来源小代码 目前默认0采购计划,1手工录入 -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #id#,#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #contractDate#, #contractNo#, #planNo#, #deleteFlag#, #companyCode#, #companyName#, #contractDate#, #contractNo#, #planNo#,
#supCode#, #supName#, #purUserId#, #purUserName#, #inventCode#, #inventName#, #supCode#, #supName#, #purUserId#, #purUserName#, #inventCode#, #inventName#,
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#purQty#, #purUnitWeight#, #purWeight#, #status#, #purQty#, #purUnitWeight#, #purWeight#, #status#,
#price#, #amount#, #taxIncludeAmount#, #taxAmount#, #taxRate#, #inventTypeDetail# #price#, #amount#, #taxIncludeAmount#, #taxAmount#, #taxRate#, #inventTypeDetail#, #source#
) )
</insert> </insert>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGCG002A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</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="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purQty">
PUR_QTY = #purQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purUnitWeight">
PUR_UNIT_WEIGHT = #purUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purWeight">
PUR_WEIGHT = #purWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveQty">
RECEIVE_QTY = #receiveQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveWeight">
RECEIVE_WEIGHT = #receiveWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxIncludeAmount">
TAX_INCLUDE_AMOUNT = #taxIncludeAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxAmount">
TAX_AMOUNT = #taxAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxRate">
TAX_RATE = #taxRate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="primaryId">
PRIMARY_ID = #primaryId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cg.domain.HGCG002B">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PUR_QTY as "purQty", <!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight", <!-- 采购单重 -->
PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT as "taxIncludeAmount", <!-- 含税金额 -->
TAX_AMOUNT as "taxAmount", <!-- 税额 -->
TAX_RATE as "taxRate", <!-- 税率 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型大类 -->
PRIMARY_ID as "primaryId" <!-- 主表id -->
FROM ${hggpSchema}.HGCG002A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCG002A WHERE 1=1
<include refid="condition" />
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCG002A (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
PUR_QTY, <!-- 采购数量 -->
PUR_UNIT_WEIGHT, <!-- 采购单重 -->
PUR_WEIGHT, <!-- 采购重量 -->
RECEIVE_QTY, <!-- 收货数量 -->
RECEIVE_WEIGHT, <!-- 收货重量 -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT, <!-- 含税金额 -->
TAX_AMOUNT, <!-- 税额 -->
TAX_RATE, <!-- 税率 -->
INVENT_TYPE_DETAIL, <!-- 存货类型大类 -->
PRIMARY_ID <!-- 主表id -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #inventType#, #inventCode#, #inventName#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #purQty#, #purUnitWeight#, #purWeight#, #receiveQty#, #receiveWeight#, #price#, #amount#, #taxIncludeAmount#, #taxAmount#, #taxRate#, #inventTypeDetail#, #primaryId#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCG002A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCG002A
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
MATERIAL = #material#, <!-- 材质 -->
UNIT = #unit#, <!-- 单位 -->
LENGTH = #length#, <!-- 长度 -->
WIDTH = #width#, <!-- 宽度 -->
THICK = #thick#, <!-- 厚度 -->
PUR_QTY = #purQty#, <!-- 采购数量 -->
PUR_UNIT_WEIGHT = #purUnitWeight#, <!-- 采购单重 -->
PUR_WEIGHT = #purWeight#, <!-- 采购重量 -->
RECEIVE_QTY = #receiveQty#, <!-- 收货数量 -->
RECEIVE_WEIGHT = #receiveWeight#, <!-- 收货重量 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT = #taxIncludeAmount#, <!-- 含税金额 -->
TAX_AMOUNT = #taxAmount#, <!-- 税额 -->
TAX_RATE = #taxRate#, <!-- 税率 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#, <!-- 存货类型大类 -->
PRIMARY_ID = #primaryId# <!-- 主表id -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
PRICE as "price", <!-- 单价 --> PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 --> AMOUNT as "amount", <!-- 金额 -->
STATUS as "status", <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 --> STATUS as "status", <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
SOURCE as "source", <!-- 数据来源 根据采购数据来源小代码 目前默认0采购合同,1手工录入 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型明细 --> INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型明细 -->
IS_INVOICING as "isInvoicing" IS_INVOICING as "isInvoicing"
</sql> </sql>
...@@ -119,6 +120,9 @@ ...@@ -119,6 +120,9 @@
<isNotEmpty prepend=" AND " property="isInvoicing"> <isNotEmpty prepend=" AND " property="isInvoicing">
IS_INVOICING = #isInvoicing# IS_INVOICING = #isInvoicing#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
</sql> </sql>
<sql id="idCondition"> <sql id="idCondition">
...@@ -204,14 +208,15 @@ ...@@ -204,14 +208,15 @@
AMOUNT, <!-- 金额 --> AMOUNT, <!-- 金额 -->
STATUS, <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 --> STATUS, <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
INVENT_TYPE_DETAIL, INVENT_TYPE_DETAIL,
IS_INVOICING IS_INVOICING,
SOURCE <!-- 数据来源 根据采购数据来源小代码 目前默认0采购合同,1手工录入 -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #id#,#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiveDate#, #receiveNo#, #deleteFlag#, #companyCode#, #companyName#, #receiveDate#, #receiveNo#,
#planNo#, #contractNo#, #supCode#, #supName#, #purUserId#, #purUserName#, #planNo#, #contractNo#, #supCode#, #supName#, #purUserId#, #purUserName#,
#inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#, #inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #receiveQty#, #receiveUnitWeight#, #unit#, #length#, #width#, #thick#, #receiveQty#, #receiveUnitWeight#,
#receiveWeight#,#price#, #amount#, #status#,#inventTypeDetail#,#isInvoicing# #receiveWeight#,#price#, #amount#, #status#,#inventTypeDetail#,#isInvoicing#, #source#
) )
</insert> </insert>
......
...@@ -2,10 +2,7 @@ package com.baosight.hggp.hg.cg.tools; ...@@ -2,10 +2,7 @@ package com.baosight.hggp.hg.cg.tools;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cg.domain.HGCG001; import com.baosight.hggp.hg.cg.domain.*;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG002A;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.zl.domain.HGZL001; import com.baosight.hggp.hg.zl.domain.HGZL001;
...@@ -33,6 +30,21 @@ public class HGCGTools { ...@@ -33,6 +30,21 @@ public class HGCGTools {
public static class HgCg001 { public static class HgCg001 {
/** /**
* 查询
*
* @param id
* @return
*/
public static HGCG001 get(Long id) {
AssertUtils.isNull(id, "采购计划id不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HGCG001> results = DaoBase.getInstance().query(HGCG001.QUERY, queryMap);
AssertUtils.isEmpty(results, String.format("采购计划[%s]不存在", id));
return results.get(0);
}
/**
* 锁 * 锁
* *
* @param planNos * @param planNos
...@@ -112,6 +124,77 @@ public class HGCGTools { ...@@ -112,6 +124,77 @@ public class HGCGTools {
} }
/** /**
* HGCG001 工具类
*
* @author:songx
* @date:2024/5/9,14:33
*/
public static class HgCg001A {
/**
* 查询
*
* @param id
* @return
*/
public static HGCG001A get(Long id) {
AssertUtils.isNull(id, "采购计划明细id不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HGCG001A> results = DaoBase.getInstance().query(HGCG001A.QUERY, queryMap);
AssertUtils.isEmpty(results, String.format("采购计划明细[%s]不存在", id));
return results.get(0);
}
/**
* 锁
*
* @param ids
* @return
*/
public static void lock(List<String> ids) {
if (CollectionUtils.isEmpty(ids)) {
return;
}
Map paramMap = new HashMap();
paramMap.put("ids", ids);
DaoBase.getInstance().update(HGSqlConstant.HgCg001A.LOCK, paramMap);
}
public static Map<Long, HGCG001A> map(List<String> ids) {
List<HGCG001A> results = list(ids);
return results.stream().collect(Collectors.toMap(HGCG001A::getId, item -> item));
}
/**
* 查询
*
* @param ids
* @return
*/
public static List<HGCG001A> list(List<String> ids) {
AssertUtils.isEmpty(ids, "计划明细id不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("ids", ids);
return DaoBase.getInstance().query(HGCG001A.QUERY, paramMap);
}
/**
* 查询
*
* @param primaryId
* @return
*/
public static List<HGCG001A> listByPrimaryId(Long primaryId) {
AssertUtils.isNull(primaryId, "计划id不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("primaryId", primaryId);
return DaoBase.getInstance().query(HGCG001A.QUERY, paramMap);
}
}
/**
* HGCG002 工具类 * HGCG002 工具类
* *
* @author:songx * @author:songx
......
...@@ -367,4 +367,16 @@ public class HGConstant { ...@@ -367,4 +367,16 @@ public class HGConstant {
//质检问题处理照片 //质检问题处理照片
public static final String CHECK_HANDLE = "CHECK_HANDLE"; public static final String CHECK_HANDLE = "CHECK_HANDLE";
} }
/**
*
* 采购计划数据来源
* @author:songx
* @date:2024/5/15,15:18
*/
public static class CgSource {
public static final Integer DEFAULT = 0;
// 手动录入
public static final Integer SDLR = 1;
}
} }
...@@ -28,6 +28,20 @@ public class HGSqlConstant { ...@@ -28,6 +28,20 @@ public class HGSqlConstant {
} }
/** /**
* HGCG001 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HgCg001A {
// 模块名称
private static final String MODULE_NAME = "HGCG001A.";
// 锁
public static final String LOCK = MODULE_NAME + "lock";
}
/**
* HGCG002 SQL 定义 * HGCG002 SQL 定义
* *
* @author:songx * @author:songx
......
...@@ -8,12 +8,10 @@ import com.baosight.hggp.core.security.UserSessionUtils; ...@@ -8,12 +8,10 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.*; import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC006; import com.baosight.hggp.hg.kc.domain.HGKC006;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
...@@ -25,7 +23,6 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -25,7 +23,6 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
/** /**
...@@ -99,11 +96,13 @@ public class ServiceHGKC006 extends ServiceBase { ...@@ -99,11 +96,13 @@ public class ServiceHGKC006 extends ServiceBase {
hgkc006.setOtherEnterDate(DateUtils.formatShort(hgkc006.getOtherEnterDate())); hgkc006.setOtherEnterDate(DateUtils.formatShort(hgkc006.getOtherEnterDate()));
if (hgkc006.getId() == null || hgkc006.getId() == 0) { if (hgkc006.getId() == null || hgkc006.getId() == 0) {
this.add(hgkc006); this.add(hgkc006);
//移动端新增需要获取新增后的id信息
HGKC006 queryKC006 = HGKCTools.HgKc006.getByOtherEnterNo(hgkc006.getOtherEnterNo());
EiInfoUtils.addBlock(inInfo,"entity", queryKC006, HGKC006.class);
} else { } else {
this.modify(hgkc006); this.modify(hgkc006);
} }
} }
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -99,6 +99,9 @@ public class ServiceHGKC008 extends ServiceBase { ...@@ -99,6 +99,9 @@ public class ServiceHGKC008 extends ServiceBase {
hgkc008.setApplyCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.RECEIVE_CODE)); hgkc008.setApplyCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.RECEIVE_CODE));
hgkc008.setStatus(HGConstant.ProductStatus.WTJ); hgkc008.setStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGKC008.INSERT, hgkc008); DaoUtils.insert(HGKC008.INSERT, hgkc008);
//移动端新增需要获取对象id信息
HGKC008 queryKC008 = HGKCTools.HgKc008.getByApplyCode(hgkc008.getApplyCode());
EiInfoUtils.addBlock(inInfo,"entity", queryKC008, HGKC008.class);
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!"); inInfo.setMsg("保存成功!");
......
...@@ -661,6 +661,12 @@ public class HGKCTools { ...@@ -661,6 +661,12 @@ public class HGKCTools {
return result; return result;
} }
public static HGKC006 getByOtherEnterNo(String otherEnterNo) {
AssertUtils.isEmpty(otherEnterNo, "申请编号为空!");
HGKC006 result = (HGKC006) DaoBase.getInstance().get(HGKC006.QUERY, HGKC006.FIELD_OTHER_ENTER_NO, otherEnterNo);
return result;
}
/** /**
* 查询 * 查询
* 成本核算数据检查 * 成本核算数据检查
...@@ -785,7 +791,11 @@ public class HGKCTools { ...@@ -785,7 +791,11 @@ public class HGKCTools {
HGKC008 result = (HGKC008) DaoBase.getInstance().get(HGKC008.QUERY, HGKC008.FIELD_ID, id); HGKC008 result = (HGKC008) DaoBase.getInstance().get(HGKC008.QUERY, HGKC008.FIELD_ID, id);
return result; return result;
} }
public static HGKC008 getByApplyCode(String applyCode) {
AssertUtils.isEmpty(applyCode, "申请编号为空!");
HGKC008 result = (HGKC008) DaoBase.getInstance().get(HGKC008.QUERY, HGKC008.FIELD_APPLY_CODE, applyCode);
return result;
}
/** /**
* 查询 * 查询
* 成本核算数据检查 * 成本核算数据检查
......
...@@ -52,7 +52,9 @@ ...@@ -52,7 +52,9 @@
<isNotEmpty prepend=" AND " property="updatedTime"> <isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime# UPDATED_TIME = #updatedTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
......
$(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
},
columns: [
],
beforeEdit: function (e) {
var status = $("#inqu_status-0-status").val();
if(status != '0'){
e.preventDefault();
}
},
loadComplete: function (grid) {
},
onSave: function (e) {
// 阻止后台请求,使用自定义
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台请求,使用自定义
e.preventDefault();
remove();
}
}
}
// 查询
$("#QUERY").on("click", query);
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
//存货编号查询条件
initInventCode();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 存货编号
*/
let initInventCode = function () {
//物料信息下拉
var inInfo=new EiInfo();
EiCommunicator.send("HGPZ005", "queryComboBox", inInfo, {
onSuccess: function (ei) {
let dataSource;
var input=$("#inqu_status-0-inventCode");
dataSource=ei.getBlock("invent_record_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "valueField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataSource,
template: "[#:valueField#]#:textField#|#:param2Field#",
filter: "contains"
});
}, onFail: function (ei) {
}
}, {async: false});
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
var status = $("#inqu_status-0-status").val();
if (status!='0') {
message("采购计划已审核无法修改");
return;
}
for (let i = 0; i < rows.length; i++) {
if (!isPositiveNumber(rows[i]['purQty'])) {
message("勾选的第" + (i + 1) + "行采购数量必须是大于0的数字");
return;
}
if (!isPositiveNumber(rows[i]['purWeight'])) {
message("勾选的第" + (i + 1) + "行采购重量必须是大于0的数字");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG001A", "save", true);
}
});
}
/**
* 删除
*/
let remove = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
var status = $("#inqu_status-0-status").val();
if (status!='0') {
message("采购计划已审核无法修改");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG001A", "remove", 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="查询条件">
<EF:EFInput ename="inqu_status-0-primaryId" cname="主表id" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyCode" cname="仓库编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-status" cname="状态" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-planDate" cname="计划日期" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-planNo" cname="计划单号" colWidth="3" type="hidden"/>
<div class="row">
<EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center" hidden="true"/>
<EF:EFColumn ename="planDate" cname="计划日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" hidden="true"/>
<EF:EFColumn ename="planNo" cname="计划单号" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="planWeight" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -83,7 +83,7 @@ $(function () { ...@@ -83,7 +83,7 @@ $(function () {
deleteFunc(); deleteFunc();
}, },
onSuccess: function (e) { onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){ if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query(); query();
} }
} }
......
...@@ -68,16 +68,19 @@ $(function () { ...@@ -68,16 +68,19 @@ $(function () {
$("#result-0-companyCode").change(function () { $("#result-0-companyCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-companyCode")); let textField = IPLAT.EFSelect.text($("#result-0-companyCode"));
$("#result-0-companyName").val(textField); $("#result-0-companyName").val(textField);
}) let valueField = IPLAT.EFSelect.value($("#result-0-companyCode"));
$("#result-0-subcontractCode").val(valueField);
$("#result-0-subcontractName").val(textField);
});
$("#result-0-depCode").change(function () { $("#result-0-depCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-depCode")); let textField = IPLAT.EFSelect.text($("#result-0-depCode"));
$("#result-0-depName").val(textField); $("#result-0-depName").val(textField);
}); });
$("#result-0-subcontractCode").change(function () { // $("#result-0-subcontractCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-subcontractCode")); // let textField = IPLAT.EFSelect.text($("#result-0-subcontractCode"));
$("#result-0-subcontractName").val(textField); // $("#result-0-subcontractName").val(textField);
// loadProjMg(IPLAT.EFSelect.value($("#result-0-subcontractCode"))); // // loadProjMg(IPLAT.EFSelect.value($("#result-0-subcontractCode")));
}); // });
$("#result-0-genralContractCode").change(function () { $("#result-0-genralContractCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-genralContractCode")); let textField = IPLAT.EFSelect.text($("#result-0-genralContractCode"));
$("#result-0-genralContractName").val(textField); $("#result-0-genralContractName").val(textField);
......
...@@ -21,11 +21,8 @@ ...@@ -21,11 +21,8 @@
</EF:EFCascadeSelect> </EF:EFCascadeSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-subcontractName" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-subcontractName" cname="乙方" colWidth="4" required="true" readonly="true"/>
<EF:EFSelect cname="乙方" ename="result-0-subcontractCode" colWidth="4" required="true" filter="contains"> <EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/>
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/> <EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/>
<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode" <EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode"
colWidth="4" required="true" filter="contains" defaultValue="" colWidth="4" required="true" filter="contains" defaultValue=""
......
...@@ -52,16 +52,19 @@ $(function () { ...@@ -52,16 +52,19 @@ $(function () {
$("#result-0-companyCode").change(function () { $("#result-0-companyCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-companyCode")); let textField = IPLAT.EFSelect.text($("#result-0-companyCode"));
$("#result-0-companyName").val(textField); $("#result-0-companyName").val(textField);
}) let valueField = IPLAT.EFSelect.value($("#result-0-companyCode"));
$("#result-0-subcontractCode").val(valueField);
$("#result-0-subcontractName").val(textField);
});
$("#result-0-depCode").change(function () { $("#result-0-depCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-depCode")); let textField = IPLAT.EFSelect.text($("#result-0-depCode"));
$("#result-0-depName").val(textField); $("#result-0-depName").val(textField);
}); });
$("#result-0-subcontractCode").change(function () { // $("#result-0-subcontractCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-subcontractCode")); // let textField = IPLAT.EFSelect.text($("#result-0-subcontractCode"));
$("#result-0-subcontractName").val(textField); // $("#result-0-subcontractName").val(textField);
// loadProjMg(IPLAT.EFSelect.value($("#result-0-subcontractCode"))); // // loadProjMg(IPLAT.EFSelect.value($("#result-0-subcontractCode")));
}); // });
$("#result-0-genralContractCode").change(function () { $("#result-0-genralContractCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-genralContractCode")); let textField = IPLAT.EFSelect.text($("#result-0-genralContractCode"));
$("#result-0-genralContractName").val(textField); $("#result-0-genralContractName").val(textField);
......
...@@ -21,11 +21,8 @@ ...@@ -21,11 +21,8 @@
</EF:EFCascadeSelect> </EF:EFCascadeSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-subcontractName" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-subcontractName" cname="乙方" colWidth="4" required="true" readonly="true"/>
<EF:EFSelect cname="乙方" ename="result-0-subcontractCode" colWidth="4" required="true" filter="contains"> <EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/>
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/> <EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/>
<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode" <EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode"
colWidth="4" required="true" filter="contains" defaultValue="" colWidth="4" required="true" filter="contains" defaultValue=""
......
...@@ -63,16 +63,19 @@ $(function () { ...@@ -63,16 +63,19 @@ $(function () {
$("#result-0-companyCode").change(function () { $("#result-0-companyCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-companyCode")); let textField = IPLAT.EFSelect.text($("#result-0-companyCode"));
$("#result-0-companyName").val(textField); $("#result-0-companyName").val(textField);
}) let valueField = IPLAT.EFSelect.value($("#result-0-companyCode"));
$("#result-0-subcontractCode").val(valueField);
$("#result-0-subcontractName").val(textField);
});
$("#result-0-depCode").change(function () { $("#result-0-depCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-depCode")); let textField = IPLAT.EFSelect.text($("#result-0-depCode"));
$("#result-0-depName").val(textField); $("#result-0-depName").val(textField);
}); });
$("#result-0-subcontractCode").change(function () { // $("#result-0-subcontractCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-subcontractCode")); // let textField = IPLAT.EFSelect.text($("#result-0-subcontractCode"));
$("#result-0-subcontractName").val(textField); // $("#result-0-subcontractName").val(textField);
// loadProjMg(IPLAT.EFSelect.value($("#result-0-subcontractCode"))); // // loadProjMg(IPLAT.EFSelect.value($("#result-0-subcontractCode")));
}); // });
$("#result-0-genralContractCode").change(function () { $("#result-0-genralContractCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-genralContractCode")); let textField = IPLAT.EFSelect.text($("#result-0-genralContractCode"));
$("#result-0-genralContractName").val(textField); $("#result-0-genralContractName").val(textField);
......
...@@ -23,11 +23,8 @@ ...@@ -23,11 +23,8 @@
</EF:EFCascadeSelect> </EF:EFCascadeSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-subcontractName" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-subcontractName" cname="乙方" colWidth="4" required="true" readonly="true"/>
<EF:EFSelect cname="乙方" ename="result-0-subcontractCode" colWidth="4" required="true" filter="contains"> <EF:EFInput ename="result-0-subcontractCode" cname="乙方名称" type="hidden"/>
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/> <EF:EFInput ename="result-0-genralContractName" cname="甲方名称" type="hidden"/>
<EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode" <EF:EFCascadeSelect cascadeFrom="result-0-subcontractCode" cname="甲方" ename="result-0-genralContractCode"
colWidth="4" required="true" filter="contains" defaultValue="" colWidth="4" required="true" filter="contains" defaultValue=""
......
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