Commit ba7010fc by wuwenlong

List<Map>转Eiblock

parent 10b8d496
...@@ -24,12 +24,12 @@ public enum CompanyTypeEnum { ...@@ -24,12 +24,12 @@ public enum CompanyTypeEnum {
EiBlock block = new EiBlock("company_type_block_id"); EiBlock block = new EiBlock("company_type_block_id");
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{ List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{
add(new HashMap<String, Object>() {{ add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, GQ.code + "-" + GQ.value); put(HGConstants.TEXT_FIELD, GQ.code + "-" + GQ.value);
put(HPConstants.VALUE_FIELD, GQ.code); put(HGConstants.VALUE_FIELD, GQ.code);
}}); }});
add(new HashMap<String, Object>() {{ add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, MY.code + "-" + MY.value); put(HGConstants.TEXT_FIELD, MY.code + "-" + MY.value);
put(HPConstants.VALUE_FIELD, MY.code); put(HGConstants.VALUE_FIELD, MY.code);
}}); }});
}}; }};
block.setRows(rows); block.setRows(rows);
......
...@@ -44,12 +44,12 @@ public enum CustomerTypeEnum { ...@@ -44,12 +44,12 @@ public enum CustomerTypeEnum {
EiBlock block = new EiBlock("customer_type_block_id"); EiBlock block = new EiBlock("customer_type_block_id");
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{ List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{
add(new HashMap<String, Object>() {{ add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, SUPPLIER.code); put(HGConstants.TEXT_FIELD, SUPPLIER.code);
put(HPConstants.VALUE_FIELD, SUPPLIER.value); put(HGConstants.VALUE_FIELD, SUPPLIER.value);
}}); }});
add(new HashMap<String, Object>() {{ add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, CUSTOMER.code); put(HGConstants.TEXT_FIELD, CUSTOMER.code);
put(HPConstants.VALUE_FIELD, CUSTOMER.value); put(HGConstants.VALUE_FIELD, CUSTOMER.value);
}}); }});
}}; }};
block.setRows(rows); block.setRows(rows);
......
...@@ -4,7 +4,7 @@ package com.baosight.hggp.common; ...@@ -4,7 +4,7 @@ package com.baosight.hggp.common;
* @author xuao * @author xuao
* @date 2024年01月09日 14:53 * @date 2024年01月09日 14:53
*/ */
public class HPConstants { public class HGConstants {
/** 多字段拼接符号 XTC */ /** 多字段拼接符号 XTC */
public static final String BLOCK_DETAIL = "detail"; public static final String BLOCK_DETAIL = "detail";
......
...@@ -43,12 +43,12 @@ public enum InitiateModeEnum { ...@@ -43,12 +43,12 @@ public enum InitiateModeEnum {
EiBlock block = new EiBlock("initiate_mode_block_id"); EiBlock block = new EiBlock("initiate_mode_block_id");
List<Map<String,Object>> rows = new ArrayList<Map<String,Object>>(){{ List<Map<String,Object>> rows = new ArrayList<Map<String,Object>>(){{
add(new HashMap<String,Object>(){{ add(new HashMap<String,Object>(){{
put(HPConstants.TEXT_FIELD,STOP.code); put(HGConstants.TEXT_FIELD,STOP.code);
put(HPConstants.VALUE_FIELD,STOP.value); put(HGConstants.VALUE_FIELD,STOP.value);
}}); }});
add(new HashMap<String,Object>(){{ add(new HashMap<String,Object>(){{
put(HPConstants.TEXT_FIELD,USING.code); put(HGConstants.TEXT_FIELD,USING.code);
put(HPConstants.VALUE_FIELD,USING.value); put(HGConstants.VALUE_FIELD,USING.value);
}}); }});
}}; }};
block.setRows(rows); block.setRows(rows);
......
...@@ -67,20 +67,20 @@ public enum InventTypeEnum { ...@@ -67,20 +67,20 @@ public enum InventTypeEnum {
EiBlock block = new EiBlock("customer_type_block_id"); EiBlock block = new EiBlock("customer_type_block_id");
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{ List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{
add(new HashMap<String, Object>() {{ add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, MATERIAL.code + HPConstants.SPLICING_SYMBOL + MATERIAL.value); put(HGConstants.TEXT_FIELD, MATERIAL.code + HGConstants.SPLICING_SYMBOL + MATERIAL.value);
put(HPConstants.VALUE_FIELD, MATERIAL.code); put(HGConstants.VALUE_FIELD, MATERIAL.code);
}}); }});
add(new HashMap<String, Object>() {{ add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, CONSUMABLE.code + HPConstants.SPLICING_SYMBOL + CONSUMABLE.value); put(HGConstants.TEXT_FIELD, CONSUMABLE.code + HGConstants.SPLICING_SYMBOL + CONSUMABLE.value);
put(HPConstants.VALUE_FIELD, CONSUMABLE.code); put(HGConstants.VALUE_FIELD, CONSUMABLE.code);
}}); }});
add(new HashMap<String, Object>() {{ add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, SEMI_FINISHED_PRODUCT.code + HPConstants.SPLICING_SYMBOL + SEMI_FINISHED_PRODUCT.value); put(HGConstants.TEXT_FIELD, SEMI_FINISHED_PRODUCT.code + HGConstants.SPLICING_SYMBOL + SEMI_FINISHED_PRODUCT.value);
put(HPConstants.VALUE_FIELD, SEMI_FINISHED_PRODUCT.code); put(HGConstants.VALUE_FIELD, SEMI_FINISHED_PRODUCT.code);
}}); }});
add(new HashMap<String, Object>() {{ add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, FINISHED_PRODUCT.code + HPConstants.SPLICING_SYMBOL + FINISHED_PRODUCT.value); put(HGConstants.TEXT_FIELD, FINISHED_PRODUCT.code + HGConstants.SPLICING_SYMBOL + FINISHED_PRODUCT.value);
put(HPConstants.VALUE_FIELD, FINISHED_PRODUCT.code); put(HGConstants.VALUE_FIELD, FINISHED_PRODUCT.code);
}}); }});
}}; }};
block.setRows(rows); block.setRows(rows);
......
package com.baosight.hggp.controller; package com.baosight.hggp.controller;
import com.baosight.hggp.common.HPConstants;
import com.baosight.hggp.equipment.hp.domain.CutterbarStatus;
import com.baosight.hggp.equipment.hp.domain.CutterbarTime;
import com.baosight.hggp.equipment.hp.domain.CutterbarWarning;
import com.baosight.hggp.equipment.hp.domain.CutterbarWarningBase;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.xml.XmlUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController @RestController
@CrossOrigin @CrossOrigin
......
...@@ -106,12 +106,12 @@ public class UserSessionUtils extends UserSession { ...@@ -106,12 +106,12 @@ public class UserSessionUtils extends UserSession {
* *获取登录用户所有角色的公司列表 * *获取登录用户所有角色的公司列表
* @return * @return
*/ */
public static List<Map<String,String>> getRoleCompany(){ public static List<Map<String,Object>> getRoleCompany(){
Map<String,String> map = new HashMap<String,String>(){{ Map<String,Object> map = new HashMap<String,Object>(){{
put("companyCode","001"); put("companyCode","001");
put("companyName","公司A"); put("companyName","公司A");
}}; }};
return new ArrayList<Map<String,String>>(){{add(map);}}; return new ArrayList<Map<String,Object>>(){{add(map);}};
} }
/** /**
......
...@@ -180,4 +180,17 @@ ...@@ -180,4 +180,17 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
NAT_CODE as "natCode",
NAT_NAME as "natName"
FROM ${hggpSchema}.hppz008
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
ORDER BY NAT_CODE
</select>
</sqlMap> </sqlMap>
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