Commit b9de1c7c authored by yff's avatar yff

修改PCJHBUG

parent 996191fc
...@@ -1174,7 +1174,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao { ...@@ -1174,7 +1174,7 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
sqlMap.append("select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKSJ, GPFK_HGBZ, GPFK_FKSL, "); sqlMap.append("select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKSJ, GPFK_HGBZ, GPFK_FKSL, ");
sqlMap.append(" GPFK_HGSL, GPFK_BHGSL, GPFK_FKR, GPFK_FKGX, GPFK_BZ, "); sqlMap.append(" GPFK_HGSL, GPFK_BHGSL, GPFK_FKR, GPFK_FKGX, GPFK_BZ, ");
sqlMap.append(" GPFK_WHRID, GPFK_WHR, GPFK_WHSJ, GPFK_CJRID, GPFK_CJR, "); sqlMap.append(" GPFK_WHRID, GPFK_WHR, GPFK_WHSJ, GPFK_CJRID, GPFK_CJR, ");
sqlMap.append(" GPFK_CJSJ, GPFK_SYSVERSION, GPFK_FKRID, GPFK_FKBX, GPFK_FKJSSJ, "); sqlMap.append(" GPFK_CJSJ, GPFK_SYSVERSION, GPFK_FKRID, GPFK_FKBX, GPFK_FKJSSJ,WOGYLX_ID, ");
sqlMap.append(" BX_CODE, BX_NAME, BZGX_CODE, BZGX_NAME,WLXX_ID, "); sqlMap.append(" BX_CODE, BX_NAME, BZGX_CODE, BZGX_NAME,WLXX_ID, ");
sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG,WOSN_CODE,WO_DJID,WO_ID, "); sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG,WOSN_CODE,WO_DJID,WO_ID, ");
sqlMap.append(" GPFK_GFSL, GPFK_LFSL, GPFK_FXSL, GPFK_FGSL, GPFK_YWRQ, GPFK_HGDJ, WOSN_KHCODE"); sqlMap.append(" GPFK_GFSL, GPFK_LFSL, GPFK_FXSL, GPFK_FGSL, GPFK_YWRQ, GPFK_HGDJ, WOSN_KHCODE");
......
...@@ -834,7 +834,11 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -834,7 +834,11 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
pcjhmxCondition.setWoid(woid); pcjhmxCondition.setWoid(woid);
List<PcjhmxVO> pcjhmxVOs = pcjhmxService.query(pcjhmxCondition).getRecords(); List<PcjhmxVO> pcjhmxVOs = pcjhmxService.query(pcjhmxCondition).getRecords();
if(pcjhmxVOs!=null&&pcjhmxVOs.size()>0) { if(pcjhmxVOs!=null&&pcjhmxVOs.size()>0) {
for(PcjhmxVO pcjhmxVO:pcjhmxVOs) { for(int i=0;i<pcjhmxVOs.size();i++) {
PcjhmxVO pcjhmxVO = pcjhmxVOs.get(i);
if((pcjhmxVO.getWgsl()>=pcjhmxVO.getJhsl())&&(i<pcjhmxVOs.size()-1)) {
continue;
}
Pcjhmx pcjhmx = new Pcjhmx(); Pcjhmx pcjhmx = new Pcjhmx();
EntityDataFactory.copyEntity(pcjhmxVO, pcjhmx); EntityDataFactory.copyEntity(pcjhmxVO, pcjhmx);
pcjhmx.setWgsl(pcjhmx.getWgsl()+1.0); pcjhmx.setWgsl(pcjhmx.getWgsl()+1.0);
...@@ -846,6 +850,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -846,6 +850,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
pcjhmx.setBhgsl(pcjhmx.getBhgsl()+1.0); pcjhmx.setBhgsl(pcjhmx.getBhgsl()+1.0);
} }
} }
pcjhmxService.update(pcjhmx);
} }
} }
} }
...@@ -1097,6 +1102,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1097,6 +1102,7 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
FkVO gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition); FkVO gpfkVo = gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition);
if(gpfkVo==null) { if(gpfkVo==null) {
Gpfk gpfk = new Gpfk(); Gpfk gpfk = new Gpfk();
System.out.println("");
FkVO curFkVo =gpfkDao.queryKwellWoBySnid(fkCondition.getWosncode(), fkCondition.getBzgxid()); FkVO curFkVo =gpfkDao.queryKwellWoBySnid(fkCondition.getWosncode(), fkCondition.getBzgxid());
gpfk.setWosnid(curFkVo.getWosnCode()); gpfk.setWosnid(curFkVo.getWosnCode());
gpfk.setWogylx(curFkVo.getWogylxid()); gpfk.setWogylx(curFkVo.getWogylxid());
...@@ -1122,9 +1128,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1122,9 +1128,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
} }
FkVO newFkVo =gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition); FkVO newFkVo =gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition);
newFkVo.setSntype(snType); newFkVo.setSntype(snType);
Wogylx wogylx = (Wogylx) GavelSql.selectEntityByKey(Wogylx.class, newFkVo.getWogylx()); Wogylx wogylx = (Wogylx) GavelSql.selectEntityByKey(Wogylx.class, newFkVo.getWogylxid());
if(wogylx!=null&&StringUtils.isNotEmpty(wogylx.getGxbz())&&(wogylx.getGxbz().equals("D")||wogylx.getGxbz().equals("M"))) { if(wogylx!=null&&StringUtils.isNotEmpty(wogylx.getGxbz())&&(wogylx.getGxbz().equals("D")||wogylx.getGxbz().equals("M"))) {
if(StringUtils.isNotEmpty(gpfkVo.getHgbz())&&gpfkVo.getHgbz().equals("N")) { if(StringUtils.isNotEmpty(newFkVo.getHgbz())&&newFkVo.getHgbz().equals("N")) {
updatePcjh(wogylx.getWoid(),wogylx.getGxlx(),false); updatePcjh(wogylx.getWoid(),wogylx.getGxlx(),false);
} }
else { else {
...@@ -1162,9 +1168,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1162,9 +1168,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
} }
FkVO newFkVo =gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition); FkVO newFkVo =gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition);
newFkVo.setSntype(snType); newFkVo.setSntype(snType);
Wogylx wogylx = (Wogylx) GavelSql.selectEntityByKey(Wogylx.class, newFkVo.getWogylx()); Wogylx wogylx = (Wogylx) GavelSql.selectEntityByKey(Wogylx.class, newFkVo.getWogylxid());
if(wogylx!=null&&StringUtils.isNotEmpty(wogylx.getGxbz())&&(wogylx.getGxbz().equals("D")||wogylx.getGxbz().equals("M"))) { if(wogylx!=null&&StringUtils.isNotEmpty(wogylx.getGxbz())&&(wogylx.getGxbz().equals("D")||wogylx.getGxbz().equals("M"))) {
if(StringUtils.isNotEmpty(gpfkVo.getHgbz())&&gpfkVo.getHgbz().equals("N")) { if(StringUtils.isNotEmpty(newFkVo.getHgbz())&&newFkVo.getHgbz().equals("N")) {
updatePcjh(wogylx.getWoid(),wogylx.getGxlx(),false); updatePcjh(wogylx.getWoid(),wogylx.getGxlx(),false);
} }
else { else {
...@@ -1267,9 +1273,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1267,9 +1273,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
} }
FkVO newFkVo =gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition); FkVO newFkVo =gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition);
newFkVo.setSntype(snType); newFkVo.setSntype(snType);
Wogylx wogylx = (Wogylx) GavelSql.selectEntityByKey(Wogylx.class, newFkVo.getWogylx()); Wogylx wogylx = (Wogylx) GavelSql.selectEntityByKey(Wogylx.class, newFkVo.getWogylxid());
if(wogylx!=null&&StringUtils.isNotEmpty(wogylx.getGxbz())&&(wogylx.getGxbz().equals("D")||wogylx.getGxbz().equals("M"))) { if(wogylx!=null&&StringUtils.isNotEmpty(wogylx.getGxbz())&&(wogylx.getGxbz().equals("D")||wogylx.getGxbz().equals("M"))) {
if(StringUtils.isNotEmpty(gpfkVo.getHgbz())&&gpfkVo.getHgbz().equals("N")) { if(StringUtils.isNotEmpty(newFkVo.getHgbz())&&newFkVo.getHgbz().equals("N")) {
updatePcjh(wogylx.getWoid(),wogylx.getGxlx(),false); updatePcjh(wogylx.getWoid(),wogylx.getGxlx(),false);
} }
else { else {
...@@ -1307,9 +1313,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -1307,9 +1313,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
} }
FkVO newFkVo =gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition); FkVO newFkVo =gpfkDao.queryKwellGpfkByWosnAndGxid(fkCondition);
newFkVo.setSntype(snType); newFkVo.setSntype(snType);
Wogylx wogylx = (Wogylx) GavelSql.selectEntityByKey(Wogylx.class, newFkVo.getWogylx()); Wogylx wogylx = (Wogylx) GavelSql.selectEntityByKey(Wogylx.class, newFkVo.getWogylxid());
if(wogylx!=null&&StringUtils.isNotEmpty(wogylx.getGxbz())&&(wogylx.getGxbz().equals("D")||wogylx.getGxbz().equals("M"))) { if(wogylx!=null&&StringUtils.isNotEmpty(wogylx.getGxbz())&&(wogylx.getGxbz().equals("D")||wogylx.getGxbz().equals("M"))) {
if(StringUtils.isNotEmpty(gpfkVo.getHgbz())&&gpfkVo.getHgbz().equals("N")) { if(StringUtils.isNotEmpty(newFkVo.getHgbz())&&newFkVo.getHgbz().equals("N")) {
updatePcjh(wogylx.getWoid(),wogylx.getGxlx(),false); updatePcjh(wogylx.getWoid(),wogylx.getGxlx(),false);
} }
else { else {
......
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