瀏覽代碼

干部作风评议加入流程分发
群众反馈修改

jz.kai 2 年之前
父節點
當前提交
0815de6c50

+ 1 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/dao/OfficeOpinionDAO.java

@@ -15,4 +15,5 @@ public interface OfficeOpinionDAO {
 	int delete(String id);
 	List<OfficeOpinion> list();
 	List<OfficeOpinion> search(Map<String,Object> searchParams,List<Sort> sortList);
+	List<OfficeOpinion> searchTodo(Map<String,Object> searchParams,List<Sort> sortList);
 }

+ 19 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/dao/OfficeReplyDAO.java

@@ -0,0 +1,19 @@
+package com.jpsoft.excellent.modules.base.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.excellent.modules.base.entity.OfficeReply;
+import java.util.Map;
+import com.jpsoft.excellent.modules.common.dto.Sort;
+
+@Repository
+public interface OfficeReplyDAO {
+	int insert(OfficeReply entity);
+	int update(OfficeReply entity);
+	int exist(String id);
+	OfficeReply get(String id);
+	int delete(String id);
+	List<OfficeReply> list();
+	List<OfficeReply> search(Map<String,Object> searchParams,List<Sort> sortList);
+	List<OfficeReply> findByList(String opinionId, Boolean status);
+}

+ 2 - 2
common/src/main/java/com/jpsoft/excellent/modules/base/entity/FeedbackStepStatus.java

@@ -21,8 +21,8 @@ public class FeedbackStepStatus {
         @ApiModelProperty(value = "步进编号")
     private String feedbackStepId;
         @ApiModelProperty(value = "交办站点")
-    private String stationId;
-    private String stationName;
+    private String orgId;
+    private String orgName;
         @ApiModelProperty(value = "回复人")
     private String userId;
     private String userName;

+ 9 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/entity/OfficeOpinion.java

@@ -55,7 +55,12 @@ public class OfficeOpinion {
     private Date updateTime;
         @ApiModelProperty(value = "更新人")
     private String updateBy;
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
+    @ApiModelProperty(value = "办理期限")
+    private Date allotedDate;
 
+    private String replyId;
     private String areaId;
     private String areaName;
     @ApiModelProperty(value = "附件列表")
@@ -64,4 +69,8 @@ public class OfficeOpinion {
     private List<FeedbackAttachmentDTO> picList;
     @ApiModelProperty(value = "图片路径数组")
     private String[] picUrlList;
+    @ApiModelProperty(value = "处理完成")
+    private Boolean isProcessed;
+    @ApiModelProperty(value = "单位回复")
+    private List<OfficeReply> officeReplyList;
 }

+ 51 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/entity/OfficeReply.java

@@ -0,0 +1,51 @@
+package com.jpsoft.excellent.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+  描述:base_office_reply的实体类
+ */
+@Data
+@ApiModel(value = "base_office_reply的实体类")
+public class OfficeReply {
+        @ApiModelProperty(value = "编号")
+    private String id;
+        @ApiModelProperty(value = "评议编号")
+    private String opinionId;
+        @ApiModelProperty(value = "交办单位")
+    private String orgId;
+    private String orgName;
+        @ApiModelProperty(value = "回复人")
+    private String userId;
+    private String userName;
+        @ApiModelProperty(value = "回复内容")
+    private String content;
+        @ApiModelProperty(value = "完成状态(0:未完成 1:已完成)")
+    private Boolean status;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "办理期限")
+    private Date allotedDate;
+        @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+        @ApiModelProperty(value = "创建人")
+    private String createBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+        @ApiModelProperty(value = "更新人")
+    private String updateBy;
+}

+ 1 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/service/OfficeOpinionService.java

@@ -14,4 +14,5 @@ public interface OfficeOpinionService {
 	int delete(String id);
 	List<OfficeOpinion> list();
 	Page<OfficeOpinion> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
+	Page<OfficeOpinion> pageSearchTodo(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
 }

+ 18 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/service/OfficeReplyService.java

@@ -0,0 +1,18 @@
+package com.jpsoft.excellent.modules.base.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.excellent.modules.base.entity.OfficeReply;
+import com.github.pagehelper.Page;
+import com.jpsoft.excellent.modules.common.dto.Sort;
+
+public interface OfficeReplyService {
+	OfficeReply get(String id);
+	boolean exist(String id);
+	int insert(OfficeReply model);
+	int update(OfficeReply model);
+	int delete(String id);
+	List<OfficeReply> list();
+	Page<OfficeReply> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
+	List<OfficeReply> findByList(String opinionId, Boolean status);
+}

+ 9 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/service/impl/OfficeOpinionServiceImpl.java

@@ -67,4 +67,13 @@ public class OfficeOpinionServiceImpl implements OfficeOpinionService {
         
         return page;
 	}
+
+	@Override
+	public Page<OfficeOpinion> pageSearchTodo(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+		Page<OfficeOpinion> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+			officeOpinionDAO.searchTodo(searchParams,sortList);
+		});
+
+		return page;
+	}
 }

+ 75 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/service/impl/OfficeReplyServiceImpl.java

@@ -0,0 +1,75 @@
+package com.jpsoft.excellent.modules.base.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.excellent.modules.base.dao.OfficeReplyDAO;
+import com.jpsoft.excellent.modules.base.entity.OfficeReply;
+import com.jpsoft.excellent.modules.base.service.OfficeReplyService;
+import com.github.pagehelper.Page;
+import com.jpsoft.excellent.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="officeReplyService")
+public class OfficeReplyServiceImpl implements OfficeReplyService {
+	@Resource(name="officeReplyDAO")
+	private OfficeReplyDAO officeReplyDAO;
+
+	@Override
+	public OfficeReply get(String id) {
+		// TODO Auto-generated method stub
+		return officeReplyDAO.get(id);
+	}
+
+	@Override
+	public int insert(OfficeReply model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return officeReplyDAO.insert(model);
+	}
+
+	@Override
+	public int update(OfficeReply model) {
+		// TODO Auto-generated method stub
+		return officeReplyDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return officeReplyDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = officeReplyDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<OfficeReply> list() {
+		// TODO Auto-generated method stub
+		return officeReplyDAO.list();
+	}
+		
+	@Override
+	public Page<OfficeReply> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<OfficeReply> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            officeReplyDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<OfficeReply> findByList(String opinionId, Boolean status) {
+		return officeReplyDAO.findByList(opinionId, status);
+	}
+}

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

@@ -221,10 +221,10 @@
 			LEFT JOIN base_work_station d on c.work_station_id = d.id_
 		]]>
 		<where>
-			and a.del_flag = 0
+			and c.del_flag = 0
 			and a.status_ = false
-			<if test="searchParams.workStation != null">
-				and a.station_id = #{searchParams.workStation}
+			<if test="searchParams.orgId != null">
+				and a.org_id = #{searchParams.orgId}
 			</if>
 			<if test="searchParams.connectPhone != null">
 				and c.connect_phone like #{searchParams.connectPhone}

+ 7 - 7
common/src/main/resources/mapper/base/FeedbackStepStatus.xml

@@ -6,7 +6,7 @@
 	<resultMap id="FeedbackStepStatusMap" type="com.jpsoft.excellent.modules.base.entity.FeedbackStepStatus">
 		<id property="id" column="id_" />
 			<result property="feedbackStepId" column="feedback_step_id" />
-			<result property="stationId" column="station_id" />
+			<result property="orgId" column="org_id" />
 			<result property="userId" column="user_id" />
 			<result property="content" column="content_" />
 			<result property="status" column="status_" />
@@ -25,12 +25,12 @@
 	-->
 	<![CDATA[
 		insert into base_feedback_step_status
-	    (id_,feedback_step_id,station_id,user_id,content_,status_,alloted_date,del_flag,create_time,create_by,update_time,update_by)
+	    (id_,feedback_step_id,org_id,user_id,content_,status_,alloted_date,del_flag,create_time,create_by,update_time,update_by)
 		values
 		(
 #{id,jdbcType=VARCHAR}
 ,#{feedbackStepId,jdbcType=VARCHAR}
-,#{stationId,jdbcType=VARCHAR}
+,#{orgId,jdbcType=VARCHAR}
 ,#{userId,jdbcType=VARCHAR}
 ,#{content,jdbcType=VARCHAR}
 ,#{status,jdbcType= NUMERIC }
@@ -52,8 +52,8 @@
 				<if test="feedbackStepId!=null">
 		feedback_step_id=#{feedbackStepId,jdbcType=VARCHAR},
 		</if>
-				<if test="stationId!=null">
-					station_id=#{stationId,jdbcType=VARCHAR},
+				<if test="orgId!=null">
+					org_id=#{orgId,jdbcType=VARCHAR},
 		</if>
 				<if test="userId!=null">
 		user_id=#{userId,jdbcType=VARCHAR},
@@ -87,7 +87,7 @@
 	</update>
 	<select id="get" parameterType="string" resultMap="FeedbackStepStatusMap">
 		select 
-id_,feedback_step_id,station_id,user_id,content_,status_,alloted_date,del_flag,create_time,create_by,update_time,update_by		from base_feedback_step_status where id_=#{0}
+id_,feedback_step_id,org_id,user_id,content_,status_,alloted_date,del_flag,create_time,create_by,update_time,update_by		from base_feedback_step_status where id_=#{0}
 	</select>
 	<select id="exist" parameterType="string" resultType="int">
 		select count(*) from base_feedback_step_status where id_=#{0}
@@ -119,7 +119,7 @@ id_,feedback_step_id,station_id,user_id,content_,status_,alloted_date,del_flag,c
 	</select>
 	<select id="findPhoneByRemind" resultType="string">
 		SELECT b.phone_ FROM base_feedback_step_status a
-		LEFT JOIN sys_user b ON a.station_id = b.station_id
+		LEFT JOIN sys_user b ON a.org_id = b.org_id
 		WHERE a.status_ = FALSE
 		AND a.create_time LIKE #{0}
 		GROUP BY b.phone_

+ 47 - 1
common/src/main/resources/mapper/base/OfficeOpinion.xml

@@ -19,9 +19,11 @@
 		<result property="createBy" column="create_by" />
 		<result property="updateTime" column="update_time" />
 		<result property="updateBy" column="update_by" />
+		<result property="allotedDate" column="alloted_date" />
 
 		<result property="areaId" column="area_id" />
 		<result property="officeName" column="office_name" />
+		<result property="replyId" column="reply_id" />
 	</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.excellent.modules.base.entity.OfficeOpinion">
 	<!--
@@ -31,7 +33,7 @@
 	-->
 	<![CDATA[
 		insert into base_office_opinion
-	    (id_,connect_,connect_phone,office_id,is_satisfied,content_,appendix_,opinion_status,confirm_status,content_attachment,del_flag,create_time,create_by,update_time,update_by)
+	    (id_,connect_,connect_phone,office_id,is_satisfied,content_,appendix_,opinion_status,confirm_status,content_attachment,del_flag,create_time,create_by,update_time,update_by,alloted_date)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -49,6 +51,7 @@
 ,#{createBy,jdbcType=VARCHAR}
 ,#{updateTime,jdbcType= TIMESTAMP }
 ,#{updateBy,jdbcType=VARCHAR}
+,#{allotedDate,jdbcType= TIMESTAMP }
 		)
 	]]>
 	</insert>
@@ -100,6 +103,9 @@
 				<if test="updateBy!=null">
 		update_by=#{updateBy,jdbcType=VARCHAR},
 		</if>
+			<if test="allotedDate!=null">
+				alloted_date=#{allotedDate,jdbcType= TIMESTAMP },
+			</if>
 		</set>
 	where id_=#{id}
 	</update>
@@ -153,9 +159,49 @@
 				and a.create_time < #{searchParams.reportDateEnd}
 				]]>
 			</if>
+			<if test="searchParams.timeout != null">
+				<![CDATA[
+				and a.alloted_date < #{searchParams.timeout}
+				]]>
+			</if>
+			<if test="searchParams.noTimeout != null">
+				<![CDATA[
+				and (a.alloted_date is null or a.alloted_date >= #{searchParams.noTimeout})
+				]]>
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}
 	 	</foreach>
 	</select>
+	<select id="searchTodo" parameterType="hashmap" resultMap="OfficeOpinionMap">
+		<![CDATA[
+			SELECT b.*,c.name_ AS office_name,a.id_ AS reply_id FROM base_office_reply a
+			LEFT JOIN base_office_opinion b ON a.opinion_id = b.id_
+			LEFT JOIN base_office c ON b.office_id = c.id_
+		]]>
+		<where>
+			and b.del_flag = 0
+			and a.status_ = false
+			<if test="searchParams.orgId != null">
+				and a.org_id = #{searchParams.orgId}
+			</if>
+			<if test="searchParams.connectPhone != null">
+				and b.connect_phone like #{searchParams.connectPhone}
+			</if>
+			<if test="searchParams.reportDateStart != null">
+				<![CDATA[
+				and b.create_time >= #{searchParams.reportDateStart}
+				]]>
+			</if>
+			<if test="searchParams.reportDateEnd != null">
+				<![CDATA[
+				and b.create_time < #{searchParams.reportDateEnd}
+				]]>
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+			${sort.name} ${sort.order}
+		</foreach>
+	</select>
 </mapper>

+ 119 - 0
common/src/main/resources/mapper/base/OfficeReply.xml

