sqlMap.append(" left join WLXX on WLXX_ID = WOBOM_WLID");
sqlMap.append(" left join WO on WO_ID = WOBOM_WOID");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = WOBOM_FFGX ");
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("where 1=1");
if(StringUtils.isNotEmpty(djid)){
sqlMap.append(" and "+SqlUtil.getWhereSql("WO_DJID",djid));
sqlMap.setParamValue("WO_DJID",djid);
if(StringUtils.isNotEmpty(woid)){
sqlMap.append(" and "+SqlUtil.getWhereSql("WO_ID",woid));
sqlMap.setParamValue("WO_ID",woid);
}
if(StringUtils.isNotEmpty(bzlx)){
sqlMap.append(" and "+SqlUtil.getWhereSql("BZGX_ID",bzlx));
sqlMap.setParamValue("BZGX_ID",bzlx);
}
sqlMap.append("order by WOBOM_XH, WLXX_CODE");
returnsqlMap.query(WobomVO.class);
...
...
@@ -1271,24 +1277,23 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append(" and "+SqlUtil.getWhereSql("WOGYLX_WOID",woid));
sqlMap.setParamValue("WOGYLX_WOID",woid);
}
if(StringUtils.isNotEmpty(woid)){
sqlMap.append(" and "+SqlUtil.getWhereSql("GYLX_BZGXID",bzlx));
sqlMap.setParamValue("GYLX_BZGXID",bzlx);
if(StringUtils.isNotEmpty(bzlx)){
sqlMap.append(" and "+SqlUtil.getWhereSql("WOGYLX_BZGXID",bzlx));