Просмотр исходного кода

业务提问功能,以及部分调整

user5 3 лет назад
Родитель
Сommit
8439570a71
31 измененных файлов с 5493 добавлено и 5 удалено
  1. 8 1
      src/main/java/com/jeeplus/modules/act/web/ActTaskController.java
  2. 14 0
      src/main/java/com/jeeplus/modules/businessQuestions/dao/BusinessQuestionsAttentionDao.java
  3. 97 0
      src/main/java/com/jeeplus/modules/businessQuestions/dao/BusinessQuestionsDao.java
  4. 21 0
      src/main/java/com/jeeplus/modules/businessQuestions/dao/BusinessQuestionsUserDao.java
  5. 270 0
      src/main/java/com/jeeplus/modules/businessQuestions/entity/BusinessQuestions.java
  6. 27 0
      src/main/java/com/jeeplus/modules/businessQuestions/entity/BusinessQuestionsAttentionUser.java
  7. 47 0
      src/main/java/com/jeeplus/modules/businessQuestions/entity/BusinessQuestionsContentsUser.java
  8. 27 0
      src/main/java/com/jeeplus/modules/businessQuestions/entity/BusinessQuestionsUser.java
  9. 40 0
      src/main/java/com/jeeplus/modules/businessQuestions/service/BusinessQuestionsAttentionService.java
  10. 833 0
      src/main/java/com/jeeplus/modules/businessQuestions/service/BusinessQuestionsService.java
  11. 39 0
      src/main/java/com/jeeplus/modules/businessQuestions/service/BusinessQuestionsUserService.java
  12. 53 0
      src/main/java/com/jeeplus/modules/businessQuestions/web/BusinessQuestionsAttentionController.java
  13. 336 0
      src/main/java/com/jeeplus/modules/businessQuestions/web/BusinessQuestionsController.java
  14. 52 0
      src/main/java/com/jeeplus/modules/businessQuestions/web/BusinessQuestionsUserController.java
  15. 18 0
      src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java
  16. 10 0
      src/main/java/com/jeeplus/modules/sys/web/OfficeController.java
  17. 96 0
      src/main/java/com/jeeplus/modules/workactivity/service/WorkActivityProcessService.java
  18. 56 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  19. 133 0
      src/main/resources/mappings/modules/businessQuestions/BusinessQuestionsAttentionDao.xml
  20. 331 0
      src/main/resources/mappings/modules/businessQuestions/BusinessQuestionsDao.xml
  21. 129 0
      src/main/resources/mappings/modules/businessQuestions/BusinessQuestionsUserDao.xml
  22. 109 0
      src/main/webapp/WEB-INF/tags/sys/businessQuestionsselectUser.tag
  23. 10 4
      src/main/webapp/WEB-INF/tags/sys/treeselectoffices.tag
  24. 18 0
      src/main/webapp/static/common/jeeplus.js
  25. 230 0
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsAttentionList.jsp
  26. 369 0
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsAudit.jsp
  27. 343 0
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsForm.jsp
  28. 548 0
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsList.jsp
  29. 380 0
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsModify.jsp
  30. 539 0
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsUserList.jsp
  31. 310 0
      src/main/webapp/webpage/modules/businessQuestions/businessQuestionsView.jsp

+ 8 - 1
src/main/java/com/jeeplus/modules/act/web/ActTaskController.java

@@ -252,7 +252,9 @@ public class ActTaskController extends BaseController {
 				}
 				RuralProjectRecords project = null;
 				Integer flag = 0;
+				Boolean insertBool = false;
 				for (int i =0;i<lists.size();i++){
+					insertBool = false;
 					WorkActivityProcess activityProcess = lists.get(i);
 					Act a = new Act();
 					if (activityProcess.getActivity() ==null) {
@@ -267,6 +269,9 @@ public class ActTaskController extends BaseController {
 							if("销假申请".equals(activityProcess.getRemarks())||"续假申请".equals(activityProcess.getRemarks())){
 								a.setTaskName("开始");
 							}else{
+								if("结案人驳回".equals(activityProcess.getRemarks())){
+									insertBool = true;
+								}
 								a.setTaskName("重申|撤销");
 							}
 						}
@@ -313,7 +318,9 @@ public class ActTaskController extends BaseController {
 						if(flag == 1 && null != project) {
 							a.setBeginDate(endDate);
 						}
-						histoicFlows.add(a);
+						if(!insertBool){
+							histoicFlows.add(a);
+						}
 					}
 				}
 			}

+ 14 - 0
src/main/java/com/jeeplus/modules/businessQuestions/dao/BusinessQuestionsAttentionDao.java

@@ -0,0 +1,14 @@
+package com.jeeplus.modules.businessQuestions.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+
+/**
+ * 业务提问dao
+ * @author: 徐滕
+ * @create: 2022-03-29 13:37
+ **/
+@MyBatisDao
+public interface BusinessQuestionsAttentionDao extends CrudDao<BusinessQuestions> {
+}

+ 97 - 0
src/main/java/com/jeeplus/modules/businessQuestions/dao/BusinessQuestionsDao.java

@@ -0,0 +1,97 @@
+package com.jeeplus.modules.businessQuestions.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsAttentionUser;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsContentsUser;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsUser;
+import com.jeeplus.modules.sys.entity.User;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 业务提问dao
+ * @author: 徐滕
+ * @create: 2022-03-29 13:37
+ **/
+@MyBatisDao
+public interface BusinessQuestionsDao extends CrudDao<BusinessQuestions> {
+
+    /**
+     * 添加处理人信息
+     * @param businessQuestionsUserList
+     */
+    void insertBusinessQuestionsUserList(@Param("list") List<BusinessQuestionsUser> businessQuestionsUserList);
+
+    /**
+     * 根据业务提问id删除业务处理人员信息
+     * @param businessQuestionsId
+     */
+    void deleteBusinessQuestionsUserByBusinessQuestionsId(String businessQuestionsId);
+
+    /**
+     * 添加回复信息
+     * @param businessQuestionsContentsUser
+     */
+    void insertBusinessQuestionsContentsUser(BusinessQuestionsContentsUser businessQuestionsContentsUser);
+
+    /**
+     * 修改回复信息
+     * @param businessQuestionsContentsUser
+     */
+    void updateBusinessQuestionsContentsUser(BusinessQuestionsContentsUser businessQuestionsContentsUser);
+
+    /**
+     * 删除回复信息
+     * @param id
+     */
+    void deleteBusinessQuestionsContentsUser(String id);
+
+    /**
+     * 查询所有回复消息(修改时间正序)
+     * @param businessQuestions
+     * @return
+     */
+    List<BusinessQuestionsContentsUser> getBusinessQuestionsContentsList(BusinessQuestions businessQuestions);
+
+    /**
+     * 根据业务提问查询处理人信息
+     * @param businessQuestionsId
+     * @return
+     */
+    List<User> getBusinessQuestionsUser(String businessQuestionsId);
+
+    /**
+     * 修改业务提问工作流流程id信息
+     * @param businessQuestions
+     */
+    void updateProcessInstanceId(BusinessQuestions businessQuestions);
+
+    /**
+     * 修改业务提问工作流流程id信息
+     * @param businessQuestions
+     */
+    void updateProcessIdAndStatus(BusinessQuestions businessQuestions);
+
+    /**
+     * 批量添加关注信息
+     * @param list
+     */
+    void insertAttentionAll(@Param("list")List<BusinessQuestionsAttentionUser> list);
+
+    /**
+     * 删除关注信息
+     * @param info
+     */
+    void deleteNotice(BusinessQuestionsAttentionUser info);
+
+    /**
+     * 查询关注人员信息
+     * @param businessQuestions
+     * @return
+     */
+    List<User> getInformUserList(BusinessQuestions businessQuestions);
+
+}

+ 21 - 0
src/main/java/com/jeeplus/modules/businessQuestions/dao/BusinessQuestionsUserDao.java

@@ -0,0 +1,21 @@
+package com.jeeplus.modules.businessQuestions.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsAttentionUser;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsContentsUser;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsUser;
+import com.jeeplus.modules.sys.entity.User;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 业务提问dao
+ * @author: 徐滕
+ * @create: 2022-03-29 13:37
+ **/
+@MyBatisDao
+public interface BusinessQuestionsUserDao extends CrudDao<BusinessQuestions> {
+}

+ 270 - 0
src/main/java/com/jeeplus/modules/businessQuestions/entity/BusinessQuestions.java

@@ -0,0 +1,270 @@
+package com.jeeplus.modules.businessQuestions.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import org.activiti.engine.runtime.ProcessInstance;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 业务提问info
+ * @author: 徐滕
+ * @create: 2022-03-29 13:30
+ **/
+public class BusinessQuestions extends ActEntity<BusinessQuestions> {
+    private String title;               //标题
+    private String projectId;           //项目id
+    private String questionType;        //问题类型
+    private String submitterId;         //提交人id
+    private String submitterName;		// 提交人名称
+    private Date submitDate;          //提交时间
+    private String actorUserId;         //处理人
+    private String actorUserNames;         //处理人
+    private String handlingSuggestion;         //处理意见
+    private Date closingDate;         //结案时间
+    private Date expectationClosingDate;         //期望结案时间
+    private String processInstanceId;   //流程id
+    private String status;              //流程状态
+    @NotNull(message = "处理人不能为空")
+    private List<User> actorUsers;      //处理人列表
+    private RuralProjectRecords project;           //项目
+    private List<Workattachment> workAttachments = Lists.newArrayList();
+    private String companyId; //提交人的公司编号
+    private String officeId;
+    private Office office;		// 所属部门
+    // 运行中的流程实例
+    private ProcessInstance processInstance;
+    private String home;
+    private String attentionUserId; //收藏人id
+
+
+    private Date startDate;             //开始时间
+    private Date endDate;               //结束时间
+    private String contentsId;               //问题内容Id
+    private String contents;               //问题内容
+    private List<BusinessQuestionsContentsUser> contentsList = Lists.newArrayList();               //回复内容集合
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public String getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(String questionType) {
+        this.questionType = questionType;
+    }
+
+    public String getSubmitterId() {
+        return submitterId;
+    }
+
+    public void setSubmitterId(String submitterId) {
+        this.submitterId = submitterId;
+    }
+
+    public Date getSubmitDate() {
+        return submitDate;
+    }
+
+    public void setSubmitDate(Date submitDate) {
+        this.submitDate = submitDate;
+    }
+
+    public String getActorUserId() {
+        return actorUserId;
+    }
+
+    public void setActorUserId(String actorUserId) {
+        this.actorUserId = actorUserId;
+    }
+
+    public Date getClosingDate() {
+        return closingDate;
+    }
+
+    public void setClosingDate(Date closingDate) {
+        this.closingDate = closingDate;
+    }
+
+    public String getProcessInstanceId() {
+        return processInstanceId;
+    }
+
+    public void setProcessInstanceId(String processInstanceId) {
+        this.processInstanceId = processInstanceId;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public List<User> getActorUsers() {
+        return actorUsers;
+    }
+
+    public void setActorUsers(List<User> actorUsers) {
+        this.actorUsers = actorUsers;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public RuralProjectRecords getProject() {
+        return project;
+    }
+
+    public void setProject(RuralProjectRecords project) {
+        this.project = project;
+    }
+
+    public Date getExpectationClosingDate() {
+        return expectationClosingDate;
+    }
+
+    public void setExpectationClosingDate(Date expectationClosingDate) {
+        this.expectationClosingDate = expectationClosingDate;
+    }
+
+    public List<Workattachment> getWorkAttachments() {
+        return workAttachments;
+    }
+
+    public void setWorkAttachments(List<Workattachment> workAttachments) {
+        this.workAttachments = workAttachments;
+    }
+
+    public String getContentsId() {
+        return contentsId;
+    }
+
+    public void setContentsId(String contentsId) {
+        this.contentsId = contentsId;
+    }
+
+    public String getContents() {
+        return contents;
+    }
+
+    public void setContents(String contents) {
+        this.contents = contents;
+    }
+
+    public String getActorUserNames() {
+        return actorUserNames;
+    }
+
+    public void setActorUserNames(String actorUserNames) {
+        this.actorUserNames = actorUserNames;
+    }
+
+    public List<BusinessQuestionsContentsUser> getContentsList() {
+        return contentsList;
+    }
+
+    public void setContentsList(List<BusinessQuestionsContentsUser> contentsList) {
+        this.contentsList = contentsList;
+    }
+
+    public String getSubmitterName() {
+        return submitterName;
+    }
+
+    public void setSubmitterName(String submitterName) {
+        this.submitterName = submitterName;
+    }
+
+    public String getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(String companyId) {
+        this.companyId = companyId;
+    }
+
+    public String getOfficeId() {
+        return officeId;
+    }
+
+    public void setOfficeId(String officeId) {
+        this.officeId = officeId;
+    }
+
+    public Office getOffice() {
+        return office;
+    }
+
+    public void setOffice(Office office) {
+        this.office = office;
+    }
+
+    public ProcessInstance getProcessInstance() {
+        return processInstance;
+    }
+
+    public void setProcessInstance(ProcessInstance processInstance) {
+        this.processInstance = processInstance;
+    }
+
+    public String getHome() {
+        return home;
+    }
+
+    public void setHome(String home) {
+        this.home = home;
+    }
+
+    public String getHandlingSuggestion() {
+        return handlingSuggestion;
+    }
+
+    public void setHandlingSuggestion(String handlingSuggestion) {
+        this.handlingSuggestion = handlingSuggestion;
+    }
+
+    public String getAttentionUserId() {
+        return attentionUserId;
+    }
+
+    public void setAttentionUserId(String attentionUserId) {
+        this.attentionUserId = attentionUserId;
+    }
+}

+ 27 - 0
src/main/java/com/jeeplus/modules/businessQuestions/entity/BusinessQuestionsAttentionUser.java

@@ -0,0 +1,27 @@
+package com.jeeplus.modules.businessQuestions.entity;
+
+/**
+ * 业务提问人员关注关系表
+ * @author: 徐滕
+ * @create: 2022-03-31 08:59
+ **/
+public class BusinessQuestionsAttentionUser {
+    private String businessQuestionsId;     //业务提问id
+    private String userId;                  //关注人id
+
+    public String getBusinessQuestionsId() {
+        return businessQuestionsId;
+    }
+
+    public void setBusinessQuestionsId(String businessQuestionsId) {
+        this.businessQuestionsId = businessQuestionsId;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+}

+ 47 - 0
src/main/java/com/jeeplus/modules/businessQuestions/entity/BusinessQuestionsContentsUser.java

@@ -0,0 +1,47 @@
+package com.jeeplus.modules.businessQuestions.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+
+/**
+ * 业务提问人员回复信息表
+ * @author: 徐滕
+ * @create: 2022-03-31 08:54
+ **/
+public class BusinessQuestionsContentsUser extends DataEntity<BusinessQuestionsContentsUser> {
+    private String businessQuestionsId;     //业务提问id
+    private String userId;                  //处理人id
+    private String userName;                //处理人名称
+    private String contents;                //回复内容
+
+    public String getBusinessQuestionsId() {
+        return businessQuestionsId;
+    }
+
+    public void setBusinessQuestionsId(String businessQuestionsId) {
+        this.businessQuestionsId = businessQuestionsId;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getContents() {
+        return contents;
+    }
+
+    public void setContents(String contents) {
+        this.contents = contents;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+}

+ 27 - 0
src/main/java/com/jeeplus/modules/businessQuestions/entity/BusinessQuestionsUser.java

@@ -0,0 +1,27 @@
+package com.jeeplus.modules.businessQuestions.entity;
+
+/**
+ * 业务提问处理人员信息表
+ * @author: 徐滕
+ * @create: 2022-03-31 08:51
+ **/
+public class BusinessQuestionsUser {
+    private String businessQuestionsId;     //业务提问id
+    private String userId;                  //处理人id
+
+    public String getBusinessQuestionsId() {
+        return businessQuestionsId;
+    }
+
+    public void setBusinessQuestionsId(String businessQuestionsId) {
+        this.businessQuestionsId = businessQuestionsId;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+}

+ 40 - 0
src/main/java/com/jeeplus/modules/businessQuestions/service/BusinessQuestionsAttentionService.java

@@ -0,0 +1,40 @@
+package com.jeeplus.modules.businessQuestions.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.modules.businessQuestions.dao.BusinessQuestionsAttentionDao;
+import com.jeeplus.modules.businessQuestions.dao.BusinessQuestionsUserDao;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 我提交的业务提问service
+ * @author: 徐滕
+ * @create: 2022-03-29 13:37
+ **/
+@Service
+@Transactional(readOnly = true)
+public class BusinessQuestionsAttentionService extends CrudService<BusinessQuestionsAttentionDao, BusinessQuestions> {
+
+    public BusinessQuestions get(String id) {
+        return super.get(id);
+    }
+
+    public List<BusinessQuestions> findList(BusinessQuestions businessQuestions) {
+        return super.findList(businessQuestions);
+    }
+
+    public Page<BusinessQuestions> findPage(Page<BusinessQuestions> page, BusinessQuestions businessQuestions) {
+        businessQuestions.setAttentionUserId(UserUtils.getUser().getId());
+        int count = dao.queryCount(businessQuestions);
+        page.setCount(count);
+        page.setCountFlag(false);
+        businessQuestions.setPage(page);
+        page.setList(findList(businessQuestions));
+        return page;
+    }
+}

+ 833 - 0
src/main/java/com/jeeplus/modules/businessQuestions/service/BusinessQuestionsService.java

@@ -0,0 +1,833 @@
+package com.jeeplus.modules.businessQuestions.service;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.businessQuestions.dao.BusinessQuestionsDao;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsAttentionUser;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsContentsUser;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsUser;
+import com.jeeplus.modules.oa.entity.OaNotify;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+import com.jeeplus.modules.sys.service.OfficeService;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
+import com.jeeplus.modules.workactivity.entity.Activity;
+import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
+import com.jeeplus.modules.workactivitymenu.entity.WorkActivityMenu;
+import com.jeeplus.modules.workactivitymenu.service.WorkActivityMenuService;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import org.activiti.engine.IdentityService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.management.StringValueExp;
+import java.util.*;
+
+/**
+ * 业务提问service
+ * @author: 徐滕
+ * @create: 2022-03-29 13:37
+ **/
+@Service
+@Transactional(readOnly = true)
+public class BusinessQuestionsService extends CrudService<BusinessQuestionsDao, BusinessQuestions> {
+    @Autowired
+    private WorkattachmentService workattachmentService;
+    @Autowired
+    private OfficeService officeService;
+    @Autowired
+    private IdentityService identityService;
+    @Autowired
+    protected WorkActivityMenuService workActivityMenuService;
+    @Autowired
+    protected WorkProjectNotifyService workProjectNotifyService;
+    @Autowired
+    private RuntimeService runtimeService;
+    @Autowired
+    protected WorkActivityProcessService workActivityProcessService;
+    @Autowired
+    private WorkActivityProcessDao workActivityProcessDao;
+    @Autowired
+    private ActTaskService actTaskService;
+    @Autowired
+    private ActivityService activityService;
+
+    public BusinessQuestions get(String id) {
+        return super.get(id);
+    }
+
+    public List<BusinessQuestions> findList(BusinessQuestions businessQuestions) {
+        return super.findList(businessQuestions);
+    }
+
+    public void queryDetails(BusinessQuestions businessQuestions) {
+        if(businessQuestions==null)return;
+        Workattachment attchment = new Workattachment();
+        attchment.setAttachmentId(businessQuestions.getId());
+        attchment.setAttachmentFlag("182");
+        List<Workattachment> attachments = workattachmentService.findList(attchment);
+        businessQuestions.setWorkAttachments(attachments);
+        for (Workattachment clientAttachment:attachments){
+            if (clientAttachment.getCollectFlag().equals("1")){
+                for (Workattachment workattachment:businessQuestions.getWorkAttachments()){
+                    if (clientAttachment.getId().equals(workattachment.getId())){
+                        workattachment.setCollectFlag("1");
+                        break;
+                    }
+                }
+            }
+        }
+
+    }
+
+    public Page<BusinessQuestions> findPage(Page<BusinessQuestions> page, BusinessQuestions businessQuestions) {
+        //处理登记人信息
+        if (businessQuestions!=null && StringUtils.isNotBlank(businessQuestions.getSubmitterId())){
+            businessQuestions.setSubmitterName(UserUtils.get(businessQuestions.getSubmitterId()).getName());
+        }
+        int count = dao.queryCount(businessQuestions);
+        page.setCount(count);
+        page.setCountFlag(false);
+        businessQuestions.setPage(page);
+        page.setList(findList(businessQuestions));
+        return page;
+    }
+
+
+    @Transactional(readOnly = false)
+    public void save(BusinessQuestions businessQuestions) {
+        if(null != businessQuestions.getProject() && StringUtils.isNotBlank(businessQuestions.getProject().getId())){
+            businessQuestions.setProjectId(businessQuestions.getProject().getId());
+        }
+        //添加信息
+        super.save(businessQuestions);
+        //添加处理人信息
+        this.saveBusinessQuestionsUser(businessQuestions);
+        if(StringUtils.isNotBlank(businessQuestions.getHandlingSuggestion())){
+            //添加回复信息(富文本框)
+            this.saveBusinessQuestionsContentsUser(businessQuestions);
+        }
+        //保存附件
+        this.saveAttachments(businessQuestions);
+
+    }
+
+    /**
+     * 添加处理人信息
+     * @param businessQuestions   业务提问信息
+     */
+    @Transactional(readOnly = false)
+    public void saveBusinessQuestionsUser(BusinessQuestions businessQuestions){
+        List<User> actorUsers = businessQuestions.getActorUsers();
+        List<BusinessQuestionsUser> businessQuestionsUserList = Lists.newArrayList();
+        for (User info : actorUsers) {
+            BusinessQuestionsUser businessQuestionsUser = new BusinessQuestionsUser();
+            businessQuestionsUser.setBusinessQuestionsId(businessQuestions.getId());
+            businessQuestionsUser.setUserId(info.getId());
+            businessQuestionsUserList.add(businessQuestionsUser);
+        }
+        //根据业务提问id删除业务处理人员信息
+        dao.deleteBusinessQuestionsUserByBusinessQuestionsId(businessQuestions.getId());
+        //添加处理人信息
+        dao.insertBusinessQuestionsUserList(businessQuestionsUserList);
+    }
+
+    /**
+     * 添加回复信息(富文本框)
+     * @param businessQuestions   业务提问信息
+     */
+    @Transactional(readOnly = false)
+    public void saveBusinessQuestionsContentsUser(BusinessQuestions businessQuestions){
+        BusinessQuestionsContentsUser businessQuestionscontentsUser = new BusinessQuestionsContentsUser();
+        businessQuestionscontentsUser.setBusinessQuestionsId(businessQuestions.getId());
+        businessQuestionscontentsUser.setUserId(UserUtils.getUser().getId());
+        businessQuestionscontentsUser.setContents(businessQuestions.getHandlingSuggestion());
+        businessQuestionscontentsUser.preInsert();
+        //添加处理人信息
+        dao.insertBusinessQuestionsContentsUser(businessQuestionscontentsUser);
+    }
+
+
+    /**
+     * 添加附件信息
+     * @param businessQuestions
+     */
+    @Transactional(readOnly = false)
+    public void saveAttachments(BusinessQuestions businessQuestions) {
+        List<Workattachment> workattachments = businessQuestions.getWorkAttachments();
+        if (workattachments!=null && workattachments.size()!=0) {
+            for (Workattachment workattachment : workattachments) {
+                if (workattachment.getId() == null) {
+                    continue;
+                }
+                if (workattachment.DEL_FLAG_NORMAL.equals(workattachment.getDelFlag())) {
+                    workattachment.setAttachmentId(businessQuestions.getId());
+                    workattachment.setAttachmentFlag("182");
+                    workattachment.setAttachmentUser(UserUtils.getUser().getId());
+                    if (StringUtils.isBlank(workattachment.getId()) || "null".equals(workattachment.getId())) {
+                        workattachmentService.insertOnWorkAttachment(workattachment);
+                    } else {
+                        workattachmentService.updateOnWorkAttachment(workattachment);
+                    }
+                } else {
+                    workattachmentService.delete(workattachment);
+                }
+            }
+        }
+    }
+
+    /**
+     * 分公司提交存储
+     * @param businessQuestions
+     * @param variables
+     */
+    @Transactional(readOnly = false)
+    public String saveAndSubmit(BusinessQuestions businessQuestions, Map<String, Object> variables, String processInstanceId) {
+        String officeId = UserUtils.getUser().getOffice().getId();
+        Office office = officeService.get(officeId);
+        businessQuestions.setOffice(office);
+        this.save(businessQuestions);
+
+        String title = "标题:"+ businessQuestions.getTitle() +"业务提问申请待审批";
+        String str = "标题:"+ businessQuestions.getTitle() +"业务提问申请待审批,所属项目:"+businessQuestions.getProject().getProjectName();
+
+        // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
+        identityService.setAuthenticatedUserId(UserUtils.getUser().getId());
+        // 启动流程
+        String businessKey = businessQuestions.getId();
+        WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("ggh3125f1f194c82bdea00005c750905",officeService.get(businessQuestions.getOfficeId()));
+        // 启动流程
+        String processType = workActivityMenu.getProcessType();
+        StringBuffer buffer = new StringBuffer();
+        Activity activity = new Activity();
+        WorkProjectNotify workProjectNotify = UtilNotify
+                .saveNotify(businessQuestions.getId(),
+                        null,
+                        businessQuestions.getCompanyId(),
+                        title,
+                        str,
+                        "182", //对应之后的判断
+                        "0",
+                        "待审批",
+                        ""  //通知角色
+                );
+        List<User> users = new ArrayList<>();
+        //根据业务提问查询处理人信息
+        List<User> clrs = dao.getBusinessQuestionsUser(businessQuestions.getId());
+        //将业务提问创建人添加到结案人角色中
+        List<User> jar = Lists.newArrayList();
+        User createBy = UserUtils.get(businessQuestions.getCreateBy().getId());
+        jar.add(createBy);
+
+        if (StringUtils.isNotBlank(workActivityMenu.getId())) {
+            workProjectNotify.setNotifyRole("");
+            workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
+            List<Activity> activities = workActivityMenu.getActivities();
+            for (Activity a : activities) {
+                String encount = a.getEncount();
+                String enlist = a.getEnlist();
+                if (a.getRole()!=null && StringUtils.isNotBlank(a.getRole().getEnname())){
+                    List enusers = UserUtils.getByRoleActivityEnnames(a.getRole().getEnname(),office.getId(),"5",businessQuestions.getCreateBy());
+                    if (enusers.size()==0){
+                        businessQuestions.setStatus("1");//暂存
+                        this.save(businessQuestions);
+                        return "流程审批人不能为空,角色"+a.getRole().getName()+"下无用户,请联系管理员!";
+                    }
+                    variables.put(enlist, enusers);
+                    variables.put(encount, enusers.size());
+                }
+                if (a.getDelFlag().equals("0") && a.getCount() == 1) {
+                    activity = a;
+                }
+            }
+            buffer.append(activity.getRole().getEnname());
+            if (activity != null && StringUtils.isNotBlank(activity.getId())) {
+                //角色审批
+                if (StringUtils.isNotBlank(activity.getRole().getEnname())) {
+                    users = UserUtils.getByRoleActivityEnnames(activity.getRole().getEnname(),office.getId(),"5",businessQuestions.getCreateBy());
+                }
+                //人员审批
+                if (StringUtils.isNotBlank(activity.getUser().getId())) {
+                    users.add(activity.getUser());
+                }
+            }
+            workProjectNotify.setId("");
+        } else {
+            if (clrs.size()==0 ){
+                businessQuestions.setStatus("1");//暂存
+                this.save(businessQuestions);
+            }
+            if (clrs.size()==0){
+                return "业务问题处理人不能为空,请联系管理员!";
+            }
+            variables.put("clrCount",clrs.size());
+            variables.put("clrList",clrs);
+            processType = "businessQuestions";
+            users.addAll(clrs);
+        }
+        for (User user : users){
+            workProjectNotify.setUser(user);
+            workProjectNotify.setId("");
+            workProjectNotifyService
+                    .save(workProjectNotify);
+            Map<String,Object> extras = new HashMap<>();
+            extras.put("type","7002");
+            extras.put("id",workProjectNotify.getId());
+            extras.put("procDefKey","182");
+            UserUtils.pushInfoToApp(title,str,extras,user.getId());
+            UserUtils.pushIm(user.getId(),str);
+        }
+        variables.put("type", processType);
+        variables.put("busId", businessKey);
+        variables.put("title", "业务提问标题:"+ businessQuestions.getTitle());//设置标题;
+        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processType, businessKey, variables);
+        businessQuestions.setProcessInstance(processInstance);
+        if (StringUtils.isNotBlank(processInstanceId)) {
+            workActivityProcessService.updateProcessInstanceId(processInstance.getId(),processInstanceId);
+            workActivityProcessService.deleteProcessInstanceId(processInstanceId);
+            workActivityProcessService.deleteProcessIdAuditUsers(processInstanceId);
+        }
+        // 更新流程实例ID
+        businessQuestions.setProcessInstanceId(processInstance.getId());
+       dao.updateProcessInstanceId(businessQuestions);
+        //通知添加流程实例ID
+        workProjectNotify.setProcessInstanceId(processInstance.getId());
+        workProjectNotifyService.save(workProjectNotify);
+        List<Activity> list = workActivityMenu.getActivities();
+        if (list != null && list.size() != 0) {
+            workActivityProcessService.saveList(list, processInstance.getId());
+        } else {
+            WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+            workActivityProcess.setProcessKey("businessQuestions");
+            workActivityProcess.setCount(1);
+            workActivityProcess.setProcessInstanceId(processInstance.getId());
+            workActivityProcess.setIsApproval("0");
+            workActivityProcessService.save(workActivityProcess);
+            workActivityProcess.setCount(2);
+            workActivityProcess.setId("");
+            workActivityProcessService.save(workActivityProcess);
+            workActivityProcessService.insertAuditsByType(clrs,processInstance.getId(),1,1);
+            workActivityProcessService.insertAuditsByType(jar,processInstance.getId(),2,0);
+        }
+        return "";
+    }
+
+
+
+
+
+
+
+
+
+    /**
+     * 查询业务提问内容集合(按照时间正序进行查询)
+     * @param businessQuestions
+     * @return
+     */
+    public List<BusinessQuestionsContentsUser> getBusinessQuestionsContentsList(BusinessQuestions businessQuestions){
+        List<BusinessQuestionsContentsUser> businessQuestionsContentsList = dao.getBusinessQuestionsContentsList(businessQuestions);
+        return businessQuestionsContentsList;
+    }
+
+    /**
+     * 删除方法
+     * @param businessQuestions
+     */
+    @Transactional(readOnly = false)
+    public void delete (BusinessQuestions businessQuestions){
+        dao.delete(businessQuestions);
+    }
+
+
+    @Transactional(readOnly = false)
+    public void cancelProcess(BusinessQuestions businessQuestions) throws Exception {
+        WorkActivityProcess process = new WorkActivityProcess();
+        process.setProcessInstanceId(businessQuestions.getProcessInstanceId());
+        process.setIsApproval("0");
+        WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+        workActivityProcess.setProcessInstanceId(businessQuestions.getProcessInstanceId());
+        List<WorkActivityProcess> processList = workActivityProcessService.findList(workActivityProcess);
+        WorkProjectNotify notify = new WorkProjectNotify();
+        notify.setNotifyId(businessQuestions.getId());
+        List<User> userList = workProjectNotifyService.readByNotifyId(notify);
+        if (userList!=null && userList.size()!=0) {
+            for (User u : userList) {
+                User user = UserUtils.get(u.getId());
+                UserUtils.pushIm(u.getId(),"申请人:"+ user.getName()+",业务提问标题:"+businessQuestions.getTitle() +" 强制撤销!");
+            }
+        }
+        if(processList!=null && processList.size()>0){
+            for (int i =0;i<processList.size();i++) {
+                WorkActivityProcess p = processList.get(i);
+                if(StringUtils.isNotBlank(p.getIsApproval()) && "0".equals(p.getIsApproval())){
+                    p.setIsApproval("-1");
+                    p.setDelFlag("1");
+                    workActivityProcessDao.updateDelFlagAndIsApproval(p);
+                }
+            }
+            WorkActivityProcess pro = new WorkActivityProcess();
+            pro.setId("");
+            pro.setDelFlag("0");
+            pro.preInsert();
+            pro.setRemarks("[强制撤销]");
+            pro.setProcessKey(processList.get(0).getProcessKey());
+            pro.setIsApproval("1");
+            pro.setProcessInstanceId(processList.get(0).getProcessInstanceId());
+            pro.setCount(0);
+            workActivityProcessDao.insert(pro);
+
+            //结束该流程,设为"撤销"状态月
+            BusinessQuestions sendMessage = new BusinessQuestions();
+            sendMessage.setId(businessQuestions.getId());
+            sendMessage.setStatus(String.valueOf(ProjectStatusEnum.RECALL.getValue()));
+            sendMessage.setProcessInstanceId(businessQuestions.getProcessInstanceId());
+            sendMessage.preUpdate();
+            dao.updateProcessIdAndStatus(sendMessage);
+            actTaskService.endProcessInstance(businessQuestions.getProcessInstanceId(), "业务提问-撤回");
+        }
+    }
+
+
+
+    /**
+     * 业务提问审批
+     * @param businessQuestions
+     * @param auditUsers
+     * @return
+     */
+    @Transactional(readOnly = false)
+    public String auditSave(BusinessQuestions businessQuestions, List<User> auditUsers) {
+        String status = businessQuestions.getStatus();
+        String taskDefKey = businessQuestions.getAct().getTaskDefKey();
+        if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit") ) {
+            actTaskService.claim(businessQuestions.getAct().getTaskId(), UserUtils.getUser().getId());
+            if(StringUtils.isNotBlank(businessQuestions.getHandlingSuggestion())) {
+                //添加回复信息(富文本框)
+                this.saveBusinessQuestionsContentsUser(businessQuestions);
+            }
+        }else {
+            businessQuestions.getAct().setFlag("yes");
+            this.save(businessQuestions);
+        }
+
+
+        String comment = "";
+        if ( Integer.parseInt(status) == ProjectStatusEnum.REJECTED.getValue()) {
+            comment = ("yes".equals(businessQuestions.getAct().getFlag())?"[重新申请] ":"[已撤销] ");
+        }else {
+            comment = ("yes".equals(businessQuestions.getAct().getFlag())?"[同意] ":"[驳回] ")+businessQuestions.getAct().getComment();
+        }
+
+        if (!"yes".equals(businessQuestions.getAct().getFlag())) {
+            businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.REJECTED.getValue()));
+        }
+
+        User createUser = UserUtils.get(businessQuestions.getCreateBy().getId());
+
+        Map<String, Object> vars = Maps.newHashMap();
+        String notifyRole = "";
+        //业务逻辑对应的条件表达式
+        User user = null;
+        List<Activity> activitieList = activityService.getByProcessInstanceId(businessQuestions.getProcessInstanceId());
+        WorkActivityMenu workActivityMenu = new WorkActivityMenu();
+        if (activitieList != null && activitieList.size() != 0) {
+            workActivityMenu.setProcessType(activitieList.get(0).getProcessKey());
+            workActivityMenu.setActivities(activitieList);
+        }
+
+        WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+        WorkActivityProcess selectProcess = new WorkActivityProcess();
+        selectProcess.setProcessInstanceId(businessQuestions.getProcessInstanceId());
+        List<WorkActivityProcess> workActivityProcesses = workActivityProcessService.findList(selectProcess);
+        List<Activity> activities = workActivityMenu.getActivities();
+        String  taskCount = "1";
+        String enname = "";
+        String notifyStr = "标题:"+ businessQuestions.getTitle() +"业务提问申请待审批";
+        String titleStr = "标题:"+ businessQuestions.getTitle() +"业务提问申请待审批";
+        String str = "标题:"+ businessQuestions.getTitle() +"业务提问申请待审批,所属项目:"+businessQuestions.getProject().getProjectName();
+        int key = 0;
+        if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("businessQuestions")) {
+            key = 1;
+            for (int i = 0; i < workActivityProcesses.size(); i++) {
+                WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+                if (taskDefKey.equals("modifyApply")) {
+                    taskCount = "0";
+                    workActivityProcess.setId("");
+                    workActivityProcess.setCount(0);
+                    if (!"yes".equals(businessQuestions.getAct().getFlag())) {
+                        businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.RECALL.getValue()));
+                        workActivityProcess.setIsApproval("2");
+                        vars.put("pass", false);
+                    } else {
+                        vars.put("pass", true);
+                        workActivityProcess.setIsApproval("1");
+                    }
+                    break;
+                } else {
+                    taskCount = activityProcess.getCount()+"";
+                    workActivityProcess = activityProcess;
+                    if (!workActivityProcess.getIsApproval().equals("0")) {
+                        workActivityProcess.setId("");
+                    }
+                    for (Activity activity : activities) {
+                        if (activity.getCount() == activityProcess.getCount()) {
+                            notifyRole = activity.getName();
+                            break;
+                        }
+                    }
+                    if (!"yes".equals(businessQuestions.getAct().getFlag())) {
+                        notifyRole = "调整项目";
+                        businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.REJECTED.getValue()));
+                        workActivityProcess.setIsApproval("2");
+                        String returnBack = "-1";
+                        for (Activity activity : activities) {
+                            if (activity.getCount() == activityProcess.getCount()) {
+                                returnBack = activity.getReturnBack();
+                                break;
+                            }
+                        }
+                        if (returnBack.equals("0")) {
+                            workActivityProcess.setId("");
+                        }
+                        vars.put("pass", false);
+                    } else {
+                        workActivityProcess.setIsApproval("1");
+                        vars.put("pass", true);
+                    }
+                    break;
+                }
+            }
+        }else {
+            workActivityMenu.setProcessType("businessQuestions");
+            for (int i = 0; i < workActivityProcesses.size(); i++) {
+                WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+                String count = String.valueOf(activityProcess.getCount());
+                workActivityProcess = activityProcess;
+                if (!workActivityProcess.getIsApproval().equals("0")) {
+                    workActivityProcess.setId("");
+                }
+                // 审核环节
+                if ("clr".equals(taskDefKey) && "1".equals(count)) {
+                    taskCount = count;
+                    if ("yes".equals(businessQuestions.getAct().getFlag())) {
+                        businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.IN_APRL.getValue()));
+                        notifyRole = "处理人处理";
+                        workActivityProcess.setIsApproval("1");
+                        enname = "jar";
+                        vars.put("jarList", auditUsers);
+                        vars.put("jarCount",auditUsers.size());
+                        vars.put("pass", true);
+                        vars.put("passs", true);
+                    } else {
+                        workActivityProcess.setIsApproval("2");
+                        vars.put("pass", false);
+                        vars.put("passs", false);
+                        user = createUser;
+                        notifyRole = "调整业务提问";
+                    }
+                    break;
+                }
+                if ("jar".equals(taskDefKey) && "2".equals(count)) {
+                    taskCount = count;
+                    if ("yes".equals(businessQuestions.getAct().getFlag())) {
+                        notifyRole = "审批通过";
+                        workActivityProcess.setIsApproval("1");
+                        vars.put("pass", true);
+                        vars.put("passs", true);
+                    } else {
+                        workActivityProcess.setIsApproval("2");
+                        businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.IN_APRL.getValue()));
+                        vars.put("pass", false);
+                        vars.put("passs", false);
+                        user = createUser;
+                        notifyRole = "调整业务提问";
+                    }
+                    break;
+                } else if ("modifyApply".equals(taskDefKey) && "0".equals(count)) {
+                    notifyRole = "发起人处理";
+                    taskCount = "0";
+                    enname = "master";
+                    workActivityProcess.setCount(0);
+                    if("yes".equals(businessQuestions.getAct().getFlag())){
+                        workActivityProcess.setIsApproval("1");
+                        vars.put("pass",true);
+                        vars.put("passs",true);
+                    }else{
+                        workActivityProcess.setIsApproval("2");
+                        businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.RECALL.getValue()));
+                        vars.put("pass",false);
+                        vars.put("passs",false);
+                    }
+                    break;
+                }
+            }
+        }
+        Integer order = 1;
+        if("jar".equals(taskDefKey)){
+            order = 2;
+        }
+
+        workActivityProcessService.updateProcessNew(workActivityProcess,workActivityMenu,key,taskCount,businessQuestions.getProcessInstanceId(),taskDefKey,"modifyApply",businessQuestions.getAct().getFlag(),comment, activities,order);
+        // 设置意见
+        businessQuestions.getAct().setComment(comment);
+        businessQuestions.preUpdate();
+        //判断是否是审核通过
+        if("yes".equals(businessQuestions.getAct().getFlag())){
+            actTaskService.complete(businessQuestions.getAct().getTaskId(), businessQuestions.getAct().getProcInsId(), businessQuestions.getAct().getComment(), vars);
+        }else{
+            //不通过需要查询审核组角色id
+            List<Act> list2 = actTaskService.toMyStartedList(businessQuestions.getProcessInstanceId());
+            // 提交流程任务
+            //如果是驳回,并且审核角色为多个,需要对每个角色的审核流都进行处理
+            for (Act actInfo: list2) {
+                actTaskService.complete(actInfo.getTask().getId(), actInfo.getProcInsId(), businessQuestions.getAct().getComment(), vars);
+            }
+        }
+        boolean state = actTaskService.isProcessEnd(businessQuestions.getAct().getProcInsId());
+        List<User> users = new ArrayList<>();
+        List<User> userList = new ArrayList<>();
+        if(!state) {
+            users.add(businessQuestions.getCreateBy());
+            //审核完成提示框
+            String title = "标题:"+ businessQuestions.getTitle() +"业务提问申请已完成";
+            String content = "标题:"+ businessQuestions.getTitle() +"业务提问申请已完成,所属项目:"+businessQuestions.getProject().getProjectName();
+            if ("yes".equals(businessQuestions.getAct().getFlag())) {
+                businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.SIGNED.getValue()));
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(businessQuestions.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                users.add(businessQuestions.getCreateBy());
+                //查询问题关注人员信息
+                List<User> informUserList = dao.getInformUserList(businessQuestions);
+                //将登记人添加进去并进行set处理
+                informUserList.add(UserUtils.get(businessQuestions.getCreateBy().getId()));
+                Set<String> setUserId = new HashSet<>();
+                List<User> informUsers = Lists.newArrayList();
+                for (User userInfo : informUserList) {
+                    setUserId.add(userInfo.getId());
+                }
+                String userIds = setUserId.toString();
+                for (User userInfo : informUserList) {
+                    if(!userIds.contains(userInfo.getId())){
+                        informUsers.add(userInfo);
+                    }
+                }
+                for (User userInfo : informUsers) {
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(businessQuestions.getId(),
+                                            userInfo,
+                                            UserUtils.getSelectCompany().getId(),
+                                            title,
+                                            content,
+                                            "182",
+                                            "0",
+                                            "待通知",
+                                            notifyRole));
+                }
+            } else {
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(businessQuestions.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                users.add(businessQuestions.getCreateBy());
+                if (Integer.valueOf(businessQuestions.getStatus()) != ProjectStatusEnum.RECALL.getValue()){
+                    businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.REJECTED.getValue()));
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(businessQuestions.getId(),
+                                            businessQuestions.getCreateBy(),
+                                            UserUtils.getSelectCompany().getId(),
+                                            titleStr,
+                                            notifyStr,
+                                            "182",
+                                            "0",
+                                            "待通知",
+                                            notifyRole));
+                }
+            }
+            workActivityProcessService.deleteProcessIdAuditUsers(businessQuestions.getProcessInstanceId());
+
+        }else{
+            if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("businessQuestions")) {
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(businessQuestions.getId());
+                userList = workProjectNotifyService.readByNotifyId(notify);
+                WorkProjectNotify workProjectNotify = UtilNotify
+                        .saveNotify(businessQuestions.getId(),
+                                new User(),
+                                UserUtils.getSelectCompany().getId(),
+                                titleStr,
+                                str,
+                                "182",
+                                "0",
+                                "待审批",
+                                notifyRole);
+                String count = taskDefKey.replace("audit","").replace("task","");
+                List<WorkProjectNotify> workProjectNotifys = activityService.getByFlagAndTaskDefKeyList(
+                        activities,
+                        workProjectNotify,
+                        taskDefKey,
+                        businessQuestions.getAct().getFlag(),
+                        count,
+                        businessQuestions.getCreateBy(),
+                        businessQuestions.getOffice().getId(),
+                        "4");
+                for (WorkProjectNotify workProjectNotify1:workProjectNotifys){
+                    users.add(workProjectNotify1.getUser());
+                    workProjectNotify1.setId("");
+                    workProjectNotify1.setIsNewRecord(false);
+                    workProjectNotifyService.save(workProjectNotify1);
+                }
+            }else {
+                if (!"yes".equals(businessQuestions.getAct().getFlag())) {//驳回待办提醒
+                    if("jar".equals(taskDefKey)){
+                        titleStr = "标题:"+ businessQuestions.getTitle() +"业务提问处理被驳回";
+                        str = "标题:"+ businessQuestions.getTitle() +"业务提问处理被驳回,请重新进行处理";
+                    }else{
+                        titleStr = "标题:"+ businessQuestions.getTitle() +"业务提问申请被驳回";
+                        str = "标题:"+ businessQuestions.getTitle() +"业务提问申请被驳回,请选择重新申请或删除";
+                    }
+                    User masterUser = businessQuestions.getCreateBy();
+                    List<User> informUserList = Lists.newArrayList();
+                    String remarks = "";
+                    if("jar".equals(taskDefKey)){
+                        informUserList.addAll(auditUsers);
+                        users.addAll(auditUsers);
+                        remarks = "待审批";
+                    }else{
+                        informUserList.add(masterUser);
+                        users.add(user);
+                        remarks = "重新申请";
+                    }
+
+
+                    WorkProjectNotify notify = new WorkProjectNotify();
+                    notify.setNotifyId(businessQuestions.getId());
+                    userList = workProjectNotifyService.readByNotifyId(notify);
+                    users.add(user);
+
+                    for (User userInfo: informUserList) {
+                        WorkProjectNotify workProjectNotify = UtilNotify
+                                .saveNotify(businessQuestions.getId(),
+                                        userInfo,
+                                        UserUtils.getSelectCompany().getId(),
+                                        titleStr,
+                                        str,
+                                        "182",
+                                        "0",
+                                        remarks,
+                                        notifyRole);
+                        workProjectNotifyService.save(workProjectNotify);
+                    }
+                } else {
+                    if (StringUtils.isNotBlank(enname)) {//驳回重新申请待办信息
+                        titleStr = "标题:"+ businessQuestions.getTitle() +"业务提问申请,待审批";
+                        str = "标题:"+ businessQuestions.getTitle() +"业务提问申请,待审批,所属项目:"+businessQuestions.getProject().getProjectName();
+                        businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.IN_APRL.getValue()));
+                        WorkProjectNotify notify = new WorkProjectNotify();
+                        notify.setNotifyId(businessQuestions.getId());
+                        userList = workProjectNotifyService.readByNotifyId(notify);
+                        WorkProjectNotify workProjectNotify = UtilNotify
+                                .saveNotify(businessQuestions.getId(),
+                                        new User(),
+                                        UserUtils.getSelectCompany().getId(),
+                                        titleStr,
+                                        str,
+                                        "182",
+                                        "0",
+                                        "待审批",
+                                        notifyRole);
+                        for (User user1:auditUsers){
+                            users.add(user1);
+                            workProjectNotify.setUser(user1);
+                            workProjectNotify.setId("");
+                            workProjectNotify.setIsNewRecord(false);
+                            workProjectNotifyService.save(workProjectNotify);
+                            Map<String,Object> extras = new HashMap<>();
+                            extras.put("type","7003");
+                            extras.put("procDefKey","182");
+                            extras.put("id",workProjectNotify.getId());
+                            UserUtils.pushInfoToApp(titleStr,str,extras,user1.getId());
+                        }
+                    }else {
+                        WorkProjectNotify notify = new WorkProjectNotify();
+                        notify.setNotifyId(businessQuestions.getId());
+                        userList = workProjectNotifyService.readByNotifyId(notify);
+                        users.add(businessQuestions.getCreateBy());
+                        workProjectNotifyService
+                                .save(UtilNotify
+                                        .saveNotify(businessQuestions.getId(),
+                                                businessQuestions.getCreateBy(),
+                                                UserUtils.getSelectCompany().getId(),
+                                                titleStr,
+                                                str,
+                                                "182",
+                                                "0",
+                                                "重新申请",
+                                                notifyRole));
+                    }
+                }
+            }
+        }
+
+        if (users!=null && users.size()!=0) {
+            List<String> userIds = new ArrayList<>(users.size());
+            for (User u : users) {
+                userIds.add(u.getId());
+            }
+            UserUtils.pushIm(userIds,titleStr);
+        }
+        if (userList!=null && userList.size()!=0) {
+            for (User u : userList) {
+                UserUtils.pushMeIm(u.getId());
+            }
+        }
+        businessQuestions.setProjectId(businessQuestions.getProject().getId());
+        dao.update(businessQuestions);
+        return "保存审核意见成功!";
+    }
+
+    /**
+     * 项目相应文件批量下载并压缩
+     * @param idList
+     */
+    @Transactional(readOnly = false)
+    public void attentionAll(List<String> idList) {
+        List<BusinessQuestionsAttentionUser> list = Lists.newArrayList();
+        //获取当前登录人
+        User user = UserUtils.getUser();
+        for (String id : idList) {
+            BusinessQuestionsAttentionUser info = new BusinessQuestionsAttentionUser();
+            info.setBusinessQuestionsId(id);
+            info.setUserId(user.getId());
+            list.add(info);
+        }
+        //删除原有收藏信息
+        for (BusinessQuestionsAttentionUser info : list) {
+            dao.deleteNotice(info);
+        }
+        //对问题进行收藏存储
+        dao.insertAttentionAll(list);
+    }
+}

+ 39 - 0
src/main/java/com/jeeplus/modules/businessQuestions/service/BusinessQuestionsUserService.java

@@ -0,0 +1,39 @@
+package com.jeeplus.modules.businessQuestions.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.businessQuestions.dao.BusinessQuestionsUserDao;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+/**
+ * 我提交的业务提问service
+ * @author: 徐滕
+ * @create: 2022-03-29 13:37
+ **/
+@Service
+@Transactional(readOnly = true)
+public class BusinessQuestionsUserService extends CrudService<BusinessQuestionsUserDao, BusinessQuestions> {
+
+    public BusinessQuestions get(String id) {
+        return super.get(id);
+    }
+
+    public List<BusinessQuestions> findList(BusinessQuestions businessQuestions) {
+        return super.findList(businessQuestions);
+    }
+
+    public Page<BusinessQuestions> findPage(Page<BusinessQuestions> page, BusinessQuestions businessQuestions) {
+        businessQuestions.setSubmitterId(UserUtils.getUser().getId());
+        int count = dao.queryCount(businessQuestions);
+        page.setCount(count);
+        page.setCountFlag(false);
+        businessQuestions.setPage(page);
+        page.setList(findList(businessQuestions));
+        return page;
+    }
+}

+ 53 - 0
src/main/java/com/jeeplus/modules/businessQuestions/web/BusinessQuestionsAttentionController.java

@@ -0,0 +1,53 @@
+package com.jeeplus.modules.businessQuestions.web;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.businessQuestions.service.BusinessQuestionsAttentionService;
+import com.jeeplus.modules.businessQuestions.service.BusinessQuestionsUserService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 我收藏的业务提问controller
+ * @author: 徐滕
+ * @create: 2022-03-29 11:20
+ **/
+@Controller
+@RequestMapping(value = "${adminPath}/businessQuestionsAttention/businessQuestionsAttention")
+public class BusinessQuestionsAttentionController extends BaseController {
+    @Autowired
+    private BusinessQuestionsAttentionService service;
+
+    @ModelAttribute
+    public BusinessQuestions get(@RequestParam(required=false) String id) {
+        BusinessQuestions entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = service.get(id);
+        }
+        if (entity == null){
+            entity = new BusinessQuestions();
+        }
+        return entity;
+    }
+
+    /**
+     * 业务提问-所有问题展示页
+     */
+    @RequiresPermissions("businessQuestionsAttention:businessQuestionsAttention:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(BusinessQuestions businessQuestions, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<BusinessQuestions> page = service.findPage(new Page<BusinessQuestions>(request, response), businessQuestions);
+        model.addAttribute("page", page);
+        return "modules/businessQuestions/businessQuestionsAttentionList";
+    }
+}

+ 336 - 0
src/main/java/com/jeeplus/modules/businessQuestions/web/BusinessQuestionsController.java

@@ -0,0 +1,336 @@
+package com.jeeplus.modules.businessQuestions.web;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsContentsUser;
+import com.jeeplus.modules.businessQuestions.service.BusinessQuestionsService;
+import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+/**
+ * 业务提问controller
+ * @author: 徐滕
+ * @create: 2022-03-29 11:20
+ **/
+@Controller
+@RequestMapping(value = "${adminPath}/businessQuestions/businessQuestions")
+public class BusinessQuestionsController extends BaseController {
+    @Autowired
+    private BusinessQuestionsService service;
+    @Autowired
+    private ActTaskService actTaskService;
+
+    @ModelAttribute
+    public BusinessQuestions get(@RequestParam(required=false) String id) {
+        BusinessQuestions entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = service.get(id);
+        }
+        if (entity == null){
+            entity = new BusinessQuestions();
+        }
+        return entity;
+    }
+
+    /**
+     * 业务提问-所有问题展示页
+     */
+    @RequiresPermissions("businessQuestions:businessQuestions:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(BusinessQuestions businessQuestions, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<BusinessQuestions> page = service.findPage(new Page<BusinessQuestions>(request, response), businessQuestions);
+        model.addAttribute("page", page);
+        return "modules/businessQuestions/businessQuestionsList";
+    }
+
+    /**
+     * 查看,增加,编辑业务提问表单页面
+     * @param businessQuestions
+     * @param model
+     * @return
+     */
+    @RequiresPermissions(value={"businessQuestions:businessQuestions:add","businessQuestions:businessQuestions:edit"},logical= Logical.OR)
+    @RequestMapping(value = "form")
+    public String form(BusinessQuestions businessQuestions, Model model) {
+        if (businessQuestions!=null&&StringUtils.isNotBlank(businessQuestions.getId())) {
+            service.queryDetails(businessQuestions);
+        }else {
+            businessQuestions.setCreateBy(UserUtils.getUser());
+            businessQuestions.setCreateDate(new Date());
+        }
+
+        model.addAttribute("businessQuestions", businessQuestions);
+        return "modules/businessQuestions/businessQuestionsForm";
+    }
+
+
+
+    /**
+     * 查看,增加,编辑业务提问表单页面
+     * @param businessQuestions
+     * @param model
+     * @return
+     */
+    @RequiresPermissions(value={"businessQuestions:businessQuestions:view"},logical= Logical.OR)
+    @RequestMapping(value = "view")
+    public String view(BusinessQuestions businessQuestions, Model model) {
+        service.queryDetails(businessQuestions);
+        //查询业务提问内容集合(按照时间正序进行查询)
+        List<BusinessQuestionsContentsUser> businessQuestionsContentsList = service.getBusinessQuestionsContentsList(businessQuestions);
+        for (BusinessQuestionsContentsUser info: businessQuestionsContentsList) {
+            info.setId("contents" + info.getId());
+        }
+        businessQuestions.setContentsList(businessQuestionsContentsList);
+        model.addAttribute("businessQuestions", businessQuestions);
+        return "modules/businessQuestions/businessQuestionsView";
+    }
+
+    /**
+     * 暂存
+     * @param businessQuestions
+     * @param model
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions(value={"businessQuestions:businessQuestions:add","businessQuestions:businessQuestions:edit"},logical=Logical.OR)
+    @RequestMapping(value = "store")
+    public String store(BusinessQuestions businessQuestions, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        if (!beanValidator(model, businessQuestions)){
+            return form(businessQuestions, model);
+        }
+
+        businessQuestions.setStatus(String.valueOf(ProjectStatusEnum.TSTORE.getValue()));
+        if(!businessQuestions.getIsNewRecord()){//编辑表单保存
+            BusinessQuestions t = service.get(businessQuestions.getId());//从数据库取出记录的值
+            MyBeanUtils.copyBeanNotNull2Bean(businessQuestions, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            service.save(t);//保存
+        }else{//新增表单保存
+            service.save(businessQuestions);//保存
+        }
+        addMessage(redirectAttributes, "暂存业务提问成功");
+        return "redirect:"+ Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+    }
+
+    /**
+     * 保存开票管理
+     */
+    @RequestMapping(value = "save")
+    public String save(BusinessQuestions businessQuestions, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        if (!beanValidator(model, businessQuestions)){
+            return form(businessQuestions, model);
+        }
+
+        User user = businessQuestions.getCreateBy();
+        String status = businessQuestions.getStatus();
+        if(user!=null && !UserUtils.getUser().getId().equals(user.getId()) && StringUtils.isNotBlank(user.getId())){
+            addMessage(redirectAttributes, "您不是申请人,无法修改");
+            return "redirect:"+Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+        }
+        //启动流程
+        businessQuestions.setStatus("2");
+        String processInstanceId ="";
+        if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(status) && "3".equals(status)){
+            processInstanceId = service.get(businessQuestions.getId()).getProcessInstanceId();
+        }
+        try {
+            Map<String, Object> variables = Maps.newHashMap();
+            businessQuestions.setCompanyId(UserUtils.getSelectCompany().getId());
+            businessQuestions.setOfficeId(UserUtils.getSelectOffice().getId());
+            String str = "";
+
+            str = service.saveAndSubmit(businessQuestions, variables,processInstanceId);
+
+
+            if (StringUtils.isNotBlank(str)){
+                addMessage(redirectAttributes, "业务提问申请提交失败:"+str);
+            }else {
+                addMessage(redirectAttributes, "业务提问申请已经提交");
+            }
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "业务提问申请提交失败!");
+            addMessage(redirectAttributes, "系统内部错误");
+            logger.error("Exception e:"+e);
+        }
+        return "redirect:"+Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+    }
+
+    /**
+     * 跳转流程处理状态
+     * @param businessQuestions
+     * @param model
+     * @return
+     */
+    @RequestMapping(value = "getProcess")
+    public String getProcess(BusinessQuestions businessQuestions, Model model){
+        model.addAttribute("processInstanceId", businessQuestions.getProcessInstanceId());
+        return "modules/worksendmessage/workSendMessageTask";
+    }
+
+    /**
+     * 删除
+     * @param businessQuestions
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions(value={"businessQuestions:businessQuestions:del"},logical=Logical.OR)
+    @RequestMapping(value = "delete")
+    public String delete(BusinessQuestions businessQuestions, RedirectAttributes redirectAttributes) {
+
+        if("2".equals(businessQuestions.getStatus())){
+            addMessage(redirectAttributes, "业务提问已送审,无法重复送审");
+            return "redirect:"+Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+        }else if("5".equals(businessQuestions.getStatus())){
+            addMessage(redirectAttributes, "业务提问已结案,无法再次送审");
+            return "redirect:"+Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+        }
+        service.delete(businessQuestions);//删除
+        addMessage(redirectAttributes, "删除成功");
+        return "redirect:"+ Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+    }
+
+    @RequiresPermissions(value={"businessQuestions:businessQuestions:edit"},logical=Logical.OR)
+    @RequestMapping(value = "revoke")
+    public String revoke(HttpServletRequest request, RedirectAttributes redirectAttributes) {
+        HashMap<String, String> requestMap = findRequestMap(request);
+        String id = requestMap.get("id");
+        try {
+            BusinessQuestions businessQuestions = service.get(id);
+            if("5".equals(businessQuestions.getStatus())){
+                addMessage(redirectAttributes, "业务提问已结案,无法撤回");
+                return "redirect:"+Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+            }
+            service.cancelProcess(businessQuestions);
+            addMessage(redirectAttributes, "撤回业务提问审批成功");
+        }catch (Exception e){
+            logger.info(e.getMessage());
+            addMessage(redirectAttributes, "撤回该业务提问审批失败");
+        }
+        return "redirect:" + Global.getAdminPath() + "/businessQuestions/businessQuestions/?repage";
+    }
+
+    /**
+     * 检查流程审批
+     * @param businessQuestions
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping("saveAudit")
+    public String saveAudit(BusinessQuestions businessQuestions,RedirectAttributes redirectAttributes) {
+        String home = businessQuestions.getHome();
+        try {
+            String taskDefKey = businessQuestions.getAct().getTaskDefKey();
+            //当状态为未通过时,重新修改数据
+            if ("modifyApply".equals(taskDefKey)) {
+                businessQuestions.getAct().setComment("重新申请");
+            }
+            List<User> users = Lists.newArrayList();
+            if ("clr".equals(taskDefKey)){
+                //添加结案人信息
+                User user = UserUtils.get(businessQuestions.getCreateBy().getId());
+                users.add(user);
+
+            }else if ("jar".equals(taskDefKey)){
+                if("yes".equals(businessQuestions.getAct().getFlag())){
+                    //添加结案人信息
+                    User user = UserUtils.get(businessQuestions.getCreateBy().getId());
+                    users.add(user);
+                }else{
+                    //添加处理人信息
+                    users = UserUtils.getByProssType(businessQuestions.getProcessInstanceId(),1);
+                }
+            }else if ("modifyApply".equals(taskDefKey)){
+                users = UserUtils.getByProssType(businessQuestions.getProcessInstanceId(),1);
+            }
+            String flag = businessQuestions.getAct().getFlag();
+            if ("yes".equals(flag) && (users==null || users.size()==0)){
+                addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+            }else {
+                BusinessQuestions t = service.get(businessQuestions.getId());//从数据库取出记录的值
+                if("5".equals(t.getStatus())){
+                    addMessage(redirectAttributes, "业务提问已结案,无法再次送审");
+                    return "redirect:"+Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+                }
+
+                String str = service.auditSave(businessQuestions,users);
+                addMessage(redirectAttributes, str);
+            }
+        }catch (Exception e){
+            addMessage(redirectAttributes, "业务提问流程审批失败");
+            logger.error("Exception e:"+e);
+        }
+
+        if (StringUtils.isNotBlank(home) && "home".equals(home)){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else {
+            return "redirect:" + Global.getAdminPath() + "/businessQuestions/businessQuestions/?repage";
+        }
+    }
+
+    @RequiresPermissions(value={"businessQuestions:businessQuestions:edit"},logical=Logical.OR)
+    @RequestMapping(value = "modify")
+    public String modify(BusinessQuestions businessQuestions, Model model,RedirectAttributes redirectAttributes) {
+        businessQuestions=service.get(businessQuestions.getId());
+        if(StringUtils.isNotBlank(businessQuestions.getId())){
+            service.queryDetails(businessQuestions);
+        }
+        ProcessInstance processInstance = actTaskService.getProcIns(businessQuestions.getProcessInstanceId());
+        if (processInstance!=null) {
+            Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+            Act act = new Act();
+            act.setTaskId(taskInfok.getId());
+            act.setTaskName(taskInfok.getName());
+            act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+            act.setProcDefId(taskInfok.getProcessDefinitionId());
+            act.setProcInsId(taskInfok.getProcessInstanceId());
+            act.setTask(taskInfok);
+            businessQuestions.setAct(act);
+        }
+
+        model.addAttribute("businessQuestions", businessQuestions);
+        return "modules/businessQuestions/businessQuestionsModify";
+    }
+
+    /**
+     * 项目相应文件批量下载并压缩
+     */
+    @RequiresPermissions("businessQuestions:businessQuestions:attentionAll")
+    @RequestMapping(value = "attentionAll")
+    public String noticeAll(HttpServletRequest request, RedirectAttributes redirectAttributes) {
+        String listIds = request.getParameter("listId");
+        List<String> idList = Arrays.asList(listIds.split(","));
+        try {
+            service.attentionAll(idList);
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "关注失败!");
+            logger.error("Exception e:"+e);
+        }
+        addMessage(redirectAttributes, "关注成功");
+        return "redirect:"+Global.getAdminPath()+"/businessQuestions/businessQuestions/?repage";
+    }
+}

+ 52 - 0
src/main/java/com/jeeplus/modules/businessQuestions/web/BusinessQuestionsUserController.java

@@ -0,0 +1,52 @@
+package com.jeeplus.modules.businessQuestions.web;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.businessQuestions.service.BusinessQuestionsUserService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 我提交的业务提问controller
+ * @author: 徐滕
+ * @create: 2022-03-29 11:20
+ **/
+@Controller
+@RequestMapping(value = "${adminPath}/businessQuestionsUser/businessQuestionsUser")
+public class BusinessQuestionsUserController extends BaseController {
+    @Autowired
+    private BusinessQuestionsUserService service;
+
+    @ModelAttribute
+    public BusinessQuestions get(@RequestParam(required=false) String id) {
+        BusinessQuestions entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = service.get(id);
+        }
+        if (entity == null){
+            entity = new BusinessQuestions();
+        }
+        return entity;
+    }
+
+    /**
+     * 业务提问-所有问题展示页
+     */
+    @RequiresPermissions("businessQuestionsUser:businessQuestionsUser:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(BusinessQuestions businessQuestions, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<BusinessQuestions> page = service.findPage(new Page<BusinessQuestions>(request, response), businessQuestions);
+        model.addAttribute("page", page);
+        return "modules/businessQuestions/businessQuestionsUserList";
+    }
+}

+ 18 - 0
src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java

@@ -63,8 +63,26 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 
 	public List<Workattachment> findList(Workattachment workattachment) {
 		List<Workattachment> list = super.findList(workattachment);
+		CollectAccessoryInfo cAInfo = new CollectAccessoryInfo();
+		User loginUser = UserUtils.getUser();
+		if(StringUtils.isNotBlank(loginUser.getId())){
+			cAInfo.setOfficeId(loginUser.getOffice().getId());
+			cAInfo.setCompanyId(loginUser.getCompany().getId());
+			cAInfo.setCreateBy(loginUser);
+		}
+		//遍历附件信息,判定改附件信息是否被收藏
+		for (Workattachment info: list) {
+			cAInfo.setUrl(info.getUrl());
+			CollectAccessoryInfo collectAccessoryInfo = projectAccessoryDao.getCollectAccessoryInfo1(cAInfo);
+			if(null != collectAccessoryInfo){
+				info.setCollectFlag("1");
+			}else{
+				info.setCollectFlag("0");
+			}
+		}
 		//附件数据处理
 		attachmentManage(list);
+		attachmentManageOnUrl(list);
 		return list;
 	}
 

+ 10 - 0
src/main/java/com/jeeplus/modules/sys/web/OfficeController.java

@@ -12,9 +12,11 @@ import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
 import com.jeeplus.common.json.AjaxJson;
+import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
 import com.jeeplus.modules.sys.dao.CompanyDao;
 import com.jeeplus.modules.sys.dao.OfficeDao;
 import com.jeeplus.modules.sys.dao.RoleDao;
@@ -41,6 +43,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import com.google.common.collect.Lists;
@@ -473,6 +476,13 @@ public class OfficeController extends BaseController {
 //            list = officeService.findList(isAll);
         }else{
             list = officeService.findListByOaNotify();
+            Iterator<Office> it = list.iterator();
+            while(it.hasNext()){
+                Office info = it.next();
+                if(info.getId().equals("876aaf31050d4829a8c916aaf2184487") || info.getId().equals("5c38f1ce85224d74bd9d110ea6fab976")){
+                    it.remove();
+                }
+            }
         }
         for (int i = 0; i < list.size(); i++) {
             Office e = list.get(i);

+ 96 - 0
src/main/java/com/jeeplus/modules/workactivity/service/WorkActivityProcessService.java

@@ -209,6 +209,102 @@ public class WorkActivityProcessService extends CrudService<WorkActivityProcessD
 	}
 
 	@Transactional(readOnly = false)
