From 2b543ca35ad4697e31225829be13e375cd2b0259 Mon Sep 17 00:00:00 2001
From: zs <zhoushuai@zbooksoft.com>
Date: 星期三, 04 二月 2026 16:46:00 +0800
Subject: [PATCH] 成果资料退回后需要删除对应附件
---
src/main/java/com/zbooksoft/gdmis/controller/CatAjjxxController.java | 64 ++++++++++++++++++++++++++++----
1 files changed, 56 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/zbooksoft/gdmis/controller/CatAjjxxController.java b/src/main/java/com/zbooksoft/gdmis/controller/CatAjjxxController.java
index 555e5e0..28e3c41 100644
--- a/src/main/java/com/zbooksoft/gdmis/controller/CatAjjxxController.java
+++ b/src/main/java/com/zbooksoft/gdmis/controller/CatAjjxxController.java
@@ -9,9 +9,7 @@
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;
@@ -66,6 +64,10 @@
UpdateXml2023Service updateXml2023Service;
@Autowired
XmlService xmlService;
+ @Autowired
+ CheckQuestionService checkQuestionService;
+ @Autowired
+ SaveQuestionService saveQuestionService;
@Autowired
CustomConfigUtil customConfigUtil;
@@ -381,7 +383,7 @@
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/鐪侀妗e彿
String filePath = uploadPath + dh + File.separator + "鐢靛瓙鏂囦欢" + File.separator;
Long id = Long.parseLong(map.get("ID").toString());
@@ -557,6 +559,47 @@
}
/**
+ * 娣诲姞楠屾敹闂
+ *
+ * @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
@@ -580,18 +623,23 @@
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);
--
Gitblit v1.9.1