| | |
| | | if (null!=tbAttResBase.getGuid()){ |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResBase); |
| | | updateFinalState(tbAttResBase.getGuid(),tbAttResBase.getCheckState()); |
| | | }else { |
| | | tbAttResBase.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResBase); |
| | |
| | | public Boolean updateFinalState(String resGuid, int state) { |
| | | TbAttResBase tbAttResBase = new TbAttResBase(); |
| | | tbAttResBase.setGuid(resGuid); |
| | | if (state==2){ |
| | | if (state==1 || state==2){ |
| | | // 审核通过,判断是否已全部通过审核 |
| | | Boolean flag = baseMapper.getFinalCheckStateByGuid(resGuid); |
| | | if (flag){ |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResBuildInfo); |
| | | if (i>0){ |
| | | tbAttResBaseService.updateFinalState(tbAttResBuildInfo.getResGuid(),0); |
| | | // tbAttResBaseService.updateFinalState(tbAttResBuildInfo.getResGuid(),0); |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | tbAttResBuildInfo.setGuid(oldAbAttResBase.getGuid()); |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResBuildInfo); |
| | | tbAttResBaseService.updateFinalState(tbAttResBuildInfo.getResGuid(), tbAttResBuildInfo.getCheckState()); |
| | | }else { |
| | | tbAttResBuildInfo.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResBuildInfo); |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResEngBene); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResEngBene.getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(tbAttResEngBene.getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | tbAttResEngBene.setGuid(oldAbAttResBase.getGuid()); |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResEngBene); |
| | | tbAttResBaseService.updateFinalState(tbAttResEngBene.getResGuid(), tbAttResEngBene.getCheckState()); |
| | | }else { |
| | | tbAttResEngBene.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResEngBene); |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResMgrSysB); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResMgrSysB.getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(tbAttResMgrSysB.getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | tbAttResMgrSysB.setGuid(oldAbAttResBase.getGuid()); |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResMgrSysB); |
| | | tbAttResBaseService.updateFinalState(tbAttResMgrSysB.getResGuid(), tbAttResMgrSysB.getCheckState()); |
| | | }else { |
| | | tbAttResMgrSysB.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResMgrSysB); |
| | |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | // 返回 |
| | |
| | | //如果是中途管理员编辑新增了一个,将状态设置为和原有的状态一致 |
| | | // 批量新增 |
| | | addFlag = saveBatch(addList); |
| | | tbAttResBaseService.updateFinalState(addList.get(0).getResGuid(),addList.get(0).getCheckState()); |
| | | } |
| | | if (updateList.size()>0){ |
| | | // 批量更新 |
| | | addFlag = updateBatchById(updateList); |
| | | tbAttResBaseService.updateFinalState(updateList.get(0).getResGuid(),updateList.get(0).getCheckState()); |
| | | } |
| | | if (removeList.size()>0){ |
| | | // 批量删除 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResProjectUtilize); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResProjectUtilize.getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(tbAttResProjectUtilize.getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | tbAttResProjectUtilize.setGuid(oldAbAttResBase.getGuid()); |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResProjectUtilize); |
| | | tbAttResBaseService.updateFinalState(tbAttResProjectUtilize.getResGuid(),tbAttResProjectUtilize.getCheckState()); |
| | | }else { |
| | | tbAttResProjectUtilize.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResProjectUtilize); |
| | |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | // 返回 |
| | |
| | | if (addList.size()>0){ |
| | | // 批量新增 |
| | | addFlag = saveBatch(addList); |
| | | tbAttResBaseService.updateFinalState(addList.get(0).getResGuid(),addList.get(0).getCheckState()); |
| | | } |
| | | if (updateList.size()>0){ |
| | | // 批量更新 |
| | | addFlag = updateBatchById(updateList); |
| | | tbAttResBaseService.updateFinalState(updateList.get(0).getResGuid(),updateList.get(0).getCheckState()); |
| | | } |
| | | if (removeList.size()>0){ |
| | | // 批量删除 |
| | |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | // 返回 |
| | |
| | | if (addList.size()>0){ |
| | | // 批量新增 |
| | | addFlag = saveBatch(addList); |
| | | tbAttResBaseService.updateFinalState(addList.get(0).getResGuid(),addList.get(0).getCheckState()); |
| | | } |
| | | if (updateList.size()>0){ |
| | | // 批量更新 |
| | | addFlag = updateBatchById(updateList); |
| | | tbAttResBaseService.updateFinalState(updateList.get(0).getResGuid(),updateList.get(0).getCheckState()); |
| | | } |
| | | if (removeList.size()>0){ |
| | | // 批量删除 |
| | |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | // 返回 |
| | |
| | | if (addList.size()>0){ |
| | | // 批量新增 |
| | | addFlag = saveBatch(addList); |
| | | tbAttResBaseService.updateFinalState(addList.get(0).getResGuid(),addList.get(0).getCheckState()); |
| | | } |
| | | if (updateList.size()>0){ |
| | | // 批量更新 |
| | | addFlag = updateBatchById(updateList); |
| | | tbAttResBaseService.updateFinalState(updateList.get(0).getResGuid(),updateList.get(0).getCheckState()); |
| | | } |
| | | if (removeList.size()>0){ |
| | | // 批量删除 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResSafetyMonitor); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResSafetyMonitor.getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(tbAttResSafetyMonitor.getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | tbAttResSafetyMonitor.setGuid(oldAbAttResBase.getGuid()); |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResSafetyMonitor); |
| | | tbAttResBaseService.updateFinalState(tbAttResSafetyMonitor.getResGuid(),tbAttResSafetyMonitor.getCheckState()); |
| | | }else { |
| | | tbAttResSafetyMonitor.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResSafetyMonitor); |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResStagChar); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | } |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResStagChar.getCheckState()==3){ |
| | | tbAttResStagChar.setCheckState(0); |
| | | detail.setCheckState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResStagChar); |
| | | int i = baseMapper.updateById(detail); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(), tbAttResStagChar.getCheckState()); |
| | |
| | | tbAttResStagChar.setGuid(oldAbAttResBase.getGuid()); |
| | | // 更新 |
| | | i = baseMapper.updateById(tbAttResStagChar); |
| | | tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(),tbAttResStagChar.getCheckState()); |
| | | }else { |
| | | tbAttResStagChar.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbAttResStagChar); |
| | |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResStagChar.setCheckLog(builder.toString()); |
| | | oldAbAttResBase.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResStagChar.setCheckLog(stringBuilder.toString()); |
| | | oldAbAttResBase.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | if (newTbAttResStagChar.getCheckState()==4){ |
| | | fillName = "编辑"; |
| | | oldAbAttResBase.setCheckState(oldAbAttResBase.getCheckState()); |
| | | newTbAttResStagChar.setCheckState(oldAbAttResBase.getCheckState()); |
| | | } |
| | | |
| | |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // 填报 |
| | | oldAbAttResBase.setLog(stringBuilder.toString()); |
| | | newTbAttResStagChar.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | // 返回 |
| | |
| | | if (addList.size()>0){ |
| | | // 批量新增 |
| | | addFlag = saveBatch(addList); |
| | | tbAttResBaseService.updateFinalState(addList.get(0).getResGuid(),addList.get(0).getCheckState()); |
| | | } |
| | | if (updateList.size()>0){ |
| | | // 批量更新 |
| | | addFlag = updateBatchById(updateList); |
| | | tbAttResBaseService.updateFinalState(updateList.get(0).getResGuid(),updateList.get(0).getCheckState()); |
| | | } |
| | | if (removeList.size()>0){ |
| | | // 批量删除 |
| | |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | // if (!edit) { |
| | | // tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | // } |
| | | return true; |
| | | } |
| | | // 返回 |
| | |
| | | if (addList.size()>0){ |
| | | // 批量新增 |
| | | addFlag = saveBatch(addList); |
| | | tbAttResBaseService.updateFinalState(addList.get(0).getResGuid(),addList.get(0).getCheckState()); |
| | | } |
| | | if (updateList.size()>0){ |
| | | // 批量更新 |
| | | addFlag = updateBatchById(updateList); |
| | | tbAttResBaseService.updateFinalState(updateList.get(0).getResGuid(),updateList.get(0).getCheckState()); |
| | | } |
| | | if (removeList.size()>0){ |
| | | // 批量删除 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbFileStorageLocation); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbFileStorageLocation.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | tbFileStorageLocation.setGuid(oldAbAttResBase.getGuid()); |
| | | // 更新 |
| | | i = baseMapper.updateById(tbFileStorageLocation); |
| | | tbAttResBaseService.updateFinalState(tbFileStorageLocation.getResGuid(), tbFileStorageLocation.getCheckState()); |
| | | }else { |
| | | tbFileStorageLocation.setCreateTime(new Date()); |
| | | i = baseMapper.insert(tbFileStorageLocation); |