禅道BUG修改-部分功能接口
This commit is contained in:
parent
678d50ced2
commit
8a2f08e44e
|
|
@ -0,0 +1,59 @@
|
|||
package com.rzyc.bean.RiskSource;
|
||||
|
||||
|
||||
/**
|
||||
* @author Xuwanxin
|
||||
* @date 2023/3/27
|
||||
* */
|
||||
public class RiskSourceStatistic {
|
||||
|
||||
private Integer lowRisk;
|
||||
|
||||
private Integer generalRisk;
|
||||
|
||||
private Integer graterRisk;
|
||||
|
||||
private Integer MajorRisk;
|
||||
|
||||
private String industryName;
|
||||
|
||||
public String getIndustryName() {
|
||||
return industryName;
|
||||
}
|
||||
|
||||
public void setIndustryName(String industryName) {
|
||||
this.industryName = industryName;
|
||||
}
|
||||
|
||||
public Integer getLowRisk() {
|
||||
return lowRisk;
|
||||
}
|
||||
|
||||
public void setLowRisk(Integer lowRisk) {
|
||||
this.lowRisk = lowRisk;
|
||||
}
|
||||
|
||||
public Integer getGeneralRisk() {
|
||||
return generalRisk;
|
||||
}
|
||||
|
||||
public void setGeneralRisk(Integer generalRisk) {
|
||||
this.generalRisk = generalRisk;
|
||||
}
|
||||
|
||||
public Integer getGraterRisk() {
|
||||
return graterRisk;
|
||||
}
|
||||
|
||||
public void setGraterRisk(Integer graterRisk) {
|
||||
this.graterRisk = graterRisk;
|
||||
}
|
||||
|
||||
public Integer getMajorRisk() {
|
||||
return MajorRisk;
|
||||
}
|
||||
|
||||
public void setMajorRisk(Integer majorRisk) {
|
||||
MajorRisk = majorRisk;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.rzyc.enums;
|
||||
|
||||
/**
|
||||
* 证件状态
|
||||
* @author Xuwanxin
|
||||
* @date 2023/3/30
|
||||
* */
|
||||
public enum CredentialState {
|
||||
|
||||
notExpire(1),
|
||||
expire(2);
|
||||
|
||||
private Integer type;
|
||||
|
||||
CredentialState(Integer type) {
|
||||
this.type = type;
|
||||
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
|
@ -37,19 +37,21 @@ public interface EntPostListMapper extends BaseMapper<EntPostList> {
|
|||
* @param enterpriseId 企业id
|
||||
* @param listId 企业用户id
|
||||
* @param year 年份
|
||||
* @param userId 用户id
|
||||
* @return int 企业岗位条数
|
||||
*/
|
||||
Integer selectEntPostListCount(@Param("enterpriseId") String enterpriseId,@Param("listId")String listId,@Param("year") Integer year);
|
||||
Integer selectEntPostListCount(@Param("enterpriseId") String enterpriseId,@Param("listId")String listId,@Param("year") Integer year,@Param("userId") String userId);
|
||||
|
||||
/**
|
||||
* 企业清单完成条数
|
||||
* @param enterpriseId 企业id
|
||||
* @param listId 企业用户id
|
||||
* @param listId 企业清单id
|
||||
* @param state 状态
|
||||
* @param year 年份
|
||||
* @param userId 用户id
|
||||
* @return int 企业清单完成条数
|
||||
*/
|
||||
Integer selectEntPostListFinishedCount(@Param("enterpriseId") String enterpriseId,@Param("listId")String listId,@Param("state")Integer state,@Param("year") Integer year);
|
||||
Integer selectEntPostListFinishedCount(@Param("enterpriseId") String enterpriseId,@Param("listId")String listId,@Param("state")Integer state,@Param("year") Integer year,@Param("userId") String userId);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,10 @@ public interface EntPostTaskMapper extends BaseMapper<EntPostTask> {
|
|||
* @param enterpriseId 企业id
|
||||
* @param listId 清单id
|
||||
* @param year 年份
|
||||
* @param userId 用户id
|
||||
* @return EntPostTaskStatistic 统计对象
|
||||
* */
|
||||
EntPostTaskStatistic selectEntPostTaskByState(@Param("enterpriseId") String enterpriseId,@Param("listId") String listId,@Param("year") Integer year);
|
||||
EntPostTaskStatistic selectEntPostTaskByState(@Param("enterpriseId") String enterpriseId,@Param("listId") String listId,@Param("year") Integer year,@Param("userId")String userId);
|
||||
|
||||
/**
|
||||
* 查询企业岗位履职总数
|
||||
|
|
@ -66,7 +67,7 @@ public interface EntPostTaskMapper extends BaseMapper<EntPostTask> {
|
|||
* @param year 年份
|
||||
* @return long 统计总条数
|
||||
* */
|
||||
long selectEntPostTaskTotal(@Param("enterpriseId") String enterpriseId,@Param("listId")String listId,@Param("year") Integer year);
|
||||
long selectEntPostTaskTotal(@Param("enterpriseId") String enterpriseId,@Param("listId")String listId,@Param("year") Integer year,@Param("userId")String userId);
|
||||
|
||||
/**
|
||||
* 插入企业岗位任务
|
||||
|
|
|
|||
|
|
@ -61,4 +61,10 @@ public interface EntUserCredentialMapper extends BaseMapper<EntUserCredential> {
|
|||
* */
|
||||
int delEntUserCredential(@Param("userId")String userId);
|
||||
|
||||
/**
|
||||
* 企业用户证件照过期是否
|
||||
* @return int
|
||||
* */
|
||||
Integer scheduleUpdateState();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,11 @@ public interface OATaskMapper extends BaseMapper<OATask> {
|
|||
/*未完成的履职任务*/
|
||||
List<OATask> notFinishTask(@Param("otcId") String otcId);
|
||||
|
||||
|
||||
/*未完成的履职任务通过用户id*/
|
||||
List<OATask> notFinishTaskByUserId(@Param("userId") String userId);
|
||||
|
||||
|
||||
/*发布任务列表*/
|
||||
List<OATask> receiveTaskPages(@Param("sysUserIds") List<String> sysUserIds,
|
||||
@Param("condition") String condition,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.rzyc.mapper;
|
||||
|
||||
import com.rzyc.bean.RiskSource.RiskSourceStatistic;
|
||||
import com.rzyc.bean.risk.RkSourcesDto;
|
||||
import com.rzyc.model.RkSourceStatistic;
|
||||
import com.rzyc.model.RkSources;
|
||||
|
|
@ -56,4 +57,33 @@ public interface RkSourcesMapper extends BaseMapper<RkSources> {
|
|||
List<RkSources> selectPageRkSources(RkSourcesDto RkSourcesDto);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 风险源信息分页查询
|
||||
* @return RiskSourceStatistic
|
||||
*/
|
||||
RiskSourceStatistic riskSourceStatistic();
|
||||
|
||||
|
||||
/**
|
||||
* 风险源信息分页查询
|
||||
* @return RiskSourceStatistic
|
||||
*/
|
||||
List<RiskSourceStatistic>riskSourceStatisticByIndustry();
|
||||
|
||||
|
||||
/**
|
||||
* 风险源详细列表
|
||||
* @param companyName
|
||||
* @param industryId
|
||||
* @param riskGrade
|
||||
* @param riskSourceId
|
||||
* @param accidentType
|
||||
* @param enterpriseId
|
||||
* @return List<RkSources>
|
||||
* */
|
||||
List<RkSources> riskSourceTable(@Param("companyName") String companyName,@Param("industryId") String industryId,@Param("riskSourceId")String riskSourceId,@Param("accidentType")String accidentType,
|
||||
@Param("enterpriseId") String enterpriseId, @Param("riskGrade")Integer riskGrade);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,4 +60,7 @@ public interface ListDetailMapper {
|
|||
@Param("delState") Integer delState,
|
||||
@Param("chinaName") String chinaName);
|
||||
|
||||
|
||||
String selectIdByTaskId(@Param("oaTaskId")String oaTaskId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class EntInspectionRecord implements Serializable {
|
|||
private String inspectionId;
|
||||
|
||||
@ApiModelProperty(value = "送检设备id")
|
||||
@TableField("inspection_device_id")
|
||||
@TableField(exist = false)
|
||||
private String inspectionDeviceId;
|
||||
|
||||
@ApiModelProperty(value = "送检组织")
|
||||
|
|
|
|||
|
|
@ -114,6 +114,19 @@ public class EntPostList implements Serializable {
|
|||
@ApiModelProperty(value = "任务总数")
|
||||
private Integer totalTaskNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "岗位名")
|
||||
private String postName;
|
||||
|
||||
|
||||
public String getPostName() {
|
||||
return postName;
|
||||
}
|
||||
|
||||
public void setPostName(String postName) {
|
||||
this.postName = postName;
|
||||
}
|
||||
|
||||
public Integer getHaveInHand() {
|
||||
return haveInHand;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,19 @@ public class EntPostTask implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private Integer numberOfDutyPerformance;
|
||||
|
||||
@ApiModelProperty(value = "任务人")
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public Integer getNumberOfDutyPerformance() {
|
||||
return numberOfDutyPerformance;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class AddOrUpdateEntEquipmentDto {
|
|||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty(value = "设备具体位置")
|
||||
private String specialLocation;
|
||||
private String specificLocation;
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
|
|
@ -225,11 +225,11 @@ public class AddOrUpdateEntEquipmentDto {
|
|||
this.manufacturer = manufacturer;
|
||||
}
|
||||
|
||||
public String getSpecialLocation() {
|
||||
return specialLocation;
|
||||
public String getSpecificLocation() {
|
||||
return specificLocation;
|
||||
}
|
||||
|
||||
public void setSpecialLocation(String specialLocation) {
|
||||
this.specialLocation = specialLocation;
|
||||
public void setSpecificLocation(String specificLocation) {
|
||||
this.specificLocation = specificLocation;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,17 @@ public class EntEmExpertDto {
|
|||
@ApiModelProperty(value = "专家住址")
|
||||
private String entEmExpertAddress;
|
||||
|
||||
@ApiModelProperty(value = "专家工作单位")
|
||||
private String entEmWorkUnit;
|
||||
|
||||
public String getEntEmWorkUnit() {
|
||||
return entEmWorkUnit;
|
||||
}
|
||||
|
||||
public void setEntEmWorkUnit(String entEmWorkUnit) {
|
||||
this.entEmWorkUnit = entEmWorkUnit;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -18,8 +19,9 @@ public class InspectionRecordDto {
|
|||
@ApiModelProperty(value = "送检记录id")
|
||||
private String inspectionId;
|
||||
|
||||
@NotNull(message = "送检设备id不能为空")
|
||||
@ApiModelProperty(value = "送检设备id")
|
||||
private Integer inspectionDeviceId;
|
||||
private String inspectionDeviceId;
|
||||
|
||||
@ApiModelProperty(value = "送检组织")
|
||||
private String inspectionOrganization;
|
||||
|
|
@ -44,11 +46,11 @@ public class InspectionRecordDto {
|
|||
this.inspectionId = inspectionId;
|
||||
}
|
||||
|
||||
public Integer getInspectionDeviceId() {
|
||||
public String getInspectionDeviceId() {
|
||||
return inspectionDeviceId;
|
||||
}
|
||||
|
||||
public void setInspectionDeviceId(Integer inspectionDeviceId) {
|
||||
public void setInspectionDeviceId(String inspectionDeviceId) {
|
||||
this.inspectionDeviceId = inspectionDeviceId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</update>
|
||||
|
||||
<update id="scheduleUpdateStateDueSoon">
|
||||
update ent_certificates set state = 3 where certificates_id in (
|
||||
update ent_certificates set state = 2 where certificates_id in (
|
||||
select * from (select certificates_id from ent_certificates where now() BETWEEN date_add(expire_time,interval-1 month) and expire_time and del_state = 1 and state = 1)b
|
||||
)
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<update id="updateEntEmExpertUpdate">
|
||||
update ent_em_expert set enterprise_id = #{enterpriseId},ent_em_expert_name = #{entEmExpertName},ent_em_expert_sex = #{entEmExpertSex},ent_em_expert_phone = #{entEmExpertPhone},ent_em_expert_class = #{entEmExpertClass},ent_em_expert_major = #{entEmExpertMajor},ent_em_expert_category = #{entEmExpertCategory},
|
||||
ent_em_expert_address = #{entEmExpertAddress},age = #{age},modify_by = #{modifyBy},modify_time = #{modifyTime}
|
||||
ent_em_expert_address = #{entEmExpertAddress},age = #{age},modify_by = #{modifyBy},modify_time = #{modifyTime},ent_em_work_unit = #{entEmWorkUnit}
|
||||
where ent_em_expert_id = #{entEmExpertId}
|
||||
</update>
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@
|
|||
<if test="null != year">
|
||||
and `year_num` = #{year}
|
||||
</if>
|
||||
<if test="null != userId and '' != userId">
|
||||
and ent_user_id = #{userId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectEntPostListFinishedCount" resultType="java.lang.Integer">
|
||||
|
|
@ -74,6 +77,9 @@
|
|||
<if test="null != year">
|
||||
and `year_num` = #{year}
|
||||
</if>
|
||||
<if test="null != userId and '' != userId">
|
||||
and ent_user_id = #{userId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<resultMap id="EntListGroupMap" type="com.rzyc.model.EntPostList">
|
||||
|
|
@ -81,13 +87,15 @@
|
|||
<result column="item_title" property="itemTitle" />
|
||||
<result column="totalTaskNumber" property="totalTaskNumber"/>
|
||||
<result column="haveInHand" property="haveInHand"/>
|
||||
<result column="name" property="postName"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectEntListGroupByListId" resultMap="EntListGroupMap">
|
||||
select epl.list_id,il.name as item_title,count(ept.task_id)as totalTaskNumber,sum(case when task_state = 1 then 1 else 0 end)as haveInHand
|
||||
select epl.list_id,il.name as item_title,count(ept.task_id)as totalTaskNumber,sum(case when task_state = 1 then 1 else 0 end)as haveInHand,ep.name postName
|
||||
from ent_post_list epl
|
||||
left join ent_post_task ept on epl.post_list_id = ept.ent_list_id
|
||||
left join in_list il on epl.list_id = il.list_id
|
||||
left join ent_post ep on epl.post_id = ep.post_id
|
||||
where epl.enterprise_id = #{enterpriseId} and il.name is not null
|
||||
<if test="null != userId and '' != userId">
|
||||
and epl.ent_user_id = #{userId}
|
||||
|
|
@ -97,11 +105,14 @@
|
|||
</if>
|
||||
group by il.list_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEntListGroupByPostListId" resultType="com.rzyc.model.EntPostList">
|
||||
select epl.list_id,ipi.in_list as item_title,count(ept.task_id)as totalTaskNumber,sum(case when task_state = 1 then 1 else 0 end)as haveInHand
|
||||
select epl.list_id,ipi.in_list as item_title,count(ept.task_id)as totalTaskNumber,sum(case when task_state = 1 then 1 else 0 end)as haveInHand,ep.name postName
|
||||
from ent_post_list epl
|
||||
left join ent_post_task ept on epl.post_list_id = ept.ent_list_id
|
||||
left join in_post_item ipi on epl.list_id = ipi.in_post_item_id
|
||||
left join ent_post ep on epl.post_id = ep.post_id
|
||||
where epl.enterprise_id = #{enterpriseId} and ipi.in_list is not null
|
||||
<if test="null != userId and '' != userId">
|
||||
and epl.ent_user_id = #{userId}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
<result column="create_by" property="createBy" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="modify_by" property="modifyBy" />
|
||||
<result column="name" property="userName"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
|
|
@ -35,25 +36,27 @@
|
|||
</delete>
|
||||
|
||||
<select id="selectEntUserPostTask" resultMap="BaseResultMap">
|
||||
select * from ent_post_task where enterprise_id = #{enterpriseId}
|
||||
select ept.*,eu.name from ent_post_task ept left join ent_user eu on ept.ent_user_id = eu.ent_user_id
|
||||
where ept.enterprise_id = #{enterpriseId}
|
||||
<if test="null != entUserId and '' != entUserId">
|
||||
and ent_user_id = #{entUserId}
|
||||
and ept.ent_user_id = #{entUserId}
|
||||
</if>
|
||||
<if test="listId != null and '' != listId">
|
||||
and list_id = #{listId}
|
||||
and ept.list_id = #{listId}
|
||||
</if>
|
||||
<if test="null != postId and '' != postId">
|
||||
and post_id = #{postId}
|
||||
and ept.post_id = #{postId}
|
||||
</if>
|
||||
<if test="null != content and '' != content">
|
||||
and item_content like concat('%',#{content},'%')
|
||||
and ept.item_content like concat('%',#{content},'%')
|
||||
</if>
|
||||
<if test="null != taskState and '' != taskState">
|
||||
and task_state = #{taskState}
|
||||
and ept.task_state = #{taskState}
|
||||
</if>
|
||||
<if test="null != postListId and '' != postListId">
|
||||
and post_list_id = #{postListId}
|
||||
and ept.post_list_id = #{postListId}
|
||||
</if>
|
||||
order by ept.create_time
|
||||
</select>
|
||||
|
||||
<select id="selectEntUserPostTaskByListId" resultMap="BaseResultMap">
|
||||
|
|
@ -79,6 +82,9 @@
|
|||
<if test="null != listId and '' != listId">
|
||||
and epl.post_list_id = #{listId}
|
||||
</if>
|
||||
<if test="null != userId and '' != userId">
|
||||
and ept.ent_user_id = #{userId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<resultMap id="entPostTaskByStateMap" type="com.rzyc.model.EntPostTaskStatistic">
|
||||
|
|
@ -100,6 +106,9 @@
|
|||
<if test="null != listId and '' != listId">
|
||||
and epl.post_list_id = #{listId}
|
||||
</if>
|
||||
<if test="null != userId and '' != userId">
|
||||
and ept.ent_user_id = #{userId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertList">
|
||||
|
|
|
|||
|
|
@ -37,14 +37,20 @@
|
|||
</select>
|
||||
|
||||
<update id="updateEntUserCredential" parameterType="com.rzyc.model.EntUserCredential">
|
||||
update ent_user_credential set credential_name= #{data.credentialName} ,credential_start_time = #{data.credentialStartTime},
|
||||
update ent_user_credential set credential_name= #{data.credentialName} ,credential_start_time = #{data.credentialStartTime},credential_state = #{data.credentialState},
|
||||
credential_end_time = #{data.credentialEndTime},credential_image_address = #{data.credentialImageAddress},
|
||||
modify_time = #{data.modifyTime} , modify_by = #{data.modifyBy}
|
||||
where ent_user_id = #{data.entUserId}
|
||||
where credential_id = #{data.credentialId}
|
||||
</update>
|
||||
|
||||
<update id="scheduleUpdateState">
|
||||
update ent_user_credential set credential_state = 2 where credential_id in (
|
||||
select * from (select credential_id from ent_user_credential where now() > credential_end_time and credential_state = 1 )b
|
||||
)
|
||||
</update>
|
||||
|
||||
<insert id="insertEntUserCredential" parameterType="com.rzyc.model.EntUserCredential">
|
||||
insert into ent_user_credential (credential_id,credential_name,credential_start_time,credential_end_time,credential_image_address,ent_user_id,create_by,create_time) values(#{data.credentialId},#{data.credentialName},#{data.credentialStartTime},#{data.credentialEndTime},#{data.credentialImageAddress},#{data.entUserId},#{data.createBy},#{data.createTime})
|
||||
insert into ent_user_credential (credential_id,credential_name,credential_start_time,credential_end_time,credential_image_address,ent_user_id,create_by,create_time,credential_state ) values(#{data.credentialId},#{data.credentialName},#{data.credentialStartTime},#{data.credentialEndTime},#{data.credentialImageAddress},#{data.entUserId},#{data.createBy},#{data.createTime},#{data.credentialState})
|
||||
</insert>
|
||||
|
||||
<delete id="entUserCredentialDelete">
|
||||
|
|
|
|||
|
|
@ -353,6 +353,19 @@
|
|||
ORDER BY ot.`StartDate` DESC;
|
||||
</select>
|
||||
|
||||
<select id="notFinishTaskByUserId" resultMap="BaseResultMap">
|
||||
SELECT ot.* FROM sysuser as su
|
||||
left join listperform lf on su.SysTitle = lf.ListPerformId
|
||||
left join listfactor lft on lf.ListPerformId = lft.ListPerformId
|
||||
left join oatask ot on lft.ListFactorId = ot.OTCId
|
||||
WHERE su.SysUserId = #{userId}
|
||||
and ot.`TaskType` = '履职任务'
|
||||
and ot.del_state = 1
|
||||
AND ot.`StartDate` < NOW()
|
||||
AND ot.`IsFinish` = '否'
|
||||
ORDER BY ot.`StartDate` DESC;
|
||||
</select>
|
||||
|
||||
|
||||
<!--接收任务列表-->
|
||||
<select id="receiveTaskPages" resultMap="TaskResultMap">
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<select id="sourcesList" resultMap="BaseResultMap">
|
||||
SELECT rt.name sourceName, ty.`name` typeName, rs.* FROM `rk_sources` rs
|
||||
LEFT JOIN `rk_risk_type` rt ON rs.rk_source_id = rt.`type_id`
|
||||
LEFT JOIN `rk_risk_type` ty ON rs.type_id = rt.`type_id`
|
||||
LEFT JOIN `rk_risk_type` ty ON rs.type_id = ty.`type_id`
|
||||
WHERE (rs.palce like #{condition} or rs.details like #{condition})
|
||||
<if test="null != enterpriseId and '' != enterpriseId">
|
||||
and rs.`enterprise_id` = #{enterpriseId}
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
SELECT rt.name sourceName, ty.`name` typeName, rs.*
|
||||
FROM `rk_sources` rs
|
||||
LEFT JOIN `rk_risk_type` rt ON rs.rk_source_id = rt.`type_id`
|
||||
LEFT JOIN `rk_risk_type` ty ON rs.type_id = rt.`type_id`
|
||||
LEFT JOIN `rk_risk_type` ty ON rs.type_id = ty.`type_id`
|
||||
WHERE rs.`enterprise_id` = #{enterpriseId}
|
||||
AND rs.`xindex` = ''
|
||||
AND rs.del_state = 1
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
SELECT rt.name sourceName, ty.`name` typeName, rs.*
|
||||
FROM `rk_sources` rs
|
||||
LEFT JOIN `rk_risk_type` rt ON rs.rk_source_id = rt.`type_id`
|
||||
LEFT JOIN `rk_risk_type` ty ON rs.type_id = rt.`type_id`
|
||||
LEFT JOIN `rk_risk_type` ty ON rs.type_id = ty.`type_id`
|
||||
WHERE rs.`enterprise_id` = #{enterpriseId}
|
||||
and rs.document_id = #{documentId}
|
||||
AND rs.`xindex` != ''
|
||||
|
|
@ -154,4 +154,51 @@
|
|||
ORDER BY rs.modify_time ASC
|
||||
</select>
|
||||
|
||||
<select id="riskSourceStatistic" resultType="com.rzyc.bean.RiskSource.RiskSourceStatistic">
|
||||
select sum(case risk_grade when 1 then 1 else 0 end ) lowRisk,
|
||||
sum(case risk_grade when 2 then 1 else 0 end ) normalRisk,
|
||||
sum(case risk_grade when 3 then 1 else 0 end ) graterRisk,
|
||||
sum(case risk_grade when 4 then 1 else 0 end ) MajorRisk
|
||||
from rk_sources
|
||||
where del_state = 1
|
||||
</select>
|
||||
|
||||
<select id="riskSourceStatisticByIndustry" resultType="com.rzyc.bean.RiskSource.RiskSourceStatistic">
|
||||
select sum(case risk_grade when 1 then 1 else 0 end ) lowRisk,
|
||||
sum(case risk_grade when 2 then 1 else 0 end ) normalRisk,
|
||||
sum(case risk_grade when 3 then 1 else 0 end ) graterRisk,
|
||||
sum(case risk_grade when 4 then 1 else 0 end ) MajorRisk,
|
||||
bi.IndustryClassName industryName
|
||||
from rk_sources rk left join baseinclass bi on rk.base_inclass_id = bi.BaseInClassId
|
||||
where del_state = 1
|
||||
group by bi.BaseInClassId
|
||||
</select>
|
||||
|
||||
|
||||
<select id="riskSourceTable" resultType="com.rzyc.model.RkSources">
|
||||
SELECT rt.name sourceName, ty.`name` typeName, rs.* FROM `rk_sources` rs
|
||||
LEFT JOIN `rk_risk_type` rt ON rs.rk_source_id = rt.`type_id`
|
||||
LEFT JOIN `rk_risk_type` ty ON rs.type_id = ty.`type_id`
|
||||
WHERE rs.del_state = 1
|
||||
<if test="null != enterpriseId and '' != enterpriseId">
|
||||
and rs.`enterprise_id` = #{enterpriseId}
|
||||
</if>
|
||||
<if test="null != riskGrade and '' != riskGrade">
|
||||
and rs.risk_grade = #{riskGrade}
|
||||
</if>
|
||||
<if test="null != industryId and '' != industryId">
|
||||
and rs.risk_grade = #{riskGrade}
|
||||
</if>
|
||||
<if test="null != riskSourceId and '' != riskSourceId">
|
||||
and rt.type_id = #{riskSourceId}
|
||||
</if>
|
||||
<if test="null != accidentType and '' != accidentType">
|
||||
and ty.type_id = #{accidentType}
|
||||
</if>
|
||||
<if test="null != companyName and '' != companyName">
|
||||
and rs.ent_name = #{companyName}
|
||||
</if>
|
||||
ORDER BY rs.`modify_time` DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -496,6 +496,9 @@
|
|||
AND ld.del_state = 1
|
||||
ORDER BY ld.`EndTime` DESC
|
||||
</select>
|
||||
<select id="selectIdByTaskId" resultType="java.lang.String">
|
||||
select ListDetailId from ListDetail where task_id = #{oaTaskId}
|
||||
</select>
|
||||
|
||||
<!--修改删除状态-->
|
||||
<update id="changeSelState">
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ public class SaticScheduleTask {
|
|||
taskService.scheduleUpdateState();
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 1 */1 * * ?")
|
||||
private void userCertificationState() {
|
||||
taskService.userCertificationState();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -350,7 +352,7 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
@PreAuthorize("hasAnyAuthority('inspectionRecord:update')")
|
||||
@MethodAnnotation(authorizations = {"inspectionRecord:update"},name = "送检操作")
|
||||
@ResponseBody
|
||||
public SingleResult submitInspection(@RequestBody InspectionRecordDto inspectionRecordDto)throws Exception{
|
||||
public SingleResult submitInspection(@RequestBody @Valid InspectionRecordDto inspectionRecordDto)throws Exception{
|
||||
return pcBusinessService.submitInspection(inspectionRecordDto);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -453,6 +453,89 @@ public class MinWorkController extends BaseController{
|
|||
return pcBusinessService.entEquipmentListAndIns(enterpriseId,typeId,page,pageSize,keyWord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序返回最小工作单元和企业二维码
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "小程序返回最小工作单元和企业二维码", notes = "小程序返回最小工作单元和企业二维码")
|
||||
@PostMapping("/getMinWorkUnitList/{parentId}")
|
||||
@ResponseBody
|
||||
public SingleResult getMinWorkUnitList(@PathVariable String parentId){
|
||||
|
||||
|
||||
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
SingleResult singleResult = new SingleResult();
|
||||
|
||||
SysEnterprise sysEnterprise = sysEnterpriseMapper.selectByPrimaryKey(parentId);
|
||||
|
||||
|
||||
|
||||
|
||||
if (sysEnterprise != null){
|
||||
if (StringUtils.isNotEmpty(sysEnterprise.getQrCode())){
|
||||
map.put("parentCode",sysEnterprise.getQrCode());
|
||||
}else{
|
||||
map.put("parentCode",null);
|
||||
}
|
||||
|
||||
List<MinWorkUnit> byparentIdList = new ArrayList<>();
|
||||
|
||||
//最小工作单元检查表
|
||||
List<MinWorkUnit> workUnitList = minWorkUnitMapper.getByparentIdList(parentId);
|
||||
if(null != workUnitList){
|
||||
for (MinWorkUnit workUnit : workUnitList){
|
||||
workUnit.setCheckType(1);
|
||||
workUnit.setTitle("工作单元:"+workUnit.getTitle());
|
||||
}
|
||||
byparentIdList.addAll(workUnitList);
|
||||
}
|
||||
|
||||
String baseInClassId = sysEnterprise.getWorkClassId();
|
||||
|
||||
//监管执法清单
|
||||
List<ChkGovBill> govBills = new ArrayList<>();
|
||||
|
||||
//企业清单
|
||||
List<ChkGovBill> entGovBills = chkGovBillMapper.entBillList(sysEnterprise.getSysenterpriseid(),"");
|
||||
if(null != entGovBills && entGovBills.size() > 0){
|
||||
govBills.addAll(entGovBills);
|
||||
}
|
||||
|
||||
//行业清单
|
||||
List<ChkGovBill> inGovBills = chkGovBillMapper.findByInClassId(baseInClassId);
|
||||
if(null != inGovBills && inGovBills.size() > 0){
|
||||
govBills.addAll(inGovBills);
|
||||
}
|
||||
|
||||
|
||||
if(null != govBills && govBills.size() > 0){
|
||||
for (ChkGovBill govBill : govBills){
|
||||
MinWorkUnit workUnit = new MinWorkUnit();
|
||||
workUnit.setId(govBill.getChkgovbillid());
|
||||
workUnit.setMinCategoryName(govBill.getChkbillname());
|
||||
workUnit.setCheckType(2);
|
||||
workUnit.setMinCategory(govBill.getChkgovbillid());
|
||||
workUnit.setTitle("监管执法:"+govBill.getChkbillname());
|
||||
byparentIdList.add(workUnit);
|
||||
}
|
||||
}
|
||||
|
||||
if (byparentIdList.size()>0) {
|
||||
map.put("minWorkUnitList", byparentIdList);
|
||||
}else{
|
||||
map.put("minWorkUnitList", null);
|
||||
}
|
||||
singleResult.setData(map);
|
||||
|
||||
|
||||
}else{
|
||||
map.put("parentCode",null);
|
||||
}
|
||||
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,11 @@ public class PcCompanyController extends BaseController{
|
|||
@ResponseBody
|
||||
public SingleResult<String> companyDetail(String SysEnterpriseId)throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
if (StringUtils.isBlank(SysEnterpriseId)){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.CODE_NOTICE);
|
||||
return singleResult;
|
||||
}
|
||||
List<SysEnterprise>sysEnterprises = sysEnterpriseMapper.companyDetail(SysEnterpriseId);
|
||||
List<String>safeClass = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(sysEnterprises.get(0).getBasesafeclassid())){
|
||||
|
|
@ -801,13 +806,24 @@ public class PcCompanyController extends BaseController{
|
|||
entCertificates.setModifyTime(new Date());
|
||||
entCertificates.setCreateBy(userId);
|
||||
|
||||
Date date = new Date();
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.setTime(certificatesAddDto.getExpireTime());
|
||||
now.add(Calendar.DAY_OF_MONTH, -30);
|
||||
Date thirdAfter = now.getTime();
|
||||
if (date.after(thirdAfter) && date.before(certificatesAddDto.getExpireTime())){
|
||||
entCertificates.setState(2);
|
||||
} else if (date.after(certificatesAddDto.getExpireTime())){
|
||||
entCertificates.setState(3);
|
||||
}else {
|
||||
entCertificates.setState(1);
|
||||
}
|
||||
EntCertificates certificates = entCertificatesMapper.selectById(entCertificates.getCertificatesId());
|
||||
if(null != certificates){
|
||||
entCertificatesMapper.updateById(entCertificates);
|
||||
}else{
|
||||
entCertificates.setCreateTime(new Date());
|
||||
entCertificates.setCreateBy(userId);
|
||||
entCertificates.setState(1);
|
||||
entCertificatesMapper.insert(entCertificates);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
|
@ -171,6 +173,12 @@ public class PcBusinessService extends BaseController {
|
|||
EntUserCredential entUserCredential = new EntUserCredential();
|
||||
BeanUtils.copyProperties(e,entUserCredential);
|
||||
EntUserCredential credential = entUserCredentialMapper.selectById(entUserCredential.getCredentialId());
|
||||
Date now = new Date();
|
||||
if (now.after(entUserCredential.getCredentialEndTime())){
|
||||
entUserCredential.setCredentialState(CredentialState.expire.getType());
|
||||
}else {
|
||||
entUserCredential.setCredentialState(CredentialState.notExpire.getType());
|
||||
}
|
||||
if (null != credential) {
|
||||
entUserCredential.setModifyBy(getUserId());
|
||||
entUserCredential.setModifyTime(new Date());
|
||||
|
|
@ -261,6 +269,13 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
entUser.setEntUserId(RandomNumber.getUUid());
|
||||
result = entUserMapper.insert(entUser);
|
||||
|
||||
|
||||
//插入清单和任务
|
||||
AssignmentTaskThread textThread = new AssignmentTaskThread(entUser.getEntUserId(),addOrUpdateEntUserDto.getEnterpriseId(),addOrUpdateEntUserDto.getPostId(),entPostListMapper,entPostTaskMapper,inEntListMapper,getUserId(),inPostListMapper,inPostItemMapper,entUserMapper,entPostMapper);
|
||||
Thread thread=new Thread(textThread);
|
||||
thread.start();
|
||||
|
||||
}
|
||||
if (result != 1){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
|
|
@ -275,10 +290,7 @@ public class PcBusinessService extends BaseController {
|
|||
}else {
|
||||
entUserCredentialMapper.delEntUserCredential(entUser.getEntUserId());
|
||||
}
|
||||
//插入清单和任务
|
||||
AssignmentTaskThread textThread = new AssignmentTaskThread(entUser.getEntUserId(),addOrUpdateEntUserDto.getEnterpriseId(),addOrUpdateEntUserDto.getPostId(),entPostListMapper,entPostTaskMapper,inEntListMapper,getUserId(),inPostListMapper,inPostItemMapper,entUserMapper,entPostMapper);
|
||||
Thread thread=new Thread(textThread);
|
||||
thread.start();
|
||||
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
|
@ -477,10 +489,11 @@ public class PcBusinessService extends BaseController {
|
|||
EntDevice entDevice = new EntDevice();
|
||||
BeanUtils.copyProperties(addOrUpdateEntEquipmentDto,entDevice);
|
||||
Integer result = 0;
|
||||
if (null != addOrUpdateEntEquipmentDto && null != addOrUpdateEntEquipmentDto.getDeviceId()){
|
||||
EntDevice ed = entDeviceMapper.selectById(addOrUpdateEntEquipmentDto.getDeviceId());
|
||||
if (null != ed && null != ed.getDeviceId()){
|
||||
entDevice.setModifyBy(getUserId());
|
||||
entDevice.setModifyTime(new Date());
|
||||
result = entDeviceMapper.updateEntDevice(entDevice);
|
||||
result = entDeviceMapper.updateById(entDevice);
|
||||
}else {
|
||||
entDevice.setCreateBy(getUserId());
|
||||
entDevice.setCreateTime(new Date());
|
||||
|
|
@ -553,6 +566,9 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
entInsRecord.setCreateBy(getUserId());
|
||||
entInsRecord.setCreateTime(new Date());
|
||||
if (StringUtils.isBlank(entInsRecord.getInsRecordId())){
|
||||
entInsRecord.setInsRecordId(RandomNumber.getUUid());
|
||||
}
|
||||
result = entInsRecordMapper.insert(entInsRecord);
|
||||
}
|
||||
if (result != 1 ){
|
||||
|
|
@ -690,6 +706,7 @@ public class PcBusinessService extends BaseController {
|
|||
SingleResult singleResult = new SingleResult();
|
||||
EntInspectionRecord entInspectionRecord = new EntInspectionRecord();
|
||||
BeanUtils.copyProperties(inspectionRecordDto,entInspectionRecord);
|
||||
entInspectionRecord.setDeviceId(inspectionRecordDto.getInspectionDeviceId());
|
||||
int result = 0;
|
||||
if (null != inspectionRecordDto && null != entInspectionRecord.getInspectionId()){
|
||||
entInspectionRecord.setModifyBy(getUserId());
|
||||
|
|
@ -799,12 +816,13 @@ public class PcBusinessService extends BaseController {
|
|||
|
||||
|
||||
|
||||
public SingleResult inListStatistic(String enterpriseId,String listId,String keyWord,Integer page,Integer pageSize){
|
||||
public SingleResult inListStatistic(String enterpriseId,String listId,String keyWord,Integer page,Integer pageSize) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
HashMap map = new HashMap();
|
||||
Integer total = entPostListMapper.selectEntPostListCount(enterpriseId,listId,null);
|
||||
String userId = getUserId();
|
||||
Integer total = entPostListMapper.selectEntPostListCount(enterpriseId,listId,null,userId);
|
||||
//2代表已完成状态
|
||||
Integer finishCount = entPostListMapper.selectEntPostListFinishedCount(enterpriseId,listId,2,null);
|
||||
Integer finishCount = entPostListMapper.selectEntPostListFinishedCount(enterpriseId,listId,2,null,userId);
|
||||
double finishPercent = Arith.div(finishCount,total) * 100;
|
||||
map.put("finishPercent",finishPercent);
|
||||
List<EntPostTask>tasks = entPostTaskMapper.selectEntUserPostTaskByListId(enterpriseId,listId,keyWord,page,pageSize);
|
||||
|
|
@ -820,14 +838,15 @@ public class PcBusinessService extends BaseController {
|
|||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entPostProcessStatistic(String enterpriseId,String listId,Integer year){
|
||||
public SingleResult entPostProcessStatistic(String enterpriseId,String listId,Integer year) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Integer total = entPostListMapper.selectEntPostListCount(enterpriseId,listId,year);
|
||||
String userId = getUserId();
|
||||
Integer total = entPostListMapper.selectEntPostListCount(enterpriseId,listId,year,userId);
|
||||
//2代表已完成状态
|
||||
Integer finishCount = entPostListMapper.selectEntPostListFinishedCount(enterpriseId,listId,2,year);
|
||||
if (null != finishCount && finishCount >= 0 ){
|
||||
Integer finishCount = entPostListMapper.selectEntPostListFinishedCount(enterpriseId,listId,2,year,userId);
|
||||
if (null != finishCount && finishCount >= 0 && total > 0){
|
||||
double finishPercent = Arith.div(finishCount,total) * 100;
|
||||
singleResult.setData(finishPercent);
|
||||
singleResult.setData(new BigDecimal(finishPercent).setScale(2, RoundingMode.DOWN).doubleValue());
|
||||
}
|
||||
|
||||
return singleResult;
|
||||
|
|
@ -838,9 +857,10 @@ public class PcBusinessService extends BaseController {
|
|||
public SingleResult entPostListPercentStatistic(String enterpriseId,String listId,Integer year)throws Exception{
|
||||
SingleResult singleResult = new SingleResult();
|
||||
HashMap map = new HashMap();
|
||||
long total = entPostTaskMapper.selectEntPostTaskTotal(enterpriseId,listId,year);
|
||||
String userId = getUserId();
|
||||
long total = entPostTaskMapper.selectEntPostTaskTotal(enterpriseId,listId,year,userId);
|
||||
//2代表已完成状态
|
||||
EntPostTaskStatistic entPostTaskStatistic = entPostTaskMapper.selectEntPostTaskByState(enterpriseId,listId,year);
|
||||
EntPostTaskStatistic entPostTaskStatistic = entPostTaskMapper.selectEntPostTaskByState(enterpriseId,listId,year,userId);
|
||||
if (null != entPostTaskStatistic){
|
||||
double finishPercent = Arith.div(entPostTaskStatistic.getFinished(),total) * 100;
|
||||
finishPercent = TypeConversion.decimalFormat(finishPercent,2);
|
||||
|
|
|
|||
|
|
@ -199,6 +199,12 @@ public class TaskService extends BaseController {
|
|||
System.out.println("证件过期定时任务结束");
|
||||
}
|
||||
|
||||
public void userCertificationState(){
|
||||
System.out.println("用户证件过期定时任务开始");
|
||||
entUserCredentialMapper.scheduleUpdateState();
|
||||
System.out.println("用户证件过期定时任务结束");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ spring:
|
|||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://121.40.106.103:3306/inventory_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&
|
||||
url: jdbc:mysql://121.40.106.103:3306/inventory_copy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&
|
||||
username: rzyc
|
||||
password: ENC(FDlRK2MAcJBMF7UBHBJPLGzRkpWQ4T6dgYP2bDnTodQ=)
|
||||
tomcat:
|
||||
|
|
|
|||
|
|
@ -16,17 +16,11 @@ 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.enums.*;
|
||||
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 com.rzyc.model.user.*;
|
||||
import com.rzyc.service.AssignmentTaskThread;
|
||||
import com.rzyc.service.SaveEntListThread;
|
||||
import com.rzyc.service.SaveEntPostAndUserThread;
|
||||
|
|
@ -2214,6 +2208,25 @@ public class MinWorkController extends BaseController{
|
|||
SaveIndustryPostThread saveIndustryPost = new SaveIndustryPostThread(sysEnterprise.getWorkClassId(),sysEnterprise.getSysenterpriseid(),inPostMapper,inPostItemMapper,inPostListMapper,inListItemMapper,sysEnterpriseMapper,entPostMapper, entPostDutyMapper,false);
|
||||
Thread saveIndustryPostThread = new Thread(saveIndustryPost);
|
||||
saveIndustryPostThread.start();
|
||||
|
||||
//生成行业对应的企业责任清单(不包括岗位的清单,只包括行业公共)
|
||||
SaveEntListThread saveEntListThread = new SaveEntListThread(inListItemMapper,inEntListMapper,getUserId(),sysEnterprise.getWorkClassId(),sysEnterprise.getSysenterpriseid());
|
||||
Thread thread = new Thread(saveEntListThread);
|
||||
thread.start();
|
||||
|
||||
//创建法人账号,用于判断手机号重复,单加不影响,没有生成履职清单和工作职责
|
||||
CopyOnWriteArrayList copyOnWriteArrayList = new CopyOnWriteArrayList();
|
||||
String entUserId = RandomNumber.getUUid();
|
||||
String postId = RandomNumber.getUUid();
|
||||
SaveEntPostAndUserThread SaveEntPostAndUserThread = new SaveEntPostAndUserThread(sysEnterprise.getSysenterpriseid(),getUserId(),sysEnterprise.getWorkClassId(),entPostMapper,entUserMapper,constantsConfigure,sysEnterprise.getLegalrepre(),sysEnterprise.getLrlinktel(),sysEnterprise.getEntname(),entUserId,postId,copyOnWriteArrayList,inListMapper,inListItemMapper,entPostDutyMapper);
|
||||
Thread t = new Thread(SaveEntPostAndUserThread);
|
||||
|
||||
//法人履职清单和履职任务
|
||||
AssignmentTaskThread textThread = new AssignmentTaskThread(entUserId,sysEnterprise.getSysenterpriseid(),postId,entPostListMapper,entPostTaskMapper,inEntListMapper,getUserId(),inPostListMapper,inPostItemMapper,entUserMapper,entPostMapper);
|
||||
Thread ttThread=new Thread(textThread);
|
||||
ttThread.start();
|
||||
t.start();
|
||||
|
||||
}else {
|
||||
SysEnterprise verifyEnterprise = sysEnterpriseMapper.selectByName(sysEnterpriseDo.getEntname(),sysEnterpriseDo.getSysenterpriseid());
|
||||
if (null != verifyEnterprise){
|
||||
|
|
@ -2238,23 +2251,7 @@ public class MinWorkController extends BaseController{
|
|||
//生成最小工作单元
|
||||
saveEntWork(sysEnterprise.getSysenterpriseid());
|
||||
|
||||
//生成行业对应的企业责任清单(不包括岗位的清单,只包括行业公共)
|
||||
SaveEntListThread saveEntListThread = new SaveEntListThread(inListItemMapper,inEntListMapper,getUserId(),sysEnterprise.getWorkClassId(),sysEnterprise.getSysenterpriseid());
|
||||
Thread thread = new Thread(saveEntListThread);
|
||||
thread.start();
|
||||
|
||||
//创建法人账号,用于判断手机号重复,单加不影响,没有生成履职清单和工作职责
|
||||
CopyOnWriteArrayList copyOnWriteArrayList = new CopyOnWriteArrayList();
|
||||
String entUserId = RandomNumber.getUUid();
|
||||
String postId = RandomNumber.getUUid();
|
||||
SaveEntPostAndUserThread SaveEntPostAndUserThread = new SaveEntPostAndUserThread(sysEnterprise.getSysenterpriseid(),getUserId(),sysEnterprise.getWorkClassId(),entPostMapper,entUserMapper,constantsConfigure,sysEnterprise.getLegalrepre(),sysEnterprise.getLrlinktel(),sysEnterprise.getEntname(),entUserId,postId,copyOnWriteArrayList,inListMapper,inListItemMapper,entPostDutyMapper);
|
||||
Thread t = new Thread(SaveEntPostAndUserThread);
|
||||
|
||||
//法人履职清单和履职任务
|
||||
AssignmentTaskThread textThread = new AssignmentTaskThread(entUserId,sysEnterprise.getSysenterpriseid(),postId,entPostListMapper,entPostTaskMapper,inEntListMapper,getUserId(),inPostListMapper,inPostItemMapper,entUserMapper,entPostMapper);
|
||||
Thread ttThread=new Thread(textThread);
|
||||
ttThread.start();
|
||||
t.start();
|
||||
|
||||
if (result > 0){
|
||||
singleResult.setMessage(Message.SUCCESS);
|
||||
|
|
@ -2325,26 +2322,7 @@ public class MinWorkController extends BaseController{
|
|||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "PC删除最小工作单元格清单",notes = "PC删除最小工作单元格清单")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "listWorkId", value = "清单id", required = true, dataType = "String")
|
||||
})
|
||||
@PostMapping("/deleteListWork")
|
||||
@ResponseBody
|
||||
public SingleResult<String> deleteListWork(String listWorkId){
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
String[] strs = listWorkId.split(",");
|
||||
List<String> listWorkIds = Arrays.asList(strs);
|
||||
if (null != listWorkIds && listWorkIds.size() >0){
|
||||
for (String id : listWorkIds) {
|
||||
int temp = listWorkMapper.updateState(id, DelState.DELETE.getState());
|
||||
if (temp > 0){
|
||||
listQuotaMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理企业地区信息
|
||||
|
|
@ -2362,4 +2340,12 @@ public class MinWorkController extends BaseController{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1350,6 +1350,27 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 未完成的履职任务
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@LoginAuth
|
||||
@ApiOperation(value = "未完成的履职任务", notes = "未完成的履职任务")
|
||||
@GetMapping(value = "factorTaskByFactorId")
|
||||
@ResponseBody
|
||||
public MultiResult<OATask> factorTaskByFactorId()throws Exception{
|
||||
MultiResult<OATask> result = new MultiResult<>();
|
||||
List<OATask> tasks = oaTaskMapper.notFinishTaskByUserId(getUserId());
|
||||
if(tasks.size() > 0 ){
|
||||
result.setData(tasks);
|
||||
}else{
|
||||
result.setCode(Code.NO_DATA.getCode());
|
||||
result.setMessage(Message.NO_DATA);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 部门分页
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -0,0 +1,113 @@
|
|||
package com.rzyc.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.common.utils.DateUtils;
|
||||
import com.common.utils.model.Code;
|
||||
import com.common.utils.model.Message;
|
||||
import com.common.utils.model.MultiResult;
|
||||
import com.common.utils.model.SingleResult;
|
||||
import com.rzyc.advice.LoginAuth;
|
||||
import com.rzyc.bean.RiskSource.RiskSourceStatistic;
|
||||
import com.rzyc.bean.user.dto.StayMatterDto;
|
||||
import com.rzyc.enums.TaskCompleteState;
|
||||
import com.rzyc.model.OATask;
|
||||
import com.rzyc.model.RkSources;
|
||||
import com.rzyc.model.user.SysUser;
|
||||
import com.rzyc.service.PcBusinessService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Xuwanxin
|
||||
* 风险管控
|
||||
* @date 2023/3/27
|
||||
*/
|
||||
@Api(tags = "风险管控")
|
||||
@CrossOrigin("*")
|
||||
@RequestMapping("riskControl")
|
||||
@Controller
|
||||
@Validated
|
||||
public class RiskControlController extends BaseController{
|
||||
|
||||
private PcBusinessService pcBusinessService;
|
||||
|
||||
@Autowired
|
||||
public RiskControlController(PcBusinessService pcBusinessService) {
|
||||
this.pcBusinessService = pcBusinessService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 政府web风险源
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@LoginAuth
|
||||
@ApiOperation(value = "政府web风险源", notes = "政府web风险源")
|
||||
@GetMapping(value = "/riskSourceStatistic")
|
||||
@ResponseBody
|
||||
public SingleResult<RiskSourceStatistic> riskSourceStatistic()throws Exception{
|
||||
return pcBusinessService.riskSourceStatistic();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 政府web风险源行业风险统计
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@LoginAuth
|
||||
@ApiOperation(value = "政府web风险源行业风险统计", notes = "政府web风险源行业风险统计")
|
||||
@GetMapping(value = "/riskSourceStatisticByIndustry")
|
||||
@ResponseBody
|
||||
public SingleResult<List<RiskSourceStatistic>> riskSourceStatisticByIndustry()throws Exception{
|
||||
return pcBusinessService.riskSourceStatisticByIndustry();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 政府web风险源列表
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@LoginAuth
|
||||
@ApiOperation(value = "政府web风险源列表", notes = "政府web风险源列表")
|
||||
@ApiImplicitParams(value = {
|
||||
@ApiImplicitParam(name = "companyName",value = "企业名"),
|
||||
@ApiImplicitParam(name = "industryId",value = "行业ID"),
|
||||
@ApiImplicitParam(name = "riskSourceId",value = "风险源ID"),
|
||||
@ApiImplicitParam(name = "accidentType",value = "事故类型ID"),
|
||||
@ApiImplicitParam(name = "riskGrade",value = "风险等级"),
|
||||
@ApiImplicitParam(name = "page",value = "page"),
|
||||
@ApiImplicitParam(name = "pageSize",value = "pageSize")
|
||||
})
|
||||
@GetMapping(value = "/riskSourceTable")
|
||||
@ResponseBody
|
||||
public SingleResult<List<RkSources>> riskSourceTable(String companyName,String industryId,String riskSourceId,
|
||||
String accidentType, String enterpriseId, Integer riskGrade,Integer page,Integer pageSize)throws Exception{
|
||||
return pcBusinessService.riskSourceTable(companyName,industryId,riskSourceId,accidentType,enterpriseId,riskGrade,page,pageSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@ import org.apache.commons.beanutils.ConvertUtils;
|
|||
import org.apache.commons.beanutils.converters.DateConverter;
|
||||
import org.apache.commons.beanutils.converters.SqlDateConverter;
|
||||
import org.apache.poi.ss.formula.functions.Na;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.propertyeditors.CustomDateEditor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -50,7 +51,12 @@ import java.util.List;
|
|||
public class WorkController extends BaseController {
|
||||
|
||||
|
||||
PcBusinessService pcBusinessService;
|
||||
private PcBusinessService pcBusinessService;
|
||||
|
||||
@Autowired
|
||||
public WorkController(PcBusinessService pcBusinessService) {
|
||||
this.pcBusinessService = pcBusinessService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 新增任务
|
||||
|
|
|
|||
|
|
@ -18,29 +18,22 @@ import com.rzyc.bean.user.PerformProgress;
|
|||
import com.rzyc.bean.user.dto.FactorCheckDto;
|
||||
import com.rzyc.bean.user.dto.FactorListDto;
|
||||
import com.rzyc.enums.*;
|
||||
import com.rzyc.model.ListWork;
|
||||
import com.rzyc.model.NoRecord;
|
||||
import com.rzyc.model.Notice;
|
||||
import com.rzyc.model.SysOrg;
|
||||
import com.rzyc.model.*;
|
||||
import com.rzyc.model.check.BookEntCheck;
|
||||
import com.rzyc.model.check.BookEntHT;
|
||||
import com.rzyc.model.ent.SysEnterprise;
|
||||
import com.rzyc.model.user.ListFactor;
|
||||
import com.rzyc.model.user.ListSafeWithBLOBs;
|
||||
import com.rzyc.model.user.SysUser;
|
||||
import com.rzyc.model.user.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
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.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@Api(tags = "微信小程序")
|
||||
@CrossOrigin("*")
|
||||
|
|
@ -753,4 +746,87 @@ public class WxContorller extends com.rzyc.controller.BaseController {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "小程序检查后提交履职任务",notes = "小程序检查后提交履职任务")
|
||||
@PostMapping("/addOaTaskAfterCheck")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public SingleResult addOaTaskAfterCheck(String oaTaskId,String listFactorId,String checkId)throws Exception{
|
||||
Integer result = 0;
|
||||
SingleResult singleResult = new SingleResult();
|
||||
|
||||
ListDetailWithBLOBs listDetail = new ListDetailWithBLOBs();
|
||||
String chinaName = getChinaName();
|
||||
System.out.println("chinaName -> "+chinaName);
|
||||
listDetail.setCreatedby(chinaName);
|
||||
listDetail.setModifiedby(chinaName);
|
||||
listDetail.setTaskId(oaTaskId);
|
||||
listDetail.setIsfinish(IsFinish.YES.getFinish());
|
||||
listDetail.setDelState(DelState.NOT_DEL.getState());
|
||||
String listDetailId = RandomNumber.getUUid();
|
||||
listDetail.setListdetailid(listDetailId);
|
||||
result += listDetailMapper.insert(listDetail);
|
||||
|
||||
//记录履职记录
|
||||
ListFactor listFactor = listFactorMapper.selectByPrimaryKey(listFactorId);
|
||||
if(null != listFactor){
|
||||
String content = "新增履职记录:"+listDetail.getWorkcnt();
|
||||
addListChange(listFactor.getListperformid(),listFactor.getListfactorid(),content);
|
||||
}
|
||||
|
||||
//修改履职档案完成情况
|
||||
factorProgres(listFactorId);
|
||||
|
||||
//如果是通过任务添加的履职信息 修改任务状态
|
||||
if(StringUtils.isNotBlank(oaTaskId)){
|
||||
String[] strs = oaTaskId.split(",");
|
||||
List<String> taskIds = Arrays.asList(strs);
|
||||
for (String str : taskIds){
|
||||
OATask oaTask = oaTaskMapper.findById(str);
|
||||
if(null != oaTask){
|
||||
//修改任务状态
|
||||
changeTaskState(oaTask,listFactorId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Listdetacheck listdetacheck = new Listdetacheck();
|
||||
listdetacheck.setListdetacheck(RandomNumber.getUUid());
|
||||
listdetacheck.setListdetailid(listDetailId);
|
||||
listdetacheck.setBookentcheckid(checkId);
|
||||
listdetacheck.setCreatedby(chinaName);
|
||||
listdetacheck.setCreatedon(new Date());
|
||||
listdetacheck.setModifiedby(chinaName);
|
||||
listdetacheck.setModifiedon(new Date());
|
||||
result += listdetacheckMapper.insert(listdetacheck);
|
||||
|
||||
if (result != 2){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存履职记录
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2023/2/9 14:21
|
||||
*/
|
||||
public void addListChange(String performId,String factorId,String content)throws Exception{
|
||||
String userId = getUserId();
|
||||
Listchange listchange = new Listchange();
|
||||
listchange.setListchangeId(RandomNumber.getUUid());
|
||||
listchange.setPerformId(performId);
|
||||
listchange.setFactorId(factorId);
|
||||
listchange.setChangeContent(content);
|
||||
listchange.setUserId(userId);
|
||||
listchange.setCreateBy(userId);
|
||||
listchange.setModifyBy(userId);
|
||||
listchange.setCreateTime(new Date());
|
||||
listchange.setModifyTime(new Date());
|
||||
listchangeMapper.insert(listchange);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,6 +142,16 @@ public class PcCompanyController extends com.rzyc.controller.BaseController {
|
|||
|
||||
CompanyEntNum companyEntNum = new CompanyEntNum();
|
||||
|
||||
|
||||
List<Integer> inherentRisks = new ArrayList<>();
|
||||
|
||||
//风险等级
|
||||
if(StringUtils.isNotBlank(companiesDto.getInherentRiskStr())){
|
||||
for (String str : companiesDto.getInherentRiskStr().split(",")){
|
||||
inherentRisks.add(TypeConversion.StringToInteger(str));
|
||||
}
|
||||
}
|
||||
|
||||
//企业总数
|
||||
Integer totalNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),companiesDto.getRiskLevel(),isAdmin,companiesDto.getBaseinclassid(),new ArrayList<>());
|
||||
companyEntNum.setTotalNum(totalNum);
|
||||
|
|
@ -171,19 +181,20 @@ public class PcCompanyController extends com.rzyc.controller.BaseController {
|
|||
Integer blueNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),companiesDto.getRiskLevel(),isAdmin,companiesDto.getBaseinclassid(),blueRisks);
|
||||
companyEntNum.setBlueNum(blueNum);
|
||||
}else{
|
||||
Integer redNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.RED.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),null);
|
||||
//红色
|
||||
Integer redNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.RED.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),inherentRisks);
|
||||
companyEntNum.setRedNum(redNum);
|
||||
|
||||
//橙色企业
|
||||
Integer orangeNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.ORANGE.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),null);
|
||||
Integer orangeNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.ORANGE.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),inherentRisks);
|
||||
companyEntNum.setOrangeNum(orangeNum);
|
||||
|
||||
//橙色企业
|
||||
Integer yellowNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.YELLOW.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),null);
|
||||
Integer yellowNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.YELLOW.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),inherentRisks);
|
||||
companyEntNum.setYellowNum(yellowNum);
|
||||
|
||||
//橙色企业
|
||||
Integer blueNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.BLUE.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),null);
|
||||
//蓝色企业
|
||||
Integer blueNum = sysEnterpriseMapper.countCompany(areaCode,companiesDto.getEntName(),RiskLevel.BLUE.getLevelDesc(),isAdmin,companiesDto.getBaseinclassid(),inherentRisks);
|
||||
companyEntNum.setBlueNum(blueNum);
|
||||
}
|
||||
|
||||
|
|
@ -661,10 +672,30 @@ public class PcCompanyController extends com.rzyc.controller.BaseController {
|
|||
sysEnterprise.setQrCode(entQrCode(sysEnterprise.getSysenterpriseid()));
|
||||
result=sysEnterpriseMapper.insert(sysEnterprise);
|
||||
|
||||
|
||||
//创建多个行业岗位
|
||||
SaveIndustryPostThread saveIndustryPost = new SaveIndustryPostThread(sysEnterprise.getWorkClassId(),sysEnterprise.getSysenterpriseid(),inPostMapper,inPostItemMapper,inPostListMapper,inListItemMapper,sysEnterpriseMapper,entPostMapper, entPostDutyMapper,false);
|
||||
Thread saveIndustryPostThread = new Thread(saveIndustryPost);
|
||||
saveIndustryPostThread.start();
|
||||
|
||||
//生成行业对应的企业责任清单(不包括岗位的清单,只包括行业公共)
|
||||
SaveEntListThread saveEntListThread = new SaveEntListThread(inListItemMapper,inEntListMapper,getUserId(),sysEnterprise.getWorkClassId(),sysEnterprise.getSysenterpriseid());
|
||||
Thread thread = new Thread(saveEntListThread);
|
||||
thread.start();
|
||||
|
||||
//创建法人账号,用于判断手机号重复,单加不影响,没有生成履职清单和工作职责
|
||||
CopyOnWriteArrayList copyOnWriteArrayList = new CopyOnWriteArrayList();
|
||||
String entUserId = RandomNumber.getUUid();
|
||||
String postId = RandomNumber.getUUid();
|
||||
SaveEntPostAndUserThread SaveEntPostAndUserThread = new SaveEntPostAndUserThread(sysEnterprise.getSysenterpriseid(),getUserId(),sysEnterprise.getWorkClassId(),entPostMapper,entUserMapper,constantsConfigure,sysEnterprise.getLegalrepre(),sysEnterprise.getLrlinktel(),sysEnterprise.getEntname(),entUserId,postId,copyOnWriteArrayList,inListMapper,inListItemMapper,entPostDutyMapper);
|
||||
Thread t = new Thread(SaveEntPostAndUserThread);
|
||||
|
||||
//法人履职清单和履职任务
|
||||
AssignmentTaskThread textThread = new AssignmentTaskThread(entUserId,sysEnterprise.getSysenterpriseid(),postId,entPostListMapper,entPostTaskMapper,inEntListMapper,getUserId(),inPostListMapper,inPostItemMapper,entUserMapper,entPostMapper);
|
||||
Thread ttThread=new Thread(textThread);
|
||||
ttThread.start();
|
||||
t.start();
|
||||
|
||||
}else {
|
||||
SysEnterprise verifyEnterprise = sysEnterpriseMapper.selectByName(sysEnterpriseDo.getEntname(),sysEnterpriseDo.getSysenterpriseid());
|
||||
if (null != verifyEnterprise){
|
||||
|
|
@ -689,23 +720,9 @@ public class PcCompanyController extends com.rzyc.controller.BaseController {
|
|||
//生成最小工作单元
|
||||
saveEntWork(sysEnterprise.getSysenterpriseid());
|
||||
|
||||
//生成行业对应的企业责任清单(不包括岗位的清单,只包括行业公共)
|
||||
SaveEntListThread saveEntListThread = new SaveEntListThread(inListItemMapper,inEntListMapper,getUserId(),sysEnterprise.getWorkClassId(),sysEnterprise.getSysenterpriseid());
|
||||
Thread thread = new Thread(saveEntListThread);
|
||||
thread.start();
|
||||
|
||||
//创建法人账号,用于判断手机号重复,单加不影响,没有生成履职清单和工作职责
|
||||
CopyOnWriteArrayList copyOnWriteArrayList = new CopyOnWriteArrayList();
|
||||
String entUserId = RandomNumber.getUUid();
|
||||
String postId = RandomNumber.getUUid();
|
||||
SaveEntPostAndUserThread SaveEntPostAndUserThread = new SaveEntPostAndUserThread(sysEnterprise.getSysenterpriseid(),getUserId(),sysEnterprise.getWorkClassId(),entPostMapper,entUserMapper,constantsConfigure,sysEnterprise.getLegalrepre(),sysEnterprise.getLrlinktel(),sysEnterprise.getEntname(),entUserId,postId,copyOnWriteArrayList,inListMapper,inListItemMapper,entPostDutyMapper);
|
||||
Thread t = new Thread(SaveEntPostAndUserThread);
|
||||
|
||||
//法人履职清单和履职任务
|
||||
AssignmentTaskThread textThread = new AssignmentTaskThread(entUserId,sysEnterprise.getSysenterpriseid(),postId,entPostListMapper,entPostTaskMapper,inEntListMapper,getUserId(),inPostListMapper,inPostItemMapper,entUserMapper,entPostMapper);
|
||||
Thread ttThread=new Thread(textThread);
|
||||
ttThread.start();
|
||||
t.start();
|
||||
//单位诊断
|
||||
this.updateOrAddDiagnosis(100,sysEnterprise.getSysenterpriseid(),"");
|
||||
|
||||
if (result > 0){
|
||||
singleResult.setMessage(Message.SUCCESS);
|
||||
|
|
@ -1299,4 +1316,7 @@ public class PcCompanyController extends com.rzyc.controller.BaseController {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -396,38 +396,7 @@ public class RiskController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改诊断列表
|
||||
* @param score
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateOrAddDiagnosis(Integer score,String enterpriseId,String category)throws Exception{
|
||||
String chinaName = getChinaName();
|
||||
Date date = new Date();
|
||||
rkCompanyDiagnosisMapper.deletByEnterpriseId(enterpriseId);
|
||||
RkCompanyDiagnosis rkCompanyDiagnosis = new RkCompanyDiagnosis();
|
||||
rkCompanyDiagnosis.setDiagnosisId(RandomNumber.getUUid());
|
||||
rkCompanyDiagnosis.setModified(chinaName);
|
||||
rkCompanyDiagnosis.setCreated(chinaName);
|
||||
rkCompanyDiagnosis.setModifyTime(date);
|
||||
rkCompanyDiagnosis.setCreateTime(date);
|
||||
rkCompanyDiagnosis.setEnterpriseId(enterpriseId);
|
||||
rkCompanyDiagnosis.setAssessTime(date);
|
||||
rkCompanyDiagnosis.setScore(score);
|
||||
rkCompanyDiagnosis.setCategory(category);
|
||||
rkCompanyDiagnosis.setStatus(FlowQueryStatus.PENDING);
|
||||
if (score < 60){
|
||||
rkCompanyDiagnosis.setGrade(1);
|
||||
}else if (score >59 && score < 75){
|
||||
rkCompanyDiagnosis.setGrade(2);
|
||||
}else if (score > 74 && score < 90){
|
||||
rkCompanyDiagnosis.setGrade(3);
|
||||
}else{
|
||||
rkCompanyDiagnosis.setGrade(4);
|
||||
}
|
||||
rkCompanyDiagnosisMapper.insert(rkCompanyDiagnosis);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.common.utils.model.Message;
|
|||
import com.common.utils.model.SingleResult;
|
||||
import com.common.utils.pager.PageOperation;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.rzyc.bean.RiskSource.RiskSourceStatistic;
|
||||
import com.rzyc.config.RedisUtil;
|
||||
import com.rzyc.controller.BaseController;
|
||||
import com.rzyc.model.*;
|
||||
|
|
@ -99,4 +100,28 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
@PageOperation
|
||||
public SingleResult riskSourceTable(String companyName,String industryId,String riskSourceId,
|
||||
String accidentType, String enterpriseId, Integer riskGrade,Integer page,Integer pageSize){
|
||||
SingleResult<List<RkSources>> result = new SingleResult<>();
|
||||
List<RkSources> rkSources = rkSourcesMapper.riskSourceTable(companyName,industryId,riskSourceId,accidentType,enterpriseId,riskGrade);
|
||||
result.setData(rkSources);
|
||||
return result;
|
||||
}
|
||||
|
||||
public SingleResult riskSourceStatisticByIndustry(){
|
||||
SingleResult<List<RiskSourceStatistic>> result = new SingleResult<>();
|
||||
List<RiskSourceStatistic> riskSourceStatistic = rkSourcesMapper.riskSourceStatisticByIndustry();
|
||||
result.setData(riskSourceStatistic);
|
||||
return result;
|
||||
}
|
||||
|
||||
public SingleResult riskSourceStatistic(){
|
||||
SingleResult<RiskSourceStatistic> result = new SingleResult<>();
|
||||
RiskSourceStatistic riskSourceStatistic = rkSourcesMapper.riskSourceStatistic();
|
||||
result.setData(riskSourceStatistic);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ spring:
|
|||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://121.40.106.103:3306/inventory_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
url: jdbc:mysql://121.40.106.103:3306/inventory_copy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||
username: rzyc
|
||||
password: ENC(FDlRK2MAcJBMF7UBHBJPLGzRkpWQ4T6dgYP2bDnTodQ=)
|
||||
tomcat:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user