Commit d8a0e824 by wuwenlong

客户档案枚举;

存货类型枚举;
存货名称枚举;
parent 8da5bfd8
......@@ -19,14 +19,21 @@ public enum DdynamicEnum {
* 用途:供应商档案下拉框.
* 编写:wwl.
*/
SUPPLIER_RECORD_BLOCK_ID("supplier_record_block_id","CUST_CODE","CUST_NAME","HPPZ002.queryComboBox"),
SUPPLIER_RECORD_BLOCK_ID("supplier_record_block_id","custCode","custName","HPPZ002.queryComboBox"),
/**
* 模块:客户档案
* 用途:客户档案下拉框.
* 编写:wwl.
*/
CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id","CUST_CODE","CUST_NAME","HPPZ003.queryComboBox");
CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id","custCode","custName","HPPZ003.queryComboBox"),
/**
* 模块:存货名称
* 用途:存货名称下拉框.
* 编写:wwl.
*/
INVENT_NAME_BLOCK_ID("invent_name_block_id","inventCode","inventName","HPPZ004.queryComboBox");
/** 将结果集放入的块名 */
......
package com.baosight.hpjx.common;
import com.baosight.iplat4j.core.ei.EiBlock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author wwl
* @Date 2024/1/10 14:29
*/
public enum InventTypeEnun {
MATERIAL(1,"原材料"),
CONSUMABLE(2,"耗材"),
SEMI_FINISHED_PRODUCT(2,"半成品"),
FINISHED_PRODUCT(2,"产成品");
private Integer code;
private String value;
InventTypeEnun(Integer code, String value) {
this.code = code;
this.value = value;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static EiBlock generatorEiBlock() {
EiBlock block = new EiBlock("customer_type_block_id");
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{
add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, MATERIAL.code);
put(HPConstants.VALUE_FIELD, MATERIAL.value);
}});
add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, CONSUMABLE.code);
put(HPConstants.VALUE_FIELD, CONSUMABLE.value);
}});
add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, SEMI_FINISHED_PRODUCT.code);
put(HPConstants.VALUE_FIELD, SEMI_FINISHED_PRODUCT.value);
}});
add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, FINISHED_PRODUCT.code);
put(HPConstants.VALUE_FIELD, FINISHED_PRODUCT.value);
}});
}};
block.setRows(rows);
return block;
}
}
......@@ -134,4 +134,18 @@
ID = #id#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
CUST_CODE as "custCode",
CUST_CNAME as "custName"
FROM hpjx.t_hppz003 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
ORDER BY CUST_CODE
</select>
</sqlMap>
\ No newline at end of file
......@@ -128,4 +128,19 @@
ID = #id#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName"
FROM hpjx.t_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
INVENT_TYPE = #inventType#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
</sqlMap>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment