Browse Source

人员管理

jz.kai 4 years ago
parent
commit
65be8f65b6
24 changed files with 1760 additions and 4 deletions
  1. 19 0
      common/src/main/java/com/jpsoft/supervision/modules/base/dao/IncidentAttachmentDAO.java
  2. 18 0
      common/src/main/java/com/jpsoft/supervision/modules/base/dao/IncidentDAO.java
  3. 19 0
      common/src/main/java/com/jpsoft/supervision/modules/base/dao/IncidentStepDAO.java
  4. 18 0
      common/src/main/java/com/jpsoft/supervision/modules/base/dao/PersonDAO.java
  5. 21 0
      common/src/main/java/com/jpsoft/supervision/modules/base/dto/IncidentAttachmentDTO.java
  6. 90 0
      common/src/main/java/com/jpsoft/supervision/modules/base/entity/Incident.java
  7. 37 0
      common/src/main/java/com/jpsoft/supervision/modules/base/entity/IncidentAttachment.java
  8. 45 0
      common/src/main/java/com/jpsoft/supervision/modules/base/entity/IncidentStep.java
  9. 41 0
      common/src/main/java/com/jpsoft/supervision/modules/base/entity/Person.java
  10. 18 0
      common/src/main/java/com/jpsoft/supervision/modules/base/service/IncidentAttachmentService.java
  11. 17 0
      common/src/main/java/com/jpsoft/supervision/modules/base/service/IncidentService.java
  12. 18 0
      common/src/main/java/com/jpsoft/supervision/modules/base/service/IncidentStepService.java
  13. 17 0
      common/src/main/java/com/jpsoft/supervision/modules/base/service/PersonService.java
  14. 76 0
      common/src/main/java/com/jpsoft/supervision/modules/base/service/impl/IncidentAttachmentServiceImpl.java
  15. 70 0
      common/src/main/java/com/jpsoft/supervision/modules/base/service/impl/IncidentServiceImpl.java
  16. 76 0
      common/src/main/java/com/jpsoft/supervision/modules/base/service/impl/IncidentStepServiceImpl.java
  17. 70 0
      common/src/main/java/com/jpsoft/supervision/modules/base/service/impl/PersonServiceImpl.java
  18. 123 0
      common/src/main/resources/mapper/base/Incident.xml
  19. 103 0
      common/src/main/resources/mapper/base/IncidentAttachment.xml
  20. 100 0
      common/src/main/resources/mapper/base/IncidentStep.xml
  21. 96 0
      common/src/main/resources/mapper/base/Person.xml
  22. 438 0
      web/src/main/java/com/jpsoft/supervision/modules/base/controller/IncidentController.java
  23. 225 0
      web/src/main/java/com/jpsoft/supervision/modules/base/controller/PersonController.java
  24. 5 4
      web/src/main/java/com/jpsoft/supervision/modules/common/controller/fileUploadController.java

+ 19 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/dao/IncidentAttachmentDAO.java

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

+ 18 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/dao/IncidentDAO.java

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

+ 19 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/dao/IncidentStepDAO.java

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

+ 18 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/dao/PersonDAO.java

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

+ 21 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/dto/IncidentAttachmentDTO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.supervision.modules.base.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+  描述:base_incident_attachment的实体类
+ */
+@Data
+@ApiModel(value = "base_incident_attachment的实体类")
+public class IncidentAttachmentDTO {
+        @ApiModelProperty(value = "附件标题")
+    private String name;
+        @ApiModelProperty(value = "附件路径")
+    private String url;
+}

+ 90 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/entity/Incident.java

@@ -0,0 +1,90 @@
+package com.jpsoft.supervision.modules.base.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import java.util.List;
+
+import com.jpsoft.supervision.modules.base.dto.IncidentAttachmentDTO;
+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_incident的实体类
+ */
+@Data
+@ApiModel(value = "base_incident的实体类")
+public class Incident {
+        @ApiModelProperty(value = "菜单编号")
+    private String id;
+        @ApiModelProperty(value = "标题")
+    private String title;
+        @ApiModelProperty(value = "内容")
+    private String content;
+        @ApiModelProperty(value = "督办类型")
+    private String caseType;
+        @ApiModelProperty(value = "督办类型名称")
+    private String caseTypeName;
+        @ApiModelProperty(value = "领导批示")
+    private String instructions;
+        @ApiModelProperty(value = "领导批示类型")
+    private String instructionsType;
+    @ApiModelProperty(value = "领导批示名称")
+    private String instructionsName;
+        @DateTimeFormat(pattern="yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
+	    @ApiModelProperty(value = "领导批示时间")
+    private Date instructionsTime;
+        @ApiModelProperty(value = "事件状态")
+    private String isFinished;
+        @ApiModelProperty(value = "事件状态名称")
+    private String isFinishedName;
+        @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;
+        @ApiModelProperty(value = "附件列表")
+    private List<IncidentAttachmentDTO> attList;
+        @ApiModelProperty(value = "图片列表")
+    private List<IncidentAttachmentDTO> picList;
+        @ApiModelProperty(value = "图片路径列表")
+    private String[] picUrlList;
+        @ApiModelProperty(value = "步进列表")
+    private List<IncidentStep> incidentStepList;
+        @ApiModelProperty(value = "步进条数")
+    private Integer incidentStepSize;
+    @ApiModelProperty(value = "菜单编号")
+    private String stepId;
+    @ApiModelProperty(value = "责任单位")
+    private String stepOrgId;
+    @ApiModelProperty(value = "责任单位名称")
+    private String stepOrgName;
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
+    @ApiModelProperty(value = "提醒时间")
+    private Date stepWarnTime;
+    @ApiModelProperty(value = "处置内容")
+    private String stepContent;
+    @ApiModelProperty(value = "提交处置方式")
+    private String subWayType;
+    @ApiModelProperty(value = "处置内容")
+    private String subContent;
+    @ApiModelProperty(value = "责任单位")
+    private String subOrgId;
+    @ApiModelProperty(value = "提醒时间")
+    private Date subWarnTime;
+}

+ 37 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/entity/IncidentAttachment.java

@@ -0,0 +1,37 @@
+package com.jpsoft.supervision.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_incident_attachment的实体类
+ */
+@Data
+@ApiModel(value = "base_incident_attachment的实体类")
+public class IncidentAttachment {
+        @ApiModelProperty(value = "编号")
+    private String id;
+        @ApiModelProperty(value = "督查事件编号")
+    private String incidentId;
+        @ApiModelProperty(value = "附件类型")
+    private String attachmentType;
+        @ApiModelProperty(value = "附件标题")
+    private String attachmentTitle;
+        @ApiModelProperty(value = "附件路径")
+    private String attachmentUrl;
+        @ApiModelProperty(value = "序号")
+    private Integer sortNo;
+        @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;
+}

+ 45 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/entity/IncidentStep.java

@@ -0,0 +1,45 @@
+package com.jpsoft.supervision.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_incident_step的实体类
+ */
+@Data
+@ApiModel(value = "base_incident_step的实体类")
+public class IncidentStep {
+        @ApiModelProperty(value = "菜单编号")
+    private String id;
+        @ApiModelProperty(value = "督查事件编号")
+    private String incidentId;
+        @ApiModelProperty(value = "责任单位")
+    private String orgId;
+        @ApiModelProperty(value = "责任单位名称")
+    private String orgName;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "提醒时间")
+    private Date warnTime;
+        @ApiModelProperty(value = "处置内容")
+    private String content;
+        @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;
+}

+ 41 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/entity/Person.java

@@ -0,0 +1,41 @@
+package com.jpsoft.supervision.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_person的实体类
+ */
+@Data
+@ApiModel(value = "base_person的实体类")
+public class Person {
+        @ApiModelProperty(value = "编号")
+    private String id;
+        @ApiModelProperty(value = "机构编号")
+    private String orgId;
+        @ApiModelProperty(value = "姓名")
+    private String name;
+        @ApiModelProperty(value = "电话")
+    private String phone;
+        @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;
+}

+ 18 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/service/IncidentAttachmentService.java

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

+ 17 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/service/IncidentService.java

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

+ 18 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/service/IncidentStepService.java

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

+ 17 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/service/PersonService.java

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

+ 76 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/service/impl/IncidentAttachmentServiceImpl.java

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

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

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

+ 76 - 0
common/src/main/java/com/jpsoft/supervision/modules/base/service/impl/IncidentStepServiceImpl.java

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

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

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

+ 123 - 0
common/src/main/resources/mapper/base/Incident.xml

@@ -0,0 +1,123 @@
+<?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.supervision.modules.base.dao.IncidentDAO">
+	<resultMap id="IncidentMap" type="com.jpsoft.supervision.modules.base.entity.Incident">
+		<id property="id" column="id_" />
+			<result property="title" column="title_" />
+			<result property="content" column="content_" />
+			<result property="caseType" column="case_type" />
+			<result property="instructions" column="instructions" />
+			<result property="instructionsType" column="instructions_type" />
+			<result property="instructionsTime" column="instructions_time" />
+			<result property="isFinished" column="is_finished" />
+			<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.supervision.modules.base.entity.Incident">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_incident
+	    (id_,title_,content_,case_type,instructions,instructions_type,instructions_time,is_finished,del_flag,create_time,create_by,update_time,update_by)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{title,jdbcType=VARCHAR}
+,#{content,jdbcType=VARCHAR}
+,#{caseType,jdbcType=VARCHAR}
+,#{instructions,jdbcType=VARCHAR}
+,#{instructionsType,jdbcType=VARCHAR}
+,#{instructionsTime,jdbcType= TIMESTAMP }
+,#{isFinished,jdbcType= NUMERIC }
+,#{delFlag,jdbcType= NUMERIC }
+,#{createTime,jdbcType= TIMESTAMP }
+,#{createBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from base_incident where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.supervision.modules.base.entity.Incident">
+		update base_incident
+		<set>
+				<if test="title!=null">
+		title_=#{title,jdbcType=VARCHAR},
+		</if>
+				<if test="content!=null">
+		content_=#{content,jdbcType=VARCHAR},
+		</if>
+				<if test="caseType!=null">
+		case_type=#{caseType,jdbcType=VARCHAR},
+		</if>
+				<if test="instructions!=null">
+		instructions=#{instructions,jdbcType=VARCHAR},
+		</if>
+				<if test="instructionsType!=null">
+			instructions_type=#{instructionsType,jdbcType=VARCHAR},
+		</if>
+				<if test="instructionsTime!=null">
+		instructions_time=#{instructionsTime,jdbcType= TIMESTAMP },
+		</if>
+			<if test="isFinished!=null">
+				is_finished=#{isFinished,jdbcType= NUMERIC },
+			</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="IncidentMap">
+		select 
+id_,title_,content_,case_type,instructions,instructions_type,instructions_time,is_finished,del_flag,create_time,create_by,update_time,update_by		from base_incident where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from base_incident where id_=#{0}
+	</select>
+	<select id="list" resultMap="IncidentMap">
+		select * from base_incident
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="IncidentMap">
+		<![CDATA[
+			select * from base_incident
+		]]>
+		<where>
+			and del_flag=0
+			<if test="searchParams.title != null">
+				and title_ like #{searchParams.title}
+			</if>
+			<if test="searchParams.caseType != null">
+				and case_type = #{searchParams.caseType}
+			</if>
+			<if test="searchParams.isFinished != null">
+				and is_finished = #{searchParams.isFinished}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+</mapper>

+ 103 - 0
common/src/main/resources/mapper/base/IncidentAttachment.xml

@@ -0,0 +1,103 @@
+<?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.supervision.modules.base.dao.IncidentAttachmentDAO">
+	<resultMap id="IncidentAttachmentMap" type="com.jpsoft.supervision.modules.base.entity.IncidentAttachment">
+		<id property="id" column="id_" />
+			<result property="incidentId" column="incident_id" />
+			<result property="attachmentType" column="attachment_type" />
+			<result property="attachmentTitle" column="attachment_title" />
+			<result property="attachmentUrl" column="attachment_url" />
+			<result property="sortNo" column="sort_no" />
+			<result property="createTime" column="create_time" />
+			<result property="createBy" column="create_by" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.supervision.modules.base.entity.IncidentAttachment">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_incident_attachment
+	    (id_,incident_id,attachment_type,attachment_title,attachment_url,sort_no,create_time,create_by)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{incidentId,jdbcType=VARCHAR}
+,#{attachmentType,jdbcType=VARCHAR}
+,#{attachmentTitle,jdbcType=VARCHAR}
+,#{attachmentUrl,jdbcType=VARCHAR}
+,#{sortNo,jdbcType=NUMERIC}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{createBy,jdbcType=VARCHAR}
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from base_incident_attachment where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.supervision.modules.base.entity.IncidentAttachment">
+		update base_incident_attachment
+		<set>
+				<if test="incidentId!=null">
+		incident_id=#{incidentId,jdbcType=VARCHAR},
+		</if>
+				<if test="attachmentType!=null">
+		attachment_type=#{attachmentType,jdbcType=VARCHAR},
+		</if>
+				<if test="attachmentTitle!=null">
+		attachment_title=#{attachmentTitle,jdbcType=VARCHAR},
+		</if>
+				<if test="attachmentUrl!=null">
+		attachment_url=#{attachmentUrl,jdbcType=VARCHAR},
+		</if>
+			<if test="sortNo!=null">
+				sort_no=#{sortNo,jdbcType=VARCHAR},
+			</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="IncidentAttachmentMap">
+		select 
+id_,incident_id,attachment_type,attachment_title,attachment_url,sort_no,create_time,create_by		from base_incident_attachment where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from base_incident_attachment where id_=#{0}
+	</select>
+	<select id="list" resultMap="IncidentAttachmentMap">
+		select * from base_incident_attachment
+	</select>
+	<select id="findListByIncidentId" parameterType="string" resultMap="IncidentAttachmentMap">
+		select * from base_incident_attachment
+		<where>
+			<if test="incidentId != null">
+				and incident_id=#{incidentId}
+			</if>
+			<if test="attachmentType != null">
+				and attachment_type=#{attachmentType}
+			</if>
+		</where>
+		order by sort_no asc
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="IncidentAttachmentMap">
+		<![CDATA[
+			select * from base_incident_attachment
+		]]>
+		<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>

+ 100 - 0
common/src/main/resources/mapper/base/IncidentStep.xml

@@ -0,0 +1,100 @@
+<?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.supervision.modules.base.dao.IncidentStepDAO">
+	<resultMap id="IncidentStepMap" type="com.jpsoft.supervision.modules.base.entity.IncidentStep">
+		<id property="id" column="id_" />
+			<result property="incidentId" column="incident_id" />
+			<result property="orgId" column="org_id" />
+			<result property="warnTime" column="warn_time" />
+			<result property="content" column="content_" />
+			<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.supervision.modules.base.entity.IncidentStep">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_incident_step
+	    (id_,incident_id,org_id,warn_time,content_,create_time,create_by,update_time,update_by)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{incidentId,jdbcType=VARCHAR}
+,#{orgId,jdbcType=VARCHAR}
+,#{warnTime,jdbcType= TIMESTAMP }
+,#{content,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{createBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from base_incident_step where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.supervision.modules.base.entity.IncidentStep">
+		update base_incident_step
+		<set>
+				<if test="incidentId!=null">
+		incident_id=#{incidentId,jdbcType=VARCHAR},
+		</if>
+				<if test="orgId!=null">
+		org_id=#{orgId,jdbcType=VARCHAR},
+		</if>
+				<if test="warnTime!=null">
+		warn_time=#{warnTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="content!=null">
+		content_=#{content,jdbcType=VARCHAR},
+		</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="IncidentStepMap">
+		select 
+id_,incident_id,org_id,warn_time,content_,create_time,create_by,update_time,update_by		from base_incident_step where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from base_incident_step where id_=#{0}
+	</select>
+	<select id="list" resultMap="IncidentStepMap">
+		select * from base_incident_step
+	</select>
+	<select id="findListByIncidentId" parameterType="string" resultMap="IncidentStepMap">
+		select * from base_incident_step where incident_id=#{0}
+		order by create_time asc
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="IncidentStepMap">
+		<![CDATA[
+			select * from base_incident_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>

+ 96 - 0
common/src/main/resources/mapper/base/Person.xml

@@ -0,0 +1,96 @@
+<?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.supervision.modules.base.dao.PersonDAO">
+	<resultMap id="PersonMap" type="com.jpsoft.supervision.modules.base.entity.Person">
+		<id property="id" column="id_" />
+			<result property="orgId" column="org_id" />
+			<result property="name" column="name_" />
+			<result property="phone" column="phone_" />
+			<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.supervision.modules.base.entity.Person">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into base_person
+	    (id_,org_id,name_,phone_,del_flag,create_time,create_by,update_time,update_by)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{orgId,jdbcType=VARCHAR}
+,#{name,jdbcType=VARCHAR}
+,#{phone,jdbcType=VARCHAR}
+,#{delFlag,jdbcType= NUMERIC }
+,#{createTime,jdbcType= TIMESTAMP }
+,#{createBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from base_person where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.supervision.modules.base.entity.Person">
+		update base_person
+		<set>
+				<if test="orgId!=null">
+		org_id=#{orgId,jdbcType=VARCHAR},
+		</if>
+				<if test="name!=null">
+		name_=#{name,jdbcType=VARCHAR},
+		</if>
+				<if test="phone!=null">
+		phone_=#{phone,jdbcType=VARCHAR},
+		</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="PersonMap">
+		select 
+id_,org_id,name_,phone_,del_flag,create_time,create_by,update_time,update_by		from base_person where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from base_person where id_=#{0}
+	</select>
+	<select id="list" resultMap="PersonMap">
+		select * from base_person
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="PersonMap">
+		<![CDATA[
+			select * from base_person
+		]]>
+		<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>

+ 438 - 0
web/src/main/java/com/jpsoft/supervision/modules/base/controller/IncidentController.java

@@ -0,0 +1,438 @@
+package com.jpsoft.supervision.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.supervision.modules.base.dto.IncidentAttachmentDTO;
+import com.jpsoft.supervision.modules.base.entity.IncidentAttachment;
+import com.jpsoft.supervision.modules.base.entity.IncidentStep;
+import com.jpsoft.supervision.modules.base.entity.Organization;
+import com.jpsoft.supervision.modules.base.service.IncidentAttachmentService;
+import com.jpsoft.supervision.modules.base.service.IncidentStepService;
+import com.jpsoft.supervision.modules.base.service.OrganizationService;
+import com.jpsoft.supervision.modules.common.utils.PojoUtils;
+import com.jpsoft.supervision.modules.common.dto.Sort;
+import com.jpsoft.supervision.modules.common.dto.MessageResult;
+import com.jpsoft.supervision.modules.base.entity.Incident;
+import com.jpsoft.supervision.modules.base.service.IncidentService;
+import com.jpsoft.supervision.modules.sys.entity.DataDictionary;
+import com.jpsoft.supervision.modules.sys.service.DataDictionaryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+@RestController
+@RequestMapping("/base/incident")
+@Api(description = "督查督办管理")
+public class IncidentController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private IncidentService incidentService;
+    @Autowired
+    private IncidentAttachmentService incidentAttachmentService;
+    @Autowired
+    private IncidentStepService incidentStepService;
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+    @Autowired
+    private OrganizationService organizationService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<Incident> create(){
+        MessageResult<Incident> msgResult = new MessageResult<>();
+
+        Incident incident = new Incident();
+        List<IncidentAttachmentDTO> incidentAttachmentDTOList = new ArrayList<>();
+        incident.setAttList(incidentAttachmentDTOList);
+        incident.setPicList(incidentAttachmentDTOList);
+
+        msgResult.setData(incident);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<Incident> add(@RequestBody Incident incident,@RequestAttribute String subject){
+        MessageResult<Incident> msgResult = new MessageResult<>();
+
+        try {
+            incident.setId(UUID.randomUUID().toString());
+            incident.setIsFinished("1");
+            incident.setDelFlag(false);
+            incident.setCreateBy(subject);
+            incident.setCreateTime(new Date());
+            int affectCount = incidentService.insert(incident);
+
+            if (affectCount > 0) {
+                //关联附件
+                for(int i=0;i<incident.getAttList().size();i++){
+                    IncidentAttachmentDTO incidentAttachmentDTO = incident.getAttList().get(i);
+                    IncidentAttachment incidentAttachment = new IncidentAttachment();
+                    incidentAttachment.setId(UUID.randomUUID().toString());
+                    incidentAttachment.setIncidentId(incident.getId());
+                    incidentAttachment.setAttachmentType("1");
+                    incidentAttachment.setAttachmentTitle(incidentAttachmentDTO.getName());
+                    incidentAttachment.setAttachmentUrl(incidentAttachmentDTO.getUrl());
+                    incidentAttachment.setSortNo(i);
+                    incidentAttachment.setCreateBy(subject);
+                    incidentAttachment.setCreateTime(new Date());
+                    incidentAttachmentService.insert(incidentAttachment);
+                }
+                //关联图片
+                for(int i=0;i<incident.getPicList().size();i++){
+                    IncidentAttachmentDTO incidentAttachmentDTO = incident.getPicList().get(i);
+                    IncidentAttachment incidentAttachment = new IncidentAttachment();
+                    incidentAttachment.setId(UUID.randomUUID().toString());
+                    incidentAttachment.setIncidentId(incident.getId());
+                    incidentAttachment.setAttachmentType("2");
+                    incidentAttachment.setAttachmentTitle(incidentAttachmentDTO.getName());
+                    incidentAttachment.setAttachmentUrl(incidentAttachmentDTO.getUrl());
+                    incidentAttachment.setSortNo(i);
+                    incidentAttachment.setCreateBy(subject);
+                    incidentAttachment.setCreateTime(new Date());
+                    incidentAttachmentService.insert(incidentAttachment);
+                }
+                //启动督查,下发第一步任务
+                if(StringUtils.isNotEmpty(incident.getStepOrgId())) {
+                    IncidentStep incidentStep = new IncidentStep();
+                    incidentStep.setId(UUID.randomUUID().toString());
+                    incidentStep.setIncidentId(incident.getId());
+                    incidentStep.setOrgId(incident.getStepOrgId());
+                    incidentStep.setWarnTime(incident.getStepWarnTime());
+//                    incidentStep.setContent(incident.getStepContent());
+                    incidentStep.setCreateBy(subject);
+                    incidentStep.setCreateTime(new Date());
+                    incidentStepService.insert(incidentStep);
+                }
+
+                msgResult.setResult(true);
+                msgResult.setData(incident);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Incident> edit(@PathVariable("id") String id){
+        MessageResult<Incident> msgResult = new MessageResult<>();
+
+        try {
+            //督办事件
+            Incident incident = incidentService.get(id);
+            DataDictionary dataDictionary = dataDictionaryService.findByCatalogNameAndValue("督办类型",incident.getCaseType());
+            if(dataDictionary != null)
+                incident.setCaseTypeName(dataDictionary.getName());
+            dataDictionary = dataDictionaryService.findByCatalogNameAndValue("领导批示类型",incident.getInstructionsType());
+            if(dataDictionary != null)
+                incident.setInstructionsName(dataDictionary.getName());
+            //附件列表
+            List<IncidentAttachment> incidentAttachmentList1 = incidentAttachmentService.findListByIncidentId(id,"1");
+            List<IncidentAttachmentDTO> incidentAttachmentDTOList1 = new ArrayList<>();
+            for(IncidentAttachment incidentAttachment : incidentAttachmentList1){
+                IncidentAttachmentDTO incidentAttachmentDTO = new IncidentAttachmentDTO();
+                incidentAttachmentDTO.setName(incidentAttachment.getAttachmentTitle());
+                incidentAttachmentDTO.setUrl(incidentAttachment.getAttachmentUrl());
+                incidentAttachmentDTOList1.add(incidentAttachmentDTO);
+            }
+            incident.setAttList(incidentAttachmentDTOList1);
+            //图片列表
+            List<IncidentAttachment> incidentAttachmentList2 = incidentAttachmentService.findListByIncidentId(id,"2");
+            List<IncidentAttachmentDTO> incidentAttachmentDTOList2 = new ArrayList<>();
+            String[] picUrlList = new String[incidentAttachmentList2.size()];
+            for(int i=0;i<incidentAttachmentList2.size();i++){
+                IncidentAttachment incidentAttachment = incidentAttachmentList2.get(i);
+                IncidentAttachmentDTO incidentAttachmentDTO = new IncidentAttachmentDTO();
+                incidentAttachmentDTO.setName(incidentAttachment.getAttachmentTitle());
+                incidentAttachmentDTO.setUrl(incidentAttachment.getAttachmentUrl());
+                incidentAttachmentDTOList2.add(incidentAttachmentDTO);
+                picUrlList[i] = incidentAttachment.getAttachmentUrl();
+            }
+            incident.setPicList(incidentAttachmentDTOList2);
+            incident.setPicUrlList(picUrlList);
+            //首次步进
+            List<IncidentStep> incidentStepList = incidentStepService.findListByIncidentId(id);
+            if(incidentStepList.size() > 0) {
+                for(IncidentStep incidentStep : incidentStepList){
+                    Organization organization = organizationService.get(incidentStep.getOrgId());
+                    incidentStep.setOrgName(organization.getName());
+                }
+                incident.setIncidentStepList(incidentStepList);
+                incident.setStepId(incidentStepList.get(0).getId());
+                incident.setStepOrgId(incidentStepList.get(0).getOrgId());
+                incident.setStepWarnTime(incidentStepList.get(incidentStepList.size()-1).getWarnTime());
+                incident.setStepContent(incidentStepList.get(0).getContent());
+
+                Organization organization = organizationService.get(incident.getStepOrgId());
+                incident.setStepOrgName(organization.getName());
+            }
+
+            if (incident != null) {
+                msgResult.setResult(true);
+                msgResult.setData(incident);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<Incident> update(@RequestBody Incident incident,@RequestAttribute String subject){
+        MessageResult<Incident> msgResult = new MessageResult<>();
+
+        try {
+            incident.setUpdateBy(subject);
+            incident.setUpdateTime(new Date());
+            
+            int affectCount = incidentService.update(incident);
+
+            if (affectCount > 0) {
+                //删除关联附件及图片
+                List<IncidentAttachment> incidentAttachmentList = incidentAttachmentService.findListByIncidentId(incident.getId(),null);
+                for(IncidentAttachment incidentAttachment : incidentAttachmentList){
+                    incidentAttachmentService.delete(incidentAttachment.getId());
+                }
+                //重新关联附件
+                for(int i=0;i<incident.getAttList().size();i++){
+                    IncidentAttachmentDTO incidentAttachmentDTO = incident.getAttList().get(i);
+                    IncidentAttachment incidentAttachment = new IncidentAttachment();
+                    incidentAttachment.setId(UUID.randomUUID().toString());
+                    incidentAttachment.setIncidentId(incident.getId());
+                    incidentAttachment.setAttachmentType("1");
+                    incidentAttachment.setAttachmentTitle(incidentAttachmentDTO.getName());
+                    incidentAttachment.setAttachmentUrl(incidentAttachmentDTO.getUrl());
+                    incidentAttachment.setSortNo(i);
+                    incidentAttachment.setCreateBy(subject);
+                    incidentAttachment.setCreateTime(new Date());
+                    incidentAttachmentService.insert(incidentAttachment);
+                }
+                //重新关联图片
+                for(int i=0;i<incident.getPicList().size();i++){
+                    IncidentAttachmentDTO incidentAttachmentDTO = incident.getPicList().get(i);
+                    IncidentAttachment incidentAttachment = new IncidentAttachment();
+                    incidentAttachment.setId(UUID.randomUUID().toString());
+                    incidentAttachment.setIncidentId(incident.getId());
+                    incidentAttachment.setAttachmentType("2");
+                    incidentAttachment.setAttachmentTitle(incidentAttachmentDTO.getName());
+                    incidentAttachment.setAttachmentUrl(incidentAttachmentDTO.getUrl());
+                    incidentAttachment.setSortNo(i);
+                    incidentAttachment.setCreateBy(subject);
+                    incidentAttachment.setCreateTime(new Date());
+                    incidentAttachmentService.insert(incidentAttachment);
+                }
+                //启动督查,下发第一步任务
+                if(StringUtils.isNotEmpty(incident.getStepId())) {
+                    IncidentStep incidentStep = incidentStepService.get(incident.getStepId());
+                    incidentStep.setOrgId(incident.getStepOrgId());
+                    incidentStep.setWarnTime(incident.getStepWarnTime());
+//                    incidentStep.setContent(incident.getStepContent());
+                    incidentStepService.update(incidentStep);
+                }
+
+                msgResult.setResult(true);
+                msgResult.setData(incident);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="督办处置")
+    @PostMapping("nextStep")
+    public MessageResult<Incident> nextStep(@RequestBody Incident incident, @RequestAttribute String subject){
+        MessageResult<Incident> msgResult = new MessageResult<>();
+
+        try {
+            //更新当前最后一条的督办记录的处置记录
+            IncidentStep incidentStep = incident.getIncidentStepList().get(incident.getIncidentStepList().size() - 1);
+            incidentStep.setContent(incident.getSubContent());
+            incidentStep.setUpdateBy(subject);
+            incidentStep.setUpdateTime(new Date());
+            incidentStepService.update(incidentStep);
+
+            if(incident.getSubWayType().equals("0")){
+                //督办事件办结
+                incident.setIsFinished("0");
+                incident.setUpdateBy(subject);
+                incident.setUpdateTime(new Date());
+                incidentService.update(incident);
+            }
+            else{
+                //督办事件进入下一步
+                IncidentStep incidentStepNext = new IncidentStep();
+                incidentStepNext.setId(UUID.randomUUID().toString());
+                incidentStepNext.setIncidentId(incident.getId());
+                incidentStepNext.setOrgId(incident.getSubOrgId());
+                incidentStepNext.setWarnTime(incident.getSubWarnTime());
+                incidentStepNext.setCreateBy(subject);
+                incidentStepNext.setCreateTime(new Date());
+                incidentStepService.insert(incidentStepNext);
+            }
+
+            msgResult.setResult(true);
+            msgResult.setData(incident);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Incident incident = incidentService.get(id);
+            incident.setDelFlag(true);
+            incident.setUpdateBy(subject);
+            incident.setUpdateTime(new Date());
+
+            int affectCount = incidentService.update(incident);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Incident incident = incidentService.get(id);
+                incident.setDelFlag(true);
+                incident.setUpdateBy(subject);
+                incident.setUpdateTime(new Date());
+
+                affectCount += incidentService.update(incident);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String title, String caseType, String isFinished,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
+
+        if (StringUtils.isNotEmpty(title)) {
+            searchParams.put("title","%" + title + "%");
+        }
+        if (StringUtils.isNotEmpty(caseType)) {
+            searchParams.put("caseType",caseType);
+        }
+        if (StringUtils.isNotEmpty(isFinished)) {
+            searchParams.put("isFinished",isFinished);
+        }
+
+        Page<Incident> page = incidentService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+        for(Incident incident : page.getResult()){
+            DataDictionary dataDictionary = dataDictionaryService.findByCatalogNameAndValue("督办类型",incident.getCaseType());
+            if(dataDictionary != null)
+                incident.setCaseTypeName(dataDictionary.getName());
+            dataDictionary = dataDictionaryService.findByCatalogNameAndValue("督查事件步骤",incident.getIsFinished());
+            if(dataDictionary != null)
+                incident.setIsFinishedName(dataDictionary.getName());
+
+            List<IncidentStep> incidentStepList = incidentStepService.findListByIncidentId(incident.getId());
+            incident.setIncidentStepSize(incidentStepList.size());
+        }
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 225 - 0
web/src/main/java/com/jpsoft/supervision/modules/base/controller/PersonController.java

@@ -0,0 +1,225 @@
+package com.jpsoft.supervision.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.supervision.modules.common.utils.PojoUtils;
+import com.jpsoft.supervision.modules.common.dto.Sort;
+import com.jpsoft.supervision.modules.common.dto.MessageResult;
+import com.jpsoft.supervision.modules.base.entity.Person;
+import com.jpsoft.supervision.modules.base.service.PersonService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/base/person")
+@Api(description = "person")
+public class PersonController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private PersonService personService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<Person> create(){
+        MessageResult<Person> msgResult = new MessageResult<>();
+
+        Person person = new Person();
+
+        msgResult.setData(person);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<Person> add(@RequestBody Person person,@RequestAttribute String subject){
+        MessageResult<Person> msgResult = new MessageResult<>();
+
+        try {
+            person.setId(UUID.randomUUID().toString());
+            person.setDelFlag(false);
+            person.setCreateBy(subject);
+            person.setCreateTime(new Date());
+            
+            int affectCount = personService.insert(person);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(person);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Person> edit(@PathVariable("id") String id){
+        MessageResult<Person> msgResult = new MessageResult<>();
+
+        try {
+            Person person = personService.get(id);
+
+            if (person != null) {
+                msgResult.setResult(true);
+                msgResult.setData(person);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<Person> update(@RequestBody Person person,@RequestAttribute String subject){
+        MessageResult<Person> msgResult = new MessageResult<>();
+
+        try {
+            person.setUpdateBy(subject);
+            person.setUpdateTime(new Date());
+            
+            int affectCount = personService.update(person);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(person);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Person person = personService.get(id);
+            person.setDelFlag(true);
+            person.setUpdateBy(subject);
+            person.setUpdateTime(new Date());
+
+            int affectCount = personService.update(person);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Person person = personService.get(id);
+                person.setDelFlag(true);
+                person.setUpdateBy(subject);
+                person.setUpdateTime(new Date());
+
+                affectCount += personService.update(person);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<Person> page = personService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 5 - 4
web/src/main/java/com/jpsoft/supervision/modules/common/controller/fileUploadController.java

@@ -33,12 +33,13 @@ public class fileUploadController {
         MessageResult<Map> messageResult = new MessageResult<>();
 
         try {
-            String rawFileUrl = OSSUtil.upload(ossConfig,"/" + subFolder,photoFile.getOriginalFilename(),photoFile.getInputStream());
-            String signedFileUrl = OSSUtil.generatePresignedUrl(ossConfig,rawFileUrl,3600, 1024);
+            String fileName = photoFile.getOriginalFilename();
+            String rawFileUrl = OSSUtil.upload(ossConfig,"/" + subFolder,fileName,photoFile.getInputStream());
+//            String signedFileUrl = OSSUtil.generatePresignedUrl(ossConfig,rawFileUrl,3600, 1024);
 
             Map<String,Object> dataMap = new HashMap<>();
-            dataMap.put("rawFileUrl", rawFileUrl);
-            dataMap.put("signedFileUrl", signedFileUrl);
+            dataMap.put("fileName", fileName);
+            dataMap.put("fileUrl", rawFileUrl);
 
             messageResult.setResult(true);
             messageResult.setData(dataMap);