+	public void updateProcessNew(WorkActivityProcess workActivityProcess, WorkActivityMenu workActivityMenu, int key, String taskCount, String processInstanceId, String taskDefKey, String audit, String flag, String comment, List<Activity> activities,Integer order) {
+		if (workActivityProcess.getCount() != 0) {
+			workActivityProcess.setId("");
+		} else {
+			WorkActivityProcess workActivityProcess1 = new WorkActivityProcess();
+			workActivityProcess1.setIsApproval("0");
+			workActivityProcess1.setCount(0);
+			workActivityProcess1.setProcessInstanceId(processInstanceId);
+			this.deleteByAudit(workActivityProcess1);
+		}
+
+		workActivityProcess.setRemarks(comment);
+		workActivityProcess.setProcessInstanceId(processInstanceId);
+		workActivityProcess.setProcessKey(workActivityMenu.getProcessType());
+		if (workActivityProcess.getCount() != 0) {
+			workActivityProcess.setCount(Integer.parseInt(taskCount));
+		}
+		workActivityProcess.setIsApproval("yes".equals(flag) ? "1" : "2");
+		if (workActivityProcess != null && StringUtils.isNotBlank(workActivityProcess.getIsApproval())) {
+
+			WorkActivityProcess w = new WorkActivityProcess();
+			w.setProcessInstanceId(processInstanceId);
+			w.setIsApproval("0");
+			w.setDelFlag("0");
+			this.delFlag(w);
+			WorkActivityProcess process = w;
+			if ((taskDefKey.equals("modifyApply") && key == 1) || (taskDefKey.equals(audit) && key == 0)) {
+				if ("yes".equals(flag)) {
+					String returnBack = "";
+					for (Activity activity : activities) {
+						if (activity.getCount() == Integer.parseInt(taskCount)) {
+							returnBack = activity.getReturnBack();
+						}
+					}
+					if (!returnBack.equals("0")) {
+						if (returnBack.equals("1")) {
+							if (!taskCount.equals("1")) {
+								process.setCount(1);
+							} else {
+								process.setCount(1);
+							}
+						} else if (returnBack.equals("2")) {
+							process.setCount(1);
+						} else {
+							process.setCount(1);
+						}
+					}
+					workActivityProcess.setId("");
+				} else {
+					process.setCount(11);
+				}
+			} else {
+				if ("yes".equals(flag)) {
+					process.setCount(Integer.parseInt(taskCount) + 1);
+				} else {
+					String returnBack = "";
+					for (Activity activity : activities) {
+						if (activity.getCount() == Integer.parseInt(taskCount)) {
+							returnBack = activity.getReturnBack();
+						}
+					}
+					if (!returnBack.equals("0")) {
+						if (returnBack.equals("1")) {
+							if (!taskCount.equals("1")) {
+								process.setCount(1);
+							} else {
+								process.setCount(1);
+							}
+						} else if (returnBack.equals("2")) {
+							process.setCount(1);
+						} else {
+							process.setCount(1);
+						}
+						WorkActivityProcess workActivityProcess1 = new WorkActivityProcess();
+						workActivityProcess1.setCount(0);
+						workActivityProcess1.setProcessInstanceId(processInstanceId);
+						workActivityProcess1.setProcessKey(workActivityMenu.getProcessType());
+						workActivityProcess1.setIsApproval("0");
+						workActivityProcess1.setActivityTask("modifyApply");
+						if(2 == order){
+							workActivityProcess1.setRemarks("结案人驳回");
+						}
+						this.save(workActivityProcess1);
+					}
+				}
+			}
+			process.setDelFlag("1");
+			this.delFlag(process);
+			if (workActivityProcess.getCount() == 0) {
+				workActivityProcess.setDelFlag("0");
+			}
+			this.save(workActivityProcess);
+		}
+	}
+
+	@Transactional(readOnly = false)
 	public void updateProcessSpecial(WorkActivityProcess workActivityProcess, WorkActivityMenu workActivityMenu,int key, String taskCount, String processInstanceId, String taskDefKey,String audit, String flag, String comment, List<Activity> activities) {
 		if (workActivityProcess.getCount()!=0){
 			workActivityProcess.setId("");

+ 56 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -15,6 +15,9 @@ import com.jeeplus.common.utils.excel.ImportExcel;
 import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestions;
+import com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsContentsUser;
+import com.jeeplus.modules.businessQuestions.service.BusinessQuestionsService;
 import com.jeeplus.modules.caseinfo.entity.CaseInfo;
 import com.jeeplus.modules.caseinfo.service.CaseInfoService;
 import com.jeeplus.modules.iim.entity.MailBox;
@@ -514,6 +517,8 @@ public class WorkProjectNotifyController extends BaseController {
 	private StatementCompanyComprehensiveService statementCompanyComprehensiveService;
 	@Autowired
 	private RuralProjectRecordsCaseBaseService caseBaseService;
+	@Autowired
+	private BusinessQuestionsService businessQuestionsService;
 
 	@ModelAttribute
 	public WorkProjectNotify get(@RequestParam(required=false) String id) {
@@ -6521,6 +6526,10 @@ public class WorkProjectNotifyController extends BaseController {
 
 					return this.caseBase(workProjectNotify,model);
 
+				}else if("182".equals(workProjectNotify.getType())){     //业务提问申请
+
+					return this.disposeBusinessQuestions(workProjectNotify,model);
+
 				}else if ("52".equals(workProjectNotify.getType())) {    //收入结算
 					WorkReceiptsSettle workReceiptsSettle = workReceiptsSettleService.get(workProjectNotify.getNotifyId());
 					Act act = getByAct(workReceiptsSettle.getProcessInstanceId());
@@ -8874,4 +8883,51 @@ public class WorkProjectNotifyController extends BaseController {
 		return "modules/workprojectnotify/workProjectNotifyForm";
 	}
 
+	private String disposeBusinessQuestions(WorkProjectNotify workProjectNotify,Model model) {
+		try {
+			BusinessQuestions businessQuestions = businessQuestionsService.get(workProjectNotify.getNotifyId());
+			businessQuestionsService.queryDetails(businessQuestions);
+			//查询业务提问内容集合(按照时间正序进行查询)
+			List<BusinessQuestionsContentsUser> businessQuestionsContentsList = businessQuestionsService.getBusinessQuestionsContentsList(businessQuestions);
+			for (BusinessQuestionsContentsUser info: businessQuestionsContentsList) {
+				info.setId("contents" + info.getId());
+			}
+			businessQuestions.setContentsList(businessQuestionsContentsList);
+
+			if (StringUtils.isNotBlank(workProjectNotify.getHome())) {
+				businessQuestions.setHome(workProjectNotify.getHome());
+			} else {
+				businessQuestions.setHome("home");
+			}
+			businessQuestions.setUploadMode(uploadMode);
+
+			//这行数据显示用
+			//下两句非常重要,标识!!!
+			if (StringUtils.isNotBlank(workProjectNotify.getProcessInstanceId())) {
+				businessQuestions.setProcessInstanceId(workProjectNotify.getProcessInstanceId());
+			}
+			businessQuestions.setAct(getByAct(businessQuestions.getProcessInstanceId()));
+
+			model.addAttribute("businessQuestions", businessQuestions);
+
+
+			if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+				return "modules/businessQuestions/businessQuestionsView";
+			} else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+				return "modules/businessQuestions/businessQuestionsAudit";
+			} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+				return "modules/businessQuestions/businessQuestionsModify";
+			} else {
+				return "modules/businessQuestions/businessQuestionsView";
+			}
+		}catch (Exception e) {
+			workProjectNotify.setStatus("1");
+			workProjectNotify.preUpdate();
+			workProjectNotifyService.save(workProjectNotify);
+			model.addAttribute("errorMsg","关联记录已经被删除!!!");
+		}
+		model.addAttribute("workProjectNotify", workProjectNotify);
+		return "modules/businessQuestions/businessQuestionsForm";
+	}
+
 }

+ 133 - 0
src/main/resources/mappings/modules/businessQuestions/BusinessQuestionsAttentionDao.xml

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.businessQuestions.dao.BusinessQuestionsAttentionDao">
+
+	<sql id="businessQuestionsColumns">
+		a.id as "id",
+		a.create_by as "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) as "createBy.name",
+		a.create_date as "createDate",
+		a.update_by as "updateBy.id",
+		a.update_date as "updateDate",
+		a.remarks as "remarks",
+		a.del_flag as "delFlag",
+		a.title as "title",
+		(select group_concat(su.name) from business_questions_user bqu left join sys_user su on su.id = bqu.user_id where bqu.business_questions_id = a.id) as "actorUserNames",
+		(select group_concat(su.name) from business_questions_user bqu left join sys_user su on su.id = bqu.user_id where bqu.business_questions_id = a.id) as "project.leaderNameStr",
+		(select group_concat(user_id) from business_questions_user bqu where bqu.business_questions_id = a.id) as "project.leaderIds",
+		a.project_id as "project.id",
+		a.question_type as "questionType",
+		a.submitter_id as "submitterId",
+		a.submit_date as "submitDate",
+		a.actor_user_id as "actorUserId",
+		a.closing_date as "closingDate",
+		a.expectation_closing_date as "expectationClosingDate",
+		a.process_instance_id as "processInstanceId",
+		a.status as "status",
+		a.contents as "contents",
+		rpr.project_name as "project.projectName"
+	</sql>
+
+
+	<sql id="businessQuestionsContentsColumns">
+		a.id as "id",
+		a.create_by as "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) as "createBy.name",
+		a.create_date as "createDate",
+		a.update_by as "updateBy.id",
+		a.update_date as "updateDate",
+		a.remarks as "remarks",
+		a.del_flag as "delFlag",
+		a.business_questions_id as "businessQuestionsId",
+		a.user_id as "userId",
+		a.contents as "contents"
+	</sql>
+
+	<sql id="businessQuestionsJoins">
+		left join rural_project_records rpr on rpr.id = a.project_id
+	</sql>
+
+
+	<select id="get" resultType="com.jeeplus.modules.businessQuestions.entity.BusinessQuestions" >
+		SELECT
+			<include refid="businessQuestionsColumns"/>
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="com.jeeplus.modules.businessQuestions.entity.BusinessQuestions" >
+		SELECT
+			<include refid="businessQuestionsColumns"/>
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		left join sys_user su on su.id = a.create_by
+		left join business_questions_attention_user bqau on bqau.business_questions_id = a.id
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			and bqau.user_id = #{attentionUserId}
+            <if test="title != null and title != ''">
+                AND a.title like
+                <if test="dbName == 'oracle'">'%'||#{title}||'%'</if>
+                <if test="dbName == 'mysql'">CONCAT('%', #{title}, '%')</if>
+            </if>
+			<if test="(submitterId != null and submitterId != '') or (submitterName != null and submitterName != '')">
+				AND (a.create_by = #{submitterId} or su.name like concat('%',#{submitterName},'%'))
+			</if>
+			<if test="project != null and project.id != null and project.id != ''">
+				AND rpr.id = #{project.id}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="startDate != null">
+				AND a.create_date >= #{startDate}
+			</if>
+			<if test="endDate != null">
+				AND a.create_date &lt;= #{endDate}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="queryCount" resultType="java.lang.Integer" >
+		SELECT
+			count(a.id)
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		left join sys_user su on su.id = a.create_by
+		left join business_questions_attention_user bqau on bqau.business_questions_id = a.id
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			and bqau.user_id = #{attentionUserId}
+            <if test="title != null and title != ''">
+                AND a.title like
+                <if test="dbName == 'oracle'">'%'||#{title}||'%'</if>
+                <if test="dbName == 'mysql'">CONCAT('%', #{title}, '%')</if>
+            </if>
+			<if test="(submitterId != null and submitterId != '') or (submitterName != null and submitterName != '')">
+				AND (a.create_by = #{submitterId} or su.name like concat('%',#{submitterName},'%'))
+			</if>
+			<if test="project != null and project.id != null and project.id != ''">
+				AND rpr.id = #{project.id}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="startDate != null">
+				AND a.create_date >= #{startDate}
+			</if>
+			<if test="endDate != null">
+				AND a.create_date &lt;= #{endDate}
+			</if>
+		</where>
+	</select>
+
+</mapper>

+ 331 - 0
src/main/resources/mappings/modules/businessQuestions/BusinessQuestionsDao.xml

@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.businessQuestions.dao.BusinessQuestionsDao">
+
+	<sql id="businessQuestionsColumns">
+		a.id as "id",
+		a.create_by as "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) as "createBy.name",
+		a.create_date as "createDate",
+		a.update_by as "updateBy.id",
+		a.update_date as "updateDate",
+		a.remarks as "remarks",
+		a.del_flag as "delFlag",
+		a.title as "title",
+		(select group_concat(su.name) from business_questions_user bqu left join sys_user su on su.id = bqu.user_id where bqu.business_questions_id = a.id) as "actorUserNames",
+		(select group_concat(su.name) from business_questions_user bqu left join sys_user su on su.id = bqu.user_id where bqu.business_questions_id = a.id) as "project.leaderNameStr",
+		(select group_concat(user_id) from business_questions_user bqu where bqu.business_questions_id = a.id) as "project.leaderIds",
+		a.project_id as "project.id",
+		a.question_type as "questionType",
+		a.submitter_id as "submitterId",
+		a.submit_date as "submitDate",
+		a.actor_user_id as "actorUserId",
+		a.closing_date as "closingDate",
+		a.expectation_closing_date as "expectationClosingDate",
+		a.process_instance_id as "processInstanceId",
+		a.status as "status",
+		a.contents as "contents",
+		rpr.project_name as "project.projectName"
+	</sql>
+
+
+	<sql id="businessQuestionsContentsColumns">
+		a.id as "id",
+		a.create_by as "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) as "createBy.name",
+		a.create_date as "createDate",
+		a.update_by as "updateBy.id",
+		a.update_date as "updateDate",
+		a.remarks as "remarks",
+		a.del_flag as "delFlag",
+		a.business_questions_id as "businessQuestionsId",
+		a.user_id as "userId",
+		a.contents as "contents"
+	</sql>
+
+	<sql id="businessQuestionsJoins">
+		left join rural_project_records rpr on rpr.id = a.project_id
+	</sql>
+
+
+	<select id="get" resultType="com.jeeplus.modules.businessQuestions.entity.BusinessQuestions" >
+		SELECT
+			<include refid="businessQuestionsColumns"/>
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="com.jeeplus.modules.businessQuestions.entity.BusinessQuestions" >
+		SELECT
+			<include refid="businessQuestionsColumns"/>
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		left join sys_user su on su.id = a.create_by
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="title != null and title != ''">
+                AND a.title like
+                <if test="dbName == 'oracle'">'%'||#{title}||'%'</if>
+                <if test="dbName == 'mysql'">CONCAT('%', #{title}, '%')</if>
+            </if>
+			<if test="(submitterId != null and submitterId != '') or (submitterName != null and submitterName != '')">
+				AND (a.create_by = #{submitterId} or su.name like concat('%',#{submitterName},'%'))
+			</if>
+			<if test="project != null and project.id != null and project.id != ''">
+				AND rpr.id = #{project.id}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="startDate != null">
+				AND a.create_date >= #{startDate}
+			</if>
+			<if test="endDate != null">
+				AND a.create_date &lt;= #{endDate}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="queryCount" resultType="java.lang.Integer" >
+		SELECT
+			count(a.id)
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		left join sys_user su on su.id = a.create_by
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="title != null and title != ''">
+                AND a.title like
+                <if test="dbName == 'oracle'">'%'||#{title}||'%'</if>
+                <if test="dbName == 'mysql'">CONCAT('%', #{title}, '%')</if>
+            </if>
+			<if test="(submitterId != null and submitterId != '') or (submitterName != null and submitterName != '')">
+				AND (a.create_by = #{submitterId} or su.name like concat('%',#{submitterName},'%'))
+			</if>
+			<if test="project != null and project.id != null and project.id != ''">
+				AND rpr.id = #{project.id}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="startDate != null">
+				AND a.create_date >= #{startDate}
+			</if>
+			<if test="endDate != null">
+				AND a.create_date &lt;= #{endDate}
+			</if>
+		</where>
+	</select>
+
+	<insert id="insert">
+		INSERT INTO business_questions_info(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			title,
+			project_id,
+			question_type,
+			submitter_id,
+			submit_date,
+			actor_user_id,
+			closing_date,
+			expectation_closing_date,
+			process_instance_id,
+			status,
+			contents
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{title},
+			#{projectId},
+			#{questionType},
+			#{submitterId},
+			#{submitDate},
+			#{actorUserId},
+			#{closingDate},
+			#{expectationClosingDate},
+			#{processInstanceId},
+			#{status},
+			#{contents}
+		)
+	</insert>
+
+	<update id="update">
+		UPDATE business_questions_info SET
+			update_by = #{updateBy.id}
+			,update_date = #{updateDate}
+			,remarks = #{remarks}
+			<if test="title != null and title != ''">
+				,title = #{title}
+			</if>
+			<if test="projectId != null and projectId != ''">
+				,project_id = #{projectId}
+			</if>
+			<if test="questionType != null and questionType != ''">
+				,question_type = #{questionType}
+			</if>
+			<if test="submitterId != null and submitterId != ''">
+				,submitter_id = #{submitterId}
+			</if>
+			<if test="submitDate != null and submitDate != ''">
+				,submit_date = #{submitDate}
+			</if>
+			<if test="actorUserId != null and actorUserId != ''">
+				,actor_user_id = #{actorUserId}
+			</if>
+			<if test="closingDate != null and closingDate != ''">
+				,closing_date = #{closingDate}
+			</if>
+			<if test="expectationClosingDate != null and expectationClosingDate != ''">
+				,expectation_closing_date = #{expectationClosingDate}
+			</if>
+			<if test="processInstanceId != null and processInstanceId != ''">
+				,process_instance_id = #{processInstanceId}
+			</if>
+			<if test="status != null and status != ''">
+				,status = #{status}
+			</if>
+			<if test="contents != null and contents != ''">
+				,contents = #{contents}
+			</if>
+		WHERE id = #{id}
+	</update>
+
+
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM business_questions_info
+		WHERE id = #{id}
+	</update>
+
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE business_questions_info SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+	<delete id="deleteBusinessQuestionsUserByBusinessQuestionsId">
+		delete from business_questions_user where business_questions_id = #{businessQuestionsId}
+	</delete>
+
+	<insert id="insertBusinessQuestionsUserList" parameterType="java.util.List">
+		INSERT INTO business_questions_user(
+		business_questions_id,
+		user_id
+		) VALUES
+		<foreach collection="list" item="item" separator=",">
+			( #{item.businessQuestionsId},
+			#{item.userId}
+			)
+		</foreach>
+	</insert>
+
+	<insert id="insertBusinessQuestionsContentsUser">
+		INSERT INTO business_questions_contents_user(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			business_questions_id,
+			user_id,
+			contents
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{businessQuestionsId},
+			#{userId},
+			#{contents}
+		)
+	</insert>
+
+	<update id="updateBusinessQuestionsContentsUser">
+		UPDATE business_questions_contents_user SET
+		update_by = #{updateBy.id}
+		,update_date = #{updateDate}
+		,contents = #{contents}
+		WHERE id = #{id}
+	</update>
+
+	<delete id="deleteBusinessQuestionsContentsUser">
+		delete from business_questions_contents_user WHERE id = #{id}
+	</delete>
+
+	<select id="getBusinessQuestionsContentsList" resultType="com.jeeplus.modules.businessQuestions.entity.BusinessQuestionsContentsUser">
+		select
+		<include refid="businessQuestionsContentsColumns"/>
+		,su.name as "userName"
+		from business_questions_contents_user a
+		left join sys_user su on su.id = a.user_id
+		where a.business_questions_id = #{id}
+		order by a.update_date asc
+	</select>
+
+	<select id="getBusinessQuestionsUser" resultType="com.jeeplus.modules.sys.entity.User">
+		select * from sys_user a
+		left join business_questions_user bqu on bqu.user_id = a.id
+		where bqu.business_questions_id = #{id}
+	</select>
+
+	<update id="updateProcessInstanceId">
+		UPDATE business_questions_info SET
+			process_instance_id = #{processInstanceId}
+		WHERE id = #{id}
+	</update>
+
+	<update id="updateProcessIdAndStatus" >
+        UPDATE  business_questions_info SET
+        process_instance_id = #{processInstanceId},
+        status = #{status}
+        WHERE id = #{id}
+    </update>
+
+	<insert id="insertAttentionAll">
+		INSERT INTO business_questions_attention_user(
+		business_questions_id,
+		user_id
+		) VALUES
+		<foreach collection="list" item="item" separator=",">
+			( #{item.businessQuestionsId},
+			#{item.userId}
+			)
+		</foreach>
+	</insert>
+
+	<delete id="deleteNotice">
+		delete from business_questions_attention_user WHERE business_questions_id = #{businessQuestionsId} and user_id = #{userId}
+	</delete>
+
+	<select id="getInformUserList" resultType="com.jeeplus.modules.sys.entity.User">
+		select a.* from sys_user a
+		left join business_questions_attention_user bqau on bqau.user_id = a.id
+		where bqau.business_questions_id  = #{id}
+	</select>
+
+</mapper>

+ 129 - 0
src/main/resources/mappings/modules/businessQuestions/BusinessQuestionsUserDao.xml

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.businessQuestions.dao.BusinessQuestionsUserDao">
+
+	<sql id="businessQuestionsColumns">
+		a.id as "id",
+		a.create_by as "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) as "createBy.name",
+		a.create_date as "createDate",
+		a.update_by as "updateBy.id",
+		a.update_date as "updateDate",
+		a.remarks as "remarks",
+		a.del_flag as "delFlag",
+		a.title as "title",
+		(select group_concat(su.name) from business_questions_user bqu left join sys_user su on su.id = bqu.user_id where bqu.business_questions_id = a.id) as "actorUserNames",
+		(select group_concat(su.name) from business_questions_user bqu left join sys_user su on su.id = bqu.user_id where bqu.business_questions_id = a.id) as "project.leaderNameStr",
+		(select group_concat(user_id) from business_questions_user bqu where bqu.business_questions_id = a.id) as "project.leaderIds",
+		a.project_id as "project.id",
+		a.question_type as "questionType",
+		a.submitter_id as "submitterId",
+		a.submit_date as "submitDate",
+		a.actor_user_id as "actorUserId",
+		a.closing_date as "closingDate",
+		a.expectation_closing_date as "expectationClosingDate",
+		a.process_instance_id as "processInstanceId",
+		a.status as "status",
+		a.contents as "contents",
+		rpr.project_name as "project.projectName"
+	</sql>
+
+
+	<sql id="businessQuestionsContentsColumns">
+		a.id as "id",
+		a.create_by as "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) as "createBy.name",
+		a.create_date as "createDate",
+		a.update_by as "updateBy.id",
+		a.update_date as "updateDate",
+		a.remarks as "remarks",
+		a.del_flag as "delFlag",
+		a.business_questions_id as "businessQuestionsId",
+		a.user_id as "userId",
+		a.contents as "contents"
+	</sql>
+
+	<sql id="businessQuestionsJoins">
+		left join rural_project_records rpr on rpr.id = a.project_id
+	</sql>
+
+
+	<select id="get" resultType="com.jeeplus.modules.businessQuestions.entity.BusinessQuestions" >
+		SELECT
+			<include refid="businessQuestionsColumns"/>
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="com.jeeplus.modules.businessQuestions.entity.BusinessQuestions" >
+		SELECT
+			<include refid="businessQuestionsColumns"/>
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		left join sys_user su on su.id = a.create_by
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="title != null and title != ''">
+                AND a.title like
+                <if test="dbName == 'oracle'">'%'||#{title}||'%'</if>
+                <if test="dbName == 'mysql'">CONCAT('%', #{title}, '%')</if>
+            </if>
+			<if test="(submitterId != null and submitterId != '') or (submitterName != null and submitterName != '')">
+				AND (a.create_by = #{submitterId} or su.name like concat('%',#{submitterName},'%'))
+			</if>
+			<if test="project != null and project.id != null and project.id != ''">
+				AND rpr.id = #{project.id}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="startDate != null">
+				AND a.create_date >= #{startDate}
+			</if>
+			<if test="endDate != null">
+				AND a.create_date &lt;= #{endDate}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="queryCount" resultType="java.lang.Integer" >
+		SELECT
+			count(a.id)
+		FROM business_questions_info a
+		<include refid="businessQuestionsJoins"/>
+		left join sys_user su on su.id = a.create_by
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+            <if test="title != null and title != ''">
+                AND a.title like
+                <if test="dbName == 'oracle'">'%'||#{title}||'%'</if>
+                <if test="dbName == 'mysql'">CONCAT('%', #{title}, '%')</if>
+            </if>
+			<if test="(submitterId != null and submitterId != '') or (submitterName != null and submitterName != '')">
+				AND (a.create_by = #{submitterId} or su.name like concat('%',#{submitterName},'%'))
+			</if>
+			<if test="project != null and project.id != null and project.id != ''">
+				AND rpr.id = #{project.id}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="startDate != null">
+				AND a.create_date >= #{startDate}
+			</if>
+			<if test="endDate != null">
+				AND a.create_date &lt;= #{endDate}
+			</if>
+		</where>
+	</select>
+
+</mapper>

+ 109 - 0
src/main/webapp/WEB-INF/tags/sys/businessQuestionsselectUser.tag

@@ -0,0 +1,109 @@
+<%@ tag language="java" pageEncoding="UTF-8"%>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ attribute name="id" type="java.lang.String" required="true" description="编号"%>
+<%@ attribute name="name" type="java.lang.String" required="true" description="隐藏域名称(ID)"%>
+<%@ attribute name="value" type="java.lang.String" required="true" description="隐藏域值(ID)"%>
+<%@ attribute name="labelName" type="java.lang.String" required="true" description="输入框名称(Name)"%>
+<%@ attribute name="labelValue" type="java.lang.String" required="true" description="输入框值(Name)"%>
+<%@ attribute name="title" type="java.lang.String" required="true" description="选择框标题"%>
+<%@ attribute name="url" type="java.lang.String" required="true" description="树结构数据地址"%>
+<%@ attribute name="checked" type="java.lang.Boolean" required="false" description="是否显示复选框,如果不需要返回父节点,请设置notAllowSelectParent为true"%>
+<%@ attribute name="extId" type="java.lang.String" required="false" description="排除掉的编号(不能选择的编号)"%>
+<%@ attribute name="isAll" type="java.lang.Boolean" required="false" description="是否列出全部数据,设置true则不进行数据权限过滤(目前仅对Office有效)"%>
+<%@ attribute name="notAllowSelectRoot" type="java.lang.Boolean" required="false" description="不允许选择根节点"%>
+<%@ attribute name="notAllowSelectParent" type="java.lang.Boolean" required="false" description="不允许选择父节点"%>
+<%@ attribute name="module" type="java.lang.String" required="false" description="过滤栏目模型(只显示指定模型,仅针对CMS的Category树)"%>
+<%@ attribute name="selectScopeModule" type="java.lang.Boolean" required="false" description="选择范围内的模型(控制不能选择公共模型,不能选择本栏目外的模型)(仅针对CMS的Category树)"%>
+<%@ attribute name="allowClear" type="java.lang.Boolean" required="false" description="是否允许清除"%>
+<%@ attribute name="allowInput" type="java.lang.Boolean" required="false" description="文本框可填写"%>
+<%@ attribute name="cssClass" type="java.lang.String" required="false" description="css样式"%>
+<%@ attribute name="cssStyle" type="java.lang.String" required="false" description="css样式"%>
+<%@ attribute name="smallBtn" type="java.lang.Boolean" required="false" description="缩小按钮显示"%>
+<%@ attribute name="hideBtn" type="java.lang.Boolean" required="false" description="是否显示按钮"%>
+<%@ attribute name="disabled" type="java.lang.String" required="false" description="是否限制选择,如果限制,设置为disabled"%>
+<%@ attribute name="dataMsgRequired" type="java.lang.String" required="false" description=""%>
+	<input id="${id}Id" name="${name}" class="${cssClass}" type="hidden" value="${value}"/>
+	<div class="input-group">
+		<input id="${id}Name" placeholder="请选择${title}" name="${labelName}" ${allowInput?'':'readonly="readonly"'}  type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
+		class="${cssClass}" style="${cssStyle}"/>
+		<span class="input-group-btn">
+	       		 <button type="button"  id="${id}Button" class="btn <c:if test="${fn:contains(cssClass, 'input-sm')}"> btn-sm </c:if><c:if test="${fn:contains(cssClass, 'input-lg')}"> btn-lg </c:if>  btn-primary ${disabled} ${hideBtn ? 'hide' : ''}"><i class="fa fa-search"></i>
+	             </button>
+       		 </span>
+    </div>
+	 <label id="${id}Name-error" class="error" for="${id}Name" style="display:none"></label>
+<script type="text/javascript">
+	$("#${id}Button").click(function(){
+		// 是否限制选择,如果限制,设置为disabled
+		if ($("#${id}Button").hasClass("disabled")){
+			return true;
+		}
+		// 正常打开
+		top.layer.open({
+		    type: 2,
+		    area: ['300px', '420px'],
+		    title:"选择${title}",
+		    ajaxData:{selectIds: $("#${id}Id").val()},
+		    content: "${ctx}/tag/treeselectReimbur?url="+encodeURIComponent("${url}")+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}" ,
+		    btn: ['确定', '关闭']
+    	       ,yes: function(index, layero){ //或者使用btn1
+						var tree = layero.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
+						var ids = [], names = [],officeIds = [], nodes = [];
+						if ("${checked}" == "true"){
+							nodes = tree.getCheckedNodes(true);
+						}else{
+							nodes = tree.getSelectedNodes();
+						}
+						for(var i=0; i<nodes.length; i++) {//<c:if test="${checked && notAllowSelectParent}">
+							if (nodes[i].isParent){
+								continue; // 如果为复选框选择,则过滤掉父节点
+							}//</c:if><c:if test="${notAllowSelectRoot}">
+							if (nodes[i].level == 0){
+								//top.$.jBox.tip("不能选择根节点("+nodes[i].name+")请重新选择。");
+								top.layer.msg("不能选择根节点("+nodes[i].name+")请重新选择。", {icon: 0});
+								return false;
+							}//</c:if><c:if test="${notAllowSelectParent}">
+							if (nodes[i].isParent){
+								//top.$.jBox.tip("不能选择父节点("+nodes[i].name+")请重新选择。");
+								//layer.msg('有表情地提示');
+								top.layer.msg("不能选择父节点("+nodes[i].name+")请重新选择。", {icon: 0});
+								return false;
+							}//</c:if><c:if test="${not empty module && selectScopeModule}">
+							if (nodes[i].module == ""){
+								//top.$.jBox.tip("不能选择公共模型("+nodes[i].name+")请重新选择。");
+								top.layer.msg("不能选择公共模型("+nodes[i].name+")请重新选择。", {icon: 0});
+								return false;
+							}else if (nodes[i].module != "${module}"){
+								//top.$.jBox.tip("不能选择当前栏目以外的栏目模型,请重新选择。");
+								top.layer.msg("不能选择当前栏目以外的栏目模型,请重新选择。", {icon: 0});
+								return false;
+							}//</c:if>
+							ids.push(nodes[i].id);
+							names.push(nodes[i].name);
+							officeIds.push(nodes[i].officeId);
+							//<c:if test="${!checked}">
+							break; // 如果为非复选框选择,则返回第一个选择  </c:if>
+						}
+						/*if(ids.length>1){
+							top.layer.msg("不能进行多选,请重新选择。", {icon: 0});
+							return false;
+						}*/
+
+						if(ids.length>5){
+							top.layer.msg("问题处理人员最多选择五个人,请重新选择。", {icon: 0});
+							return false;
+						}
+						$("#${id}Id").val(ids.join(",").replace(/u_/ig,"")).change();
+						$("#${id}Name").val(names.join(",")).change();
+						$("#${id}officeId").val(officeIds.join(","));
+						console.log(officeIds)
+						$("#${id}Name").focus();
+						top.layer.close(index);
+				    	       },
+    	cancel: function(index){ //或者使用btn2
+    	           //按钮【按钮二】的回调
+    	       }
+		});
+
+	});
+</script>

+ 10 - 4
src/main/webapp/WEB-INF/tags/sys/treeselectoffices.tag

@@ -82,10 +82,15 @@
 						return false;
 					}//</c:if>
 					if ((nodes[i].pId)==("7f776d072d7b4c839cef4e63ce6dbfa5")){
-						ids.push(nodes[1].id);
-						var fName = '';
-						fName = createFName(nodes[1],fName);
-						parentIds.push(fName);
+						for(var j=0; j<nodes.length; j++){
+							if ((nodes[j].id)==("7f776d072d7b4c839cef4e63ce6dbfa5")){
+								ids.push(nodes[j].id);
+								var fName = '';
+								fName = createFName(nodes[j],fName);
+								parentIds.push(fName);
+							}
+						}
+
 					}
 					ids.push(nodes[i].id);
 					<c:if test="${retnParent}">
@@ -103,6 +108,7 @@
 				//按钮【按钮二】的回调
 			}
 		});
+
 	});
 	function createFName(node,fName) {
 		var parentNode = node.getParentNode();

+ 18 - 0
src/main/webapp/static/common/jeeplus.js

@@ -562,6 +562,24 @@ function getAuditState(id)
     }
     return result;
 }
+
+function getBusinessQuestionsAuditState(id)
+{
+    var result ={};
+    result.action = true;
+    switch(id)
+    {
+        case "0":result.status="";result.action = false;break;
+        case "1":result.label = "tempstore";result.status="暂存";result.action = false;break;
+        case "2":result.label = "auditing";result.status="处理中";break;
+        case "3":result.label = "cancel";result.status="撤回";break;
+        case "4":result.label = "reject";result.status="驳回";break;
+        case "5":result.label = "signed";result.status="已结案";break;
+        default:
+            result.label = "unknown";result.status="未知";break;
+    }
+    return result;
+}
 function getCaseBaseAuditState(id)
 {
     var result ={};

+ 230 - 0
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsAttentionList.jsp

@@ -0,0 +1,230 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>通告管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.js"></script>
+	<script type="text/javascript">
+
+        $(document).ready(function() {
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+				, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+				, trigger: 'click'
+            });
+        });
+
+
+		//打开对话框(查看)
+		function openDialogListView(title,url,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: url,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}
+				}
+			});
+
+		}
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+
+			<form:form id="searchForm" modelAttribute="businessQuestions" action="${ctx}/businessQuestionsAttention/businessQuestionsAttention/list" method="post" class="form-inline">
+			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+			<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+			<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+				<div class="commonQuery">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">标题:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="title" htmlEscape="false" maxlength="200"  class=" form-control layui-input" />
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">所属项目:</label>
+						<div class="layui-input-block with-icon">
+							<sys:gridselectcallprojectt url="${ctx}/workreimbursement/workReimbursement/selectprojectOnList" id="project" name="project.id"  value="${businessQuestions.project.id}"  title="选择所属项目" labelName="project.projectName" cssStyle="background-color:#fff"
+														labelValue="${businessQuestions.project.projectName}" cssClass="form-control required layui-input"  fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+						</div>
+					</div>
+					<div class="layui-item athird">
+						<div class="input-group">
+							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+							<div class="layui-btn-group search-spacing">
+								<button id="searchQuery" class="layui-btn layui-btn-sm  layui-bg-blue" onclick="search()">查询</button>
+								<button id="searchReset" class="layui-btn layui-btn-sm  " onclick="resetSearch()">重置</button>
+							</div>
+						</div>
+					</div>
+					<div style="    clear:both;"></div>
+				</div>
+				<div id="moresees" style="clear:both;display:none;">
+
+					<div class="layui-item query athird">
+						<label class="layui-form-label">创建日期:</label>
+						<div class="layui-input-block readOnlyFFF">
+							<input id="startDate" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${businessQuestions.startDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+							<span class="group-sep">-</span>
+							<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${businessQuestions.endDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">问题状态:</label>
+						<div class="layui-input-block">
+							<form:select path="status" class="form-control simple-select">
+								<form:option value="" label=""/>
+								<form:options items="${fns:getDictList('businessQuestions_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</div>
+
+					<div class="layui-item query athird">
+						<label class="layui-form-label">创建人:</label>
+						<div class="layui-input-block with-icon">
+							<sys:inquireselectUserNotReadolnyTow id="submitter" name="submitterId" value="${businessQuestions.submitterId}" labelName="submitterName" labelValue="${businessQuestions.submitterName}" cssStyle="background-color: #fff"
+																 title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+						</div>
+					</div>
+					<div style="clear:both;"></div>
+				</div>
+			</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<div class="layui-btn-group">
+						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+					</div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+			,id:"checkboxTable"
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {checkbox: true, fixed: true}
+				,{field:'index',align:'center',  width:40,title: '序号'}
+				,{field:'title',align:'center', title: '标题', minWidth:150,templet:function(d){
+						var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看', '${ctx}/businessQuestions/businessQuestions/view?id=" + d.id + "','95%','95%')\">" +
+								"<span title=" + d.title + ">" + d.title + "</span></a>";
+						return xml;
+					}}
+                ,{field:'projectName',align:'center', title: '所属项目', minWidth:150,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectView/view?id=" + d.projectId +"','95%', '95%')\">" + d.projectName + "</a>";
+					}}
+				,{field:'questionType',align:'center', title: '问题类型', width:80}
+                ,{field:'createBy',align:'center', title: '提交人姓名', minWidth:200}
+                ,{field:'createDate', align:'center',title: '提交时间',width:150,templet:function(d){
+						return "<span title='"+ d.createDate +"'>" + d.createDate + "</span>";
+					}}
+                ,{field:'actorUserNames', align:'center',title: '处理人', width:80}
+                ,{field:'closingDate', align:'center',title: '结案时间',width:150,templet:function(d){
+						return "<span title='"+ d.closingDate +"'>" + d.closingDate + "</span>";
+					}}
+                ,{align:'center', title: '状态',  width:70,templet:function(d){
+						var st = getBusinessQuestionsAuditState(d.status)
+						var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/businessQuestions/businessQuestions/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+						return xml;
+					}}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="businessQuestions" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${businessQuestions.id}"
+                    ,"title":"${businessQuestions.title}"
+                    ,"actorUserNames":"${businessQuestions.actorUserNames}"
+					,"questionType":"${fns:getMainDictLabel(businessQuestions.questionType, 'questionsType', '')}"
+                    ,"status":"${businessQuestions.status}"
+    				,"closingDate":"<fmt:formatDate value="${businessQuestions.closingDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    ,"createBy":"${businessQuestions.createBy.name}"
+                    ,"createDate":"<fmt:formatDate value="${businessQuestions.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    ,"processInstanceId":"${businessQuestions.processInstanceId}"
+                    ,"projectId":"${businessQuestions.project.id}"
+                    ,"projectName":"${businessQuestions.project.projectName}"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 369 - 0
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsAudit.jsp

@@ -0,0 +1,369 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>业务提问审批</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+              if(obj == 1) {
+                  $("#flag").val("yes");
+              }else {
+                  $("#flag").val("no");
+              }
+			  $("#inputForm").submit();
+			  return true;
+		  }
+		  return false;
+		}
+		$(document).ready(function() {
+			$("#name").focus();
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+
+			$("#attachment_btn").click(function () {
+				$("#attachment_file").click();
+			});
+		});
+
+		function insertTitle(tValue){
+			var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+				var attachmentId = "";
+				var attachmentFlag = "182";
+				console.log(file);
+				var timestamp=new Date().getTime();
+
+				var storeAs = "businessQuestions";
+				var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile"+divId).show();
+				multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+	<form:form id="inputForm" modelAttribute="businessQuestions" action="${ctx}/businessQuestions/businessQuestions/saveAudit" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="project.id"/>
+		<form:hidden path="home"/>
+		<form:hidden path="act.taskId"/>
+		<form:hidden path="act.taskName"/>
+		<form:hidden path="act.taskDefKey"/>
+		<form:hidden path="act.procInsId"/>
+		<form:hidden path="act.procDefId"/>
+		<form:hidden id="flag" path="act.flag"/>
+		<c:set var="status" value="${businessQuestions.act.status}" />
+
+		<div class="form-group layui-row first lw14">
+			<div class="form-group-label"><h2>业务提问信息</h2></div>
+			<div class="layui-item layui-col-sm6 lw6">
+				<label class="layui-form-label"><span class="require-item">*</span>标题:</label>
+				<div class="layui-input-block">
+					<form:input path="title" placeholder="请输入标题" htmlEscape="false" readonly="true" class="form-control layui-input judgment"/>
+				</div>
+			</div>
+
+			<div class="layui-item layui-col-sm6 lw6">
+				<label class="layui-form-label"><span class="require-item">*</span>问题类型:</label>
+				<div class="layui-input-block">
+					<form:select path="questionType" disabled="true" class="form-control editable-select layui-input judgment">
+						<form:option value=""/>
+						<form:options items="${fns:getMainDictList('questionsType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+			</div>
+
+			<div class="layui-item layui-col-sm6 lw6">
+				<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+				<div class="layui-input-block">
+					<input placeholder="项目名称" htmlEscape="false" readonly="true" class="form-control layui-input judgment" value="${businessQuestions.project.projectName}">
+				</div>
+			</div>
+
+			<div class="layui-item layui-col-sm6 lw6">
+				<label class="layui-form-label double-line"><span class="require-item">*</span>问题处理人员:</label>
+				<div class="layui-input-block">
+					<input placeholder="问题处理人员" htmlEscape="false" readonly="true" class="form-control layui-input judgment" value="${businessQuestions.project.leaderNameStr}">
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6 lw6">
+				<label class="layui-form-label double-line">期望完成时间:</label>
+				<div class="layui-input-block">
+					<input id="expectationClosingDate" name="expectationClosingDate"   type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon"
+						   placeholder="期望完成时间" value="<fmt:formatDate value="${businessQuestions.expectationClosingDate}" pattern="yyyy-MM-dd"/>"/>
+				</div>
+			</div>
+
+			<div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+				<label class="layui-form-label">问题内容:</label>
+				<div class="layui-input-block">
+					<div>
+						<div>
+							<form:textarea path="contents" disabled="true" htmlEscape="false" colspan="3" rows="6" maxlength="550"
+										   class="form-control "/>
+							<sys:ckeditorView replace="contents" uploadPath="/oa/oa"/>
+						</div>
+					</div>
+				</div>
+			</div>
+
+			<c:forEach items="${businessQuestions.contentsList}" var = "contentsInfo" varStatus="status">
+				<div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+					<label class="layui-form-label">${contentsInfo.userName}:</label>
+					<div class="layui-input-block">
+						<div>
+							<div>
+                                    <textarea id="${contentsInfo.id}" name="${contentsInfo.id}" disabled="true" htmlEscape="false" colspan="3" rows="6" maxlength="550"
+											  class="form-control" >${contentsInfo.contents}</textarea>
+								<sys:ckeditorView replace="${contentsInfo.id}" uploadPath="/oa/oa"/>
+							</div>
+						</div>
+					</div>
+				</div>
+			</c:forEach>
+
+
+			<div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+				<label class="layui-form-label">回复:</label>
+				<div class="layui-input-block">
+					<div>
+						<div>
+							<form:textarea path="handlingSuggestion" htmlEscape="false" colspan="3" rows="6" maxlength="550"
+										   class="form-control "/>
+							<sys:ckeditorView replace="handlingSuggestion" uploadPath="/oa/oa"/>
+						</div>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>附件信息</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+						<%--<sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                            name="linkman.id"  title="选择资料库"
+                                            cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                            searchLabel="资料库" searchKey="fileName"></sys:collectSelect>--%>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="listAttachment" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="200px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${businessQuestions.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${businessQuestions.uploadMode == 2}">
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+												<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+												<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${businessQuestions.uploadMode == 2}">
+																<c:choose>
+																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+																		<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+																	</c:when>
+																	<c:otherwise>
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																				<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																					</c:when>
+																					<c:otherwise>
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:otherwise>
+																</c:choose>
+															</c:when>
+															<c:otherwise>
+																<c:choose>
+																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+																		<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+																	</c:when>
+																	<c:otherwise>
+																		<c:choose>
+																			<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																				<td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+																			</c:when>
+																			<c:otherwise>
+																				<c:choose>
+																					<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																					</c:when>
+																					<c:otherwise>
+																						<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																					</c:otherwise>
+																				</c:choose>
+																			</c:otherwise>
+																		</c:choose>
+																	</c:otherwise>
+																</c:choose>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+											<%--附件下载删除--%>
+										<c:choose>
+											<c:when test="${businessQuestions.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+													</c:when>
+													<c:otherwise>
+														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+											</c:otherwise>
+										</c:choose>
+										<c:if test="${workClientAttachment.collectFlag != 1}">
+											<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+										</c:if>
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+		</div>
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>意见</h2></div>
+			<div class="layui-item layui-col-sm12 lw6 with-textarea">
+				<label class="layui-form-label">意见:</label>
+				<div class="layui-input-block">
+					<form:textarea path="act.comment" class="form-control" rows="4" maxlength="127" />
+					<input type="file" name="upload_files" style="display: none;">
+				</div>
+			</div>
+		</div>
+
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>审批流程</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container" >
+				<act:flowChart procInsId="${businessQuestions.act.procInsId}"/>
+				<act:histoicFlow procInsId="${businessQuestions.act.procInsId}" />
+			</div>
+		</div>
+
+		<div class="form-group layui-row page-end"></div>
+	</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 343 - 0
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsForm.jsp

@@ -0,0 +1,343 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<html>
+<head>
+    <title>业务提问管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/businessQuestions/businessQuestions/store");
+                }else if (i==1){
+                    var flags=judgment();
+                    if (!flags){
+                        return flags;
+                    }
+                    var questionType = $("#questionType").val();
+                    if(null == questionType || undefined == questionType || '' == questionType){
+                        parent.layer.msg("请选择问题类型!", {icon: 5});
+                        return false;
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+            laydate.render({
+                elem: '#expectationClosingDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+                , trigger: 'click'
+            });
+        });
+
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "182";
+                console.log(file);
+                var timestamp=new Date().getTime();
+
+                var storeAs = "businessQuestions";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="businessQuestions" action="${ctx}/businessQuestions/businessQuestions/save" method="post" class="form-horizontal layui-form">
+            <form:hidden path="id"/>
+            <form:hidden path="contentsId"/>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>业务提问信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>标题:</label>
+                    <div class="layui-input-block">
+                        <form:input path="title" placeholder="请输入标题" htmlEscape="false"  class="form-control layui-input judgment"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>问题类型:</label>
+                    <div class="layui-input-block">
+                        <form:select path="questionType" class="form-control editable-select layui-input judgment">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('questionsType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+                    <div class="layui-input-block with-icon">
+                        <sys:gridselectReproject url="${ctx}/workreimbursement/workReimbursement/selectproject" id="project" name="project.id"  value="${businessQuestions.project.id}"  title="选择提问项目" labelName="project.projectName"
+                                                 labelValue="${businessQuestions.project.projectName}" cssClass="form-control judgment layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" ></sys:gridselectReproject>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>问题处理人员:</label>
+                    <div class="layui-input-block readOnlyFFF  with-icon">
+                        <sys:businessQuestionsselectUser id="master" name="actorUsers" value="${businessQuestions.project.leaderIds}" labelName="leaderNameStr" labelValue="${businessQuestions.project.leaderNameStr}"
+                                               title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control judgment layui-input" allowClear="true" notAllowSelectParent="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label double-line">期望完成时间:</label>
+                    <div class="layui-input-block">
+                        <input id="expectationClosingDate" name="expectationClosingDate"   type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon"
+                               placeholder="期望完成时间" value="<fmt:formatDate value="${businessQuestions.expectationClosingDate}" pattern="yyyy-MM-dd"/>"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+                    <label class="layui-form-label">问题内容:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="contents" htmlEscape="false"  colspan="3" rows="6"  maxlength="550" class="form-control "/>
+                        <sys:ckeditor replace="contents" uploadPath="/oa/oa"/>
+                    </div>
+                </div>
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>附件信息</h2></div>
+                    <div class="layui-item nav-btns">
+                        <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                        <%--<sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                            name="linkman.id"  title="选择资料库"
+                                            cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+                                            searchLabel="资料库" searchKey="fileName"></sys:collectSelect>--%>
+                    </div>
+                    <div id="addFile_attachment" style="display: none" class="upload-progress">
+                        <span id="fileName_attachment" ></span>
+                        <b><span id="baifenbi_attachment" ></span></b>
+                        <div class="progress">
+                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                            </div>
+                        </div>
+                    </div>
+                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                    <span id="attachment_title"></span>
+                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                        <table id="listAttachment" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                    <%-- <th>序号</th>--%>
+                                <th>文件预览</th>
+                                <th>上传人</th>
+                                <th>上传时间</th>
+                                <th width="200px">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="file_attachment">
+                            <c:forEach items="${businessQuestions.workAttachments}" var = "workClientAttachment" varStatus="status">
+                                <tr>
+
+                                        <%-- <td>${status.index + 1}</td>--%>
+                                    <c:choose>
+                                        <c:when test="${businessQuestions.uploadMode == 2}">
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                    <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <c:choose>
+                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                </c:otherwise>
+                                                            </c:choose>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                    <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <c:choose>
+                                                                <c:when test="${businessQuestions.uploadMode == 2}">
+                                                                    <c:choose>
+                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                                            <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                                        </c:when>
+                                                                        <c:otherwise>
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    <c:choose>
+                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:when>
+                                                                                        <c:otherwise>
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:otherwise>
+                                                                                    </c:choose>
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </c:otherwise>
+                                                                    </c:choose>
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <c:choose>
+                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                                            <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                                        </c:when>
+                                                                        <c:otherwise>
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                    <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    <c:choose>
+                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:when>
+                                                                                        <c:otherwise>
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:otherwise>
+                                                                                    </c:choose>
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </c:otherwise>
+                                                                    </c:choose>
+                                                                </c:otherwise>
+                                                            </c:choose>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:otherwise>
+                                    </c:choose>
+
+                                    <td>${workClientAttachment.createBy.name}</td>
+                                    <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                    <td class="op-td">
+                                        <div class="op-btn-box" >
+                                                <%--附件下载删除--%>
+                                            <c:choose>
+                                                <c:when test="${businessQuestions.uploadMode == 2}">
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                </c:otherwise>
+                                            </c:choose>
+                                            <c:if test="${workClientAttachment.collectFlag != 1}">
+                                                <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+                                            </c:if>
+                                            <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+                                                <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                            </c:if>
+
+                                        </div>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 548 - 0
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsList.jsp

@@ -0,0 +1,548 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>通告管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.js"></script>
+	<script type="text/javascript">
+
+        $(document).ready(function() {
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+				, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+				, trigger: 'click'
+            });
+        });
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['送审', '暂存', '关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogAdmin(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['提交', '关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2: function (index) {
+                }
+            });
+        }
+
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogreModify(title,url,id,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+			var split = buttons.split(",");
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				skin: 'three-btns',
+				content: url,
+				btn: split,
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					if(split.length==2){return}
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}else {
+						return false;
+					}
+				},
+				btn3: function (index) {
+				}
+			});
+
+
+        }
+
+
+		//打开对话框(查看)
+		function openDialogListView(title,url,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: url,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}
+				}
+			});
+
+		}
+	</script>
+	<script>
+
+		function notifyDialogre(title,url,width,height,target){
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				skin:"three-btns",
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				btn: ['通过','驳回','关闭'],
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+					return false;
+				},
+				btn3: function(index){
+				}
+			});
+
+		}
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+
+			<form:form id="searchForm" modelAttribute="businessQuestions" action="${ctx}/businessQuestions/businessQuestions/list" method="post" class="form-inline">
+			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+			<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+			<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+				<div class="commonQuery">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">标题:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="title" htmlEscape="false" maxlength="200"  class=" form-control layui-input" />
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">所属项目:</label>
+						<div class="layui-input-block with-icon">
+							<sys:gridselectcallprojectt url="${ctx}/workreimbursement/workReimbursement/selectprojectOnList" id="project" name="project.id"  value="${businessQuestions.project.id}"  title="选择所属项目" labelName="project.projectName" cssStyle="background-color:#fff"
+														labelValue="${businessQuestions.project.projectName}" cssClass="form-control required layui-input"  fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+						</div>
+					</div>
+					<div class="layui-item athird">
+						<div class="input-group">
+							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+							<div class="layui-btn-group search-spacing">
+								<button id="searchQuery" class="layui-btn layui-btn-sm  layui-bg-blue" onclick="search()">查询</button>
+								<button id="searchReset" class="layui-btn layui-btn-sm  " onclick="resetSearch()">重置</button>
+							</div>
+						</div>
+					</div>
+					<div style="    clear:both;"></div>
+				</div>
+				<div id="moresees" style="clear:both;display:none;">
+
+					<div class="layui-item query athird">
+						<label class="layui-form-label">创建日期:</label>
+						<div class="layui-input-block readOnlyFFF">
+							<input id="startDate" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${businessQuestions.startDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+							<span class="group-sep">-</span>
+							<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${businessQuestions.endDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">问题状态:</label>
+						<div class="layui-input-block">
+							<form:select path="status" class="form-control simple-select">
+								<form:option value="" label=""/>
+								<form:options items="${fns:getDictList('businessQuestions_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</div>
+
+					<div class="layui-item query athird">
+						<label class="layui-form-label">创建人:</label>
+						<div class="layui-input-block with-icon">
+							<sys:inquireselectUserNotReadolnyTow id="submitter" name="submitterId" value="${businessQuestions.submitterId}" labelName="submitterName" labelValue="${businessQuestions.submitterName}" cssStyle="background-color: #fff"
+																 title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+						</div>
+					</div>
+					<div style="clear:both;"></div>
+				</div>
+			</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<div class="layui-btn-group">
+						<shiro:hasPermission name="businessQuestions:businessQuestions:add">
+							<table:addRow label="新增" url="${ctx}/businessQuestions/businessQuestions/form" title="业务提问" height="95%;" width="95%;"></table:addRow><!-- 增加按钮 -->
+						</shiro:hasPermission>
+						<shiro:hasPermission name="businessQuestions:businessQuestions:attentionAll">
+							<button type="button" data-toggle="tooltip" data-placement="top" class="layui-btn layui-btn-sm layui-bg-orange" id="attention"> 关注</button>
+						</shiro:hasPermission>
+
+						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+					</div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+			,id:"checkboxTable"
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                {checkbox: true, fixed: true}
+				,{field:'index',align:'center',  width:40,title: '序号'}
+				,{field:'title',align:'center', title: '标题', minWidth:150,templet:function(d){
+						var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看', '${ctx}/businessQuestions/businessQuestions/view?id=" + d.id + "','95%','95%')\">" +
+								"<span title=" + d.title + ">" + d.title + "</span></a>";
+						return xml;
+					}}
+                ,{field:'projectName',align:'center', title: '所属项目', minWidth:150,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectView/view?id=" + d.projectId +"','95%', '95%')\">" + d.projectName + "</a>";
+					}}
+				,{field:'questionType',align:'center', title: '问题类型', width:80}
+                ,{field:'createBy',align:'center', title: '提交人姓名', minWidth:200}
+                ,{field:'createDate', align:'center',title: '提交时间',width:150,templet:function(d){
+						return "<span title='"+ d.createDate +"'>" + d.createDate + "</span>";
+					}}
+                ,{field:'actorUserNames', align:'center',title: '处理人', width:80}
+                ,{field:'closingDate', align:'center',title: '结案时间',width:150,templet:function(d){
+						return "<span title='"+ d.closingDate +"'>" + d.closingDate + "</span>";
+					}}
+                ,{align:'center', title: '状态',  width:70,templet:function(d){
+						var st = getBusinessQuestionsAuditState(d.status)
+						var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/businessQuestions/businessQuestions/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+						return xml;
+					}}
+                ,{align:'center',title:"操作",width:130,templet:function(d){
+						////对操作进行初始化
+						var xml = "<div class=\"layui-btn-group\">";
+						if(d.canedit != undefined && d.canedit == "1")
+							xml += "<a href=\"javascript:void(0)\" onclick=\"openDialog('修改业务提问', '${ctx}/businessQuestions/businessQuestions/form?id="+ d.id +"','95%', '95%')\"   class=\"layui-btn layui-btn-xs  layui-bg-green\"> 修改</a>";
+
+						if(d.canmodify != undefined && d.canmodify =="1"){
+							xml+="<a href=\"#\" onclick=\"openDialogreModify('修改业务提问', '${ctx}/businessQuestions/businessQuestions/modify?id=" + d.id + "','" + d.id + "','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+						}
+						if(d.cancancel != undefined && d.cancancel =="1"){
+							xml+="<a href=\"${ctx}/businessQuestions/businessQuestions/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该业务提问吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 撤回</a>";
+						}
+						if(d.canrecall != undefined && d.canrecall =="1"){
+							xml+="<a href=\"#\" onclick=\"openDialogre('修改业务提问', '${ctx}/businessQuestions/businessQuestions/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+						}
+						if(d.candelete != undefined && d.candelete == "1")
+							xml += "<a href=\"${ctx}/businessQuestions/businessQuestions/delete?id="+ d.id +"\" onclick=\"return confirmx('确认要删除该业务提问吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
+						xml+="</div>"
+						return xml;
+					}}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="businessQuestions" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${businessQuestions.id}"
+                    ,"title":"${businessQuestions.title}"
+                    ,"actorUserNames":"${businessQuestions.actorUserNames}"
+					,"questionType":"${fns:getMainDictLabel(businessQuestions.questionType, 'questionsType', '')}"
+                    ,"status":"${businessQuestions.status}"
+    				,"closingDate":"<fmt:formatDate value="${businessQuestions.closingDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    ,"createBy":"${businessQuestions.createBy.name}"
+                    ,"createDate":"<fmt:formatDate value="${businessQuestions.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    ,"processInstanceId":"${businessQuestions.processInstanceId}"
+                    ,"projectId":"${businessQuestions.project.id}"
+                    ,"projectName":"${businessQuestions.project.projectName}"
+                    <shiro:hasPermission name="businessQuestions:businessQuestions:edit">,"canedit":<c:choose><c:when test="${businessQuestions.status == 1 && fns:getUser().id == businessQuestions.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canmodify":<c:choose><c:when test="${businessQuestions.status == 4 && fns:getUser().id == businessQuestions.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canrecall":<c:choose><c:when test="${businessQuestions.status == 3 && fns:getUser().id == businessQuestions.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="businessQuestions:businessQuestions:del">,"candelete":<c:choose><c:when test="${fns:getUser().id == businessQuestions.createBy.id && (businessQuestions.status == 1 or businessQuestions.status == 3 or businessQuestions.status == 4)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+                    ,"cancancel":<c:choose><c:when test="${businessQuestions.status == 2 && fns:getUser().id == businessQuestions.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+		$("#attention").bind("click",function () {
+			//获得表格CheckBox已经选中的行的信息
+			var checkList = layui.table.checkStatus('checkboxTable').data;
+			//定义数组存放批量删除的行的id
+			var listId = [];
+			//进行遍历所有选中行数据,拿出每一行的id存储到数组中
+			$.each(checkList, function (i, data) {
+				listId.push(data.id);
+			});
+			if (listId.length <= 0) {
+				layer.msg("请选择需要关注的业务问题信息", {icon: 2})
+			} else {
+				$("#searchForm").attr("action","${ctx}/businessQuestions/businessQuestions/attentionAll?listId="+ listId);
+				$("#searchForm").submit();
+				return true;
+			}
+		});
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 380 - 0
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsModify.jsp

@@ -0,0 +1,380 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<html>
+<head>
+    <title>业务提问管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/businessQuestions/businessQuestions/store");
+                }else if (i==1){
+                    var questionType = $("#questionType").val();
+                    if(null == questionType || undefined == questionType || '' == questionType){
+                        parent.layer.msg("请选择问题类型!", {icon: 5});
+                        return false;
+                    }
+                    var flags=judgment();
+                    if (!flags){
+                        return flags;
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+            laydate.render({
+                elem: '#expectationClosingDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+                , trigger: 'click'
+            });
+        });
+
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "182";
+                console.log(file);
+                var timestamp=new Date().getTime();
+
+                var storeAs = "businessQuestions";
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="businessQuestions" action="${ctx}/businessQuestions/businessQuestions/saveAudit" method="post" class="form-horizontal layui-form">
+            <form:hidden path="id"/>
+            <form:hidden path="home"/>
+            <form:hidden path="act.taskId"/>
+            <form:hidden path="act.taskName"/>
+            <form:hidden path="act.taskDefKey"/>
+            <form:hidden path="act.procInsId"/>
+            <form:hidden path="act.procDefId"/>
+            <form:hidden id="flag" path="act.flag"/>
+            <c:set var="status" value="${businessQuestions.act.status}" />
+
+            <form:hidden path="contentsId"/>
+            <input type="hidden" name="actorUsers" value="${businessQuestions.project.leaderIds}">
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>业务提问信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>标题:</label>
+                    <div class="layui-input-block">
+                        <form:input path="title" placeholder="请输入标题" htmlEscape="false"  class="form-control layui-input judgment"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>问题类型:</label>
+                    <div class="layui-input-block">
+                        <form:select path="questionType" class="form-control editable-select layui-input judgment">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('questionsType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+                    <div class="layui-input-block with-icon">
+                        <sys:gridselectReproject url="${ctx}/workreimbursement/workReimbursement/selectproject" id="project" name="project.id"  value="${businessQuestions.project.id}"  title="选择提问项目" labelName="project.projectName"
+                                                 labelValue="${businessQuestions.project.projectName}" cssClass="form-control judgment layui-input" fieldLabels="工程" fieldKeys="projectName" searchLabel="工程名称" searchKey="projectName" ></sys:gridselectReproject>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>问题处理人员:</label>
+                    <div class="layui-input-block">
+                        <input placeholder="问题处理人员" htmlEscape="false" readonly="true" class="form-control layui-input judgment" value="${businessQuestions.project.leaderNameStr}">
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label double-line">期望完成时间:</label>
+                    <div class="layui-input-block">
+                        <input id="expectationClosingDate" name="expectationClosingDate"   type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon"
+                               placeholder="期望完成时间" value="<fmt:formatDate value="${businessQuestions.expectationClosingDate}" pattern="yyyy-MM-dd"/>"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+                    <label class="layui-form-label">问题内容:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="contents" htmlEscape="false"  colspan="3" rows="6"  maxlength="550" class="form-control " disabled="true"/>
+                        <sys:ckeditor replace="contents" uploadPath="/oa/oa"/>
+                    </div>
+                </div>
+
+                <c:forEach items="${businessQuestions.contentsList}" var = "contentsInfo" varStatus="status">
+                    <div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+                        <label class="layui-form-label">${contentsInfo.userName}:</label>
+                        <div class="layui-input-block">
+                            <div>
+                                <div>
+                                    <textarea id="${contentsInfo.id}" name="${contentsInfo.id}" disabled="true" htmlEscape="false" colspan="3" rows="6" maxlength="550"
+                                              class="form-control" >${contentsInfo.contents}</textarea>
+                                    <sys:ckeditorView replace="${contentsInfo.id}" uploadPath="/oa/oa"/>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </c:forEach>
+
+                <div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+                    <label class="layui-form-label">回复:</label>
+                    <div class="layui-input-block">
+                        <div>
+                            <div>
+                                <form:textarea path="handlingSuggestion" htmlEscape="false" colspan="3" rows="6" maxlength="550"
+                                               class="form-control "/>
+                                <sys:ckeditorView replace="handlingSuggestion" uploadPath="/oa/oa"/>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
+
+
+
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>附件信息</h2></div>
+                    <div class="layui-item nav-btns">
+                        <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                    </div>
+                    <div id="addFile_attachment" style="display: none" class="upload-progress">
+                        <span id="fileName_attachment" ></span>
+                        <b><span id="baifenbi_attachment" ></span></b>
+                        <div class="progress">
+                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                            </div>
+                        </div>
+                    </div>
+                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                    <span id="attachment_title"></span>
+                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                        <table id="listAttachment" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                    <%-- <th>序号</th>--%>
+                                <th>文件预览</th>
+                                <th>上传人</th>
+                                <th>上传时间</th>
+                                <th width="200px">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="file_attachment">
+                            <c:forEach items="${businessQuestions.workAttachments}" var = "workClientAttachment" varStatus="status">
+                                <tr>
+
+                                        <%-- <td>${status.index + 1}</td>--%>
+                                    <c:choose>
+                                        <c:when test="${businessQuestions.uploadMode == 2}">
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                    <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <c:choose>
+                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                </c:otherwise>
+                                                            </c:choose>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                    <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <c:choose>
+                                                                <c:when test="${businessQuestions.uploadMode == 2}">
+                                                                    <c:choose>
+                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                                            <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                                        </c:when>
+                                                                        <c:otherwise>
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    <c:choose>
+                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:when>
+                                                                                        <c:otherwise>
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:otherwise>
+                                                                                    </c:choose>
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </c:otherwise>
+                                                                    </c:choose>
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <c:choose>
+                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                                            <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                                        </c:when>
+                                                                        <c:otherwise>
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                    <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    <c:choose>
+                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:when>
+                                                                                        <c:otherwise>
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:otherwise>
+                                                                                    </c:choose>
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </c:otherwise>
+                                                                    </c:choose>
+                                                                </c:otherwise>
+                                                            </c:choose>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:otherwise>
+                                    </c:choose>
+
+                                    <td>${workClientAttachment.createBy.name}</td>
+                                    <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                    <td class="op-td">
+                                        <div class="op-btn-box" >
+                                                <%--附件下载删除--%>
+                                            <c:choose>
+                                                <c:when test="${businessQuestions.uploadMode == 2}">
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                </c:otherwise>
+                                            </c:choose>
+                                            <c:if test="${workClientAttachment.collectFlag != 1}">
+                                                <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+                                            </c:if>
+                                            <c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+                                                <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment','_attachment')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                            </c:if>
+
+                                        </div>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 539 - 0
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsUserList.jsp

@@ -0,0 +1,539 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>通告管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/ckeditor/ckeditor.js"></script>
+	<script type="text/javascript">
+
+        $(document).ready(function() {
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow1);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+				, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+				, trigger: 'click'
+            });
+        });
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['送审', '暂存', '关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogAdmin(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['提交', '关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2: function (index) {
+                }
+            });
+        }
+
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogreModify(title,url,id,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+			var split = buttons.split(",");
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				skin: 'three-btns',
+				content: url,
+				btn: split,
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					if(split.length==2){return}
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}else {
+						return false;
+					}
+				},
+				btn3: function (index) {
+				}
+			});
+
+
+        }
+
+
+		//打开对话框(查看)
+		function openDialogListView(title,url,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: url,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}
+				}
+			});
+
+		}
+	</script>
+	<script>
+
+		function notifyDialogre(title,url,width,height,target){
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				skin:"three-btns",
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				btn: ['通过','驳回','关闭'],
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+					return false;
+				},
+				btn3: function(index){
+				}
+			});
+
+		}
+	</script>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="contentShadow layui-row" id="queryDiv">
+
+			<form:form id="searchForm" modelAttribute="businessQuestions" action="${ctx}/businessQuestionsUser/businessQuestionsUser/list" method="post" class="form-inline">
+			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+			<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+			<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+				<div class="commonQuery">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">标题:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="title" htmlEscape="false" maxlength="200"  class=" form-control layui-input" />
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">所属项目:</label>
+						<div class="layui-input-block with-icon">
+							<sys:gridselectcallprojectt url="${ctx}/workreimbursement/workReimbursement/selectprojectOnList" id="project" name="project.id"  value="${businessQuestions.project.id}"  title="选择所属项目" labelName="project.projectName" cssStyle="background-color:#fff"
+														labelValue="${businessQuestions.project.projectName}" cssClass="form-control required layui-input"  fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+						</div>
+					</div>
+					<div class="layui-item athird">
+						<div class="input-group">
+							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+							<div class="layui-btn-group search-spacing">
+								<button id="searchQuery" class="layui-btn layui-btn-sm  layui-bg-blue" onclick="search()">查询</button>
+								<button id="searchReset" class="layui-btn layui-btn-sm  " onclick="resetSearch()">重置</button>
+							</div>
+						</div>
+					</div>
+					<div style="    clear:both;"></div>
+				</div>
+				<div id="moresees" style="clear:both;display:none;">
+
+					<div class="layui-item query athird">
+						<label class="layui-form-label">创建日期:</label>
+						<div class="layui-input-block readOnlyFFF">
+							<input id="startDate" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${businessQuestions.startDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+							<span class="group-sep">-</span>
+							<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+								   value="<fmt:formatDate value="${businessQuestions.endDate}" pattern="yyyy-MM-dd"/>"/>
+							</input>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">问题状态:</label>
+						<div class="layui-input-block">
+							<form:select path="status" class="form-control simple-select">
+								<form:option value="" label=""/>
+								<form:options items="${fns:getDictList('businessQuestions_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</div>
+					<div style="clear:both;"></div>
+				</div>
+			</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<div class="layui-btn-group">
+						<%--<shiro:hasPermission name="businessQuestions:businessQuestions:add">
+							<table:addRow label="新增" url="${ctx}/businessQuestions/businessQuestions/form" title="业务提问" height="95%;" width="95%;"></table:addRow><!-- 增加按钮 -->
+						</shiro:hasPermission>
+						<shiro:hasPermission name="businessQuestions:businessQuestions:noticeAll">
+							<button type="button" data-toggle="tooltip" data-placement="top" class="layui-btn layui-btn-sm layui-bg-orange" id="notice"> 收藏</button>
+						</shiro:hasPermission>--%>
+
+						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+					</div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                //{checkbox: true, fixed: true},
+				{field:'index',align:'center',  width:40,title: '序号'}
+				,{field:'title',align:'center', title: '标题', minWidth:150,templet:function(d){
+						var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看', '${ctx}/businessQuestions/businessQuestions/view?id=" + d.id + "','95%','95%')\">" +
+								"<span title=" + d.title + ">" + d.title + "</span></a>";
+						return xml;
+					}}
+                ,{field:'projectName',align:'center', title: '所属项目', minWidth:150,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectView/view?id=" + d.projectId +"','95%', '95%')\">" + d.projectName + "</a>";
+					}}
+				,{field:'questionType',align:'center', title: '问题类型', width:80}
+                ,{field:'createBy',align:'center', title: '提交人姓名', minWidth:200}
+                ,{field:'createDate', align:'center',title: '提交时间',width:150,templet:function(d){
+						return "<span title='"+ d.createDate +"'>" + d.createDate + "</span>";
+					}}
+                ,{field:'actorUserNames', align:'center',title: '处理人', width:80}
+                ,{field:'closingDate', align:'center',title: '结案时间',width:150,templet:function(d){
+						return "<span title='"+ d.closingDate +"'>" + d.closingDate + "</span>";
+					}}
+                ,{align:'center', title: '状态',  width:70,templet:function(d){
+						var st = getBusinessQuestionsAuditState(d.status)
+						var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/businessQuestions/businessQuestions/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+						return xml;
+					}}
+                /*,{align:'center',title:"操作",width:130,templet:function(d){
+						////对操作进行初始化
+						var xml = "<div class=\"layui-btn-group\">";
+						if(d.canedit != undefined && d.canedit == "1")
+							xml += "<a href=\"javascript:void(0)\" onclick=\"openDialog('修改业务提问', '${ctx}/businessQuestions/businessQuestions/form?id="+ d.id +"','95%', '95%')\"   class=\"layui-btn layui-btn-xs  layui-bg-green\"> 修改</a>";
+
+						if(d.canmodify != undefined && d.canmodify =="1"){
+							xml+="<a href=\"#\" onclick=\"openDialogreModify('修改业务提问', '${ctx}/businessQuestions/businessQuestions/modify?id=" + d.id + "','" + d.id + "','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+						}
+						if(d.cancancel != undefined && d.cancancel =="1"){
+							xml+="<a href=\"${ctx}/businessQuestions/businessQuestions/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该业务提问吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 撤回</a>";
+						}
+						if(d.canrecall != undefined && d.canrecall =="1"){
+							xml+="<a href=\"#\" onclick=\"openDialogre('修改业务提问', '${ctx}/businessQuestions/businessQuestions/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 修改</a>";
+						}
+						if(d.candelete != undefined && d.candelete == "1")
+							xml += "<a href=\"${ctx}/businessQuestions/businessQuestions/delete?id="+ d.id +"\" onclick=\"return confirmx('确认要删除该业务提问吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-red\"> 删除</a>";
+						xml+="</div>"
+						return xml;
+					}}*/
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="businessQuestions" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${businessQuestions.id}"
+                    ,"title":"${businessQuestions.title}"
+                    ,"actorUserNames":"${businessQuestions.actorUserNames}"
+					,"questionType":"${fns:getMainDictLabel(businessQuestions.questionType, 'questionsType', '')}"
+                    ,"status":"${businessQuestions.status}"
+    				,"closingDate":"<fmt:formatDate value="${businessQuestions.closingDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    ,"createBy":"${businessQuestions.createBy.name}"
+                    ,"createDate":"<fmt:formatDate value="${businessQuestions.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+                    ,"processInstanceId":"${businessQuestions.processInstanceId}"
+                    ,"projectId":"${businessQuestions.project.id}"
+                    ,"projectName":"${businessQuestions.project.projectName}"
+                    <shiro:hasPermission name="businessQuestions:businessQuestions:edit">,"canedit":<c:choose><c:when test="${businessQuestions.status == 1}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canmodify":<c:choose><c:when test="${businessQuestions.status == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    ,"canrecall":<c:choose><c:when test="${businessQuestions.status == 3}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                    </shiro:hasPermission>
+                    <shiro:hasPermission name="businessQuestions:businessQuestions:del">,"candelete":<c:choose><c:when test="${businessQuestions.status == 1 or businessQuestions.status == 3 or businessQuestions.status == 4}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+                    ,"cancancel":<c:choose><c:when test="${businessQuestions.status == 2 }">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+		/*$("#notice").bind("click",function () {
+			//获得表格CheckBox已经选中的行的信息
+			var checkList = layui.table.checkStatus('checkboxTable').data;
+			//定义数组存放批量删除的行的id
+			var listId = [];
+			//进行遍历所有选中行数据,拿出每一行的id存储到数组中
+			$.each(checkList, function (i, data) {
+				listId.push(data.id);
+			});
+			if (listId.length <= 0) {
+				layer.msg("请选择需要关注的业务问题信息", {icon: 2})
+			} else {
+				$("#searchForm").attr("action","${ctx}/businessQuestions/businessQuestions/noticeAll?listId="+ listId);
+				$("#searchForm").submit();
+				return true;
+			}
+		});*/
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+</body>
+</html>

+ 310 - 0
src/main/webapp/webpage/modules/businessQuestions/businessQuestionsView.jsp

@@ -0,0 +1,310 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<html>
+<head>
+    <title>业务提问管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <script src="${ctxStatic}/common/html/js/script.js"></script>
+
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+
+            return false;
+        }
+        $(document).ready(function() {
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+
+            });
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+        });
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="businessQuestions" action="" method="post" class="form-horizontal layui-form">
+            <form:hidden path="id"/>
+            <form:hidden path="contentsId"/>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>业务提问信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>标题:</label>
+                    <div class="layui-input-block">
+                        <form:input path="title" placeholder="请输入标题" htmlEscape="false" readonly="true" class="form-control layui-input judgment"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>问题类型:</label>
+                    <div class="layui-input-block">
+                        <form:select path="questionType" disabled="true" class="form-control editable-select layui-input judgment">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('questionsType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+                    <div class="layui-input-block">
+                        <input placeholder="项目名称" htmlEscape="false" readonly="true" class="form-control layui-input judgment" value="${businessQuestions.project.projectName}">
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>问题处理人员:</label>
+                    <div class="layui-input-block">
+                        <input placeholder="问题处理人员" htmlEscape="false" readonly="true" class="form-control layui-input judgment" value="${businessQuestions.project.leaderNameStr}">
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label double-line">期望完成时间:</label>
+                    <div class="layui-input-block">
+                        <input id="expectationClosingDate" name="expectationClosingDate"   type="text" maxlength="20" readonly class="laydate-icondate form-control layui-input layer-date laydate-icon"
+                               placeholder="期望完成时间" value="<fmt:formatDate value="${businessQuestions.expectationClosingDate}" pattern="yyyy-MM-dd"/>"/>
+                    </div>
+                </div>
+
+                <div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+                    <label class="layui-form-label">问题内容:</label>
+                    <div class="layui-input-block">
+                        <div>
+                            <div>
+                                <form:textarea path="contents" disabled="true" htmlEscape="false" colspan="3" rows="6" maxlength="550"
+                                               class="form-control "/>
+                                <sys:ckeditorView replace="contents" uploadPath="/oa/oa"/>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
+                <c:forEach items="${businessQuestions.contentsList}" var = "contentsInfo" varStatus="status">
+                    <div class="layui-item layui-col-sm12" style="padding-bottom: 20px;">
+                        <label class="layui-form-label">${contentsInfo.userName}:</label>
+                        <div class="layui-input-block">
+                            <div>
+                                <div>
+                                    <textarea id="${contentsInfo.id}" name="${contentsInfo.id}" disabled="true" htmlEscape="false" colspan="3" rows="6" maxlength="550"
+                                              class="form-control" >${contentsInfo.contents}</textarea>
+                                    <sys:ckeditorView replace="${contentsInfo.id}" uploadPath="/oa/oa"/>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </c:forEach>
+
+
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>附件信息</h2></div>
+                    <div id="addFile_attachment" style="display: none" class="upload-progress">
+                        <span id="fileName_attachment" ></span>
+                        <b><span id="baifenbi_attachment" ></span></b>
+                        <div class="progress">
+                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                            </div>
+                        </div>
+                    </div>
+                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                    <span id="attachment_title"></span>
+                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                        <table id="listAttachment" class="table table-bordered table-condensed details">
+                            <thead>
+                            <tr>
+                                    <%-- <th>序号</th>--%>
+                                <th>文件预览</th>
+                                <th>上传人</th>
+                                <th>上传时间</th>
+                                <th width="200px">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="file_attachment">
+                            <c:forEach items="${businessQuestions.workAttachments}" var = "workClientAttachment" varStatus="status">
+                                <tr>
+
+                                        <%-- <td>${status.index + 1}</td>--%>
+                                    <c:choose>
+                                        <c:when test="${businessQuestions.uploadMode == 2}">
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                    <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <c:choose>
+                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                </c:otherwise>
+                                                            </c:choose>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                    <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <c:choose>
+                                                                <c:when test="${businessQuestions.uploadMode == 2}">
+                                                                    <c:choose>
+                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                                            <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                                        </c:when>
+                                                                        <c:otherwise>
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    <c:choose>
+                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:when>
+                                                                                        <c:otherwise>
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:otherwise>
+                                                                                    </c:choose>
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </c:otherwise>
+                                                                    </c:choose>
+                                                                </c:when>
+                                                                <c:otherwise>
+                                                                    <c:choose>
+                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                                                            <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                                                        </c:when>
+                                                                        <c:otherwise>
+                                                                            <c:choose>
+                                                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                                                    <td><a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                                                </c:when>
+                                                                                <c:otherwise>
+                                                                                    <c:choose>
+                                                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:when>
+                                                                                        <c:otherwise>
+                                                                                            <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                                                        </c:otherwise>
+                                                                                    </c:choose>
+                                                                                </c:otherwise>
+                                                                            </c:choose>
+                                                                        </c:otherwise>
+                                                                    </c:choose>
+                                                                </c:otherwise>
+                                                            </c:choose>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:otherwise>
+                                    </c:choose>
+
+                                    <td>${workClientAttachment.createBy.name}</td>
+                                    <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                    <td class="op-td">
+                                        <div class="op-btn-box" >
+                                                <%--附件下载删除--%>
+                                            <c:choose>
+                                                <c:when test="${businessQuestions.uploadMode == 2}">
+                                                    <c:choose>
+                                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                            <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                        </c:when>
+                                                        <c:otherwise>
+                                                            <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                        </c:otherwise>
+                                                    </c:choose>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                </c:otherwise>
+                                            </c:choose>
+                                            <c:if test="${workClientAttachment.collectFlag != 1}">
+                                                <a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+                                            </c:if>
+
+                                        </div>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>