Commit 7363e2b3 by liuyang

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

parents 094e68c1 fe87e7a9
......@@ -54,6 +54,8 @@ public class HGKC010 extends DaoEPBase {
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String FIELD_INVENT_NAME_LIKE = "inventNameLike"; /*匹配编号、名称、规格*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
......@@ -122,6 +124,11 @@ public class HGKC010 extends DaoEPBase {
private String factoryName = " "; /* 厂区名称*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
//app下拉查询条件
private String inventNameLike = " "; /* 匹配编号、名称、规格*/
/**
* initialize the metadata.
*/
......@@ -267,6 +274,9 @@ public class HGKC010 extends DaoEPBase {
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME_LIKE);
eiColumn.setDescName("匹配编号、名称、规格");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -749,6 +759,14 @@ public class HGKC010 extends DaoEPBase {
this.inventTypeDetail = inventTypeDetail;
}
public String getInventNameLike() {
return inventNameLike;
}
public void setInventNameLike(String inventNameLike) {
this.inventNameLike = inventNameLike;
}
/**
* get the value from Map.
*
......@@ -787,6 +805,8 @@ public class HGKC010 extends DaoEPBase {
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setInventNameLike(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME_LIKE)), inventNameLike));
}
/**
......@@ -827,6 +847,7 @@ public class HGKC010 extends DaoEPBase {
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_INVENT_NAME_LIKE, StringUtils.toString(inventNameLike, eiMetadata.getMeta(FIELD_INVENT_NAME_LIKE)));
return map;
}
}
......@@ -89,11 +89,13 @@ public class ServiceHGKC010 extends ServiceBase {
String whCode = MapUtils.getString(queryMap, HGKC010.FIELD_WH_CODE);
String inventType = MapUtils.getString(queryMap, HGKC010.FIELD_INVENT_TYPE);
String companyCode = MapUtils.getString(queryMap, HGKC010.FIELD_COMPANY_CODE);
String inventNameLike = MapUtils.getString(queryMap, HGKC010.FIELD_INVENT_NAME_LIKE);
Map map = new HashMap();
map.put(HGKC010.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC010.FIELD_WH_CODE, whCode);
map.put(HGKC010.FIELD_INVENT_TYPE, inventType);
map.put(HGKC010.FIELD_COMPANY_CODE, companyCode);
map.put(HGKC010.FIELD_INVENT_NAME_LIKE, inventNameLike);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID), map,false);
return inInfo;
......
......@@ -101,6 +101,14 @@
<isNotEmpty prepend=" AND " property="inventCodes">
INVENT_CODE IN <iterate close=")" open="(" conjunction="," property="inventCodes">#inventCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventNameLike">
(
INVENT_NAME LIKE CONCAT('%', #inventNameLike#, '%')
or INVENT_CODE LIKE CONCAT('%', #inventNameLike#, '%')
or SPEC LIKE CONCAT('%', #inventNameLike#, '%')
)
</isNotEmpty>
</sql>
<sql id="idCondition">
......
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