| | |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("\"res_guid\"", entity.getResGuid()); |
| | | queryWrapper.eq("\"tb_year\"", entity.getTbYear()); |
| | | // queryWrapper.eq("\"tb_quarter\"",entity.getTbQuarter()); |
| | | queryWrapper.eq("\"tb_quarter\"",entity.getTbQuarter()); |
| | | TbResGeneralInvestigationState state = tbResGeneralInvestigationStateService.getOne(queryWrapper); |
| | | if (null == state) { |
| | | state = new TbResGeneralInvestigationState(); |
| | |
| | | state.setCreateTime(entity.getCreateTime()); |
| | | state.setCreateUser(entity.getCreateUser()); |
| | | } else { |
| | | if (state.getCheckState() == 1 || state.getCheckState() == 2) { |
| | | if (state.getCheckState() > 1) { |
| | | return R.fail(entity.getResName() + "本年度已经普查完成,不能在提交了。"); |
| | | } |
| | | } |
| | |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("\"res_guid\"", entity.getResGuid()); |
| | | queryWrapper.eq("\"tb_year\"", entity.getTbYear()); |
| | | queryWrapper.eq("\"tb_quarter\"",entity.getTbQuarter()); |
| | | TbResGeneralInvestigationState state = tbResGeneralInvestigationStateService.getOne(queryWrapper); |
| | | if (null == state) { |
| | | //无填报状态记录则新建 |
| | |
| | | state.setCreateUser(entity.getCreateUser()); |
| | | } else { |
| | | //查看填报状态,只有0填报中才可以一直填报 |
| | | if (state.getCheckState() == 1 || state.getCheckState() == 2) { |
| | | if (state.getCheckState() <= 3) { |
| | | return R.fail(entity.getResName() + "本年度已经普查完成,不能在提交了。"); |
| | | } |
| | | } |