Commit c4ca7466 by wancheng

报屏获取公司代码优化

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