Browse Source

反馈意见添加分发附件及"无效件"

jz.kai 2 years ago
parent
commit
39b63f6821

+ 1 - 1
common/src/main/java/com/jpsoft/excellent/modules/base/dto/FeedbackAttachmentDTO.java → common/src/main/java/com/jpsoft/excellent/modules/base/dto/AttachmentDTO.java

@@ -9,7 +9,7 @@ import lombok.Data;
  */
 @Data
 @ApiModel(value = "base_incident_attachment的实体类")
-public class FeedbackAttachmentDTO {
+public class AttachmentDTO {
         @ApiModelProperty(value = "附件标题")
     private String name;
         @ApiModelProperty(value = "附件路径")

+ 13 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/dto/NextStepDTO.java

@@ -0,0 +1,13 @@
+package com.jpsoft.excellent.modules.base.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class NextStepDTO {
+    private String opinionId;
+    private String[] orgIds;
+    private String allotedDate;
+    private List<AttachmentDTO> attList;
+}

+ 4 - 7
common/src/main/java/com/jpsoft/excellent/modules/base/entity/FeedbackOpinion.java

@@ -1,12 +1,9 @@
 package com.jpsoft.excellent.modules.base.entity;
 
-import java.io.Serializable;
 import java.util.Date;
-import java.text.SimpleDateFormat;
-import java.math.BigDecimal;
 import java.util.List;
 
-import com.jpsoft.excellent.modules.base.dto.FeedbackAttachmentDTO;
+import com.jpsoft.excellent.modules.base.dto.AttachmentDTO;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
@@ -36,7 +33,7 @@ public class FeedbackOpinion {
         @ApiModelProperty(value = "处理进度")
     private Boolean opinionStatus;
         @ApiModelProperty(value = "确认状态")
-    private Boolean confirmStatus;
+    private Integer confirmStatus;
         @ApiModelProperty(value = "原因")
     private String cause;
         @ApiModelProperty(value = "内容")
@@ -74,9 +71,9 @@ public class FeedbackOpinion {
     private Boolean areaSubordinate;
 
         @ApiModelProperty(value = "附件列表")
-    private List<FeedbackAttachmentDTO> attList;
+    private List<AttachmentDTO> attList;
         @ApiModelProperty(value = "图片列表")
-    private List<FeedbackAttachmentDTO> picList;
+    private List<AttachmentDTO> picList;
         @ApiModelProperty(value = "图片路径数组")
     private String[] picUrlList;
         @ApiModelProperty(value = "处理完成")

+ 3 - 6
common/src/main/java/com/jpsoft/excellent/modules/base/entity/OfficeOpinion.java

@@ -1,12 +1,9 @@
 package com.jpsoft.excellent.modules.base.entity;
 
-import java.io.Serializable;
 import java.util.Date;
-import java.text.SimpleDateFormat;
-import java.math.BigDecimal;
 import java.util.List;
 
-import com.jpsoft.excellent.modules.base.dto.FeedbackAttachmentDTO;
+import com.jpsoft.excellent.modules.base.dto.AttachmentDTO;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
@@ -64,9 +61,9 @@ public class OfficeOpinion {
     private String areaId;
     private String areaName;
     @ApiModelProperty(value = "附件列表")
-    private List<FeedbackAttachmentDTO> attList;
+    private List<AttachmentDTO> attList;
     @ApiModelProperty(value = "图片列表")
-    private List<FeedbackAttachmentDTO> picList;
+    private List<AttachmentDTO> picList;
     @ApiModelProperty(value = "图片路径数组")
     private String[] picUrlList;
     @ApiModelProperty(value = "处理完成")

+ 3 - 0
common/src/main/resources/mapper/base/FeedbackOpinion.xml

@@ -170,6 +170,9 @@
 			<if test="searchParams.opinionStatus != null">
 				and a.opinion_status = #{searchParams.opinionStatus}
 			</if>
+			<if test="searchParams.avail">
+				and a.confirm_status != 2
+			</if>
 			<if test="searchParams.confirmStatus != null">
 				and a.confirm_status = #{searchParams.confirmStatus}
 			</if>

+ 81 - 51
web/src/main/java/com/jpsoft/excellent/modules/base/controller/FeedbackOpinionController.java

@@ -1,18 +1,16 @@
 package com.jpsoft.excellent.modules.base.controller;
 
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.Page;
 import com.jpsoft.excellent.config.OSSConfig;
-import com.jpsoft.excellent.modules.base.dto.FeedbackAttachmentDTO;
+import com.jpsoft.excellent.modules.base.dto.AttachmentDTO;
 import com.jpsoft.excellent.modules.base.dto.FeedbackOpinionReportDTO;
+import com.jpsoft.excellent.modules.base.dto.NextStepDTO;
 import com.jpsoft.excellent.modules.base.entity.*;
 import com.jpsoft.excellent.modules.base.service.*;
 import com.jpsoft.excellent.modules.common.utils.OSSUtil;
 import com.jpsoft.excellent.modules.common.utils.PojoUtils;
 import com.jpsoft.excellent.modules.common.dto.Sort;
 import com.jpsoft.excellent.modules.common.dto.MessageResult;
-import com.jpsoft.excellent.modules.sys.entity.DataDictionary;
 import com.jpsoft.excellent.modules.sys.entity.User;
 import com.jpsoft.excellent.modules.sys.service.DataDictionaryService;
 import com.jpsoft.excellent.modules.sys.service.UserService;
@@ -27,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpServletRequest;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.text.SimpleDateFormat;
@@ -65,7 +62,7 @@ public class FeedbackOpinionController {
     public MessageResult<FeedbackOpinion> create(){
         MessageResult<FeedbackOpinion> msgResult = new MessageResult<>();
 
-        List<FeedbackAttachmentDTO> feedbackAttachmentList = new ArrayList<FeedbackAttachmentDTO>();
+        List<AttachmentDTO> feedbackAttachmentList = new ArrayList<AttachmentDTO>();
 
         FeedbackOpinion feedbackOpinion = new FeedbackOpinion();
         feedbackOpinion.setAttList(feedbackAttachmentList);
@@ -126,28 +123,28 @@ public class FeedbackOpinionController {
             }
 
             //附件列表
-            List<FeedbackAttachmentDTO> feedbackAttachmentDTOList1 = new ArrayList<>();
-            List<FeedbackAttachment> feedbackAttachmentList1 = feedbackAttachmentService.findListByFeedbackOpinionId(id,"1");
+            List<AttachmentDTO> attachmentDTOList1 = new ArrayList<>();
+            List<FeedbackAttachment> feedbackAttachmentList1 = feedbackAttachmentService.findListByFeedbackOpinionId(id,"3");
             for(FeedbackAttachment feedbackAttachment : feedbackAttachmentList1){
-                FeedbackAttachmentDTO feedbackAttachmentDTO = new FeedbackAttachmentDTO();
-                feedbackAttachmentDTO.setName(feedbackAttachment.getAttachmentTitle());
-                feedbackAttachmentDTO.setUrl(feedbackAttachment.getAttachmentUrl());
-                feedbackAttachmentDTOList1.add(feedbackAttachmentDTO);
+                AttachmentDTO attachmentDTO = new AttachmentDTO();
+                attachmentDTO.setName(feedbackAttachment.getAttachmentTitle());
+                attachmentDTO.setUrl(feedbackAttachment.getAttachmentUrl());
+                attachmentDTOList1.add(attachmentDTO);
             }
-            feedbackOpinion.setAttList(feedbackAttachmentDTOList1);
+            feedbackOpinion.setAttList(attachmentDTOList1);
             //图片列表
-            List<FeedbackAttachmentDTO> feedbackAttachmentDTOList2 = new ArrayList<>();
+            List<AttachmentDTO> attachmentDTOList2 = new ArrayList<>();
             List<FeedbackAttachment> feedbackAttachmentList2 = feedbackAttachmentService.findListByFeedbackOpinionId(id,"2");
             String[] picUrlList = new String[feedbackAttachmentList2.size()];
             for(int i=0;i<feedbackAttachmentList2.size();i++){
                 FeedbackAttachment feedbackAttachment = feedbackAttachmentList2.get(i);
-                FeedbackAttachmentDTO feedbackAttachmentDTO = new FeedbackAttachmentDTO();
-                feedbackAttachmentDTO.setName(feedbackAttachment.getAttachmentTitle());
-                feedbackAttachmentDTO.setUrl(feedbackAttachment.getAttachmentUrl());
-                feedbackAttachmentDTOList2.add(feedbackAttachmentDTO);
+                AttachmentDTO attachmentDTO = new AttachmentDTO();
+                attachmentDTO.setName(feedbackAttachment.getAttachmentTitle());
+                attachmentDTO.setUrl(feedbackAttachment.getAttachmentUrl());
+                attachmentDTOList2.add(attachmentDTO);
                 picUrlList[i] = feedbackAttachment.getAttachmentUrl();
             }
-            feedbackOpinion.setPicList(feedbackAttachmentDTOList2);
+            feedbackOpinion.setPicList(attachmentDTOList2);
             feedbackOpinion.setPicUrlList(picUrlList);
             //步进列表
             List<FeedbackStepStatus> feedbackStepStatusList = feedbackStepStatusService.findByList(feedbackOpinion.getId(),null);
@@ -193,7 +190,7 @@ public class FeedbackOpinionController {
             int affectCount = feedbackOpinionService.update(feedbackOpinion);
 
             if (affectCount > 0) {
-                if (feedbackOpinion.getConfirmStatus() == null || !feedbackOpinion.getConfirmStatus()) {
+                if (feedbackOpinion.getConfirmStatus() == null || feedbackOpinion.getConfirmStatus() == 0) {
                     //删除关联附件及图片
                     List<FeedbackAttachment> feedbackAttachmentList = feedbackAttachmentService.findListByFeedbackOpinionId(feedbackOpinion.getId(), null);
                     for (FeedbackAttachment feedbackAttachment : feedbackAttachmentList) {
@@ -201,13 +198,13 @@ public class FeedbackOpinionController {
                     }
                     //关联附件
                     for (int i = 0; i < feedbackOpinion.getAttList().size(); i++) {
-                        FeedbackAttachmentDTO feedbackAttachmentDTO = feedbackOpinion.getAttList().get(i);
+                        AttachmentDTO attachmentDTO = feedbackOpinion.getAttList().get(i);
                         FeedbackAttachment feedbackAttachment = new FeedbackAttachment();
                         feedbackAttachment.setId(UUID.randomUUID().toString());
                         feedbackAttachment.setFeedbackOpinionId(feedbackOpinion.getId());
                         feedbackAttachment.setAttachmentType("1");
-                        feedbackAttachment.setAttachmentTitle(feedbackAttachmentDTO.getName());
-                        feedbackAttachment.setAttachmentUrl(feedbackAttachmentDTO.getUrl());
+                        feedbackAttachment.setAttachmentTitle(attachmentDTO.getName());
+                        feedbackAttachment.setAttachmentUrl(attachmentDTO.getUrl());
                         feedbackAttachment.setSortNo(i);
                         feedbackAttachment.setCreateBy(subject);
                         feedbackAttachment.setCreateTime(new Date());
@@ -215,13 +212,13 @@ public class FeedbackOpinionController {
                     }
                     //关联图片
                     for (int i = 0; i < feedbackOpinion.getPicList().size(); i++) {
-                        FeedbackAttachmentDTO feedbackAttachmentDTO = feedbackOpinion.getPicList().get(i);
+                        AttachmentDTO attachmentDTO = feedbackOpinion.getPicList().get(i);
                         FeedbackAttachment feedbackAttachment = new FeedbackAttachment();
                         feedbackAttachment.setId(UUID.randomUUID().toString());
                         feedbackAttachment.setFeedbackOpinionId(feedbackOpinion.getId());
                         feedbackAttachment.setAttachmentType("2");
-                        feedbackAttachment.setAttachmentTitle(feedbackAttachmentDTO.getName());
-                        feedbackAttachment.setAttachmentUrl(feedbackAttachmentDTO.getUrl());
+                        feedbackAttachment.setAttachmentTitle(attachmentDTO.getName());
+                        feedbackAttachment.setAttachmentUrl(attachmentDTO.getUrl());
                         feedbackAttachment.setSortNo(i);
                         feedbackAttachment.setCreateBy(subject);
                         feedbackAttachment.setCreateTime(new Date());
@@ -246,7 +243,7 @@ public class FeedbackOpinionController {
         return msgResult;
     }
 
-	@ApiOperation(value="删除")
+    @ApiOperation(value="删除")
     @PostMapping("delete/{id}")
     public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
         MessageResult<Integer> msgResult = new MessageResult<>();
@@ -371,12 +368,10 @@ public class FeedbackOpinionController {
             }
         }
         if (StringUtils.isNotEmpty(confirmStatus)) {
-            if("1".equals(confirmStatus)) {
-                searchParams.put("confirmStatus", true);
-            }
-            if("0".equals(confirmStatus)) {
-                searchParams.put("confirmStatus", false);
-            }
+            searchParams.put("confirmStatus", confirmStatus);
+        }
+        else {
+            searchParams.put("avail", true);
         }
         if (StringUtils.isNotEmpty(timeout)) {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -515,12 +510,7 @@ public class FeedbackOpinionController {
             }
         }
         if (StringUtils.isNotEmpty(confirmStatus)) {
-            if("1".equals(confirmStatus)) {
-                searchParams.put("confirmStatus", true);
-            }
-            if("0".equals(confirmStatus)) {
-                searchParams.put("confirmStatus", false);
-            }
+            searchParams.put("confirmStatus", confirmStatus);
         }
         if (StringUtils.isNotEmpty(timeout)) {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -580,12 +570,15 @@ public class FeedbackOpinionController {
             else{
                 row.getCell(9).setCellValue("未处理");
             }
-            if(feedbackOpinion.getConfirmStatus()){
+            if(feedbackOpinion.getConfirmStatus() == 1){
                 row.getCell(10).setCellValue("已确认");
             }
-            else{
+            if(feedbackOpinion.getConfirmStatus() == 0){
                 row.getCell(10).setCellValue("待确认");
             }
+            if(feedbackOpinion.getConfirmStatus() == 2){
+                row.getCell(10).setCellValue("忽略");
+            }
 
             row.getCell(0).setCellStyle(cellStyleContent);
             row.getCell(1).setCellStyle(cellStyleContent);
@@ -672,7 +665,7 @@ public class FeedbackOpinionController {
                 } else {
                     ZsWCY++;
                 }
-                if (feedbackOpinion.getConfirmStatus() != null && feedbackOpinion.getConfirmStatus()) {
+                if (feedbackOpinion.getConfirmStatus() != null && feedbackOpinion.getConfirmStatus() == 1) {
                     ZsYQR++;
                 } else {
                     ZsWQR++;
@@ -714,7 +707,7 @@ public class FeedbackOpinionController {
                     } else {
                         countWCY++;
                     }
-                    if (feedbackOpinion.getConfirmStatus() != null && feedbackOpinion.getConfirmStatus()) {
+                    if (feedbackOpinion.getConfirmStatus() != null && feedbackOpinion.getConfirmStatus() == 1) {
                         countYQR++;
                     } else {
                         countWQR++;
@@ -907,35 +900,48 @@ public class FeedbackOpinionController {
     @ApiOperation(value="步进")
     @PostMapping("nextStep")
     @Transactional(rollbackFor = Exception.class)
-    public MessageResult nextStep(String feedbackOpinionId, String[] orgIds, String allotedDate, @RequestAttribute String subject){
+    public MessageResult nextStep(@RequestBody NextStepDTO nextStepDTO, @RequestAttribute String subject){
         MessageResult msgResult = new MessageResult<>();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 
         try {
             //反馈意见
-            FeedbackOpinion feedbackOpinion = feedbackOpinionService.get(feedbackOpinionId);
-            feedbackOpinion.setConfirmStatus(true);
-            feedbackOpinion.setAllotedDate(sdf.parse(allotedDate));
+            FeedbackOpinion feedbackOpinion = feedbackOpinionService.get(nextStepDTO.getOpinionId());
+            feedbackOpinion.setConfirmStatus(1);
+            feedbackOpinion.setAllotedDate(sdf.parse(nextStepDTO.getAllotedDate()));
             feedbackOpinionService.update(feedbackOpinion);
 
+            //反馈意见附件
+            for(AttachmentDTO dto : nextStepDTO.getAttList()) {
+                FeedbackAttachment feedbackAttachment = new FeedbackAttachment();
+                feedbackAttachment.setId(UUID.randomUUID().toString());
+                feedbackAttachment.setFeedbackOpinionId(feedbackOpinion.getId());
+                feedbackAttachment.setAttachmentType("3");
+                feedbackAttachment.setAttachmentTitle(dto.getName());
+                feedbackAttachment.setAttachmentUrl(dto.getUrl());
+                feedbackAttachment.setCreateBy(subject);
+                feedbackAttachment.setCreateTime(new Date());
+                feedbackAttachmentService.insert(feedbackAttachment);
+            }
+
             //反馈意见步进
             FeedbackStep feedbackStep = new FeedbackStep();
             feedbackStep.setId(UUID.randomUUID().toString());
             feedbackStep.setFeedbackOpinionId(feedbackOpinion.getId());
-            feedbackStep.setAllotedDate(sdf.parse(allotedDate));
+            feedbackStep.setAllotedDate(sdf.parse(nextStepDTO.getAllotedDate()));
             feedbackStep.setDelFlag(false);
             feedbackStep.setCreateTime(new Date());
             feedbackStep.setCreateBy(subject);
             feedbackStepService.insert(feedbackStep);
 
             //反馈意见反馈
-            for(String orgId : orgIds) {
+            for(String orgId : nextStepDTO.getOrgIds()) {
                 FeedbackStepStatus feedbackStepStatus = new FeedbackStepStatus();
                 feedbackStepStatus.setId(UUID.randomUUID().toString());
                 feedbackStepStatus.setFeedbackStepId(feedbackStep.getId());
                 feedbackStepStatus.setOrgId(orgId);
                 feedbackStepStatus.setStatus(false);
-                feedbackStepStatus.setAllotedDate(sdf.parse(allotedDate));
+                feedbackStepStatus.setAllotedDate(sdf.parse(nextStepDTO.getAllotedDate()));
                 feedbackStepStatus.setDelFlag(false);
                 feedbackStepStatus.setCreateTime(new Date());
                 feedbackStepStatus.setCreateBy(subject);
@@ -962,7 +968,7 @@ public class FeedbackOpinionController {
         try {
             //反馈意见
             FeedbackOpinion feedbackOpinion = feedbackOpinionService.get(feedbackOpinionId);
-            feedbackOpinion.setConfirmStatus(true);
+            feedbackOpinion.setConfirmStatus(1);
             feedbackOpinion.setOpinionStatus(true);
             feedbackOpinion.setUpdateBy(subject);
             feedbackOpinion.setUpdateTime(new Date());
@@ -980,6 +986,30 @@ public class FeedbackOpinionController {
         return msgResult;
     }
 
+    @ApiOperation(value="完成")
+    @PostMapping("noAvail")
+    public MessageResult noAvail(String feedbackOpinionId, @RequestAttribute String subject){
+        MessageResult msgResult = new MessageResult<>();
+        try {
+            //反馈意见
+            FeedbackOpinion feedbackOpinion = feedbackOpinionService.get(feedbackOpinionId);
+            feedbackOpinion.setConfirmStatus(2);
+            feedbackOpinion.setUpdateBy(subject);
+            feedbackOpinion.setUpdateTime(new Date());
+            feedbackOpinionService.update(feedbackOpinion);
+
+            msgResult.setResult(true);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
     private String parentFullName(String parentId){
         String fullName = "";
 

+ 20 - 21
web/src/main/java/com/jpsoft/excellent/modules/base/controller/OfficeOpinionController.java

@@ -2,7 +2,7 @@ package com.jpsoft.excellent.modules.base.controller;
 
 import com.github.pagehelper.Page;
 import com.jpsoft.excellent.config.OSSConfig;
-import com.jpsoft.excellent.modules.base.dto.FeedbackAttachmentDTO;
+import com.jpsoft.excellent.modules.base.dto.AttachmentDTO;
 import com.jpsoft.excellent.modules.base.entity.*;
 import com.jpsoft.excellent.modules.base.service.*;
 import com.jpsoft.excellent.modules.common.utils.OSSUtil;
@@ -22,7 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpServletRequest;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.text.SimpleDateFormat;
@@ -54,7 +53,7 @@ public class OfficeOpinionController {
     public MessageResult<OfficeOpinion> create(){
         MessageResult<OfficeOpinion> msgResult = new MessageResult<>();
 
-        List<FeedbackAttachmentDTO> feedbackAttachmentList = new ArrayList<>();
+        List<AttachmentDTO> feedbackAttachmentList = new ArrayList<>();
         OfficeOpinion officeOpinion = new OfficeOpinion();
         officeOpinion.setAttList(feedbackAttachmentList);
         officeOpinion.setPicList(feedbackAttachmentList);
@@ -112,28 +111,28 @@ public class OfficeOpinionController {
             }
 
             //附件列表
-            List<FeedbackAttachmentDTO> feedbackAttachmentDTOList1 = new ArrayList<>();
+            List<AttachmentDTO> attachmentDTOList1 = new ArrayList<>();
             List<OfficeAttachment> officeAttachmentList1 = officeAttachmentService.findListByOfficeOpinionId(id,"1");
             for(OfficeAttachment officeAttachment : officeAttachmentList1){
-                FeedbackAttachmentDTO feedbackAttachmentDTO = new FeedbackAttachmentDTO();
-                feedbackAttachmentDTO.setName(officeAttachment.getAttachmentTitle());
-                feedbackAttachmentDTO.setUrl(officeAttachment.getAttachmentUrl());
-                feedbackAttachmentDTOList1.add(feedbackAttachmentDTO);
+                AttachmentDTO attachmentDTO = new AttachmentDTO();
+                attachmentDTO.setName(officeAttachment.getAttachmentTitle());
+                attachmentDTO.setUrl(officeAttachment.getAttachmentUrl());
+                attachmentDTOList1.add(attachmentDTO);
             }
-            officeOpinion.setAttList(feedbackAttachmentDTOList1);
+            officeOpinion.setAttList(attachmentDTOList1);
             //图片列表
-            List<FeedbackAttachmentDTO> feedbackAttachmentDTOList2 = new ArrayList<>();
+            List<AttachmentDTO> attachmentDTOList2 = new ArrayList<>();
             List<OfficeAttachment> officeAttachmentList2 = officeAttachmentService.findListByOfficeOpinionId(id,"2");
             String[] picUrlList = new String[officeAttachmentList2.size()];
             for(int i=0;i<officeAttachmentList2.size();i++){
                 OfficeAttachment officeAttachment = officeAttachmentList2.get(i);
-                FeedbackAttachmentDTO feedbackAttachmentDTO = new FeedbackAttachmentDTO();
-                feedbackAttachmentDTO.setName(officeAttachment.getAttachmentTitle());
-                feedbackAttachmentDTO.setUrl(officeAttachment.getAttachmentUrl());
-                feedbackAttachmentDTOList2.add(feedbackAttachmentDTO);
+                AttachmentDTO attachmentDTO = new AttachmentDTO();
+                attachmentDTO.setName(officeAttachment.getAttachmentTitle());
+                attachmentDTO.setUrl(officeAttachment.getAttachmentUrl());
+                attachmentDTOList2.add(attachmentDTO);
                 picUrlList[i] = officeAttachment.getAttachmentUrl();
             }
-            officeOpinion.setPicList(feedbackAttachmentDTOList2);
+            officeOpinion.setPicList(attachmentDTOList2);
             officeOpinion.setPicUrlList(picUrlList);
             //步进列表
             List<OfficeReply> officeReplyList = officeReplyService.findByList(officeOpinion.getId(),null);
@@ -187,13 +186,13 @@ public class OfficeOpinionController {
                     }
                     //关联附件
                     for (int i = 0; i < officeOpinion.getAttList().size(); i++) {
-                        FeedbackAttachmentDTO feedbackAttachmentDTO = officeOpinion.getAttList().get(i);
+                        AttachmentDTO attachmentDTO = officeOpinion.getAttList().get(i);
                         OfficeAttachment officeAttachment = new OfficeAttachment();
                         officeAttachment.setId(UUID.randomUUID().toString());
                         officeAttachment.setOfficeOpinionId(officeOpinion.getId());
                         officeAttachment.setAttachmentType("1");
-                        officeAttachment.setAttachmentTitle(feedbackAttachmentDTO.getName());
-                        officeAttachment.setAttachmentUrl(feedbackAttachmentDTO.getUrl());
+                        officeAttachment.setAttachmentTitle(attachmentDTO.getName());
+                        officeAttachment.setAttachmentUrl(attachmentDTO.getUrl());
                         officeAttachment.setSortNo(i);
                         officeAttachment.setCreateBy(subject);
                         officeAttachment.setCreateTime(new Date());
@@ -201,13 +200,13 @@ public class OfficeOpinionController {
                     }
                     //关联图片
                     for (int i = 0; i < officeOpinion.getPicList().size(); i++) {
-                        FeedbackAttachmentDTO feedbackAttachmentDTO = officeOpinion.getPicList().get(i);
+                        AttachmentDTO attachmentDTO = officeOpinion.getPicList().get(i);
                         OfficeAttachment officeAttachment = new OfficeAttachment();
                         officeAttachment.setId(UUID.randomUUID().toString());
                         officeAttachment.setOfficeOpinionId(officeOpinion.getId());
                         officeAttachment.setAttachmentType("2");
-                        officeAttachment.setAttachmentTitle(feedbackAttachmentDTO.getName());
-                        officeAttachment.setAttachmentUrl(feedbackAttachmentDTO.getUrl());
+                        officeAttachment.setAttachmentTitle(attachmentDTO.getName());
+                        officeAttachment.setAttachmentUrl(attachmentDTO.getUrl());
                         officeAttachment.setSortNo(i);
                         officeAttachment.setCreateBy(subject);
                         officeAttachment.setCreateTime(new Date());

+ 1 - 1
web/src/main/java/com/jpsoft/excellent/modules/open/FeedbackOpinionApiController.java

@@ -127,7 +127,7 @@ public class FeedbackOpinionApiController {
             feedbackOpinion.setDelFlag(false);
             feedbackOpinion.setCreateTime(new Date());
             feedbackOpinion.setOpinionStatus(false);
-            feedbackOpinion.setConfirmStatus(false);
+            feedbackOpinion.setConfirmStatus(0);
             
             int affectCount = feedbackOpinionService.insert(feedbackOpinion);