Commit eee9fe4f authored by 黄自鹏's avatar 黄自鹏

调整bug

parent 6a4b51ac
......@@ -1475,7 +1475,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
public FkVO queryKwellWxWoBySnidUptoDate(String wosnid) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select top 1 WO_ID,WO_ZT,WLXX_CODE,WLXX_GG,WLXX_ID,WOSN_CODE,WOSN_ID,");
sqlMap.append(" WLXX_GG,WO_DJID,WOSN_CODE ");
sqlMap.append(" WO_DJID ");
sqlMap.append("from WOSN ");
sqlMap.append(" left join WO on WO_ID=WOSN_WOID");
sqlMap.append(" left join WLXX on wlxx_id = wo_wlid");
......
......@@ -37,7 +37,7 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap.append(" left join WO on WO_ID = WOSN_WOID ");
sqlMap.append(" left join WLXX on WLXX_ID = WO_WLID ");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = GPFK_FKGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append(" left join BZGX on BZGX_ID = U_GPFK_BZGXID ");
sqlMap.append(" left join GZZX on GZZX_ID = BZGX_GZZXID ");
sqlMap.append(" where 1=1 ");
if ( StringUtils.isNotEmpty(condition.getGzzxid())){
......
......@@ -1800,11 +1800,15 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
GpfkCondition gpfkCondition = new GpfkCondition();
gpfkCondition.setWosnid(fkCondition.getSncode());
gpfkCondition.setBzgxid(fkCondition.getBzgxid());
FkVO curFkVo = gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getSncode());
checkLastBzgxIfComplete(curFkVo);
checkNextBzgxIfExistFk(curFkVo);
if(StringUtils.isNotEmpty(curFkVo.getId())) {
curFkVo = gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getSncode(), fkCondition.getBzgxid());
//FkVO curFkVo = gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getSncode());
//checkLastBzgxIfComplete(curFkVo);
//checkNextBzgxIfExistFk(curFkVo);
// if(StringUtils.isNotEmpty(curFkVo.getId())) {
// curFkVo = gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getSncode(), fkCondition.getBzgxid());
// }
FkVO curFkVo = gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getSncode(), fkCondition.getBzgxid());
if (curFkVo == null) {
curFkVo = gpfkDao.queryKwellWxWoBySnidUptoDate(fkCondition.getSncode());
}
curFkVo.setSntype(snType);
return curFkVo;
......@@ -1826,9 +1830,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0);
gpfk.setBzgxid(fkCondition.getBzgxid());
gpfk.setFkgx(fkCondition.getBzgxid());
insert(gpfk);
FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid());
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), null, curFkVo.getWosnCode(), HGBZ);
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), fkCondition.getBzgxid(), curFkVo.getWosnCode(), HGBZ);
newFkVo.setSntype(snType);
return newFkVo;
}
......@@ -1849,9 +1854,10 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
gpfk.setHgsl(1.0);
gpfk.setBhgsl(0.0);
gpfk.setBzgxid(fkCondition.getBzgxid());
gpfk.setFkgx(fkCondition.getBzgxid());
insert(gpfk);
FkVO newFkVo =gpfkDao.queryWxWowithIfExistGpfkByWosnAndBzgxidInNewDate(fkCondition.getWosncode(), fkCondition.getBzgxid());
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), null, curFkVo.getWosnCode(), BHGBZ);
addOrUpdateGpfkjg(curFkVo.getWlid(), fkCondition.getBzgxid(), fkCondition.getBzgxid(), curFkVo.getWosnCode(), BHGBZ);
newFkVo.setSntype(snType);
return newFkVo;
}
......
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