| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbFileStorageLocation; |
| | | import cn.gistack.sm.sjztmd.mapper.TbFileStorageLocationMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbFileStorageLocationService; |
| | | 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(TbFileStorageLocation tbFileStorageLocation) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbFileStorageLocation.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbFileStorageLocation detail = baseMapper.getDetailByResGuid(tbFileStorageLocation.getResGuid()); |
| | | // 更新日志 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbFileStorageLocation); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbFileStorageLocation.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbFileStorageLocation tbFileStorageLocation) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbFileStorageLocation.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbFileStorageLocation detail = baseMapper.getDetailByResGuid(tbFileStorageLocation.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbFileStorageLocation); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbFileStorageLocation.getResGuid(), tbFileStorageLocation.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |