企业端-小程序接口和调试修改
This commit is contained in:
parent
5c92503fb8
commit
ee27b103d1
|
|
@ -28,11 +28,13 @@ public interface EntPostTaskMapper extends BaseMapper<EntPostTask> {
|
||||||
* @param listId 清单id
|
* @param listId 清单id
|
||||||
* @param content 内容模糊搜索
|
* @param content 内容模糊搜索
|
||||||
* @param taskState 任务状态
|
* @param taskState 任务状态
|
||||||
|
* @param postListId 用户要务id
|
||||||
* @return EntPostTask 企业用户清单任务
|
* @return EntPostTask 企业用户清单任务
|
||||||
* */
|
* */
|
||||||
List<EntPostTask>selectEntUserPostTask(@Param("enterpriseId") String enterpriseId, @Param("entUserId")String entUserId,
|
List<EntPostTask>selectEntUserPostTask(@Param("enterpriseId") String enterpriseId, @Param("entUserId")String entUserId,
|
||||||
@Param("postId")String postId, @Param("listId")String listId,
|
@Param("postId")String postId, @Param("listId")String listId,
|
||||||
@Param("content")String content,@Param("taskState") Integer taskState);
|
@Param("content")String content,@Param("taskState") Integer taskState,
|
||||||
|
@Param("postListId")String postListId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -80,4 +82,20 @@ public interface EntPostTaskMapper extends BaseMapper<EntPostTask> {
|
||||||
* @param userId 用户id
|
* @param userId 用户id
|
||||||
* */
|
* */
|
||||||
int deleteEntPostTaskList(String userId);
|
int deleteEntPostTaskList(String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证履职是否完成
|
||||||
|
* @param entPostTaskId
|
||||||
|
* @return EntPostTask
|
||||||
|
* */
|
||||||
|
EntPostTask verifyCompletion(String entPostTaskId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改工作要务完成状态
|
||||||
|
* @param entPostTaskId
|
||||||
|
* @return int
|
||||||
|
* */
|
||||||
|
int updateTaskState(String entPostTaskId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.rzyc.mapper.check;
|
||||||
import com.rzyc.bean.bigdata.GetBookEntHT;
|
import com.rzyc.bean.bigdata.GetBookEntHT;
|
||||||
import com.rzyc.bean.check.DangerExport;
|
import com.rzyc.bean.check.DangerExport;
|
||||||
import com.rzyc.bean.index.AreaDangerNum;
|
import com.rzyc.bean.index.AreaDangerNum;
|
||||||
|
import com.rzyc.model.DangerStatistic;
|
||||||
import com.rzyc.model.check.BookEntHT;
|
import com.rzyc.model.check.BookEntHT;
|
||||||
import com.rzyc.model.check.BookEntHTExample;
|
import com.rzyc.model.check.BookEntHTExample;
|
||||||
import com.rzyc.model.check.DangerCount;
|
import com.rzyc.model.check.DangerCount;
|
||||||
|
|
@ -150,7 +151,7 @@ public interface BookEntHTMapper {
|
||||||
@Param("areaCode") String areaCode,
|
@Param("areaCode") String areaCode,
|
||||||
@Param("htstate") String htstate);
|
@Param("htstate") String htstate);
|
||||||
|
|
||||||
List<BookEntHT>dangerDetailByCompanyId(String SysEnterpriseId);
|
List<BookEntHT>dangerDetailByCompanyId(@Param("SysEnterpriseId") String SysEnterpriseId,@Param("htState")String htState);
|
||||||
|
|
||||||
List<BookEntHT>dangerListRecord(@Param("title") String title,
|
List<BookEntHT>dangerListRecord(@Param("title") String title,
|
||||||
@Param("entName")String entName,
|
@Param("entName")String entName,
|
||||||
|
|
@ -266,4 +267,11 @@ public interface BookEntHTMapper {
|
||||||
/*约谈*/
|
/*约谈*/
|
||||||
Integer lawState(@Param("bookEntHTId") String bookEntHTId);
|
Integer lawState(@Param("bookEntHTId") String bookEntHTId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业隐患统计
|
||||||
|
* @param enterpriseId 企业id
|
||||||
|
* @return DangerStatistic 隐患统计对象
|
||||||
|
* */
|
||||||
|
DangerStatistic selectHalfAYearEntDangerStatistics(String enterpriseId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.rzyc.model;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隐患数统计
|
||||||
|
* @author xuwanxin
|
||||||
|
* @date 2022/12/9
|
||||||
|
* */
|
||||||
|
@ApiModel("企业隐患统计")
|
||||||
|
public class DangerStatistic {
|
||||||
|
|
||||||
|
@ApiModelProperty("整改中")
|
||||||
|
private long underRectification;
|
||||||
|
|
||||||
|
@ApiModelProperty("未整改")
|
||||||
|
private long notRectified;
|
||||||
|
|
||||||
|
@ApiModelProperty("已整改")
|
||||||
|
private long rectified;
|
||||||
|
|
||||||
|
public long getUnderRectification() {
|
||||||
|
return underRectification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnderRectification(long underRectification) {
|
||||||
|
this.underRectification = underRectification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getNotRectified() {
|
||||||
|
return notRectified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNotRectified(long notRectified) {
|
||||||
|
this.notRectified = notRectified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getRectified() {
|
||||||
|
return rectified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRectified(long rectified) {
|
||||||
|
this.rectified = rectified;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,8 @@ import java.util.Date;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
@ -71,6 +73,7 @@ public class EntPostListDetail implements Serializable {
|
||||||
@TableField("IsFinish")
|
@TableField("IsFinish")
|
||||||
private String IsFinish;
|
private String IsFinish;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "完成时间")
|
@ApiModelProperty(value = "完成时间")
|
||||||
@TableField("FinishTime")
|
@TableField("FinishTime")
|
||||||
private Date FinishTime;
|
private Date FinishTime;
|
||||||
|
|
@ -79,6 +82,10 @@ public class EntPostListDetail implements Serializable {
|
||||||
@TableField("del_state")
|
@TableField("del_state")
|
||||||
private Integer delState;
|
private Integer delState;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "履职任务名")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String itemTitle;
|
||||||
|
|
||||||
@TableField("CreatedOn")
|
@TableField("CreatedOn")
|
||||||
private Date CreatedOn;
|
private Date CreatedOn;
|
||||||
|
|
||||||
|
|
@ -91,6 +98,14 @@ public class EntPostListDetail implements Serializable {
|
||||||
@TableField("ModifiedBy")
|
@TableField("ModifiedBy")
|
||||||
private String ModifiedBy;
|
private String ModifiedBy;
|
||||||
|
|
||||||
|
public String getItemTitle() {
|
||||||
|
return itemTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemTitle(String itemTitle) {
|
||||||
|
this.itemTitle = itemTitle;
|
||||||
|
}
|
||||||
|
|
||||||
public String getListDetailId() {
|
public String getListDetailId() {
|
||||||
return ListDetailId;
|
return ListDetailId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,18 @@ public class EntPostTask implements Serializable {
|
||||||
@TableField("modify_by")
|
@TableField("modify_by")
|
||||||
private String modifyBy;
|
private String modifyBy;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "履职次数")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer numberOfDutyPerformance;
|
||||||
|
|
||||||
|
public Integer getNumberOfDutyPerformance() {
|
||||||
|
return numberOfDutyPerformance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumberOfDutyPerformance(Integer numberOfDutyPerformance) {
|
||||||
|
this.numberOfDutyPerformance = numberOfDutyPerformance;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTaskId() {
|
public String getTaskId() {
|
||||||
return taskId;
|
return taskId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,14 @@ import java.util.Date;
|
||||||
* */
|
* */
|
||||||
public class EntPostListDetailDto {
|
public class EntPostListDetailDto {
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "履职记录id")
|
@ApiModelProperty(value = "履职记录id")
|
||||||
private String ListDetailId;
|
private String ListDetailId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "履职清单id")
|
@ApiModelProperty(value = "履职清单id")
|
||||||
private String ListFactorId;
|
private String ListFactorId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户id")
|
@ApiModelProperty(value = "公司用户id")
|
||||||
private String SysUserId;
|
private String SysUserId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "工作摘要")
|
@ApiModelProperty(value = "工作摘要")
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,23 @@ public class EntUserPostTaskDto {
|
||||||
@ApiModelProperty(value = "任务状态")
|
@ApiModelProperty(value = "任务状态")
|
||||||
Integer taskState;
|
Integer taskState;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户要务id")
|
||||||
|
String postListId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "页码")
|
@ApiModelProperty(value = "页码")
|
||||||
Integer page;
|
Integer page;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "条数")
|
@ApiModelProperty(value = "条数")
|
||||||
Integer pageSize;
|
Integer pageSize;
|
||||||
|
|
||||||
|
public String getPostListId() {
|
||||||
|
return postListId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPostListId(String postListId) {
|
||||||
|
this.postListId = postListId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getEnterpriseId() {
|
public String getEnterpriseId() {
|
||||||
return enterpriseId;
|
return enterpriseId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
<result column="CreatedBy" property="CreatedBy" />
|
<result column="CreatedBy" property="CreatedBy" />
|
||||||
<result column="ModifiedOn" property="ModifiedOn" />
|
<result column="ModifiedOn" property="ModifiedOn" />
|
||||||
<result column="ModifiedBy" property="ModifiedBy" />
|
<result column="ModifiedBy" property="ModifiedBy" />
|
||||||
|
<result column="item_title" property="itemTitle"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
|
|
@ -30,7 +31,9 @@
|
||||||
ListDetailId, ListFactorId, SysUserId, WorkTitle, WorkCnt, WorkFile, StartTime, EndTime, OTCType, OTCId, enterprise_id, ent_post_task_id, IsFinish, FinishTime, del_state, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy
|
ListDetailId, ListFactorId, SysUserId, WorkTitle, WorkCnt, WorkFile, StartTime, EndTime, OTCType, OTCId, enterprise_id, ent_post_task_id, IsFinish, FinishTime, del_state, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectListDetail" resultMap="BaseResultMap">
|
<select id="selectListDetail" resultMap="BaseResultMap">
|
||||||
select * from ent_post_list_detail where SysUserId = #{userId}
|
select epld.*,ept.item_title from ent_post_list_detail epld
|
||||||
|
left join ent_post_task ept on epld.ent_post_task_id = ept.task_id
|
||||||
|
where SysUserId = #{userId}
|
||||||
<if test="null != postListId and '' != postListId">
|
<if test="null != postListId and '' != postListId">
|
||||||
and ListFactorId = #{postListId}
|
and ListFactorId = #{postListId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectEntPostList" resultMap="BaseResultMap">
|
<select id="selectEntPostList" resultMap="BaseResultMap">
|
||||||
select epl.*,sum(case when task_state = 2 then 1 else 0 end)as finishCount from ent_post_list epl left join ent_post_task ept on epl.post_list_id = ept.post_list_id
|
select epl.*,count(ListDetailId)as finishCount from ent_post_list epl
|
||||||
|
left join ent_post_list_detail epld on epl.post_list_id = epld.ListFactorId
|
||||||
where epl.enterprise_id = #{enterpriseId} and epl.ent_user_id = #{entUserId}
|
where epl.enterprise_id = #{enterpriseId} and epl.ent_user_id = #{entUserId}
|
||||||
<if test="null != finishedState and '' != finishedState">
|
<if test="null != finishedState and '' != finishedState">
|
||||||
and epl.finish_state = #{finishedState}
|
and epl.finish_state = #{finishedState}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
task_id, post_id, ent_user_id, enterprise_id, ent_list_id, list_id, post_list_id, item_title, item_content, start_time, ent_time, task_state, frequency, del_state, create_time, create_by, modify_time, modify_by
|
task_id, post_id, ent_user_id, enterprise_id, ent_list_id, list_id, post_list_id, item_title, item_content, start_time, ent_time, task_state, frequency, del_state, create_time, create_by, modify_time, modify_by
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteEntPostTaskList">
|
<delete id="deleteEntPostTaskList">
|
||||||
delete from ent_post_task where ent_user_id = #{entUserId}
|
delete from ent_post_task where ent_user_id = #{entUserId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
@ -50,6 +51,9 @@
|
||||||
<if test="null != taskState and '' != taskState">
|
<if test="null != taskState and '' != taskState">
|
||||||
and task_state = #{taskState}
|
and task_state = #{taskState}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != postListId and '' != postListId">
|
||||||
|
and post_list_id = #{postListId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectEntUserPostTaskByListId" resultMap="BaseResultMap">
|
<select id="selectEntUserPostTaskByListId" resultMap="BaseResultMap">
|
||||||
|
|
@ -132,6 +136,16 @@
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="verifyCompletion" resultType="com.rzyc.model.EntPostTask">
|
||||||
|
select ept.frequency,count(epld.ListDetailId)as numberOfDutyPerformance from ent_post_task ept
|
||||||
|
left join ent_post_list_detail epld on ept.task_id = epld.ent_post_task_id
|
||||||
|
where ent_post_task_id = #{entPostTaskId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateTaskState">
|
||||||
|
update ent_post_task set task_state = 2 where ent_post_task_id = #{entPostTaskId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1301,6 +1301,9 @@
|
||||||
|
|
||||||
<select id="dangerDetailByCompanyId" resultMap="EntHTListResultMap">
|
<select id="dangerDetailByCompanyId" resultMap="EntHTListResultMap">
|
||||||
select * from BookEntHT bt where SysEnterpriseId = #{SysEnterpriseId}
|
select * from BookEntHT bt where SysEnterpriseId = #{SysEnterpriseId}
|
||||||
|
<if test="null != htState and '' != htState">
|
||||||
|
and HTState = #{htState}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="dangerListRecord" resultMap="BaseResultMap">
|
<select id="dangerListRecord" resultMap="BaseResultMap">
|
||||||
|
|
@ -1688,7 +1691,8 @@
|
||||||
ORDER BY so.org_type asc,so.`OrgCode` ASC
|
ORDER BY so.org_type asc,so.`OrgCode` ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--约谈-->
|
|
||||||
|
<!--约谈-->
|
||||||
<update id="talkState">
|
<update id="talkState">
|
||||||
UPDATE `bookentht` SET talk_state = 2 WHERE BookEntHTId = #{bookEntHTId}
|
UPDATE `bookentht` SET talk_state = 2 WHERE BookEntHTId = #{bookEntHTId}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -1698,5 +1702,10 @@
|
||||||
UPDATE `bookentht` SET law_state = 2 WHERE BookEntHTId = #{bookEntHTId}
|
UPDATE `bookentht` SET law_state = 2 WHERE BookEntHTId = #{bookEntHTId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="selectHalfAYearEntDangerStatistics" resultType="com.rzyc.model.DangerStatistic">
|
||||||
|
select sum(case when HTState = '整改中' then 1 else 0 end ) as underRectification,sum(case when HTState = '已整改' then 1 else 0 end )as rectified,sum(case when HTState = '未整改' then 1 else 0 end ) as notRectified from bookentht
|
||||||
|
where CreatedOn between date_sub(now(),interval 6 month) and now() and SysEnterpriseId = #{enterpriseId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1424,6 +1424,483 @@ public class BaseController {
|
||||||
return oaTaskTimes;
|
return oaTaskTimes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回复推送消息
|
||||||
|
*/
|
||||||
|
public class SendMessage implements Runnable{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送者用户id
|
||||||
|
*/
|
||||||
|
private String sysUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收者用户id
|
||||||
|
*/
|
||||||
|
private String receiveId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业id
|
||||||
|
*/
|
||||||
|
private String enterpriseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送类型 :
|
||||||
|
* 1->新增隐患
|
||||||
|
* 2:法人审核隐患整改情况
|
||||||
|
* 3:隐患分配整改人员
|
||||||
|
* 4:授权签名
|
||||||
|
* 5:隐患完成整改
|
||||||
|
* 6:推送任务
|
||||||
|
* 7:履职提醒
|
||||||
|
* 8:推送履职任务
|
||||||
|
* 9:推送履职任务
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务级别 1:安办 2:部门
|
||||||
|
*/
|
||||||
|
private String tasklevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隐患id
|
||||||
|
*/
|
||||||
|
private String bookEntHtId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送内容
|
||||||
|
*/
|
||||||
|
private String sendMsg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到企业端检查通知
|
||||||
|
* @param enterpriseId
|
||||||
|
*/
|
||||||
|
public SendMessage(Integer type,String sendMsg, String enterpriseId) {
|
||||||
|
this.sendMsg = sendMsg;
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隐患推送构造方法
|
||||||
|
* @param receiveId
|
||||||
|
* @param type
|
||||||
|
* @param bookEntHtId
|
||||||
|
*/
|
||||||
|
public SendMessage(String receiveId, Integer type, String bookEntHtId) {
|
||||||
|
this.receiveId = receiveId;
|
||||||
|
this.type = type;
|
||||||
|
this.bookEntHtId = bookEntHtId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendMessage(String sysUserId, String receiveId, Integer type, String sendMsg) {
|
||||||
|
this.sysUserId = sysUserId;
|
||||||
|
this.receiveId = receiveId;
|
||||||
|
this.type = type;
|
||||||
|
this.sendMsg = sendMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendMessage(String sysUserId, String receiveId, String enterpriseId, Integer type, String tasklevel) {
|
||||||
|
this.sysUserId = sysUserId;
|
||||||
|
this.receiveId = receiveId;
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
this.type = type;
|
||||||
|
this.tasklevel = tasklevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendMessage(String sysUserId, String receiveId, String enterpriseId, Integer type) {
|
||||||
|
this.sysUserId = sysUserId;
|
||||||
|
this.receiveId = receiveId;
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendMessage(String sysUserId, String enterpriseId, Integer type) {
|
||||||
|
this.sysUserId = sysUserId;
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendMessage() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
|
||||||
|
//分配隐患人员推送
|
||||||
|
if(1 == type){
|
||||||
|
sendDangerMsg(enterpriseId,sysUserId);
|
||||||
|
}else if(2 == type){
|
||||||
|
sendexamineDangerMsg(enterpriseId,sysUserId);
|
||||||
|
}else if(3 == type){
|
||||||
|
handelDanger(sysUserId,receiveId);
|
||||||
|
}else if(4 == type){
|
||||||
|
autographAuth(sysUserId,receiveId);
|
||||||
|
}else if(5 == type){
|
||||||
|
completeRectification(receiveId,enterpriseId);
|
||||||
|
}else if(6 == type){
|
||||||
|
sendTask(receiveId,sysUserId,tasklevel);
|
||||||
|
}else if(7 == type){
|
||||||
|
sendFactorMsg(receiveId,sysUserId,sendMsg);
|
||||||
|
}else if(8 == type){
|
||||||
|
changeDanger(receiveId,bookEntHtId);
|
||||||
|
}else if(9 == type){
|
||||||
|
sendCheckMsg(enterpriseId,sendMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到企业端检查通知
|
||||||
|
* @param enterpriseId
|
||||||
|
* @param sendMsg
|
||||||
|
*/
|
||||||
|
public void sendCheckMsg(String enterpriseId,String sendMsg){
|
||||||
|
try {
|
||||||
|
//推送别名
|
||||||
|
String alias = "";
|
||||||
|
//获取企业端法人账号
|
||||||
|
SysUser sysUser = sysUserMapper.findByEntId(enterpriseId);
|
||||||
|
if(null != sysUser){
|
||||||
|
alias = MD5.md5(sysUser.getSysuserid());
|
||||||
|
}
|
||||||
|
//如果别名不为空 则推送消息
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
|
||||||
|
String content = sendMsg;
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","6");//跳转企业端通知页面
|
||||||
|
|
||||||
|
Jpush.sendAllNotifications(alias,content,map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送履职任务
|
||||||
|
* @param receiveId
|
||||||
|
*/
|
||||||
|
private void changeDanger(String receiveId,String bookEntHtId){
|
||||||
|
try {
|
||||||
|
String alias = "";
|
||||||
|
String [] strs = receiveId.split(",");
|
||||||
|
for (String str : strs){
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
alias += ","+MD5.md5(str);
|
||||||
|
}else{
|
||||||
|
alias = MD5.md5(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String content = "你提交的隐患信息已提交整改资料,请到隐患详情查看整改资料,并闭环。";
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","5");//调整到隐患详情
|
||||||
|
map.put("bookEntHtId",bookEntHtId);//隐患id
|
||||||
|
|
||||||
|
Jpush.sendGovAllNotifications(alias,content,map);
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 履职任务
|
||||||
|
* @param receiveId
|
||||||
|
* @param sendId
|
||||||
|
* @param sendMsg
|
||||||
|
*/
|
||||||
|
private void sendFactorMsg(String receiveId,String sendId,String sendMsg){
|
||||||
|
try {
|
||||||
|
SysUser sysUser = sysUserMapper.selectByPrimaryKey(sendId);
|
||||||
|
if(null != sysUser){
|
||||||
|
String alias = "";
|
||||||
|
String [] strs = receiveId.split(",");
|
||||||
|
for (String str : strs){
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
alias += ","+MD5.md5(str);
|
||||||
|
}else{
|
||||||
|
alias = MD5.md5(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String content = sendMsg;
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","4");//跳转到履职列表
|
||||||
|
|
||||||
|
Jpush.sendGovAllNotifications(alias,content,map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增任务推送
|
||||||
|
* @param receiveId
|
||||||
|
* @param sendId
|
||||||
|
* @param taskLevel
|
||||||
|
*/
|
||||||
|
private void sendTask(String receiveId,String sendId,String taskLevel){
|
||||||
|
try {
|
||||||
|
SysUser sysUser = sysUserMapper.selectByPrimaryKey(sendId);
|
||||||
|
if(null != sysUser){
|
||||||
|
String alias = "";
|
||||||
|
String [] strs = receiveId.split(",");
|
||||||
|
for (String str : strs){
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
alias += ","+MD5.md5(str);
|
||||||
|
}else{
|
||||||
|
alias = MD5.md5(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String sendUserName = "安办:";
|
||||||
|
|
||||||
|
if("1".equals(taskLevel)){
|
||||||
|
sendUserName += sysUser.getChinaname() + ",发布了新任务,请查看。";
|
||||||
|
}else if("2".equals(taskLevel)){
|
||||||
|
String unitName = this.getUnitName(sysUser.getSysuserid());
|
||||||
|
|
||||||
|
sendUserName = unitName+":"+sysUser.getChinaname() + ",发布了新任务,请查看。";
|
||||||
|
}
|
||||||
|
|
||||||
|
String content = sendUserName;
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","3");//跳转到隐患列表
|
||||||
|
|
||||||
|
Jpush.sendGovAllNotifications(alias,content,map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成整改
|
||||||
|
*/
|
||||||
|
private void completeRectification(String receiveId,String enterpriseId){
|
||||||
|
try {
|
||||||
|
String alias = "";
|
||||||
|
String [] strs = receiveId.split(",");
|
||||||
|
for (String str : strs){
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
alias += ","+MD5.md5(str);
|
||||||
|
}else{
|
||||||
|
alias = MD5.md5(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String compamyName = "企业";
|
||||||
|
SysEnterprise sysEnterprise =sysEnterpriseMapper.selectByPrimaryKey(enterpriseId);
|
||||||
|
if(null != sysEnterprise){
|
||||||
|
compamyName = sysEnterprise.getEntname();
|
||||||
|
}
|
||||||
|
String content = compamyName+"的隐患已完成整改";
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","1");//跳转到隐患列表
|
||||||
|
|
||||||
|
Jpush.sendGovAllNotifications(alias,content,map);
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送隐患消息
|
||||||
|
* @param enterpriseId
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void sendDangerMsg(String enterpriseId,String sysUserId){
|
||||||
|
try {
|
||||||
|
//推送别名
|
||||||
|
String alias = "";
|
||||||
|
//获取企业端法人账号
|
||||||
|
SysUser sysUser = sysUserMapper.findByEntId(enterpriseId);
|
||||||
|
if(null != sysUser){
|
||||||
|
alias = MD5.md5(sysUser.getSysuserid());
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取企业非法人账号别名
|
||||||
|
List<SysEntUser> sysEntUsers = sysEntUserMapper.entUser(enterpriseId);
|
||||||
|
if(null != sysEntUsers && sysEntUsers.size() > 0){
|
||||||
|
for (SysEntUser sysEntUser : sysEntUsers){
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
alias += ","+MD5.md5(sysEntUser.getSysentuserid());
|
||||||
|
}else{
|
||||||
|
alias += MD5.md5(sysEntUser.getSysentuserid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果别名不为空 则推送消息
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
|
||||||
|
String deptName = this.getUnitName(sysUserId);
|
||||||
|
String content = "收到“"+deptName+"”的隐患整改通知";
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","1");
|
||||||
|
|
||||||
|
Jpush.sendAllNotifications(alias,content,map);
|
||||||
|
}
|
||||||
|
/*SendMessage sendMessage = new SendMessage();
|
||||||
|
sendMessage.run();*/
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业端非法人上传隐患整改资料 推行消息给法人账号
|
||||||
|
* @param enterpriseId
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void sendexamineDangerMsg(String enterpriseId,String sysUserId){
|
||||||
|
try {
|
||||||
|
//推送别名
|
||||||
|
String alias = "";
|
||||||
|
//获取企业端法人账号
|
||||||
|
SysUser sysUser = sysUserMapper.findByEntId(enterpriseId);
|
||||||
|
if(null != sysUser){
|
||||||
|
alias = MD5.md5(sysUser.getSysuserid());
|
||||||
|
}
|
||||||
|
//如果别名不为空 则推送消息
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
|
||||||
|
String content = "收到隐患整改信息,请审核。";
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","1");
|
||||||
|
|
||||||
|
Jpush.sendAllNotifications(alias,content,map);
|
||||||
|
}
|
||||||
|
/*SendMessage sendMessage = new SendMessage();
|
||||||
|
sendMessage.run();*/
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隐患分配人员后 推送消息
|
||||||
|
*/
|
||||||
|
private void handelDanger(String sysUserId,String receiveId){
|
||||||
|
try {
|
||||||
|
//推送别名
|
||||||
|
String alias = "";
|
||||||
|
//获取企业端法人账号
|
||||||
|
SysEntUser sysEntUser = sysEntUserMapper.findById(receiveId);
|
||||||
|
if(null != sysEntUser){
|
||||||
|
alias = MD5.md5(sysEntUser.getSysentuserid());
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果别名不为空 则推送消息
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
|
||||||
|
String content = "收到需整改的隐患,请及时处理。";
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","1");
|
||||||
|
|
||||||
|
Jpush.sendAllNotifications(alias,content,map);
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签名授权通知
|
||||||
|
*/
|
||||||
|
private void autographAuth(String sysUserId,String receiveId){
|
||||||
|
try {
|
||||||
|
if(StringUtils.isNotBlank(receiveId)){
|
||||||
|
String alias = "";
|
||||||
|
String [] strs = receiveId.split(",");
|
||||||
|
for (String str : strs){
|
||||||
|
if(StringUtils.isNotBlank(alias)){
|
||||||
|
alias += ","+MD5.md5(str);
|
||||||
|
}else{
|
||||||
|
alias = MD5.md5(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String deptName = this.getUnitName(sysUserId);
|
||||||
|
String content = deptName+"的安全检查需要授权签名.";
|
||||||
|
//msg.wav
|
||||||
|
Map<String,String> map = new HashMap<String,String>();
|
||||||
|
map.put("type","2");//调整到签名授权页面
|
||||||
|
|
||||||
|
Jpush.sendGovAllNotifications(alias,content,map);
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改企业风险等级
|
||||||
|
* @param companyId
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void changeEntRiskLevel(String companyId)throws Exception{
|
||||||
|
|
||||||
|
|
||||||
|
Integer score = 100;
|
||||||
|
List<BookEntHT> entHts = bookEntHTMapper.notRectifiedDanger(companyId);
|
||||||
|
if(null != entHts && entHts.size() > 0){
|
||||||
|
for (BookEntHT bookEntHT : entHts){
|
||||||
|
if(HtlevelType.MAJOR.getType().equals(bookEntHT.getHtlevel())){
|
||||||
|
score -= 20;
|
||||||
|
}else{
|
||||||
|
score -= 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//风险等级
|
||||||
|
String riskLevel = "重大风险";
|
||||||
|
if (score >= 80) {
|
||||||
|
riskLevel = "低风险";
|
||||||
|
}
|
||||||
|
if (score < 80 & score >= 70) {
|
||||||
|
riskLevel = "一般风险";
|
||||||
|
}
|
||||||
|
if (score < 70 & score >= 60) {
|
||||||
|
riskLevel = "较大风险";
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("score -> " + score + " & riskLevel -> " + riskLevel);
|
||||||
|
sysEnterpriseMapper.chnageScore(companyId,score,riskLevel);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,346 @@
|
||||||
|
package com.rzyc.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.common.utils.*;
|
||||||
|
import com.common.utils.jwt.JwtUtil;
|
||||||
|
import com.common.utils.model.*;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.rzyc.advice.LoginAuth;
|
||||||
|
import com.rzyc.bean.HiddenDanger;
|
||||||
|
import com.rzyc.bean.SysEnterpriseDo;
|
||||||
|
import com.rzyc.bean.check.*;
|
||||||
|
import com.rzyc.bean.check.dto.ListQuotaDto;
|
||||||
|
import com.rzyc.bean.check.dto.ListWorkDto;
|
||||||
|
import com.rzyc.bean.check.dto.WorkPageDto;
|
||||||
|
import com.rzyc.bean.check.vo.WorkPageVo;
|
||||||
|
import com.rzyc.bean.ent.MinCompaniesDto;
|
||||||
|
import com.rzyc.enums.DelState;
|
||||||
|
import com.rzyc.enums.DocumentOtcType;
|
||||||
|
import com.rzyc.enums.FactorType;
|
||||||
|
import com.rzyc.enums.ReportSuperior;
|
||||||
|
import com.rzyc.model.*;
|
||||||
|
import com.rzyc.model.check.*;
|
||||||
|
import com.rzyc.model.ent.*;
|
||||||
|
import com.rzyc.model.user.ListFactor;
|
||||||
|
import com.rzyc.model.user.ListPerform;
|
||||||
|
import com.rzyc.model.user.SysUnit;
|
||||||
|
import com.rzyc.model.user.SysUser;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.beanutils.BeanUtils;
|
||||||
|
import org.apache.commons.beanutils.ConvertUtils;
|
||||||
|
import org.apache.commons.beanutils.converters.DateConverter;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.io.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Api(tags = "小程序")
|
||||||
|
@CrossOrigin("*")
|
||||||
|
@RequestMapping("minWork")
|
||||||
|
@Controller
|
||||||
|
@Validated
|
||||||
|
public class MinWorkController extends BaseController{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序企业自查闭环
|
||||||
|
* @retrun
|
||||||
|
* */
|
||||||
|
@ApiOperation(value = "小程序企业自查闭环", notes = "小程序企业自查闭环")
|
||||||
|
@PostMapping("/companySelfBookEntHTClose")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "htId", value = "隐患id", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "entHtState", value = "隐患状态", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "sysEnterpriseId", value = "企业id", required = false, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "rectifyResult", value = "整改描述", required = false, dataType = "string"),
|
||||||
|
})
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult companySelfBookEntHTClose(String htId,String entHtState,String sysEnterpriseId,String rectifyResult){
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
bookenthtCompanyMapper.updateByKey(htId,entHtState,rectifyResult);
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序企业自查上报隐患
|
||||||
|
* @retrun
|
||||||
|
* */
|
||||||
|
@ApiOperation(value = "小程序企业自查上报隐患", notes = "小程序企业自查上报隐患")
|
||||||
|
@PostMapping("/companySelfBookEntHTSubmit")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "sysEnterpriseId", value = "企业id", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "beCheckedTime", value = "检查时间", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "hiddenArea", value = "隐患问题所在", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "rectifyTime", value = "整改时间", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "htlevel", value = "隐患等级", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "bookEntHTId", value = "主键id", required = true, dataType = "string"),
|
||||||
|
|
||||||
|
})
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult companySelfBookEntHTSubmit(String sysEnterpriseId,String beCheckedTime,String hiddenArea,String rectifyTime,String htlevel,String bookEntHTId){
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
SysEnterprise sysEnterprise = sysEnterpriseMapper.selectByPrimaryKey(sysEnterpriseId);
|
||||||
|
if(null != sysEnterprise){
|
||||||
|
BookEntHT bookEntHT = new BookEntHT();
|
||||||
|
bookEntHT.setBookenthtid(bookEntHTId);
|
||||||
|
bookEntHT.setSysenterpriseid(sysEnterpriseId);
|
||||||
|
bookEntHT.setBecheckedperson(sysEnterprise.getEntname());
|
||||||
|
bookEntHT.setHiddenarea(hiddenArea);
|
||||||
|
bookEntHT.setHtlevel(htlevel);
|
||||||
|
bookEntHT.setBecheckedtime(new Date());
|
||||||
|
bookEntHT.setConfirmtime(DateUtils.parseCalendar2Date(Calendar.getInstance()));
|
||||||
|
bookEntHT.setHtsource("企业自查");
|
||||||
|
bookEntHT.setRectifyperson(sysEnterprise.getLegalrepre());
|
||||||
|
bookEntHT.setRectifytime(DateUtils.parseString2Date(rectifyTime,Constants.DATA_MEET));
|
||||||
|
bookEntHT.setHtstate("整改中");
|
||||||
|
bookEntHT.setCreatedby(sysEnterprise.getEntname());
|
||||||
|
bookEntHT.setCreatedon(new Date());
|
||||||
|
bookEntHT.setModifiedby(sysEnterprise.getEntname());
|
||||||
|
bookEntHT.setModifiedon(new Date());
|
||||||
|
bookenthtCompanyMapper.insert(bookEntHT);
|
||||||
|
// super.addLog(sysUserId,"","BookEntHT",bookEntHtId,"查询",JSONArray.toJSONString(params));
|
||||||
|
}else{
|
||||||
|
singleResult.setCode(Code.EX_PARAM.getCode());
|
||||||
|
singleResult.setMessage(Message.EX_PARAM);
|
||||||
|
}
|
||||||
|
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序企业自查隐患列表
|
||||||
|
* @retrun
|
||||||
|
* */
|
||||||
|
@ApiOperation(value = "小程序企业自查隐患列表", notes = "小程序企业自查隐患列表")
|
||||||
|
@PostMapping("/companySelfBookEntHT")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "HTState", value = "隐患状态", required = false, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "sysEnterpriseId", value = "公司id", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "page", value = "page", required = true, dataType = "int"),
|
||||||
|
@ApiImplicitParam(name = "pageSize", value = "pageSize", required = true, dataType = "int")
|
||||||
|
})
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult companySelfBookEntHT(String HTState,String sysEnterpriseId,Integer page,Integer pageSize) throws Exception {
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
Pager pager = new Pager();
|
||||||
|
PageHelper.startPage(page,pageSize);
|
||||||
|
Page<BookenthtCompany> list = (Page<BookenthtCompany>)bookenthtCompanyMapper.selectCompanySelfList(HTState,sysEnterpriseId);
|
||||||
|
getDatePage(pager,list);
|
||||||
|
singleResult.setData(pager);
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序政府端闭环隐患
|
||||||
|
* */
|
||||||
|
@ApiOperation(value = "小程序政府端闭环隐患", notes = "小程序政府端闭环隐患")
|
||||||
|
@PostMapping("/minProgramDangerClose")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "sysUserId", value = "用户id", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "htId", value = "隐患id", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "entHtState", value = "隐患状态 整改中 已整改 未整改 审核中 ", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "rectifyResult", value = "隐患来源 政府部门", required = true, dataType = "string"),
|
||||||
|
})
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult minProgramDangerClose(String sysUserId,String htId,String entHtState,String rectifyResult,
|
||||||
|
HttpServletRequest httpServletRequest) throws Exception {
|
||||||
|
SingleResult result = new SingleResult();
|
||||||
|
if(StringUtils.isNotBlank(htId)){
|
||||||
|
BookEntHT bookEntHT = bookEntHTMapper.selectByPrimaryKey(htId);
|
||||||
|
if(null != bookEntHT){
|
||||||
|
if(StringUtils.isNotBlank(entHtState) && !("审核中".equals(entHtState))){
|
||||||
|
|
||||||
|
List<String> userIds = this.getCheckUserId(htId);
|
||||||
|
if((null != userIds && userIds.contains(sysUserId)) || StringUtils.isBlank(bookEntHT.getRectifyUserId())){
|
||||||
|
String oldHTState = bookEntHT.getHtstate();
|
||||||
|
|
||||||
|
|
||||||
|
//修改状态为未整改 如果未超期 状态变为 整改中
|
||||||
|
if("未整改".equals(entHtState)){
|
||||||
|
if(Calendar.getInstance().getTimeInMillis() < bookEntHT.getRectifytime().getTime()){
|
||||||
|
entHtState = "整改中";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 如果整改成功 给政府账号推送一个通知
|
||||||
|
* 如果未整改完成 则判断是否分配了整改人员 如果分配了
|
||||||
|
* 则推送一条消息 给整改人
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(entHtState.equals("已整改")){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//推送消息给政府端
|
||||||
|
/* SendMessage sendMessage = new SendMessage("", bookEntHT.getCreatedby(), bookEntHT.getSysenterpriseid(), 5);
|
||||||
|
sendMessage.run();*/
|
||||||
|
}else if(entHtState.equals("未整改") || entHtState.equals("整改中")){
|
||||||
|
//状态变为未整改 或者 整改中
|
||||||
|
if(StringUtils.isNotBlank(bookEntHT.getRectifyUserId())){
|
||||||
|
//未整改 并且整改人员不为空 则推送
|
||||||
|
//推送消息
|
||||||
|
SendMessage sendMessage = new SendMessage(bookEntHT.getCreatedby(), bookEntHT.getRectifyUserId(), bookEntHT.getSysenterpriseid(), 3);
|
||||||
|
Thread thread = new Thread(sendMessage);
|
||||||
|
thread.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bookEntHTMapper.changeHTState(htId,entHtState,rectifyResult);
|
||||||
|
|
||||||
|
//修改分数
|
||||||
|
/* if("未整改".equals(entHtState) || "已整改".equals(entHtState)){
|
||||||
|
String HTStete = entHtState;
|
||||||
|
super.changeDagerGrage(bookEntHtId,oldHTState,HTStete);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
result.setMessage("隐患状态修改成功");
|
||||||
|
}else{
|
||||||
|
result.setCode(Code.ERROR.getCode());
|
||||||
|
result.setMessage("您不是该隐患上传者,暂无权限闭环该隐患。");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
bookEntHTMapper.changeRectifyResult(htId,rectifyResult);
|
||||||
|
|
||||||
|
//推送给法人 让法人确认
|
||||||
|
SendMessage sendMessage = new SendMessage(sysUserId, bookEntHT.getSysenterpriseid(), 2);
|
||||||
|
Thread thread = new Thread(sendMessage);
|
||||||
|
thread.start();
|
||||||
|
|
||||||
|
|
||||||
|
result.setMessage("提交审核成功");
|
||||||
|
|
||||||
|
//推送给政府检查人员
|
||||||
|
List<ChkPerson> chkPeople = chkPersonMapper.findByCheckId(bookEntHT.getBookentcheckid());
|
||||||
|
if(null != chkPeople && chkPeople.size() > 0){
|
||||||
|
String receiveId = "";
|
||||||
|
for (ChkPerson chkPerson : chkPeople){
|
||||||
|
if(StringUtils.isNotBlank(receiveId)){
|
||||||
|
receiveId += ","+chkPerson.getSysuserid();
|
||||||
|
}else{
|
||||||
|
receiveId = chkPerson.getSysuserid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SendMessage dangerSendMsg = new SendMessage(receiveId, 8, bookEntHT.getBookenthtid());
|
||||||
|
Thread dangerthread = new Thread(dangerSendMsg);
|
||||||
|
dangerthread.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加通知
|
||||||
|
addNotice(bookEntHT.getSysenterpriseid(),bookEntHT.getHiddenarea());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改分数
|
||||||
|
changeEntRiskLevel(bookEntHT.getSysenterpriseid());
|
||||||
|
}else{
|
||||||
|
result.setCode(Code.NO_DATA.getCode());
|
||||||
|
result.setMessage(Message.NO_DATA);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
result.setCode(Code.EX_PARAM.getCode());
|
||||||
|
result.setMessage(Message.EX_PARAM);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加隐患通知
|
||||||
|
* @param entId
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private void addNotice(String entId,String dangerContent)throws Exception{
|
||||||
|
List<DutyTree> dutyTrees = dutyTreeMapper.findByTargetId(entId);
|
||||||
|
if(null != dutyTrees && dutyTrees.size() > 0 ){
|
||||||
|
List<Notice> notices = new ArrayList<>();
|
||||||
|
String content = "";
|
||||||
|
SysEnterprise enterprise = sysEnterpriseMapper.selectByPrimaryKey(entId);
|
||||||
|
if(null != enterprise){
|
||||||
|
content = enterprise.getEntname()+"的";
|
||||||
|
}
|
||||||
|
content += "隐患<"+dangerContent+">,";
|
||||||
|
content += "已上传整改信息。";
|
||||||
|
|
||||||
|
for (DutyTree dutyTree : dutyTrees){
|
||||||
|
Notice notice = new Notice();
|
||||||
|
notice.setId(RandomNumber.getUUid());
|
||||||
|
notice.setTitle("隐患整改");
|
||||||
|
notice.setCompanyid(entId);
|
||||||
|
notice.setCheckuserid(dutyTree.getUserId());
|
||||||
|
notice.setContent(content);
|
||||||
|
notice.setReadState(1+"");
|
||||||
|
notice.setType(1);
|
||||||
|
notice.setCreateTime(new Date());
|
||||||
|
notices.add(notice);
|
||||||
|
}
|
||||||
|
|
||||||
|
noticeMapper.insertList(notices);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取隐患检查人员id
|
||||||
|
* @param bookEntHTId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private List<String> getCheckUserId(String bookEntHTId)throws Exception{
|
||||||
|
List<String> userIds = new ArrayList<>();
|
||||||
|
List<ChkPerson> chkPeople = chkPersonMapper.findByBookEntHTId(bookEntHTId);
|
||||||
|
if(null != chkPeople && chkPeople.size() > 0){
|
||||||
|
for (ChkPerson chkPerson : chkPeople){
|
||||||
|
userIds.add(chkPerson.getSysuserid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return userIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序查看通知
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
* */
|
||||||
|
@ApiOperation(value = "小程序查看通知", notes = "小程序查看通知")
|
||||||
|
@PostMapping("/noticeList")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "checkUserId", value = "检查人Id", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "type", value = "类型数组", required = true, dataType = "string"),
|
||||||
|
})
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult noticeList(String checkUserId,String type) throws Exception {
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
List<Integer> types = new ArrayList<>();
|
||||||
|
if(StringUtils.isNotBlank(type)){
|
||||||
|
types = JSONArray.parseArray(type,Integer.class);
|
||||||
|
}
|
||||||
|
List<Notice>notices = noticeMapper.selectList(checkUserId,types);
|
||||||
|
singleResult.setData(notices);
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
package com.rzyc.controller;
|
package com.rzyc.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.common.utils.DateUtils;
|
import com.common.utils.*;
|
||||||
import com.common.utils.RandomNumber;
|
|
||||||
import com.common.utils.StringUtils;
|
|
||||||
import com.common.utils.TypeConversion;
|
|
||||||
import com.common.utils.encryption.PasswdFactory;
|
import com.common.utils.encryption.PasswdFactory;
|
||||||
import com.common.utils.excel.ExcelUtils;
|
import com.common.utils.excel.ExcelUtils;
|
||||||
import com.common.utils.jwt.JwtUtil;
|
import com.common.utils.jwt.JwtUtil;
|
||||||
|
|
@ -22,6 +19,7 @@ import com.rzyc.bean.ent.*;
|
||||||
import com.rzyc.bean.user.dto.LoginDto;
|
import com.rzyc.bean.user.dto.LoginDto;
|
||||||
import com.rzyc.config.MethodAnnotation;
|
import com.rzyc.config.MethodAnnotation;
|
||||||
import com.rzyc.model.Accident;
|
import com.rzyc.model.Accident;
|
||||||
|
import com.rzyc.model.DangerStatistic;
|
||||||
import com.rzyc.model.EntCertificates;
|
import com.rzyc.model.EntCertificates;
|
||||||
import com.rzyc.model.check.*;
|
import com.rzyc.model.check.*;
|
||||||
import com.rzyc.model.ent.EntBillCon;
|
import com.rzyc.model.ent.EntBillCon;
|
||||||
|
|
@ -29,6 +27,7 @@ import com.rzyc.model.ent.InEntList;
|
||||||
import com.rzyc.model.ent.SysEnterprise;
|
import com.rzyc.model.ent.SysEnterprise;
|
||||||
import com.rzyc.model.user.SysUnit;
|
import com.rzyc.model.user.SysUnit;
|
||||||
import com.rzyc.model.user.SysUser;
|
import com.rzyc.model.user.SysUser;
|
||||||
|
import com.rzyc.service.MobileBusinessService;
|
||||||
import com.rzyc.service.PcBusinessService;
|
import com.rzyc.service.PcBusinessService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
|
@ -52,10 +51,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author dong
|
* @author dong
|
||||||
|
|
@ -68,9 +64,17 @@ import java.util.List;
|
||||||
@Controller
|
@Controller
|
||||||
@Validated
|
@Validated
|
||||||
public class PcCompanyController extends BaseController{
|
public class PcCompanyController extends BaseController{
|
||||||
@Autowired
|
|
||||||
PcBusinessService pcBusinessService;
|
PcBusinessService pcBusinessService;
|
||||||
|
|
||||||
|
MobileBusinessService mobileBusinessService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public PcCompanyController(PcBusinessService pcBusinessService, MobileBusinessService mobileBusinessService) {
|
||||||
|
this.pcBusinessService = pcBusinessService;
|
||||||
|
this.mobileBusinessService = mobileBusinessService;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PC企业详细
|
* PC企业详细
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -265,15 +269,16 @@ public class PcCompanyController extends BaseController{
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "SysEnterpriseId", value = "公司id", required = true, dataType = "string"),
|
@ApiImplicitParam(name = "SysEnterpriseId", value = "公司id", required = true, dataType = "string"),
|
||||||
@ApiImplicitParam(name = "page", value = "页数", required = true, dataType = "int"),
|
@ApiImplicitParam(name = "page", value = "页数", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = "pageSize", value = "条数", required = true, dataType = "int")
|
@ApiImplicitParam(name = "pageSize", value = "条数", required = true, dataType = "int"),
|
||||||
|
@ApiImplicitParam(name = "htState", value = "隐患条件", required = false, dataType = "string")
|
||||||
})
|
})
|
||||||
@PostMapping("/companyDetailDanger")
|
@PostMapping("/companyDetailDanger")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult<Pager<BookEntHT>> companyDetailDanger(String SysEnterpriseId, Integer page, Integer pageSize)throws Exception {
|
public SingleResult<Pager<BookEntHT>> companyDetailDanger(String SysEnterpriseId, Integer page, Integer pageSize,String htState)throws Exception {
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
Pager<BookEntHT> pager = new Pager<>();
|
Pager<BookEntHT> pager = new Pager<>();
|
||||||
PageHelper.startPage(page, pageSize);
|
PageHelper.startPage(page, pageSize);
|
||||||
List<BookEntHT>bookEntHTS = bookEntHTMapper.dangerDetailByCompanyId(SysEnterpriseId);
|
List<BookEntHT>bookEntHTS = bookEntHTMapper.dangerDetailByCompanyId(SysEnterpriseId,htState);
|
||||||
Page<BookEntHT>bookEnt =(Page<BookEntHT>) bookEntHTS;
|
Page<BookEntHT>bookEnt =(Page<BookEntHT>) bookEntHTS;
|
||||||
getDatePage(pager,bookEnt);
|
getDatePage(pager,bookEnt);
|
||||||
if (bookEntHTS != null){
|
if (bookEntHTS != null){
|
||||||
|
|
@ -917,6 +922,88 @@ public class PcCompanyController extends BaseController{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业半年统计隐患
|
||||||
|
* @return list
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "企业半年统计隐患", notes = "企业半年统计隐患")
|
||||||
|
@GetMapping(value = "/entDangerStatistics")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = true, dataType = "string"),
|
||||||
|
})
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult<DangerStatistic> entDangerStatistics(@RequestParam(required = true)String enterpriseId)throws Exception{
|
||||||
|
return mobileBusinessService.entDangerStatistics(enterpriseId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序企业自查闭环
|
||||||
|
* @retrun
|
||||||
|
* */
|
||||||
|
@ApiOperation(value = "小程序企业自查闭环", notes = "小程序企业自查闭环")
|
||||||
|
@PostMapping("/companySelfBookEntHTClose")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "htId", value = "隐患id", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "entHtState", value = "隐患状态", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "sysEnterpriseId", value = "企业id", required = false, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "rectifyResult", value = "整改描述", required = false, dataType = "string"),
|
||||||
|
})
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult companySelfBookEntHTClose(String htId,String entHtState,String sysEnterpriseId,String rectifyResult){
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
bookenthtCompanyMapper.updateByKey(htId,entHtState,rectifyResult);
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序企业自查上报隐患
|
||||||
|
* @retrun
|
||||||
|
* */
|
||||||
|
@ApiOperation(value = "小程序企业自查上报隐患", notes = "小程序企业自查上报隐患")
|
||||||
|
@PostMapping("/companySelfBookEntHTSubmit")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "sysEnterpriseId", value = "企业id", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "beCheckedTime", value = "检查时间", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "hiddenArea", value = "隐患问题所在", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "rectifyTime", value = "整改时间", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "htlevel", value = "隐患等级", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "bookEntHTId", value = "主键id", required = true, dataType = "string"),
|
||||||
|
|
||||||
|
})
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult companySelfBookEntHTSubmit(String sysEnterpriseId,String beCheckedTime,String hiddenArea,String rectifyTime,String htlevel,String bookEntHTId){
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
SysEnterprise sysEnterprise = sysEnterpriseMapper.selectByPrimaryKey(sysEnterpriseId);
|
||||||
|
if(null != sysEnterprise){
|
||||||
|
BookEntHT bookEntHT = new BookEntHT();
|
||||||
|
bookEntHT.setBookenthtid(bookEntHTId);
|
||||||
|
bookEntHT.setSysenterpriseid(sysEnterpriseId);
|
||||||
|
bookEntHT.setBecheckedperson(sysEnterprise.getEntname());
|
||||||
|
bookEntHT.setHiddenarea(hiddenArea);
|
||||||
|
bookEntHT.setHtlevel(htlevel);
|
||||||
|
bookEntHT.setBecheckedtime(new Date());
|
||||||
|
bookEntHT.setConfirmtime(DateUtils.parseCalendar2Date(Calendar.getInstance()));
|
||||||
|
bookEntHT.setHtsource("企业自查");
|
||||||
|
bookEntHT.setRectifyperson(sysEnterprise.getLegalrepre());
|
||||||
|
bookEntHT.setRectifytime(DateUtils.parseString2Date(rectifyTime, Constants.DATA_MEET));
|
||||||
|
bookEntHT.setHtstate("整改中");
|
||||||
|
bookEntHT.setCreatedby(sysEnterprise.getEntname());
|
||||||
|
bookEntHT.setCreatedon(new Date());
|
||||||
|
bookEntHT.setModifiedby(sysEnterprise.getEntname());
|
||||||
|
bookEntHT.setModifiedon(new Date());
|
||||||
|
bookenthtCompanyMapper.insert(bookEntHT);
|
||||||
|
// super.addLog(sysUserId,"","BookEntHT",bookEntHtId,"查询",JSONArray.toJSONString(params));
|
||||||
|
}else{
|
||||||
|
singleResult.setCode(Code.EX_PARAM.getCode());
|
||||||
|
singleResult.setMessage(Message.EX_PARAM);
|
||||||
|
}
|
||||||
|
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -427,8 +427,8 @@ public class PersonalController extends BaseController{
|
||||||
@PreAuthorize("hasAnyAuthority('entPostListDetail:update')")
|
@PreAuthorize("hasAnyAuthority('entPostListDetail:update')")
|
||||||
@MethodAnnotation(authorizations = {"entPostListDetail:update"},name = "查询履职记录列表")
|
@MethodAnnotation(authorizations = {"entPostListDetail:update"},name = "查询履职记录列表")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult selectPostListDetail(String postListId,String userId)throws Exception{
|
public SingleResult selectPostListDetail(String postListId,String userId,Integer page,Integer pageSize)throws Exception{
|
||||||
return pcBusinessService.selectPostListDetail(postListId,userId);
|
return pcBusinessService.selectPostListDetail(postListId,userId,page,pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -546,4 +546,7 @@ public class PersonalController extends BaseController{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,17 +171,22 @@ public class UploadController extends com.rzyc.controller.BaseController {
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true, dataType = "string"),
|
@ApiImplicitParam(name = "userId", value = "用户id", required = true, dataType = "string"),
|
||||||
@ApiImplicitParam(name = "OTCId", value = "目标uuid", required = true, dataType = "string"),
|
@ApiImplicitParam(name = "OTCId", value = "目标uuid", required = true, dataType = "string"),
|
||||||
@ApiImplicitParam(name = "OTCType", value = "文件类型", required = true, dataType = "string")
|
@ApiImplicitParam(name = "OTCType", value = "文件类型", required = true, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "trueName", value = "文件名", required = false, dataType = "string")
|
||||||
})
|
})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "/upload", method = RequestMethod.POST)
|
@RequestMapping(value = "/upload", method = RequestMethod.POST)
|
||||||
public FileResult upload(String userId, String OTCId, String OTCType, MultipartFile file) {
|
public FileResult upload(String userId, String OTCId, String OTCType,String trueName, MultipartFile file) {
|
||||||
FileResult fileResult = new FileResult();
|
FileResult fileResult = new FileResult();
|
||||||
|
|
||||||
Boolean success = false;
|
Boolean success = false;
|
||||||
|
//赋值
|
||||||
|
String fileName = trueName;
|
||||||
try {
|
try {
|
||||||
String url = "";
|
String url = "";
|
||||||
String fileName = file.getOriginalFilename();
|
if (StringUtils.isBlank(fileName)) {
|
||||||
|
fileName = file.getOriginalFilename();
|
||||||
|
}
|
||||||
System.out.println("file name is -> "+fileName);
|
System.out.println("file name is -> "+fileName);
|
||||||
String suffix = fileName.substring(fileName.lastIndexOf(".")+1,fileName.length());
|
String suffix = fileName.substring(fileName.lastIndexOf(".")+1,fileName.length());
|
||||||
suffix = suffix.toLowerCase();
|
suffix = suffix.toLowerCase();
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ package com.rzyc.service;
|
||||||
import com.common.utils.model.SingleResult;
|
import com.common.utils.model.SingleResult;
|
||||||
import com.common.utils.pager.PageOperation;
|
import com.common.utils.pager.PageOperation;
|
||||||
import com.rzyc.controller.BaseController;
|
import com.rzyc.controller.BaseController;
|
||||||
|
import com.rzyc.model.DangerStatistic;
|
||||||
import com.rzyc.model.EntDevice;
|
import com.rzyc.model.EntDevice;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
@ -25,5 +26,12 @@ public class MobileBusinessService extends BaseController {
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SingleResult entDangerStatistics(String enterpriseId){
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
DangerStatistic dangerStatistic = bookEntHTMapper.selectHalfAYearEntDangerStatistics(enterpriseId);
|
||||||
|
singleResult.setData(dangerStatistic);
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import com.rzyc.config.RedisUtil;
|
||||||
import com.rzyc.controller.BaseController;
|
import com.rzyc.controller.BaseController;
|
||||||
import com.rzyc.enums.DelState;
|
import com.rzyc.enums.DelState;
|
||||||
import com.rzyc.enums.RedisKeys;
|
import com.rzyc.enums.RedisKeys;
|
||||||
|
import com.rzyc.mapper.EntPostTaskMapper;
|
||||||
import com.rzyc.model.*;
|
import com.rzyc.model.*;
|
||||||
import com.rzyc.model.dto.*;
|
import com.rzyc.model.dto.*;
|
||||||
import com.rzyc.model.ent.EntPost;
|
import com.rzyc.model.ent.EntPost;
|
||||||
|
|
@ -141,7 +142,7 @@ public class PcBusinessService extends BaseController {
|
||||||
}
|
}
|
||||||
//EntPostTask
|
//EntPostTask
|
||||||
List<EntPostTask>list = entPostTaskMapper.selectEntUserPostTask(entUserPostTaskDto.getEnterpriseId(),entUserPostTaskDto.getEntUserId(),entUserPostTaskDto.getPostId()
|
List<EntPostTask>list = entPostTaskMapper.selectEntUserPostTask(entUserPostTaskDto.getEnterpriseId(),entUserPostTaskDto.getEntUserId(),entUserPostTaskDto.getPostId()
|
||||||
,entUserPostTaskDto.getListId(),entUserPostTaskDto.getContent(),entUserPostTaskDto.getTaskState());
|
,entUserPostTaskDto.getListId(),entUserPostTaskDto.getContent(),entUserPostTaskDto.getTaskState(),entUserPostTaskDto.getPostListId());
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1177,10 +1178,18 @@ public class PcBusinessService extends BaseController {
|
||||||
singleResult.setCode(Code.ERROR.getCode());
|
singleResult.setCode(Code.ERROR.getCode());
|
||||||
singleResult.setMessage(Message.ERROR);
|
singleResult.setMessage(Message.ERROR);
|
||||||
}
|
}
|
||||||
|
//判断任务是否完成,完成则修改为完成状态
|
||||||
|
if (null != entPostListDetailDto.getEntPostTaskId()){
|
||||||
|
EntPostTask entPostTask = entPostTaskMapper.verifyCompletion(entPostListDetailDto.getEntPostTaskId());
|
||||||
|
if (entPostTask.getNumberOfDutyPerformance().equals(entPostTask.getFrequency())){
|
||||||
|
entPostTaskMapper.updateTaskState(entPostListDetailDto.getEntPostTaskId());
|
||||||
|
}
|
||||||
|
}
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SingleResult selectPostListDetail(String postListId,String userId){
|
@PageOperation
|
||||||
|
public SingleResult selectPostListDetail(String postListId,String userId,Integer page,Integer pageSize){
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
List<EntPostListDetail> list = entPostListDetailMapper.selectListDetail(postListId,userId);
|
List<EntPostListDetail> list = entPostListDetailMapper.selectListDetail(postListId,userId);
|
||||||
singleResult.setData(list);
|
singleResult.setData(list);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user