Commit c4ca7466 by wancheng

报屏获取公司代码优化

parent caaee74d
...@@ -80,17 +80,17 @@ public class ServiceHPBI001 extends ServiceBase { ...@@ -80,17 +80,17 @@ public class ServiceHPBI001 extends ServiceBase {
//汇总数据 //汇总数据
//if(!StringUtils.isEmpty(inInfo.getCellStr(EiConstant.queryBlock, 0, "date"))){ //if(!StringUtils.isEmpty(inInfo.getCellStr(EiConstant.queryBlock, 0, "date"))){
//每日数据 //每日数据
String pro_name = "***"; String pro_code = "***";
List<Map> mrsj= dao.query("HPBI001.queryDay", params); List<Map> mrsj= dao.query("HPBI001.queryDay", params);
if(mrsj!=null){ if(mrsj!=null){
for (Map obj:mrsj) { for (Map obj:mrsj) {
if((Long) obj.get("SORT") == 2){ if((Long) obj.get("SORT") == 2){
pro_name = (String) obj.get("VALUE"); pro_code = (String) obj.get("PROJ_CODE");
} }
} }
} }
params.put("pro_name", pro_name); params.put("pro_name", pro_code);
inInfo.setCell(EiConstant.queryBlock, 0, "pro_name",pro_name); inInfo.setCell(EiConstant.queryBlock, 0, "pro_name",pro_code);
outInfo = super.query(inInfo,"HPBI001.querySum",new HPBI001()); outInfo = super.query(inInfo,"HPBI001.querySum",new HPBI001());
//生产月报 //生产月报
...@@ -142,12 +142,9 @@ public class ServiceHPBI001 extends ServiceBase { ...@@ -142,12 +142,9 @@ public class ServiceHPBI001 extends ServiceBase {
map.put("offset",0); map.put("offset",0);
map.put("limit",1000); map.put("limit",1000);
//获取公司代码 //获取公司代码
Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params);
String company_code = "%"; String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){ if(!StringUtils.isEmpty(UserSessionUtils.getCompanyCode().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString(); company_code = UserSessionUtils.getCompanyCode();
} }
//数据集入参 //数据集入参
Map params =new HashMap(); Map params =new HashMap();
...@@ -201,12 +198,16 @@ public class ServiceHPBI001 extends ServiceBase { ...@@ -201,12 +198,16 @@ public class ServiceHPBI001 extends ServiceBase {
map.put("offset",0); map.put("offset",0);
map.put("limit",1000); map.put("limit",1000);
//获取公司代码 //获取公司代码
Map user_params =new HashMap(); /* Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId()); user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params); List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params);
String company_code = "%"; String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){ if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString(); company_code = company_codes.get(0).get("COMPANY_CODE").toString();
}*/
String company_code = "%";
if(!StringUtils.isEmpty(UserSessionUtils.getCompanyCode().trim())){
company_code = UserSessionUtils.getCompanyCode();
} }
//数据集入参 //数据集入参
Map params =new HashMap(); Map params =new HashMap();
...@@ -262,12 +263,9 @@ public class ServiceHPBI001 extends ServiceBase { ...@@ -262,12 +263,9 @@ public class ServiceHPBI001 extends ServiceBase {
map.put("offset",0); map.put("offset",0);
map.put("limit",1000); map.put("limit",1000);
//获取公司代码 //获取公司代码
Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params);
String company_code = "%"; String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){ if(!StringUtils.isEmpty(UserSessionUtils.getCompanyCode().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString(); company_code = UserSessionUtils.getCompanyCode();
} }
//数据集入参 //数据集入参
Map params =new HashMap(); Map params =new HashMap();
...@@ -321,12 +319,9 @@ public class ServiceHPBI001 extends ServiceBase { ...@@ -321,12 +319,9 @@ public class ServiceHPBI001 extends ServiceBase {
map.put("offset",0); map.put("offset",0);
map.put("limit",1000); map.put("limit",1000);
//获取公司代码 //获取公司代码
Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params);
String company_code = "%"; String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){ if(!StringUtils.isEmpty(UserSessionUtils.getCompanyCode().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString(); company_code = UserSessionUtils.getCompanyCode();
} }
//数据集入参 //数据集入参
Map params =new HashMap(); Map params =new HashMap();
...@@ -385,12 +380,9 @@ public class ServiceHPBI001 extends ServiceBase { ...@@ -385,12 +380,9 @@ public class ServiceHPBI001 extends ServiceBase {
map.put("offset",0); map.put("offset",0);
map.put("limit",1000); map.put("limit",1000);
//获取公司代码 //获取公司代码
Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params);
String company_code = "%"; String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){ if(!StringUtils.isEmpty(UserSessionUtils.getCompanyCode().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString(); company_code = UserSessionUtils.getCompanyCode();
} }
//数据集入参 //数据集入参
Map params =new HashMap(); Map params =new HashMap();
...@@ -453,12 +445,9 @@ public class ServiceHPBI001 extends ServiceBase { ...@@ -453,12 +445,9 @@ public class ServiceHPBI001 extends ServiceBase {
map.put("offset",0); map.put("offset",0);
map.put("limit",1000); map.put("limit",1000);
//获取公司代码 //获取公司代码
Map user_params =new HashMap();
user_params.put("loginName", UserSession.getUserId());
List<Map> company_codes = super.dao.query("HPBI001.queryCompanyCode",user_params);
String company_code = "%"; String company_code = "%";
if(!StringUtils.isEmpty(company_codes.get(0).get("COMPANY_CODE").toString().trim())){ if(!StringUtils.isEmpty(UserSessionUtils.getCompanyCode().trim())){
company_code = company_codes.get(0).get("COMPANY_CODE").toString(); company_code = UserSessionUtils.getCompanyCode();
} }
//数据集入参 //数据集入参
Map params =new HashMap(); Map params =new HashMap();
......
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