| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResMgrSysB; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResMgrSysBMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResMgrSysBService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResMgrSysB tbAttResMgrSysB) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResMgrSysB.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResMgrSysB detail = baseMapper.getDetailByResGuid(tbAttResMgrSysB.getResGuid()); |
| | | // 更新日志 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResMgrSysB); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResMgrSysB.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResMgrSysB tbAttResMgrSysB) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResMgrSysB.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResMgrSysB detail = baseMapper.getDetailByResGuid(tbAttResMgrSysB.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResMgrSysB); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResMgrSysB.getResGuid(), tbAttResMgrSysB.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |