jz.kai 2 yıl önce
ebeveyn
işleme
e7ff749bb4

+ 18 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/dao/FeedbackStepDAO.java

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

+ 18 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/dao/FeedbackStepStatusDAO.java

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

+ 41 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/entity/FeedbackStep.java

@@ -0,0 +1,41 @@
+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_feedback_step的实体类
+ */
+@Data
+@ApiModel(value = "base_feedback_step的实体类")
+public class FeedbackStep {
+        @ApiModelProperty(value = "编号")
+    private String id;
+        @ApiModelProperty(value = "反馈信息编号")
+    private String feedbackOpinionId;
+        @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;
+}

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

@@ -0,0 +1,49 @@
+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_feedback_step_status的实体类
+ */
+@Data
+@ApiModel(value = "base_feedback_step_status的实体类")
+public class FeedbackStepStatus {
+        @ApiModelProperty(value = "编号")
+    private String id;
+        @ApiModelProperty(value = "步进编号")
+    private String feedbackStepId;
+        @ApiModelProperty(value = "交办单位")
+    private String orgId;
+        @ApiModelProperty(value = "回复人")
+    private String userId;
+        @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;
+}

+ 17 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/service/FeedbackStepService.java

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

+ 17 - 0
common/src/main/java/com/jpsoft/excellent/modules/base/service/FeedbackStepStatusService.java

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

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

@@ -0,0 +1,70 @@
+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.FeedbackStepDAO;
+import com.jpsoft.excellent.modules.base.entity.FeedbackStep;
+import com.jpsoft.excellent.modules.base.service.FeedbackStepService;
+import com.github.pagehelper.Page;
+import com.jpsoft.excellent.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="feedbackStepService")
+public class FeedbackStepServiceImpl implements FeedbackStepService {
+	@Resource(name="feedbackStepDAO")
+	private FeedbackStepDAO feedbackStepDAO;
+
+	@Override
+	public FeedbackStep get(String id) {
+		// TODO Auto-generated method stub
+		return feedbackStepDAO.get(id);
+	}
+
+	@Override
+	public int insert(FeedbackStep model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return feedbackStepDAO.insert(model);
+	}
+
+	@Override
+	public int update(FeedbackStep model) {
+		// TODO Auto-generated method stub
+		return feedbackStepDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return feedbackStepDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = feedbackStepDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<FeedbackStep> list() {
+		// TODO Auto-generated method stub
+		return feedbackStepDAO.list();
+	}
+		
+	@Override
+	public Page<FeedbackStep> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<FeedbackStep> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            feedbackStepDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

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

@@ -0,0 +1,70 @@
+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.FeedbackStepStatusDAO;
+import com.jpsoft.excellent.modules.base.entity.FeedbackStepStatus;
+import com.jpsoft.excellent.modules.base.service.FeedbackStepStatusService;
+import com.github.pagehelper.Page;
+import com.jpsoft.excellent.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="feedbackStepStatusService")
+public class FeedbackStepStatusServiceImpl implements FeedbackStepStatusService {
+	@Resource(name="feedbackStepStatusDAO")
+	private FeedbackStepStatusDAO feedbackStepStatusDAO;
+
+	@Override
+	public FeedbackStepStatus get(String id) {
+		// TODO Auto-generated method stub
+		return feedbackStepStatusDAO.get(id);
+	}
+
+	@Override
+	public int insert(FeedbackStepStatus model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return feedbackStepStatusDAO.insert(model);
+	}
+
+	@Override
+	public int update(FeedbackStepStatus model) {
+		// TODO Auto-generated method stub
+		return feedbackStepStatusDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return feedbackStepStatusDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = feedbackStepStatusDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<FeedbackStepStatus> list() {
+		// TODO Auto-generated method stub
+		return feedbackStepStatusDAO.list();
+	}
+		
+	@Override
+	public Page<FeedbackStepStatus> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<FeedbackStepStatus> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            feedbackStepStatusDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 91 - 0
common/src/main/resources/mapper/base/FeedbackStep.xml

@@ -0,0 +1,91 @@
+<?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.FeedbackStepDAO">
+	<resultMap id="FeedbackStepMap" type="com.jpsoft.excellent.modules.base.entity.FeedbackStep">
+		<id property="id" column="id_" />
+			<result property="feedbackOpinionId" column="feedback_opinion_id" />
+			<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.FeedbackStep">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_feedback_step
+	    (id_,feedback_opinion_id,alloted_date,del_flag,create_time,create_by,update_time,update_by)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{feedbackOpinionId,jdbcType=VARCHAR}
+,#{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_feedback_step where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.excellent.modules.base.entity.FeedbackStep">
+		update base_feedback_step
+		<set>
+				<if test="feedbackOpinionId!=null">
+		feedback_opinion_id=#{feedbackOpinionId,jdbcType=VARCHAR},
+		</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="FeedbackStepMap">
+		select 
+id_,feedback_opinion_id,alloted_date,del_flag,create_time,create_by,update_time,update_by		from base_feedback_step where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from base_feedback_step where id_=#{0}
+	</select>
+	<select id="list" resultMap="FeedbackStepMap">
+		select * from base_feedback_step
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="FeedbackStepMap">
+		<![CDATA[
+			select * from base_feedback_step
+		]]>
+		<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>
+</mapper>

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

@@ -0,0 +1,111 @@
+<?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.FeedbackStepStatusDAO">
+	<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="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.FeedbackStepStatus">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_feedback_step_status
+	    (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}
+,#{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_feedback_step_status where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.excellent.modules.base.entity.FeedbackStepStatus">
+		update base_feedback_step_status
+		<set>
+				<if test="feedbackStepId!=null">
+		feedback_step_id=#{feedbackStepId,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="FeedbackStepStatusMap">
+		select 
+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}
+	</select>
+	<select id="list" resultMap="FeedbackStepStatusMap">
+		select * from base_feedback_step_status
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="FeedbackStepStatusMap">
+		<![CDATA[
+			select * from base_feedback_step_status
+		]]>
+		<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>
+</mapper>