Commit a720343694b3fa06691cab96f228a1f3e6b858fd

Authored by 廖磊
1 parent c7a26d41

formsServiceImpl修改

src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -1199,8 +1199,8 @@ public class FormsServiceImpl implements FormsService { @@ -1199,8 +1199,8 @@ public class FormsServiceImpl implements FormsService {
1199 1199
1200 String sql = "select gs_name, fgs_name, cl_zbh, fcsj, bc_type, xl_bm, xl_name, schedule_date" 1200 String sql = "select gs_name, fgs_name, cl_zbh, fcsj, bc_type, xl_bm, xl_name, schedule_date"
1201 + " from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' " 1201 + " from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' "
1202 - + "and schedule_date_str >= '"+startDate+"' "  
1203 - + "and schedule_date_str <= '"+endDate+"' "; 1202 + + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' "
  1203 + + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"' ";
1204 if(line.trim().length() != 0){ 1204 if(line.trim().length() != 0){
1205 sql += "and xl_bm = '"+line+"' "; 1205 sql += "and xl_bm = '"+line+"' ";
1206 } 1206 }
@@ -1356,8 +1356,8 @@ public class FormsServiceImpl implements FormsService { @@ -1356,8 +1356,8 @@ public class FormsServiceImpl implements FormsService {
1356 1356
1357 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from " 1357 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from "
1358 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" 1358 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type"
1359 - + " from bsth_c_s_sp_info" + " where schedule_date_str >= '"  
1360 - + map.get("startDate").toString() + "' and schedule_date_str <='" + map.get("endDate").toString() + "' and xl_bm='" 1359 + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"
  1360 + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='"
1361 + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')" 1361 + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')"
1362 + " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'" 1362 + " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'"
1363 + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'" 1363 + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'"
@@ -1440,8 +1440,8 @@ public class FormsServiceImpl implements FormsService { @@ -1440,8 +1440,8 @@ public class FormsServiceImpl implements FormsService {
1440 1440
1441 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from " 1441 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from "
1442 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" 1442 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type"
1443 - + " from bsth_c_s_sp_info" + " where schedule_date_str >= '"  
1444 - + map.get("startDate").toString() + "' and schedule_date_str<= '" + map.get("endDate").toString() + "' and xl_bm='" 1443 + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"
  1444 + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='"
1445 + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out') " 1445 + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out') "
1446 + " and gs_bm='"+ map.get("gsdmAllline").toString() + "'" 1446 + " and gs_bm='"+ map.get("gsdmAllline").toString() + "'"
1447 + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'" 1447 + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'"