| | |
| | | import com.ruili.wcp.web.model.AjaxResponse; |
| | | import com.ruili.wcp.web.model.ErrorInfo; |
| | | import com.zbooksoft.gdmis.config.ArchivesCustomConfig; |
| | | import com.zbooksoft.gdmis.data.entity.CatCgwjxx; |
| | | import com.zbooksoft.gdmis.data.entity.CatCheck; |
| | | import com.zbooksoft.gdmis.data.entity.CatYswjxx; |
| | | import com.zbooksoft.gdmis.data.entity.*; |
| | | import com.zbooksoft.gdmis.service.*; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | |
| | | UpdateXml2023Service updateXml2023Service; |
| | | @Autowired |
| | | XmlService xmlService; |
| | | @Autowired |
| | | CheckQuestionService checkQuestionService; |
| | | @Autowired |
| | | SaveQuestionService saveQuestionService; |
| | | |
| | | @Autowired |
| | | CustomConfigUtil customConfigUtil; |
| | |
| | | String uploadPath = archivesCustomConfig.getOriginalPath(); |
| | | for (Map<String, Object> map : list) { |
| | | // String dh = map.get("DH").toString(); |
| | | String dh = map.get("XMKYQBH").toString(); |
| | | String dh = map.get("XMKYQBH").toString()+"["+map.get("XMKYQMC")+"]"; |
| | | //d/省馆档号 |
| | | String filePath = uploadPath + dh + File.separator + "电子文件" + File.separator; |
| | | Long id = Long.parseLong(map.get("ID").toString()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 添加验收问题 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping({"/SaveQuestion"}) |
| | | @ResponseBody |
| | | @RequiresUser |
| | | public Object SaveQuestion(@RequestBody Map<String, Object> postData) { |
| | | try { |
| | | Long id = Long.parseLong(postData.get("id").toString()); |
| | | |
| | | String selectSql = "SELECT * FROM BUS_TRANSFER_LOG WHERE ID =" + id; |
| | | Map<String, Object> map = jdbcTemplate.queryForMap(selectSql); |
| | | Object ajId = map.get("AJ_ID"); |
| | | List<String> ids= (List<String>) postData.get("ids"); |
| | | for (String questionId : ids) { |
| | | CheckQuestion question= checkQuestionService.getById(questionId); |
| | | if (question != null) { |
| | | QueryWrapper<SaveQuestion> queryWrapper=new QueryWrapper<>(); |
| | | queryWrapper.eq("TRANSFER_ID",id).eq("CHECK_ID",question.getId()); |
| | | List<SaveQuestion> saveQuestionList=saveQuestionService.list(queryWrapper); |
| | | if (saveQuestionList.size()==0){ |
| | | SaveQuestion saveQuestion=new SaveQuestion(); |
| | | saveQuestion.setQuestion(question.getQuestion()); |
| | | saveQuestion.setRequirements(question.getRequirements()); |
| | | saveQuestion.setTranslation(question.getTranslation()); |
| | | saveQuestion.setTransferId(id); |
| | | saveQuestion.setCheckId(question.getId()); |
| | | saveQuestionService.saveOrUpdate(saveQuestion); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return new AjaxResponse(true); |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage(), e); |
| | | return new AjaxResponse(new ErrorInfo(e.getMessage()), false); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 资料验收 |
| | | * |
| | | * @return |
| | |
| | | CatCheck catCheck = new CatCheck(); |
| | | catCheck.setItemId(id); |
| | | catCheck.setAjId(Long.parseLong(ajId.toString())); |
| | | catCheck.setQuestion(postData.get("question").toString()); |
| | | // catCheck.setQuestion(postData.get("question").toString()); |
| | | catCheck.setIsPass(checkState); |
| | | catCheck.setCreateTime(new Date()); |
| | | catCheck.setCreateUserName(user.getUserName()); |
| | | catCheck.setCreateUserId(user.getUserId()); |
| | | catCheck.setCheckQuestion(postData.get("checkQuestion") == null ? "" : postData.get("checkQuestion").toString()); |
| | | // catCheck.setCheckQuestion(postData.get("checkQuestion") == null ? "" : postData.get("checkQuestion").toString()); |
| | | catCheckService.saveOrUpdate(catCheck); |
| | | |
| | | String updateSql = "update BUS_TRANSFER_LOG set YSZT = '" + checkState + "' where ID = " + id; |
| | | jdbcTemplate.execute(updateSql); |
| | | String updateSqlY = "update CAT_ITEM_YSWJXX set YSZT = '" + checkState + "' where YJ_ID = " + id; |
| | | jdbcTemplate.execute(updateSqlY); |
| | | if (checkState==1){ |
| | | String updateSqlY = "update CAT_ITEM_YSWJXX set YSZT = '" + checkState + "' where YJ_ID = " + id; |
| | | jdbcTemplate.execute(updateSqlY); |
| | | }else if (checkState==3){ |
| | | String updateSqlY = "update CAT_FILE_AJJXX set YSWSJ = '" + postData.get("checkData") + "' where ID = " + ajId; |
| | | jdbcTemplate.execute(updateSqlY); |
| | | } |
| | | return new AjaxResponse(true); |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage(), e); |