@@ -1109,9 +1110,11 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
...
@@ -1109,9 +1110,11 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append("from WOBOM");
sqlMap.append("from WOBOM");
sqlMap.append(" left join WLXX on WLXX_ID = WOBOM_WLID");
sqlMap.append(" left join WLXX on WLXX_ID = WOBOM_WLID");
sqlMap.append(" left join WO on WO_ID = WOBOM_WOID");
sqlMap.append(" left join WO on WO_ID = WOBOM_WOID");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = WOBOM_FFGX ");
sqlMap.append(" left join WOSN on WOSN_WOID = WO_ID");
sqlMap.append(" left join WOGYLX on WOGYLX_WOID = WO_ID ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append(" left join (select sum(GPHY_ZPSL) as ZPSL,GPHY_MID,GPHY_WLID from GPHY group by GPHY_MID,GPHY_WLID) k on k.GPHY_MID = WO_ID and k.GPHY_WLID = WLXX_ID");
sqlMap.append(" left join GPFK on GPFK_WOSNID = WOSN_CODE and GPFK_FKGX= BZGX_ID and GPFK_WOGYLX =WOGYLX_ID");
sqlMap.append(" left join (select sum(GPHY_ZPSL) as ZPSL,GPHY_MID,GPHY_WLID from GPHY group by GPHY_MID,GPHY_WLID) k on k.GPHY_MID = GPFK_ID and k.GPHY_WLID = WLXX_ID");
sqlMap.append("where 1=1");
sqlMap.append("where 1=1");
if(StringUtils.isNotEmpty(woid)){
if(StringUtils.isNotEmpty(woid)){
sqlMap.append(" and "+SqlUtil.getWhereSql("WO_ID",woid));
sqlMap.append(" and "+SqlUtil.getWhereSql("WO_ID",woid));
...
@@ -1121,6 +1124,10 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
...
@@ -1121,6 +1124,10 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append(" and "+SqlUtil.getWhereSql("BZGX_ID",bzlx));
sqlMap.append(" and "+SqlUtil.getWhereSql("BZGX_ID",bzlx));
sqlMap.setParamValue("BZGX_ID",bzlx);
sqlMap.setParamValue("BZGX_ID",bzlx);
}
}
if(StringUtils.isNotEmpty(wosn)){
sqlMap.append(" and "+SqlUtil.getWhereSql("WOSN_CODE",wosn));
sqlMap.setParamValue("WOSN_CODE",wosn);
}
sqlMap.append("order by WOBOM_XH, WLXX_CODE");
sqlMap.append("order by WOBOM_XH, WLXX_CODE");
returnsqlMap.query(WobomVO.class);
returnsqlMap.query(WobomVO.class);
}
}
...
@@ -1165,8 +1172,8 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
...
@@ -1165,8 +1172,8 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append(" left join WOSN on WOSN_CODE = GPFK_WOSNID ");
sqlMap.append(" left join WOSN on WOSN_CODE = GPFK_WOSNID ");
sqlMap.append(" left join WO on WO_ID = WOSN_WOID ");
sqlMap.append(" left join WO on WO_ID = WOSN_WOID ");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID ");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_FKGX ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append(" left join BZGX on BZGX_ID = GPFK_FKGX ");
sqlMap.append("where 1 = 1 ");
sqlMap.append("where 1 = 1 ");
if(StringUtils.isNotEmpty(condition.getId())){
if(StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and "+SqlUtil.getWhereSql("GPFK_ID",condition.getId()));
sqlMap.append(" and "+SqlUtil.getWhereSql("GPFK_ID",condition.getId()));
...
@@ -1226,5 +1233,24 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
...
@@ -1226,5 +1233,24 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {