| | |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | /** |
| | | * 修改项目信息 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Integer updateProject(IrProject po){ |
| | | po.setOperateDt(new Date()); |
| | | if (po.getVillageId() != null) { |
| | | po.setTownId(irProjectMapper.getSupperByVillageId(po.getVillageId())); |
| | | po.setCountyId(irProjectMapper.getSupperByVillageId(po.getTownId())); |
| | | po.setCityId(irProjectMapper.getSupperByVillageId(po.getCountyId())); |
| | | po.setProvinceId(irProjectMapper.getSupperByVillageId(po.getCityId())); |
| | | } |
| | | if (po.getTownId() != null) { |
| | | po.setCountyId(irProjectMapper.getSupperByVillageId(po.getTownId())); |
| | | po.setCityId(irProjectMapper.getSupperByVillageId(po.getCountyId())); |
| | | po.setProvinceId(irProjectMapper.getSupperByVillageId(po.getCityId())); |
| | | } |
| | | if (po.getCountyId() != null) { |
| | | po.setCityId(irProjectMapper.getSupperByVillageId(po.getCountyId())); |
| | | po.setProvinceId(irProjectMapper.getSupperByVillageId(po.getCityId())); |
| | | } |
| | | if (po.getCityId() != null) { |
| | | po.setProvinceId(irProjectMapper.getSupperByVillageId(po.getCityId())); |
| | | } |
| | | int rows = irProjectMapper.updateByPrimaryKeySelective(po); |
| | | if (rows == 0){ |
| | | return 0; |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | /** |
| | | * 修改项目状态 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Integer updateProjectState(IrProject po){ |
| | | po.setOperateDt(new Date()); |
| | | int rows = irProjectMapper.updateProjectState(po); |
| | | if (rows == 0){ |
| | | return 0; |
| | | } |
| | | return 1; |
| | | } |
| | | } |