@@ -0,0 +1,119 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.excellent.modules.base.dao.OfficeReplyDAO">
+	<resultMap id="OfficeReplyMap" type="com.jpsoft.excellent.modules.base.entity.OfficeReply">
+		<id property="id" column="id_" />
+			<result property="opinionId" column="opinion_id" />
+			<result property="orgId" column="org_id" />
+			<result property="userId" column="user_id" />
+			<result property="content" column="content_" />
+			<result property="status" column="status_" />
+			<result property="allotedDate" column="alloted_date" />
+			<result property="delFlag" column="del_flag" />
+			<result property="createTime" column="create_time" />
+			<result property="createBy" column="create_by" />
+			<result property="updateTime" column="update_time" />
+			<result property="updateBy" column="update_by" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.excellent.modules.base.entity.OfficeReply">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_office_reply
+	    (id_,opinion_id,org_id,user_id,content_,status_,alloted_date,del_flag,create_time,create_by,update_time,update_by)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{opinionId,jdbcType=VARCHAR}
+,#{orgId,jdbcType=VARCHAR}
+,#{userId,jdbcType=VARCHAR}
+,#{content,jdbcType=VARCHAR}
+,#{status,jdbcType= NUMERIC }
+,#{allotedDate,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+,#{createTime,jdbcType= TIMESTAMP }
+,#{createBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from base_office_reply where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.excellent.modules.base.entity.OfficeReply">
+		update base_office_reply
+		<set>
+				<if test="opinionId!=null">
+		opinion_id=#{opinionId,jdbcType=VARCHAR},
+		</if>
+				<if test="orgId!=null">
+		org_id=#{orgId,jdbcType=VARCHAR},
+		</if>
+				<if test="userId!=null">
+		user_id=#{userId,jdbcType=VARCHAR},
+		</if>
+				<if test="content!=null">
+		content_=#{content,jdbcType=VARCHAR},
+		</if>
+				<if test="status!=null">
+		status_=#{status,jdbcType= NUMERIC },
+		</if>
+				<if test="allotedDate!=null">
+		alloted_date=#{allotedDate,jdbcType= TIMESTAMP },
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="OfficeReplyMap">
+		select 
+id_,opinion_id,org_id,user_id,content_,status_,alloted_date,del_flag,create_time,create_by,update_time,update_by		from base_office_reply where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from base_office_reply where id_=#{0}
+	</select>
+	<select id="list" resultMap="OfficeReplyMap">
+		select * from base_office_reply
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="OfficeReplyMap">
+		<![CDATA[
+			select * from base_office_reply
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+	<select id="findByList" resultMap="OfficeReplyMap">
+		SELECT * FROM base_office_reply
+		WHERE opinion_id = #{opinionId}
+		<if test="status != null">
+			AND status_ = #{status}
+		</if>
+		ORDER BY create_time ASC
+	</select>
+</mapper>

+ 21 - 10
web/src/main/java/com/jpsoft/excellent/modules/base/controller/FeedbackOpinionController.java

@@ -57,6 +57,8 @@ public class FeedbackOpinionController {
     private FeedbackAttachmentService feedbackAttachmentService;
     @Autowired
     private AreaService areaService;
+    @Autowired
+    private OrganizationService organizationService;
 
     @ApiOperation(value="创建空记录")
     @GetMapping("create")
@@ -150,9 +152,9 @@ public class FeedbackOpinionController {
             //步进列表
             List<FeedbackStepStatus> feedbackStepStatusList = feedbackStepStatusService.findByList(feedbackOpinion.getId(),null);
             for(FeedbackStepStatus feedbackStepStatus : feedbackStepStatusList){
-                if(StringUtils.isNotEmpty(feedbackStepStatus.getStationId())){
-                    WorkStation workStation = workStationService.get(feedbackStepStatus.getStationId());
-                    feedbackStepStatus.setStationName(workStation.getStationName());
+                if(StringUtils.isNotEmpty(feedbackStepStatus.getOrgId())){
+                    Organization organization = organizationService.get(feedbackStepStatus.getOrgId());
+                    feedbackStepStatus.setOrgName(organization.getName());
                 }
                 if(StringUtils.isNotEmpty(feedbackStepStatus.getUserId())){
                     User user = userService.get(feedbackStepStatus.getUserId());
@@ -419,7 +421,7 @@ public class FeedbackOpinionController {
     @RequestMapping(value = "reportListXls",method = RequestMethod.POST)
     public String reportListXls(String sort, String connect, String connectPhone, String areaId, String workStation, String window,
                                 String isSatisfied, String opinionStatus, String confirmStatus, Date[] reportDate,
-                                Boolean areaSubordinate, @RequestAttribute String subject){
+                                Boolean areaSubordinate, String timeout, @RequestAttribute String subject){
         String downloadUrl = "";
 
         //新建文档
@@ -520,6 +522,15 @@ public class FeedbackOpinionController {
                 searchParams.put("confirmStatus", false);
             }
         }
+        if (StringUtils.isNotEmpty(timeout)) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            if("1".equals(timeout)) {
+                searchParams.put("timeout", sdf.format(new Date()));
+            }
+            if("0".equals(timeout)) {
+                searchParams.put("noTimeout", sdf.format(new Date()));
+            }
+        }
         if (reportDate.length > 0) {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
             Calendar calendar = new GregorianCalendar();
@@ -742,11 +753,11 @@ public class FeedbackOpinionController {
 
         Map<String,Object> searchParams = new HashMap<>();
         User user = userService.get(subject);
-        if(StringUtils.isNotEmpty(user.getStationId())) {
-            searchParams.put("workStation", user.getStationId());
+        if(StringUtils.isNotEmpty(user.getOrgId())) {
+            searchParams.put("orgId", user.getOrgId());
         }
         else{
-            searchParams.put("workStation", "0");
+            searchParams.put("orgId", "0");
         }
 
         if (StringUtils.isNotEmpty(connectPhone)) {
@@ -896,7 +907,7 @@ public class FeedbackOpinionController {
     @ApiOperation(value="步进")
     @PostMapping("nextStep")
     @Transactional(rollbackFor = Exception.class)
-    public MessageResult nextStep(String feedbackOpinionId, String[] stationIds, String allotedDate, @RequestAttribute String subject){
+    public MessageResult nextStep(String feedbackOpinionId, String[] orgIds, String allotedDate, @RequestAttribute String subject){
         MessageResult msgResult = new MessageResult<>();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 
@@ -918,11 +929,11 @@ public class FeedbackOpinionController {
             feedbackStepService.insert(feedbackStep);
 
             //反馈意见反馈
-            for(String stationId : stationIds) {
+            for(String orgId : orgIds) {
                 FeedbackStepStatus feedbackStepStatus = new FeedbackStepStatus();
                 feedbackStepStatus.setId(UUID.randomUUID().toString());
                 feedbackStepStatus.setFeedbackStepId(feedbackStep.getId());
-                feedbackStepStatus.setStationId(stationId);
+                feedbackStepStatus.setOrgId(orgId);
                 feedbackStepStatus.setStatus(false);
                 feedbackStepStatus.setAllotedDate(sdf.parse(allotedDate));
                 feedbackStepStatus.setDelFlag(false);

+ 183 - 5
web/src/main/java/com/jpsoft/excellent/modules/base/controller/OfficeOpinionController.java

@@ -4,13 +4,13 @@ import com.github.pagehelper.Page;
 import com.jpsoft.excellent.config.OSSConfig;
 import com.jpsoft.excellent.modules.base.dto.FeedbackAttachmentDTO;
 import com.jpsoft.excellent.modules.base.entity.*;
-import com.jpsoft.excellent.modules.base.service.AreaService;
-import com.jpsoft.excellent.modules.base.service.OfficeAttachmentService;
+import com.jpsoft.excellent.modules.base.service.*;
 import com.jpsoft.excellent.modules.common.utils.OSSUtil;
 import com.jpsoft.excellent.modules.common.utils.PojoUtils;
 import com.jpsoft.excellent.modules.common.dto.Sort;
 import com.jpsoft.excellent.modules.common.dto.MessageResult;
-import com.jpsoft.excellent.modules.base.service.OfficeOpinionService;
+import com.jpsoft.excellent.modules.sys.entity.User;
+import com.jpsoft.excellent.modules.sys.service.UserService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
@@ -19,6 +19,7 @@ import org.apache.poi.ss.usermodel.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
@@ -40,7 +41,13 @@ public class OfficeOpinionController {
     @Autowired
     private OfficeAttachmentService officeAttachmentService;
     @Autowired
+    private OfficeReplyService officeReplyService;
+    @Autowired
     private AreaService areaService;
+    @Autowired
+    private OrganizationService organizationService;
+    @Autowired
+    private UserService userService;
 
     @ApiOperation(value="创建空记录")
     @GetMapping("create")
@@ -128,6 +135,19 @@ public class OfficeOpinionController {
             }
             officeOpinion.setPicList(feedbackAttachmentDTOList2);
             officeOpinion.setPicUrlList(picUrlList);
+            //步进列表
+            List<OfficeReply> officeReplyList = officeReplyService.findByList(officeOpinion.getId(),null);
+            for(OfficeReply officeReply : officeReplyList){
+                if(StringUtils.isNotEmpty(officeReply.getOrgId())){
+                    Organization organization = organizationService.get(officeReply.getOrgId());
+                    officeReply.setOrgName(organization.getName());
+                }
+                if(StringUtils.isNotEmpty(officeReply.getUserId())){
+                    User user = userService.get(officeReply.getUserId());
+                    officeReply.setUserName(user.getRealName());
+                }
+            }
+            officeOpinion.setOfficeReplyList(officeReplyList);
 
             if (officeOpinion != null) {
                 msgResult.setResult(true);
@@ -282,7 +302,7 @@ public class OfficeOpinionController {
     @ApiOperation(value="列表")
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
-            String connect, String connectPhone, String areaId, Boolean areaSubordinate, String isSatisfied, String opinionStatus, String confirmStatus, Date[] reportDate,
+            String connect, String connectPhone, String areaId, Boolean areaSubordinate, String isSatisfied, String opinionStatus, String confirmStatus, Date[] reportDate, String timeout,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestAttribute String subject){
@@ -328,6 +348,15 @@ public class OfficeOpinionController {
                 searchParams.put("confirmStatus", false);
             }
         }
+        if (StringUtils.isNotEmpty(timeout)) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            if("1".equals(timeout)) {
+                searchParams.put("timeout", sdf.format(new Date()));
+            }
+            if("0".equals(timeout)) {
+                searchParams.put("noTimeout", sdf.format(new Date()));
+            }
+        }
         if (reportDate.length > 0) {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
             Calendar calendar = new GregorianCalendar();
@@ -346,6 +375,13 @@ public class OfficeOpinionController {
             if(StringUtils.isNotEmpty(officeOpinion.getAreaId())) {
                 officeOpinion.setAreaName(parentFullName(officeOpinion.getAreaId()));
             }
+            int num = officeReplyService.findByList(officeOpinion.getId(),false).size();
+            if(num > 0) {
+                officeOpinion.setIsProcessed(false);
+            }
+            else{
+                officeOpinion.setIsProcessed(true);
+            }
         }
 
         msgResult.setResult(true);
@@ -403,7 +439,7 @@ public class OfficeOpinionController {
     @RequestMapping(value = "reportListXls",method = RequestMethod.POST)
     public String reportListXls(String sort, String connect, String connectPhone, String areaId, String workStation, String window,
                                 String isSatisfied, String opinionStatus, String confirmStatus, String[] cause, Date[] reportDate,
-                                Boolean areaSubordinate, @RequestAttribute String subject){
+                                Boolean areaSubordinate, String timeout, @RequestAttribute String subject){
         String downloadUrl = "";
 
         //新建文档
@@ -491,6 +527,15 @@ public class OfficeOpinionController {
                 searchParams.put("confirmStatus", false);
             }
         }
+        if (StringUtils.isNotEmpty(timeout)) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            if("1".equals(timeout)) {
+                searchParams.put("timeout", sdf.format(new Date()));
+            }
+            if("0".equals(timeout)) {
+                searchParams.put("noTimeout", sdf.format(new Date()));
+            }
+        }
         if (reportDate.length > 0) {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
             Calendar calendar = new GregorianCalendar();
@@ -578,4 +623,137 @@ public class OfficeOpinionController {
 
         return downloadUrl;
     }
+
+    @ApiOperation(value="步进")
+    @PostMapping("nextStep")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult nextStep(String opinionId, String[] orgIds, String allotedDate, @RequestAttribute String subject){
+        MessageResult msgResult = new MessageResult<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+
+        try {
+            //群众评议
+            OfficeOpinion officeOpinion = officeOpinionService.get(opinionId);
+            officeOpinion.setConfirmStatus(true);
+            officeOpinion.setAllotedDate(sdf.parse(allotedDate));
+            officeOpinionService.update(officeOpinion);
+
+            //群众评议反馈
+            for(String org : orgIds) {
+                OfficeReply officeReply = new OfficeReply();
+                officeReply.setId(UUID.randomUUID().toString());
+                officeReply.setOpinionId(officeOpinion.getId());
+                officeReply.setOrgId(org);
+                officeReply.setStatus(false);
+                officeReply.setAllotedDate(sdf.parse(allotedDate));
+                officeReply.setDelFlag(false);
+                officeReply.setCreateTime(new Date());
+                officeReply.setCreateBy(subject);
+                officeReplyService.insert(officeReply);
+            }
+
+            msgResult.setResult(true);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="完成")
+    @PostMapping("finish")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult finish(String opinionId, @RequestAttribute String subject){
+        MessageResult msgResult = new MessageResult<>();
+        try {
+            //反馈意见
+            OfficeOpinion officeOpinion = officeOpinionService.get(opinionId);
+            officeOpinion.setConfirmStatus(true);
+            officeOpinion.setOpinionStatus(true);
+            officeOpinion.setUpdateBy(subject);
+            officeOpinion.setUpdateTime(new Date());
+            officeOpinionService.update(officeOpinion);
+
+            msgResult.setResult(true);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageListTodo",method = RequestMethod.POST)
+    public MessageResult<Map> pageListTodo(
+            String connectPhone, Date[] reportDate,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        Map<String,Object> searchParams = new HashMap<>();
+        User user = userService.get(subject);
+        if(StringUtils.isNotEmpty(user.getOrgId())) {
+            searchParams.put("orgId", user.getOrgId());
+        }
+        else{
+            searchParams.put("orgId", "0");
+        }
+
+        if (StringUtils.isNotEmpty(connectPhone)) {
+            searchParams.put("connectPhone","%" + connectPhone + "%");
+        }
+
+        if (reportDate.length > 0) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            Calendar calendar = new GregorianCalendar();
+            calendar.setTime(reportDate[1]);
+            calendar.add(calendar.DATE,1);
+
+            searchParams.put("reportDateStart",sdf.format(reportDate[0]));
+            searchParams.put("reportDateEnd",sdf.format(calendar.getTime()));
+        }
+
+        Page<OfficeOpinion> page = officeOpinionService.pageSearchTodo(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="待办处理")
+    @RequestMapping(value = "saveTodo",method = RequestMethod.POST)
+    public MessageResult saveTodo(String replyId, String content, @RequestAttribute String subject){
+        MessageResult msgResult = new MessageResult<>();
+
+        try {
+            OfficeReply officeReply = officeReplyService.get(replyId);
+            officeReply.setUserId(subject);
+            officeReply.setContent(content);
+            officeReply.setStatus(true);
+            officeReply.setUpdateBy(subject);
+            officeReply.setUpdateTime(new Date());
+            officeReplyService.update(officeReply);
+
+            msgResult.setResult(true);
+        }
+        catch (Exception exception) {
+            msgResult.setResult(false);
+            msgResult.setMessage(exception.getMessage());
+        }
+
+        return msgResult;
+    }
 }

+ 2 - 2
web/src/main/java/com/jpsoft/excellent/modules/timed/stepStatusSMS.java

@@ -27,7 +27,7 @@ public class stepStatusSMS {
     private UserService userService;
 
     //每天9点执行一次->同时在unactive方法中执行
-    @Scheduled(cron = "0 0 9 * * ?")
+    @Scheduled(cron = "0 0 10 * * ?")
 //    @Scheduled(cron = "0 0/1 * * * ?")
     public void run() {
         log.warn("定时任务:待办反馈提醒短信开始");
@@ -37,7 +37,7 @@ public class stepStatusSMS {
         calendar.add(calendar.DATE,-7);
         List<String> list = feedbackStepStatusService.findPhoneByRemind(sdf.format(calendar.getTime()) + "%");
         if(list.size() > 0) {
-            SMSUtil.sendSMS("待办反馈存在未处理的反馈意见,请及时处理。", StringUtils.join(list.toArray(), ","), null);
+            SMSUtil.sendSMS("【双优督办】待办反馈存在未处理的反馈意见,请及时处理。", StringUtils.join(list.toArray(), ","), null);
         }
 
         log.warn("定时任务:待办反馈提醒短信结束");