企业端设备模块->企业端PC,小程序接口调试
This commit is contained in:
parent
4114fe9533
commit
e2d4699a4a
|
|
@ -24,6 +24,17 @@ public class CertificatesPageDto {
|
||||||
@ApiModelProperty(value = "每页条数",required = true,example = "10")
|
@ApiModelProperty(value = "每页条数",required = true,example = "10")
|
||||||
private Integer pageSize;//每页显示多少条
|
private Integer pageSize;//每页显示多少条
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "过期状态 1、正常 2、即将到期 3、已到期",required = false)
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
public String getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(String state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
public String getEnterpriseId() {
|
public String getEnterpriseId() {
|
||||||
return enterpriseId;
|
return enterpriseId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import java.util.List;
|
||||||
public interface EntCertificatesMapper extends BaseMapper<EntCertificates> {
|
public interface EntCertificatesMapper extends BaseMapper<EntCertificates> {
|
||||||
|
|
||||||
/*证件列表*/
|
/*证件列表*/
|
||||||
List<EntCertificates> certificatesList(@Param("enterpriseId") String enterpriseId);
|
List<EntCertificates> certificatesList(@Param("enterpriseId") String enterpriseId,@Param("state") String[] state);
|
||||||
|
|
||||||
List<EntCertificates> findAll();
|
List<EntCertificates> findAll();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,10 @@ public interface EntUserMapper extends BaseMapper<EntUser> {
|
||||||
* @param keyContent 关键字
|
* @param keyContent 关键字
|
||||||
* @param postId 岗位id
|
* @param postId 岗位id
|
||||||
* @param enterpriseId 企业id
|
* @param enterpriseId 企业id
|
||||||
|
* @param userType 用户类型
|
||||||
* @return EntUser 企业用户实体
|
* @return EntUser 企业用户实体
|
||||||
* */
|
* */
|
||||||
List<EntUser>selectEntUserList(@Param("keyContent") String keyContent,@Param("postId")String postId,@Param("enterpriseId") String enterpriseId);
|
List<EntUser>selectEntUserList(@Param("keyContent") String keyContent,@Param("postId")String postId,@Param("enterpriseId") String enterpriseId,@Param("userType")Integer userType);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -60,4 +61,14 @@ public interface EntUserMapper extends BaseMapper<EntUser> {
|
||||||
* @return int 成功或失败
|
* @return int 成功或失败
|
||||||
* */
|
* */
|
||||||
EntUser validName(@Param("name")String name);
|
EntUser validName(@Param("name")String name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业用户不分页
|
||||||
|
* @param name 名字
|
||||||
|
* @param enterpriseId 公司id
|
||||||
|
* @return list
|
||||||
|
* */
|
||||||
|
List<EntUser> selectEntUserListNoPage(@Param("name") String name,@Param("enterpriseId")String enterpriseId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,17 @@ public class EntDevice implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer recordNumber;
|
private Integer recordNumber;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private EntDeviceType deviceType;
|
||||||
|
|
||||||
|
public EntDeviceType getDeviceType() {
|
||||||
|
return deviceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceType(EntDeviceType deviceType) {
|
||||||
|
this.deviceType = deviceType;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getFrequency() {
|
public Integer getFrequency() {
|
||||||
return frequency;
|
return frequency;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
@ -24,16 +26,18 @@ public class EntDeviceMaintenancePlan implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "保养计划")
|
@ApiModelProperty(value = "保养计划")
|
||||||
@TableId("maintenance_plan_id")
|
@TableId("maintenance_plan_id")
|
||||||
private Integer maintenancePlanId;
|
private String maintenancePlanId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
|
@ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
|
||||||
@TableField("maintenance_plan_level")
|
@TableField("maintenance_plan_level")
|
||||||
private Integer maintenancePlanLevel;
|
private Integer maintenancePlanLevel;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "计划开始时间")
|
@ApiModelProperty(value = "计划开始时间")
|
||||||
@TableField("maintenance_plan_start_time")
|
@TableField("maintenance_plan_start_time")
|
||||||
private Date maintenancePlanStartTime;
|
private Date maintenancePlanStartTime;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "计划结束时间")
|
@ApiModelProperty(value = "计划结束时间")
|
||||||
@TableField("maintenance_plan_end_time")
|
@TableField("maintenance_plan_end_time")
|
||||||
private Date maintenancePlanEndTime;
|
private Date maintenancePlanEndTime;
|
||||||
|
|
@ -74,13 +78,36 @@ public class EntDeviceMaintenancePlan implements Serializable {
|
||||||
@TableField("modify_time")
|
@TableField("modify_time")
|
||||||
private Date modifyTime;
|
private Date modifyTime;
|
||||||
|
|
||||||
public Integer getMaintenancePlanId() {
|
@TableField("device_id")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String entUserName;
|
||||||
|
|
||||||
|
public String getEntUserName() {
|
||||||
|
return entUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEntUserName(String entUserName) {
|
||||||
|
this.entUserName = entUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceId() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(String deviceId) {
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaintenancePlanId() {
|
||||||
return maintenancePlanId;
|
return maintenancePlanId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMaintenancePlanId(Integer maintenancePlanId) {
|
public void setMaintenancePlanId(String maintenancePlanId) {
|
||||||
this.maintenancePlanId = maintenancePlanId;
|
this.maintenancePlanId = maintenancePlanId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getMaintenancePlanLevel() {
|
public Integer getMaintenancePlanLevel() {
|
||||||
return maintenancePlanLevel;
|
return maintenancePlanLevel;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
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;
|
||||||
|
|
||||||
|
|
@ -34,10 +36,13 @@ public class EntDeviceMaintenanceRecord implements Serializable {
|
||||||
@TableField("maintenance_level")
|
@TableField("maintenance_level")
|
||||||
private Integer maintenanceLevel;
|
private Integer maintenanceLevel;
|
||||||
|
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "开始时间")
|
@ApiModelProperty(value = "开始时间")
|
||||||
@TableField("start_time")
|
@TableField("start_time")
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "结束时间")
|
@ApiModelProperty(value = "结束时间")
|
||||||
@TableField("ent_time")
|
@TableField("ent_time")
|
||||||
private Date entTime;
|
private Date entTime;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import java.util.Date;
|
||||||
public class EntDeviceMaintenancePlanDto {
|
public class EntDeviceMaintenancePlanDto {
|
||||||
|
|
||||||
@ApiModelProperty(value = "保养计划")
|
@ApiModelProperty(value = "保养计划")
|
||||||
private Integer maintenancePlanId;
|
private String maintenancePlanId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
|
@ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
|
||||||
private Integer maintenancePlanLevel;
|
private Integer maintenancePlanLevel;
|
||||||
|
|
@ -40,14 +40,25 @@ public class EntDeviceMaintenancePlanDto {
|
||||||
@ApiModelProperty(value = "备件id")
|
@ApiModelProperty(value = "备件id")
|
||||||
private String sparePartId;
|
private String sparePartId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设备id")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "计划描述")
|
@ApiModelProperty(value = "计划描述")
|
||||||
private String maintenanceDescription;
|
private String maintenanceDescription;
|
||||||
|
|
||||||
public Integer getMaintenancePlanId() {
|
public String getDeviceId() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(String deviceId) {
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaintenancePlanId() {
|
||||||
return maintenancePlanId;
|
return maintenancePlanId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMaintenancePlanId(Integer maintenancePlanId) {
|
public void setMaintenancePlanId(String maintenancePlanId) {
|
||||||
this.maintenancePlanId = maintenancePlanId;
|
this.maintenancePlanId = maintenancePlanId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ public class EntDeviceMaintenanceRecordDto {
|
||||||
@ApiModelProperty(value = "保养记录")
|
@ApiModelProperty(value = "保养记录")
|
||||||
private String recordId;
|
private String recordId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "保养状态")
|
@ApiModelProperty(value = "保养状态 1.保养中 2.已完成")
|
||||||
private Integer maintenanceStatus;
|
private Integer maintenanceStatus;
|
||||||
|
|
||||||
@ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
|
@ApiModelProperty(value = "1.日常保养 2.常规润滑 3.二级检修保养 4.三级检修保养 5.项目检修保养 6.年度检修保养")
|
||||||
|
|
@ -52,6 +52,17 @@ public class EntDeviceMaintenanceRecordDto {
|
||||||
@ApiModelProperty(value = "工作描述")
|
@ApiModelProperty(value = "工作描述")
|
||||||
private String jobDescription;
|
private String jobDescription;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设备id")
|
||||||
|
private String deviceId;
|
||||||
|
|
||||||
|
public String getDeviceId() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(String deviceId) {
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getRecordId() {
|
public String getRecordId() {
|
||||||
return recordId;
|
return recordId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,12 @@
|
||||||
<select id="certificatesList" resultMap="BaseResultMap">
|
<select id="certificatesList" resultMap="BaseResultMap">
|
||||||
SELECT * FROM ent_certificates ec
|
SELECT * FROM ent_certificates ec
|
||||||
WHERE ec.`enterprise_id` = #{enterpriseId}
|
WHERE ec.`enterprise_id` = #{enterpriseId}
|
||||||
|
<if test="null != state and state.length >0">
|
||||||
|
and `state` in
|
||||||
|
<foreach collection='state' open='(' item='id' separator=',' close=')'>
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
ORDER BY ec.`modify_time` DESC
|
ORDER BY ec.`modify_time` DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
<result column="create_time" property="createTime" />
|
<result column="create_time" property="createTime" />
|
||||||
<result column="modify_by" property="modifyBy" />
|
<result column="modify_by" property="modifyBy" />
|
||||||
<result column="modify_time" property="modifyTime" />
|
<result column="modify_time" property="modifyTime" />
|
||||||
|
<result column="name" property="entUserName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
|
|
@ -31,7 +32,8 @@
|
||||||
where maintenance_plan_id = #{maintenancePlanId}
|
where maintenance_plan_id = #{maintenancePlanId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectEntDeviceMaintenancePlanList">
|
<select id="selectEntDeviceMaintenancePlanList" resultMap="BaseResultMap">
|
||||||
select * from ent_device_maintenance_plan where device_id = #{deviceId}
|
select edmp.*,eu.name from ent_device_maintenance_plan edmp left join ent_user eu on edmp.maintenance_people_id = eu.ent_user_id
|
||||||
|
where device_id = #{deviceId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,9 @@
|
||||||
|
|
||||||
<select id="selectEntEquipmentOverdue" resultMap="entEquipmentOverdueMap">
|
<select id="selectEntEquipmentOverdue" resultMap="entEquipmentOverdueMap">
|
||||||
select ed.*,cycle.frequency,cycle.recordNumber from ent_device ed
|
select ed.*,cycle.frequency,cycle.recordNumber from ent_device ed
|
||||||
left join (select edic.frequency,count(eir.ins_record_id)as recordNumber from ent_device_ins_cycle edic ed on ed.device_id = edic.device_id
|
left join (select edic.device_id,edic.frequency,count(eir.ins_record_id)as recordNumber from ent_device_ins_cycle edic
|
||||||
left join ent_ins_record eir on edic.inspection_id = eir.cycle_id order by create_time desc limit 1)as cycle
|
left join ent_ins_record eir on edic.inspection_id = eir.cycle_id)as cycle on ed.device_id = cycle.device_id
|
||||||
where ed.enterprise_id = #{enterpriseId} and overdue_inspection = 2
|
where ed.enterprise_id = #{enterpriseId} and overdue_inspection = 2
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<update id="updateEntEquipment" >
|
<update id="updateEntEquipment" >
|
||||||
update ent_device_type set name = #{entDeviceType.name},logo = #{entDeviceType.logo},parent_id = #{entDeviceType.parentId},parent_path = #{entDeviceType.parentPath},parent_name = #{entDeviceType.parentName},sort_id = #{entDeviceType.sortId},
|
update ent_device_type set name = #{entDeviceType.name},logo = #{entDeviceType.logo},parent_id = #{entDeviceType.parentId},parent_path = #{entDeviceType.parentPath},parent_name = #{entDeviceType.parentName},sort_id = #{entDeviceType.sortId},
|
||||||
modify_by = #{modifyBy},modify_time = #{modifyTime}
|
modify_by = #{entDeviceType.modifyBy},modify_time = #{entDeviceType.modifyTime}
|
||||||
where type_id = #{entDeviceType.typeId}
|
where type_id = #{entDeviceType.typeId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectInspectionRecord" resultMap="BaseResultMap">
|
<select id="selectInspectionRecord" resultMap="BaseResultMap">
|
||||||
select * from ent_inspection_record where device_id = #{deviceId}
|
select * from ent_inspection_record where inspection_device_id = #{deviceId}
|
||||||
<if test="startTime != null and '' != startTime">
|
<if test="startTime != null and '' != startTime">
|
||||||
and start_time = #{startTime}
|
and start_time = #{startTime}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -75,15 +75,18 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectEntListGroupByListId" resultMap="EntListGroupMap">
|
<select id="selectEntListGroupByListId" resultMap="EntListGroupMap">
|
||||||
select epl.list_id,epl.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
|
||||||
from ent_post_list epl
|
from ent_post_list epl
|
||||||
left join ent_post_task ept on epl.post_list_id = ept.ent_list_id
|
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
|
||||||
where epl.enterprise_id = #{enterpriseId} and epl.ent_user_id = #{userId}
|
where epl.enterprise_id = #{enterpriseId}
|
||||||
|
<if test="null != userId and '' != userId">
|
||||||
|
and epl.ent_user_id = #{userId}
|
||||||
|
</if>
|
||||||
<if test="null != listId and '' != listId">
|
<if test="null != listId and '' != listId">
|
||||||
and epl.list_id = #{listId}
|
and epl.list_id = #{listId}
|
||||||
</if>
|
</if>
|
||||||
group by epl.list_id,epl.item_title
|
group by il.list_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRepairPlan">
|
<select id="selectRepairPlan">
|
||||||
select * from ent_repair_plan where device_id = #{deviceId}
|
select * from ent_repair_plan where repair_device_id = #{deviceId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateRepairPlan">
|
<update id="updateRepairPlan">
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,9 @@
|
||||||
<if test="null != postId and '' != postId">
|
<if test="null != postId and '' != postId">
|
||||||
and eu.post_path like concat('%',#{postId},'%')
|
and eu.post_path like concat('%',#{postId},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != userType and '' != userType">
|
||||||
|
and eu.user_type = #{userType}
|
||||||
|
</if>
|
||||||
<if test="null != enterpriseId and '' != enterpriseId">
|
<if test="null != enterpriseId and '' != enterpriseId">
|
||||||
and eu.enterprise_id = #{enterpriseId}
|
and eu.enterprise_id = #{enterpriseId}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -83,6 +86,16 @@
|
||||||
group by t1.ent_user_id
|
group by t1.ent_user_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectEntUserListNoPage" resultMap="BaseResultMap">
|
||||||
|
select * from ent_user eu where eu.user_type = 2
|
||||||
|
<if test="null != name and '' != name">
|
||||||
|
and eu.name like concat('%',#{name},'%')
|
||||||
|
</if>
|
||||||
|
<if test="null != enterpriseId and '' != enterpriseId">
|
||||||
|
and eu.enterprise_id = #{enterpriseId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateEntUser" parameterType="com.rzyc.model.ent.EntUser">
|
<update id="updateEntUser" parameterType="com.rzyc.model.ent.EntUser">
|
||||||
update ent_user set post_id = #{entUser.postId},
|
update ent_user set post_id = #{entUser.postId},
|
||||||
enterprise_id = #{entUser.enterpriseId},
|
enterprise_id = #{entUser.enterpriseId},
|
||||||
|
|
@ -110,8 +123,4 @@
|
||||||
<select id="validName" resultMap="BaseResultMap">
|
<select id="validName" resultMap="BaseResultMap">
|
||||||
select ent_user_id,name,mobile from ent_user where name = #{name}
|
select ent_user_id,name,mobile from ent_user where name = #{name}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1197,6 +1197,7 @@ public class BaseController {
|
||||||
ept.setFrequency(entPostList.getFrequency());
|
ept.setFrequency(entPostList.getFrequency());
|
||||||
ept.setTaskState(1);
|
ept.setTaskState(1);
|
||||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||||
|
ept.setItemContent(entPostList.getItemContent());
|
||||||
ept.setPostId(entPostList.getPostId());
|
ept.setPostId(entPostList.getPostId());
|
||||||
ept.setEntUserId(entPostList.getEntUserId());
|
ept.setEntUserId(entPostList.getEntUserId());
|
||||||
ept.setListId(entPostList.getListId());
|
ept.setListId(entPostList.getListId());
|
||||||
|
|
@ -1233,6 +1234,7 @@ public class BaseController {
|
||||||
ept.setFrequency(entPostList.getFrequency());
|
ept.setFrequency(entPostList.getFrequency());
|
||||||
ept.setTaskState(1);
|
ept.setTaskState(1);
|
||||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||||
|
ept.setItemContent(entPostList.getItemContent());
|
||||||
ept.setPostId(entPostList.getPostId());
|
ept.setPostId(entPostList.getPostId());
|
||||||
ept.setEntUserId(entPostList.getEntUserId());
|
ept.setEntUserId(entPostList.getEntUserId());
|
||||||
ept.setListId(entPostList.getListId());
|
ept.setListId(entPostList.getListId());
|
||||||
|
|
@ -1272,6 +1274,7 @@ public class BaseController {
|
||||||
ept.setFrequency(entPostList.getFrequency());
|
ept.setFrequency(entPostList.getFrequency());
|
||||||
ept.setTaskState(1);
|
ept.setTaskState(1);
|
||||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||||
|
ept.setItemContent(entPostList.getItemContent());
|
||||||
ept.setPostId(entPostList.getPostId());
|
ept.setPostId(entPostList.getPostId());
|
||||||
ept.setEntUserId(entPostList.getEntUserId());
|
ept.setEntUserId(entPostList.getEntUserId());
|
||||||
ept.setListId(entPostList.getListId());
|
ept.setListId(entPostList.getListId());
|
||||||
|
|
@ -1310,6 +1313,7 @@ public class BaseController {
|
||||||
SysUser sysUser = getUser(sysUserId);
|
SysUser sysUser = getUser(sysUserId);
|
||||||
String subject = year+"年第"+index+"月工作任务:"+entPostList.getFrequency();
|
String subject = year+"年第"+index+"月工作任务:"+entPostList.getFrequency();
|
||||||
ept.setItemTitle(subject);
|
ept.setItemTitle(subject);
|
||||||
|
ept.setItemContent(entPostList.getItemContent());
|
||||||
ept.setFrequency(entPostList.getFrequency());
|
ept.setFrequency(entPostList.getFrequency());
|
||||||
ept.setTaskState(1);
|
ept.setTaskState(1);
|
||||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||||
|
|
|
||||||
|
|
@ -452,8 +452,8 @@ public class EnterpriseEquipmentController extends BaseController {
|
||||||
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = true, dataType = "string"),
|
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = true, dataType = "string"),
|
||||||
})
|
})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult selectEntEquipmentOverdue(@RequestParam("enterpriseId") String enterpriseId)throws Exception{
|
public SingleResult<List<EntDevice>> selectEntEquipmentOverdue(@RequestParam("enterpriseId") String enterpriseId,Integer state ,Integer deviceName)throws Exception{
|
||||||
return pcBusinessService.selectEntEquipmentOverdue(enterpriseId);
|
return pcBusinessService.selectEntEquipmentOverdue(enterpriseId,state,deviceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -753,7 +753,13 @@ public class PcCompanyController extends BaseController{
|
||||||
public SingleResult<Pager<EntCertificates>> certificatesPage(@Valid CertificatesPageDto certificatesPageDto)throws Exception{
|
public SingleResult<Pager<EntCertificates>> certificatesPage(@Valid CertificatesPageDto certificatesPageDto)throws Exception{
|
||||||
SingleResult<Pager<EntCertificates>> result = new SingleResult<>();
|
SingleResult<Pager<EntCertificates>> result = new SingleResult<>();
|
||||||
PageHelper.startPage(certificatesPageDto.getPage(), certificatesPageDto.getPageSize());
|
PageHelper.startPage(certificatesPageDto.getPage(), certificatesPageDto.getPageSize());
|
||||||
Page<EntCertificates> page = (Page<EntCertificates>)entCertificatesMapper.certificatesList(certificatesPageDto.getEnterpriseId());
|
Page<EntCertificates> page ;
|
||||||
|
if (null != certificatesPageDto.getState()){
|
||||||
|
page = (Page<EntCertificates>)entCertificatesMapper.certificatesList(certificatesPageDto.getEnterpriseId(),certificatesPageDto.getState().split(","));
|
||||||
|
}else {
|
||||||
|
page = (Page<EntCertificates>)entCertificatesMapper.certificatesList(certificatesPageDto.getEnterpriseId(),null);
|
||||||
|
|
||||||
|
}
|
||||||
Pager<EntCertificates> pager = new Pager<>();
|
Pager<EntCertificates> pager = new Pager<>();
|
||||||
getDatePage(pager,page);
|
getDatePage(pager,page);
|
||||||
result.setData(pager);
|
result.setData(pager);
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,7 @@ public class PersonalController extends BaseController{
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "企业用户证照表", notes = "企业用户证照表")
|
@ApiOperation(value = "企业用户证照表", notes = "企业用户证照表")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "entUserId", value = "企业用户id",required = true, dataType = "string"),
|
@ApiImplicitParam(name = "entUserId", value = "企业用户id",required = false, dataType = "string"),
|
||||||
@ApiImplicitParam(name = "page", value = "page",required = true, dataType = "int"),
|
@ApiImplicitParam(name = "page", value = "page",required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = "pageSize", value = "pageSize",required = true, dataType = "int"),
|
@ApiImplicitParam(name = "pageSize", value = "pageSize",required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = "credentialState", value = "证件过期 1.未过期 2.已超时",required = false, dataType = "int"),
|
@ApiImplicitParam(name = "credentialState", value = "证件过期 1.未过期 2.已超时",required = false, dataType = "int"),
|
||||||
|
|
@ -338,13 +338,39 @@ public class PersonalController extends BaseController{
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult<List<EntUser>> entUserList(@RequestParam(required = false) String keyContent,
|
public SingleResult<List<EntUser>> entUserList(@RequestParam(required = false) String keyContent,
|
||||||
@RequestParam(required = false) String postId,
|
@RequestParam(required = false) String postId,
|
||||||
@RequestParam(required = true) Integer page,
|
@RequestParam(required = true) Integer page,
|
||||||
@RequestParam(required = true) Integer pageSize,
|
@RequestParam(required = true) Integer pageSize,
|
||||||
@RequestParam(required = false) String enterpriseId)throws Exception{
|
@RequestParam(required = false) String enterpriseId,
|
||||||
return pcBusinessService.entUserList(keyContent,page,pageSize,postId,enterpriseId);
|
@RequestParam(required = false) Integer userType)throws Exception{
|
||||||
|
return pcBusinessService.entUserList(keyContent,page,pageSize,postId,enterpriseId,userType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业岗位人员不分页
|
||||||
|
* @param name
|
||||||
|
* @param enterpriseId
|
||||||
|
* @return list
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "企业岗位人员不分页", notes = "企业岗位人员不分页")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "name", value = "姓名",required = false, dataType = "string"),
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = false, dataType = "string"),
|
||||||
|
})
|
||||||
|
@GetMapping(value = "/entUserListNoPage")
|
||||||
|
@PreAuthorize("hasAnyAuthority('entUserList','entUserList:update')")
|
||||||
|
@MethodAnnotation(authorizations = {"entUserList","entUserList:update"},name = "企业岗位人员不分页")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult<List<EntUser>> entUserList(@RequestParam(required = false) String name,
|
||||||
|
@RequestParam(required = true) String enterpriseId)throws Exception{
|
||||||
|
return pcBusinessService.entUserListNoPage(name,enterpriseId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增和修改公司岗位人员
|
* 新增和修改公司岗位人员
|
||||||
* @param addOrUpdateEntUserDto
|
* @param addOrUpdateEntUserDto
|
||||||
|
|
@ -363,6 +389,8 @@ public class PersonalController extends BaseController{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手动企业分配任务
|
* 手动企业分配任务
|
||||||
* @param listDto
|
* @param listDto
|
||||||
|
|
|
||||||
|
|
@ -195,9 +195,9 @@ public class PcBusinessService extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PageOperation
|
@PageOperation
|
||||||
public SingleResult entUserList(String keyContent,Integer page,Integer pageSize,String postId,String enterpriseId){
|
public SingleResult entUserList(String keyContent,Integer page,Integer pageSize,String postId,String enterpriseId,Integer userType){
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
Page<EntUser>users = (Page<EntUser>) entUserMapper.selectEntUserList(keyContent,postId,enterpriseId);
|
Page<EntUser>users = (Page<EntUser>) entUserMapper.selectEntUserList(keyContent,postId,enterpriseId,userType);
|
||||||
//计算履职百分比,后期这里使用redis来读取履职进度
|
//计算履职百分比,后期这里使用redis来读取履职进度
|
||||||
for (EntUser e:users.getResult()) {
|
for (EntUser e:users.getResult()) {
|
||||||
Integer total = e.getFinishTask() + e.getOngoingTask() + e.getOverTimeTask();
|
Integer total = e.getFinishTask() + e.getOngoingTask() + e.getOverTimeTask();
|
||||||
|
|
@ -210,6 +210,13 @@ public class PcBusinessService extends BaseController {
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SingleResult entUserListNoPage(String name,String enterpriseId){
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
List<EntUser>users = entUserMapper.selectEntUserListNoPage(name,enterpriseId);
|
||||||
|
singleResult.setData(users);
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
public SingleResult addOrUpdateEntUser(AddOrUpdateEntUserDto addOrUpdateEntUserDto) throws Exception {
|
public SingleResult addOrUpdateEntUser(AddOrUpdateEntUserDto addOrUpdateEntUserDto) throws Exception {
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
//正则验证手机号
|
//正则验证手机号
|
||||||
|
|
@ -231,7 +238,7 @@ public class PcBusinessService extends BaseController {
|
||||||
entUser.setPostPath(entPost.getPostPath());
|
entUser.setPostPath(entPost.getPostPath());
|
||||||
entUser.setPostPathName(entPost.getPostId());
|
entUser.setPostPathName(entPost.getPostId());
|
||||||
//密码为用户名加手机号
|
//密码为用户名加手机号
|
||||||
entUser.setPasswd(MD5.md5(entUser.getName() + entUser.getMobile()));
|
entUser.setPasswd(MD5.md5(entUser.getMobile()));
|
||||||
int result = 0 ;
|
int result = 0 ;
|
||||||
if (StringUtils.isNotBlank(entUser.getEntUserId())){
|
if (StringUtils.isNotBlank(entUser.getEntUserId())){
|
||||||
EntUser phone = entUserMapper.validMobile(entUser.getMobile(),entUser.getEntUserId());
|
EntUser phone = entUserMapper.validMobile(entUser.getMobile(),entUser.getEntUserId());
|
||||||
|
|
@ -323,6 +330,7 @@ public class PcBusinessService extends BaseController {
|
||||||
entPostMap.put("name",entDeviceType.getName());
|
entPostMap.put("name",entDeviceType.getName());
|
||||||
entPostMap.put("parentId",entDeviceType.getParentId());
|
entPostMap.put("parentId",entDeviceType.getParentId());
|
||||||
entPostMap.put("parentPath",entDeviceType.getParentPath());
|
entPostMap.put("parentPath",entDeviceType.getParentPath());
|
||||||
|
entPostMap.put("parentName",entDeviceType.getParentName());
|
||||||
entPostMap.put("logo",entDeviceType.getLogo());
|
entPostMap.put("logo",entDeviceType.getLogo());
|
||||||
data.add(entPostMap);
|
data.add(entPostMap);
|
||||||
}
|
}
|
||||||
|
|
@ -341,6 +349,8 @@ public class PcBusinessService extends BaseController {
|
||||||
public SingleResult deviceDetail(String deviceId){
|
public SingleResult deviceDetail(String deviceId){
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
EntDevice entDevice = entDeviceMapper.selectById(deviceId);
|
EntDevice entDevice = entDeviceMapper.selectById(deviceId);
|
||||||
|
EntDeviceType entDeviceType = entDeviceTypeMapper.selectById(entDevice.getTypeId());
|
||||||
|
entDevice.setDeviceType(entDeviceType);
|
||||||
singleResult.setData(entDevice);
|
singleResult.setData(entDevice);
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
@ -376,6 +386,14 @@ public class PcBusinessService extends BaseController {
|
||||||
singleResult.setCode(Code.ERROR.getCode());
|
singleResult.setCode(Code.ERROR.getCode());
|
||||||
singleResult.setMessage(Message.ERROR);
|
singleResult.setMessage(Message.ERROR);
|
||||||
}
|
}
|
||||||
|
//更新redis
|
||||||
|
List<EntDeviceType> entDeviceTypes = entDeviceTypeMapper.selectEntEquipmentTypeList(addOrUpdateEntPostDto.getEnterpriseId());
|
||||||
|
//树结构处理
|
||||||
|
JSONArray jsonArray = handleEntEquipment(entDeviceTypes);
|
||||||
|
List<EntPost>posts = JSONArray.parseArray(JSONArray.toJSONString(jsonArray),EntPost.class);
|
||||||
|
singleResult.setData(posts);
|
||||||
|
//存redis
|
||||||
|
boolean insertRedisResult = redisUtil.set(redisUtil.appendSymbol(RedisKeys.DEVICE.getKey(),addOrUpdateEntPostDto.getEnterpriseId()),posts,0);
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -399,16 +417,15 @@ public class PcBusinessService extends BaseController {
|
||||||
if (result != 1 ){
|
if (result != 1 ){
|
||||||
singleResult.setCode(Code.ERROR.getCode());
|
singleResult.setCode(Code.ERROR.getCode());
|
||||||
singleResult.setMessage(Message.ERROR);
|
singleResult.setMessage(Message.ERROR);
|
||||||
}else {
|
}
|
||||||
//更新redis
|
//更新redis
|
||||||
List<EntDeviceType> entDeviceTypes = entDeviceTypeMapper.selectEntEquipmentTypeList(addOrUpdateEntEquipmentTypeDto.getEnterpriseId());
|
List<EntDeviceType> entDeviceTypes = entDeviceTypeMapper.selectEntEquipmentTypeList(addOrUpdateEntEquipmentTypeDto.getEnterpriseId());
|
||||||
//树结构处理
|
//树结构处理
|
||||||
JSONArray jsonArray = handleEntEquipment(entDeviceTypes);
|
JSONArray jsonArray = handleEntEquipment(entDeviceTypes);
|
||||||
List<EntPost>posts = JSONArray.parseArray(JSONArray.toJSONString(jsonArray),EntPost.class);
|
List<EntDeviceType>types = JSONArray.parseArray(JSONArray.toJSONString(jsonArray),EntDeviceType.class);
|
||||||
singleResult.setData(posts);
|
singleResult.setData(types);
|
||||||
//存redis
|
//存redis
|
||||||
boolean insertRedisResult = redisUtil.set(redisUtil.appendSymbol(RedisKeys.DEVICE.getKey(),addOrUpdateEntEquipmentTypeDto.getEnterpriseId()),posts,0);
|
boolean insertRedisResult = redisUtil.set(redisUtil.appendSymbol(RedisKeys.DEVICE.getKey(),addOrUpdateEntEquipmentTypeDto.getEnterpriseId()),types,0);
|
||||||
}
|
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -536,6 +553,7 @@ public class PcBusinessService extends BaseController {
|
||||||
if (null != entDeviceMaintenancePlanDto && null != entDeviceMaintenancePlan.getMaintenancePlanId()){
|
if (null != entDeviceMaintenancePlanDto && null != entDeviceMaintenancePlan.getMaintenancePlanId()){
|
||||||
result = entDeviceMaintenancePlanMapper.updateEntDeviceMaintenancePlan(entDeviceMaintenancePlan);
|
result = entDeviceMaintenancePlanMapper.updateEntDeviceMaintenancePlan(entDeviceMaintenancePlan);
|
||||||
}else {
|
}else {
|
||||||
|
entDeviceMaintenancePlan.setMaintenancePlanId(RandomNumber.getUUid());
|
||||||
result = entDeviceMaintenancePlanMapper.insert(entDeviceMaintenancePlan);
|
result = entDeviceMaintenancePlanMapper.insert(entDeviceMaintenancePlan);
|
||||||
}
|
}
|
||||||
if (result != 1 ){
|
if (result != 1 ){
|
||||||
|
|
@ -716,6 +734,7 @@ public class PcBusinessService extends BaseController {
|
||||||
entPostList.setCreateBy(getUserId());
|
entPostList.setCreateBy(getUserId());
|
||||||
entPostList.setCreateTime(new Date());
|
entPostList.setCreateTime(new Date());
|
||||||
entPostList.setDelState(DelState.NOT_DEL.getState());
|
entPostList.setDelState(DelState.NOT_DEL.getState());
|
||||||
|
entPostList.setPostListId(RandomNumber.getUUid());
|
||||||
int result = entPostListMapper.insert(entPostList);
|
int result = entPostListMapper.insert(entPostList);
|
||||||
if (result != 1 ){
|
if (result != 1 ){
|
||||||
singleResult.setCode(Code.ERROR.getCode());
|
singleResult.setCode(Code.ERROR.getCode());
|
||||||
|
|
@ -962,7 +981,7 @@ public class PcBusinessService extends BaseController {
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SingleResult selectEntEquipmentOverdue(String enterpriseId){
|
public SingleResult selectEntEquipmentOverdue(String enterpriseId,Integer state ,Integer deviceName){
|
||||||
SingleResult singleResult = new SingleResult();
|
SingleResult singleResult = new SingleResult();
|
||||||
List<EntDevice>devices = entDeviceMapper.selectEntEquipmentOverdue(enterpriseId);
|
List<EntDevice>devices = entDeviceMapper.selectEntEquipmentOverdue(enterpriseId);
|
||||||
singleResult.setData(devices);
|
singleResult.setData(devices);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user