企业端-小程序接口和调试修改
This commit is contained in:
parent
05bf113bfb
commit
e14c1a7764
|
|
@ -12,7 +12,13 @@ public enum RedisKeys {
|
|||
POST("entPost"),
|
||||
|
||||
//企业设备
|
||||
DEVICE("entDevice");
|
||||
DEVICE("entDevice"),
|
||||
|
||||
//岗位Id
|
||||
POSTID("postId"),
|
||||
|
||||
//用户Id
|
||||
USERID("userId");
|
||||
|
||||
/*******分界线********/
|
||||
|
||||
|
|
|
|||
|
|
@ -55,4 +55,12 @@ public interface EntDeviceInsCycleMapper extends BaseMapper<EntDeviceInsCycle> {
|
|||
* @return 周期巡检
|
||||
* */
|
||||
EntDeviceInsCycle selectByDeviceId(String deviceId);
|
||||
|
||||
|
||||
/**
|
||||
* 删除周期巡检
|
||||
* @param deviceInspectionCycleId 周期巡检id
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(String deviceInspectionCycleId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,5 +35,11 @@ public interface EntDeviceMaintenancePlanMapper extends BaseMapper<EntDeviceMain
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* 查询企业设备保养计划
|
||||
* @param maintenancePlanId 保养计划主键
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(String maintenancePlanId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,11 @@ public interface EntDeviceMaintenanceRecordMapper extends BaseMapper<EntDeviceMa
|
|||
* */
|
||||
List<EntDeviceMaintenanceRecord>selectEntDeviceMaintenanceRecord(String deviceId);
|
||||
|
||||
/**
|
||||
* 设备保养记录软删除
|
||||
* @param deviceEntInsRecordId
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(String deviceEntInsRecordId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,10 @@ public interface EntDeviceMapper extends BaseMapper<EntDevice> {
|
|||
* 查询企业设备表
|
||||
* @param enterpriseId 企业id
|
||||
* @param typeId 设备类型id
|
||||
* @param keyWord 关键字
|
||||
* @return list
|
||||
* */
|
||||
List<EntDevice>selectEntEquipmentList(@Param("enterpriseId") String enterpriseId,@Param("typeId") String typeId);
|
||||
List<EntDevice>selectEntEquipmentList(@Param("enterpriseId") String enterpriseId,@Param("typeId") String typeId,@Param("keyWord") String keyWord);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -62,4 +63,19 @@ public interface EntDeviceMapper extends BaseMapper<EntDevice> {
|
|||
* */
|
||||
List<EntDevice> selectEntEquipmentOverdue(String enterpriseId);
|
||||
|
||||
|
||||
/**
|
||||
* 软删除设备
|
||||
* @param deviceId 设备id
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(String deviceId);
|
||||
|
||||
/**
|
||||
* 小程序企业设备
|
||||
* @param modelState 设备状态
|
||||
* @return int
|
||||
* */
|
||||
List<EntDevice>mobileEntDevice(String modelState);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,11 @@ public interface EntEmExpertMapper extends BaseMapper<EntEmExpert> {
|
|||
* @param enterpriseId 企业id
|
||||
* @param entEmExpertClass 企业应急专家领域
|
||||
* @param entEmExpertCategory 企业应急专家分类
|
||||
* @param name 专家名
|
||||
* @return list
|
||||
* */
|
||||
List<EntEmExpert>selectEntEmExpertList(@Param("enterpriseId") String enterpriseId, @Param("entEmExpertClass")String entEmExpertClass,
|
||||
@Param("entEmExpertCategory") String entEmExpertCategory);
|
||||
@Param("entEmExpertCategory") String entEmExpertCategory,@Param("name") String name);
|
||||
|
||||
/**
|
||||
* 企业应急专家修改
|
||||
|
|
|
|||
|
|
@ -35,5 +35,12 @@ public interface EntInsRecordMapper extends BaseMapper<EntInsRecord> {
|
|||
* */
|
||||
List<EntInsRecord> selectInspectionRecord(@Param("deviceId") String deviceId,@Param("inspectionRecordName") String inspectionRecordName);
|
||||
|
||||
/**
|
||||
* 软删除巡检记录
|
||||
* @param deviceEntInsRecordId 巡检记录主键
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(String deviceEntInsRecordId);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,4 +36,12 @@ public interface EntInspectionRecordMapper extends BaseMapper<EntInspectionRecor
|
|||
* */
|
||||
int updateEntInspectionRecord(@Param("data") EntInspectionRecord entInspectionRecord);
|
||||
|
||||
|
||||
/**
|
||||
* 软删除送检记录
|
||||
* @return int
|
||||
* @param deviceEntInspectionRecordId
|
||||
* */
|
||||
int updateDelState(String deviceEntInspectionRecordId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,4 +36,12 @@ public interface EntOperatingInstructionMapper extends BaseMapper<EntOperatingIn
|
|||
* */
|
||||
int updateEntOperatingInstruction(@Param("data") EntOperatingInstruction entOperatingInstruction);
|
||||
|
||||
|
||||
/**
|
||||
* 修改企业操作规程删除状态
|
||||
* @param opInstructionId 操作规程对象id
|
||||
* @return int
|
||||
* */
|
||||
int updateStateOperatingInstruction(String opInstructionId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
package com.rzyc.mapper;
|
||||
|
||||
import com.rzyc.model.EntPostListDetail;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业履职记录
|
||||
Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author
|
||||
* @since 2022-12-08
|
||||
*/
|
||||
@Repository
|
||||
public interface EntPostListDetailMapper extends BaseMapper<EntPostListDetail> {
|
||||
|
||||
/**
|
||||
* 查询用户履职
|
||||
* @param postListId 岗位清单id
|
||||
* @param userId 用户id
|
||||
* @return list
|
||||
* */
|
||||
List<EntPostListDetail> selectListDetail(@Param("postListId") String postListId,@Param("userId") String userId);
|
||||
|
||||
}
|
||||
|
|
@ -61,4 +61,12 @@ public interface EntPostListMapper extends BaseMapper<EntPostList> {
|
|||
* @return int 企业清单(类型)
|
||||
*/
|
||||
List<EntPostList>selectEntListGroupByListId(@Param("enterpriseId") String enterpriseId,@Param("listId")String listId,@Param("userId")String userId);
|
||||
|
||||
|
||||
/**
|
||||
* 删除企业用户岗位清单
|
||||
* @param entUserId 用户id
|
||||
* @return int
|
||||
*/
|
||||
Integer deleteEntPostList(String entUserId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,4 +73,11 @@ public interface EntPostTaskMapper extends BaseMapper<EntPostTask> {
|
|||
* */
|
||||
int insertList(@Param("entTasks") List<EntPostTask> entTasks);
|
||||
|
||||
|
||||
/**
|
||||
* 删除企业岗位任务
|
||||
* @return int
|
||||
* @param userId 用户id
|
||||
* */
|
||||
int deleteEntPostTaskList(String userId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,11 @@ public interface EntRepairPlanMapper extends BaseMapper<EntRepairPlan> {
|
|||
* */
|
||||
int updateRepairPlan(@Param("data") EntRepairPlan entRepairPlan);
|
||||
|
||||
/**
|
||||
* 软删除维修计划
|
||||
* @param repairPlanId 企业维修计划主键
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(@Param("repairPlanId")String repairPlanId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,11 @@ public interface EntRepairRecordMapper extends BaseMapper<EntRepairRecord> {
|
|||
* */
|
||||
int repairRecordUpdate(EntRepairRecord entRepairRecord);
|
||||
|
||||
/**
|
||||
* 软删除维修记录
|
||||
* @param repairRecordId
|
||||
* @return int
|
||||
* */
|
||||
int updateDelState(String repairRecordId );
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,11 @@ public interface EntReportRepairMapper extends BaseMapper<EntReportRepair> {
|
|||
int updateReportRecord(@Param("data") EntReportRepair entReportRepair);
|
||||
|
||||
|
||||
/**
|
||||
* 软删除报修列表
|
||||
* @return int
|
||||
* @param reportRepairId 报修对象ID
|
||||
* */
|
||||
int updateDelState(String reportRepairId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,4 +53,12 @@ public interface EntUserCredentialMapper extends BaseMapper<EntUserCredential> {
|
|||
* */
|
||||
int entUserCredentialDelete(@Param("credentialId") String credentialId);
|
||||
|
||||
|
||||
/**
|
||||
* 企业用户证件照删除
|
||||
* @param userId 企业用户id
|
||||
* @return int
|
||||
* */
|
||||
int delEntUserCredential(@Param("userId")String userId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,4 +45,32 @@ public interface NoticeMapper {
|
|||
/*接收文件下达*/
|
||||
List<Notice> receiveList(@Param("companyId") String companyId,
|
||||
@Param("entId") String entId);
|
||||
|
||||
/**
|
||||
* 通知消息
|
||||
* @date 2022/11/29
|
||||
* @param userId 用户id
|
||||
* @param type 通知消息
|
||||
* @return list
|
||||
* */
|
||||
List<Notice>selectNotices(@Param("type") String type,@Param("userId") String userId);
|
||||
|
||||
|
||||
/**
|
||||
* 通知消息已读未读数量
|
||||
* @param userId 用户id
|
||||
* @date 2022/11/30
|
||||
* @return notice
|
||||
* */
|
||||
Notice selectEntNoticeNumber(String userId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 一键已读
|
||||
* @param userId 用户id
|
||||
* @date 2022/12/2
|
||||
* @return int
|
||||
* */
|
||||
int oneButtonRead(String userId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,6 +158,18 @@ public class EntDevice implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private EntDeviceType deviceType;
|
||||
|
||||
@ApiModelProperty("巡检人名")
|
||||
@TableField(exist = false)
|
||||
private String insRecordPerson;
|
||||
|
||||
public String getInsRecordPerson() {
|
||||
return insRecordPerson;
|
||||
}
|
||||
|
||||
public void setInsRecordPerson(String insRecordPerson) {
|
||||
this.insRecordPerson = insRecordPerson;
|
||||
}
|
||||
|
||||
public EntDeviceType getDeviceType() {
|
||||
return deviceType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,17 @@ public class EntEmExpert implements Serializable {
|
|||
@TableField("modify_time")
|
||||
private Date modifyTime;
|
||||
|
||||
@TableField("ent_em_work_unit")
|
||||
private String entEmWorkUnit;
|
||||
|
||||
public String getEntEmWorkUnit() {
|
||||
return entEmWorkUnit;
|
||||
}
|
||||
|
||||
public void setEntEmWorkUnit(String entEmWorkUnit) {
|
||||
this.entEmWorkUnit = entEmWorkUnit;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,252 @@
|
|||
package com.rzyc.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业履职记录
|
||||
|
||||
* </p>
|
||||
*
|
||||
* @author
|
||||
* @since 2022-12-08
|
||||
*/
|
||||
@TableName("ent_post_list_detail")
|
||||
@ApiModel(value="EntPostListDetail对象", description="企业履职记录")
|
||||
public class EntPostListDetail implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "履职记录id")
|
||||
@TableId("ListDetailId")
|
||||
private String ListDetailId;
|
||||
|
||||
@ApiModelProperty(value = "履职清单id")
|
||||
@TableField("ListFactorId")
|
||||
private String ListFactorId;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@TableField("SysUserId")
|
||||
private String SysUserId;
|
||||
|
||||
@ApiModelProperty(value = "工作摘要")
|
||||
@TableField("WorkTitle")
|
||||
private String WorkTitle;
|
||||
|
||||
@ApiModelProperty(value = "清单内容")
|
||||
@TableField("WorkCnt")
|
||||
private String WorkCnt;
|
||||
|
||||
@TableField("WorkFile")
|
||||
private String WorkFile;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@TableField("StartTime")
|
||||
private Date StartTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@TableField("EndTime")
|
||||
private Date EndTime;
|
||||
|
||||
@TableField("OTCType")
|
||||
private String OTCType;
|
||||
|
||||
@TableField("OTCId")
|
||||
private String OTCId;
|
||||
|
||||
@ApiModelProperty(value = "企业id")
|
||||
@TableField("enterprise_id")
|
||||
private String enterpriseId;
|
||||
|
||||
@ApiModelProperty(value = "任务id")
|
||||
@TableField("ent_post_task_id")
|
||||
private String entPostTaskId;
|
||||
|
||||
@TableField("IsFinish")
|
||||
private String IsFinish;
|
||||
|
||||
@ApiModelProperty(value = "完成时间")
|
||||
@TableField("FinishTime")
|
||||
private Date FinishTime;
|
||||
|
||||
@ApiModelProperty(value = "删除状态 1:正常 2:已删除")
|
||||
@TableField("del_state")
|
||||
private Integer delState;
|
||||
|
||||
@TableField("CreatedOn")
|
||||
private Date CreatedOn;
|
||||
|
||||
@TableField("CreatedBy")
|
||||
private String CreatedBy;
|
||||
|
||||
@TableField("ModifiedOn")
|
||||
private Date ModifiedOn;
|
||||
|
||||
@TableField("ModifiedBy")
|
||||
private String ModifiedBy;
|
||||
|
||||
public String getListDetailId() {
|
||||
return ListDetailId;
|
||||
}
|
||||
|
||||
public void setListDetailId(String ListDetailId) {
|
||||
this.ListDetailId = ListDetailId;
|
||||
}
|
||||
public String getListFactorId() {
|
||||
return ListFactorId;
|
||||
}
|
||||
|
||||
public void setListFactorId(String ListFactorId) {
|
||||
this.ListFactorId = ListFactorId;
|
||||
}
|
||||
public String getSysUserId() {
|
||||
return SysUserId;
|
||||
}
|
||||
|
||||
public void setSysUserId(String SysUserId) {
|
||||
this.SysUserId = SysUserId;
|
||||
}
|
||||
public String getWorkTitle() {
|
||||
return WorkTitle;
|
||||
}
|
||||
|
||||
public void setWorkTitle(String WorkTitle) {
|
||||
this.WorkTitle = WorkTitle;
|
||||
}
|
||||
public String getWorkCnt() {
|
||||
return WorkCnt;
|
||||
}
|
||||
|
||||
public void setWorkCnt(String WorkCnt) {
|
||||
this.WorkCnt = WorkCnt;
|
||||
}
|
||||
public String getWorkFile() {
|
||||
return WorkFile;
|
||||
}
|
||||
|
||||
public void setWorkFile(String WorkFile) {
|
||||
this.WorkFile = WorkFile;
|
||||
}
|
||||
public Date getStartTime() {
|
||||
return StartTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Date StartTime) {
|
||||
this.StartTime = StartTime;
|
||||
}
|
||||
public Date getEndTime() {
|
||||
return EndTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date EndTime) {
|
||||
this.EndTime = EndTime;
|
||||
}
|
||||
public String getOTCType() {
|
||||
return OTCType;
|
||||
}
|
||||
|
||||
public void setOTCType(String OTCType) {
|
||||
this.OTCType = OTCType;
|
||||
}
|
||||
public String getOTCId() {
|
||||
return OTCId;
|
||||
}
|
||||
|
||||
public void setOTCId(String OTCId) {
|
||||
this.OTCId = OTCId;
|
||||
}
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId;
|
||||
}
|
||||
|
||||
public void setEnterpriseId(String enterpriseId) {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
public String getEntPostTaskId() {
|
||||
return entPostTaskId;
|
||||
}
|
||||
|
||||
public void setEntPostTaskId(String entPostTaskId) {
|
||||
this.entPostTaskId = entPostTaskId;
|
||||
}
|
||||
public String getIsFinish() {
|
||||
return IsFinish;
|
||||
}
|
||||
|
||||
public void setIsFinish(String IsFinish) {
|
||||
this.IsFinish = IsFinish;
|
||||
}
|
||||
public Date getFinishTime() {
|
||||
return FinishTime;
|
||||
}
|
||||
|
||||
public void setFinishTime(Date FinishTime) {
|
||||
this.FinishTime = FinishTime;
|
||||
}
|
||||
public Integer getDelState() {
|
||||
return delState;
|
||||
}
|
||||
|
||||
public void setDelState(Integer delState) {
|
||||
this.delState = delState;
|
||||
}
|
||||
public Date getCreatedOn() {
|
||||
return CreatedOn;
|
||||
}
|
||||
|
||||
public void setCreatedOn(Date CreatedOn) {
|
||||
this.CreatedOn = CreatedOn;
|
||||
}
|
||||
public String getCreatedBy() {
|
||||
return CreatedBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String CreatedBy) {
|
||||
this.CreatedBy = CreatedBy;
|
||||
}
|
||||
public Date getModifiedOn() {
|
||||
return ModifiedOn;
|
||||
}
|
||||
|
||||
public void setModifiedOn(Date ModifiedOn) {
|
||||
this.ModifiedOn = ModifiedOn;
|
||||
}
|
||||
public String getModifiedBy() {
|
||||
return ModifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String ModifiedBy) {
|
||||
this.ModifiedBy = ModifiedBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EntPostListDetail{" +
|
||||
"ListDetailId=" + ListDetailId +
|
||||
", ListFactorId=" + ListFactorId +
|
||||
", SysUserId=" + SysUserId +
|
||||
", WorkTitle=" + WorkTitle +
|
||||
", WorkCnt=" + WorkCnt +
|
||||
", WorkFile=" + WorkFile +
|
||||
", StartTime=" + StartTime +
|
||||
", EndTime=" + EndTime +
|
||||
", OTCType=" + OTCType +
|
||||
", OTCId=" + OTCId +
|
||||
", enterpriseId=" + enterpriseId +
|
||||
", entPostTaskId=" + entPostTaskId +
|
||||
", IsFinish=" + IsFinish +
|
||||
", FinishTime=" + FinishTime +
|
||||
", delState=" + delState +
|
||||
", CreatedOn=" + CreatedOn +
|
||||
", CreatedBy=" + CreatedBy +
|
||||
", ModifiedOn=" + ModifiedOn +
|
||||
", ModifiedBy=" + ModifiedBy +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.rzyc.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -57,8 +58,41 @@ public class Notice implements Serializable {
|
|||
@ApiModelProperty("查看记录")
|
||||
private List<NoRecord> records;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long total;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long read;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long unread;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(Long total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Long getRead() {
|
||||
return read;
|
||||
}
|
||||
|
||||
public void setRead(Long read) {
|
||||
this.read = read;
|
||||
}
|
||||
|
||||
public Long getUnread() {
|
||||
return unread;
|
||||
}
|
||||
|
||||
public void setUnread(Long unread) {
|
||||
this.unread = unread;
|
||||
}
|
||||
|
||||
public Integer getDownloadNum() {
|
||||
return downloadNum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,178 @@
|
|||
package com.rzyc.model.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 企业履职记录dto
|
||||
* @author Xuwanxin
|
||||
* @date 2022/12/8
|
||||
* */
|
||||
public class EntPostListDetailDto {
|
||||
|
||||
@ApiModelProperty(value = "履职记录id")
|
||||
private String ListDetailId;
|
||||
|
||||
@ApiModelProperty(value = "履职清单id")
|
||||
private String ListFactorId;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String SysUserId;
|
||||
|
||||
@ApiModelProperty(value = "工作摘要")
|
||||
private String WorkTitle;
|
||||
|
||||
@ApiModelProperty(value = "清单内容")
|
||||
private String WorkCnt;
|
||||
|
||||
private String WorkFile;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private Date StartTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private Date EndTime;
|
||||
|
||||
|
||||
private String OTCType;
|
||||
|
||||
private String OTCId;
|
||||
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private String enterpriseId;
|
||||
|
||||
@ApiModelProperty(value = "任务id")
|
||||
private String entPostTaskId;
|
||||
|
||||
private String IsFinish;
|
||||
|
||||
@ApiModelProperty(value = "完成时间")
|
||||
private Date FinishTime;
|
||||
|
||||
@ApiModelProperty(value = "删除状态 1:正常 2:已删除")
|
||||
private Integer delState;
|
||||
|
||||
public String getListDetailId() {
|
||||
return ListDetailId;
|
||||
}
|
||||
|
||||
public void setListDetailId(String listDetailId) {
|
||||
ListDetailId = listDetailId;
|
||||
}
|
||||
|
||||
public String getListFactorId() {
|
||||
return ListFactorId;
|
||||
}
|
||||
|
||||
public void setListFactorId(String listFactorId) {
|
||||
ListFactorId = listFactorId;
|
||||
}
|
||||
|
||||
public String getSysUserId() {
|
||||
return SysUserId;
|
||||
}
|
||||
|
||||
public void setSysUserId(String sysUserId) {
|
||||
SysUserId = sysUserId;
|
||||
}
|
||||
|
||||
public String getWorkTitle() {
|
||||
return WorkTitle;
|
||||
}
|
||||
|
||||
public void setWorkTitle(String workTitle) {
|
||||
WorkTitle = workTitle;
|
||||
}
|
||||
|
||||
public String getWorkCnt() {
|
||||
return WorkCnt;
|
||||
}
|
||||
|
||||
public void setWorkCnt(String workCnt) {
|
||||
WorkCnt = workCnt;
|
||||
}
|
||||
|
||||
public String getWorkFile() {
|
||||
return WorkFile;
|
||||
}
|
||||
|
||||
public void setWorkFile(String workFile) {
|
||||
WorkFile = workFile;
|
||||
}
|
||||
|
||||
public Date getStartTime() {
|
||||
return StartTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Date startTime) {
|
||||
StartTime = startTime;
|
||||
}
|
||||
|
||||
public Date getEndTime() {
|
||||
return EndTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
EndTime = endTime;
|
||||
}
|
||||
|
||||
public String getOTCType() {
|
||||
return OTCType;
|
||||
}
|
||||
|
||||
public void setOTCType(String OTCType) {
|
||||
this.OTCType = OTCType;
|
||||
}
|
||||
|
||||
public String getOTCId() {
|
||||
return OTCId;
|
||||
}
|
||||
|
||||
public void setOTCId(String OTCId) {
|
||||
this.OTCId = OTCId;
|
||||
}
|
||||
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId;
|
||||
}
|
||||
|
||||
public void setEnterpriseId(String enterpriseId) {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
|
||||
public String getEntPostTaskId() {
|
||||
return entPostTaskId;
|
||||
}
|
||||
|
||||
public void setEntPostTaskId(String entPostTaskId) {
|
||||
this.entPostTaskId = entPostTaskId;
|
||||
}
|
||||
|
||||
public String getIsFinish() {
|
||||
return IsFinish;
|
||||
}
|
||||
|
||||
public void setIsFinish(String isFinish) {
|
||||
IsFinish = isFinish;
|
||||
}
|
||||
|
||||
public Date getFinishTime() {
|
||||
return FinishTime;
|
||||
}
|
||||
|
||||
public void setFinishTime(Date finishTime) {
|
||||
FinishTime = finishTime;
|
||||
}
|
||||
|
||||
public Integer getDelState() {
|
||||
return delState;
|
||||
}
|
||||
|
||||
public void setDelState(Integer delState) {
|
||||
this.delState = delState;
|
||||
}
|
||||
}
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
</sql>
|
||||
|
||||
<select id="deviceInspectionCycle" resultMap="BaseResultMap">
|
||||
select * from ent_device_ins_cycle where device_id = #{deviceId}
|
||||
select * from ent_device_ins_cycle where device_id = #{deviceId} and del_state = 1
|
||||
<if test="null != inspectionName and '' != inspectionName">
|
||||
and inspection_name like concat('%',#{inspectionName},'%')
|
||||
</if>
|
||||
|
|
@ -51,9 +51,14 @@
|
|||
</select>
|
||||
|
||||
<select id="selectByDeviceId" resultMap="BaseResultMap">
|
||||
select * from ent_device_ins_cycle where device_id = #{deviceId}
|
||||
select * from ent_device_ins_cycle where device_id = #{deviceId} and del_state = 1
|
||||
</select>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_device_ins_cycle set del_state = 2 where inspection_id = #{deviceInspectionCycleId}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@
|
|||
|
||||
<select id="selectEntDeviceMaintenancePlanList" resultMap="BaseResultMap">
|
||||
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}
|
||||
where device_id = #{deviceId} and del_state = 1
|
||||
</select>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_device_maintenance_plan set del_state = 2 where maintenance_plan_id = #{maintenancePlanId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
<result column="create_time" property="createTime" />
|
||||
<result column="modify_by" property="modifyBy" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="name" property="name"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
|
|
@ -31,11 +32,18 @@
|
|||
<update id="UpdateEntDeviceMaintenanceRecord">
|
||||
update ent_device_maintenance_record set maintenance_status = #{data.maintenanceStatus} , maintenance_level = #{data.maintenanceLevel}, start_time = #{data.startTime},ent_time = #{data.entTime},maintenance_time_hour = #{data.maintenanceTimeHour},
|
||||
maintenance_time_minute = #{data.maintenanceTimeMinute},maintenance_cost = #{data.maintenanceCost},shutdown_or_not = #{shutdownOrNot},down_time = #{data.downTime},maintenance_charge_person = #{data.maintenanceChargePerson},
|
||||
maintenance_requirement = #{data.maintenanceRequirement},job_description = #{data.jobDescription},modify_by = #{data.modifyBy},modify_time = #{modifyTime}
|
||||
maintenance_requirement = #{data.maintenanceRequirement},job_description = #{data.jobDescription},modify_by = #{data.modifyBy},modify_time = #{data.modifyTime} where record_id = #{data.recordId}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectEntDeviceMaintenanceRecord" resultMap="BaseResultMap">
|
||||
select * from ent_device_maintenance_record where device_id = #{deviceId}
|
||||
select edmr.*, eu.name
|
||||
from ent_device_maintenance_record edmr
|
||||
left join ent_user eu on edmr.maintenance_charge_person = eu.ent_user_id
|
||||
where device_id = #{deviceId} and del_state =1
|
||||
</select>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_device_maintenance_record set del_state = 2 where record_id = #{deviceEntInsRecordId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -28,10 +28,15 @@
|
|||
|
||||
|
||||
<select id="selectEntEquipmentList" resultMap="BaseResultMap">
|
||||
select * from ent_device where enterprise_id = #{enterpriseId}
|
||||
select * from ent_device where enterprise_id = #{enterpriseId} and del_state = 1
|
||||
<if test="null != typeId and '' != typeId">
|
||||
and type_path like concat('%',#{typeId},'%')
|
||||
</if>
|
||||
<if test="null != keyWord and '' != keyWord">
|
||||
and `name` like concat('%',#{keyWord},'%')
|
||||
or `number` like concat('%',#{keyWord},'%')
|
||||
or `model_num` like concat('%',#{keyWord},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
|
@ -72,19 +77,38 @@
|
|||
|
||||
|
||||
<select id="entEquipmentStatistic" resultMap="statistic">
|
||||
select count(edmr.record_id) as entDeviceMaintenanceRecord ,count(eir.ins_record_id) as entInsRecord,
|
||||
count(err.repair_record_id)as entRepairRecord,count(eisr.inspection_id) as entInspectionRecord
|
||||
select t1.entDeviceMaintenanceRecord,t2.entInsRecord,t3.entRepairRecord,t4.entInspectionRecord
|
||||
from ent_device ed
|
||||
left join ent_device_maintenance_record edmr on ed.device_id = edmr.device_id
|
||||
left join ent_ins_record eir on ed.device_id = eir.device_id
|
||||
left join ent_repair_record err on ed.device_id = err.device_id
|
||||
left join ent_inspection_record eisr on ed.device_id = eisr.inspection_device_id
|
||||
left join (select device_id,count(record_id) as entDeviceMaintenanceRecord from ent_device_maintenance_record where device_id = #{deviceId} and del_state = 1 ) as t1 on ed.device_id = t1.device_id
|
||||
left join (select device_id,count(ins_record_id) as entInsRecord from ent_ins_record where device_id = #{deviceId} and del_state = 1) as t2 on ed.device_id = t2.device_id
|
||||
left join (select device_id,count(repair_record_id) as entRepairRecord from ent_repair_record where device_id = #{deviceId} and del_state = 1) as t3 on ed.device_id = t3.device_id
|
||||
left join (select device_id,count(inspection_id) as entInspectionRecord from ent_inspection_record where device_id = #{deviceId} and del_state = 1) as t4 on ed.device_id = t4.device_id
|
||||
where ed.device_id = #{deviceId}
|
||||
<if test="null != enterpriseId and '' != enterpriseId ">
|
||||
and ed.enterprise_id = #{enterpriseId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<resultMap id="mobileEntDeviceMobile" type="com.rzyc.model.EntDevice">
|
||||
<id column="device_id" property="deviceId" />
|
||||
<result column="name" property="name" />
|
||||
<result column="model_state" property="modelState" />
|
||||
<result column="entInsRecord" property="entInsRecord" />
|
||||
<result column="InsRecordPerson" property="insRecordPerson"/>
|
||||
<result column="frequency" property="frequency"/>
|
||||
</resultMap>
|
||||
<select id="mobileEntDevice" resultMap="mobileEntDeviceMobile">
|
||||
select DISTINCT ed.device_id,ed.name,t2.entInsRecord,t3.InsRecordPerson,t4.frequency from ent_device ed
|
||||
left join ent_device_ins_cycle t4 on ed.device_id = t4.device_id
|
||||
left join (select device_id,count(ins_record_id) as entInsRecord from ent_ins_record where del_state = 1) as t2 on ed.device_id = t2.device_id
|
||||
left join (select device_id,ins_record_person as InsRecordPerson from ent_ins_record where del_state = 1 order by create_time desc limit 1) as t3 on ed.device_id = t3.device_id
|
||||
where ed.del_state = 1
|
||||
<if test="null != modelState and '' != modelState">
|
||||
and model_state = #{modelState}
|
||||
</if>
|
||||
order by ed.model_state desc
|
||||
</select>
|
||||
|
||||
<update id="updateEntDevice" parameterType="com.rzyc.model.EntDevice">
|
||||
update ent_device set type_path = #{entDevice.typePath},enterprise_id = #{entDevice.enterpriseId},qr_code = #{entDevice.qrCode},installation_time = #{entDevice.installationTime},
|
||||
enable_time = #{entDevice.enableTime},scrap_time = #{entDevice.scrapTime},factory_number = #{entDevice.factoryNumber},longitude = #{entDevice.longitude},latitude = #{entDevice.latitude},
|
||||
|
|
@ -95,4 +119,8 @@
|
|||
<update id="updateOverdueInspection">
|
||||
update ent_device set overdue_inspection = #{overdueState} where device_id = #{deviceId}
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_device set del_state = 2 where device_id = #{deviceId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@
|
|||
<if test="null != entEmExpertCategory and '' != entEmExpertCategory">
|
||||
and ent_em_expert_category like concat('%',#{entEmExpertCategory},'%')
|
||||
</if>
|
||||
<if test="null != name and '' != name">
|
||||
and ent_em_expert_name like concat('%',#{name},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,10 +32,14 @@
|
|||
|
||||
<select id="selectInspectionRecord" resultMap="BaseResultMap">
|
||||
select eir.*,edic.inspection_name as inspectionName from ent_ins_record eir left join ent_device_ins_cycle edic on eir.cycle_id = edic.inspection_id
|
||||
where eir.device_id = #{deviceId}
|
||||
where eir.device_id = #{deviceId} and eir.del_state = 1
|
||||
<if test="null != inspectionRecordName and '' != inspectionRecordName">
|
||||
and eir.ins_record_situation like concat('%',#{inspectionRecordName},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_ins_record set del_state = 2 where ins_record_id = #{deviceEntInsRecordId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.rzyc.model.EntInspectionRecord">
|
||||
<id column="inspection_id" property="inspectionId" />
|
||||
<result column="inspection_device_id" property="inspectionDeviceId" />
|
||||
<result column="inspection_organization" property="inspectionOrganization" />
|
||||
<result column="inspection_user_id" property="inspectionUserId" />
|
||||
<result column="inspection_time" property="inspectionTime" />
|
||||
|
|
@ -15,26 +14,37 @@
|
|||
<result column="create_time" property="createTime" />
|
||||
<result column="modify_by" property="modifyBy" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="name" property="name"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
inspection_id, inspection_device_id, inspection_organization, inspection_user_id, inspection_time, inspection_state, inspection_text, create_by, create_time, modify_by, modify_time
|
||||
inspection_id, inspection_organization, inspection_user_id, inspection_time, inspection_state, inspection_text, create_by, create_time, modify_by, modify_time
|
||||
</sql>
|
||||
|
||||
<select id="selectInspectionRecord" resultMap="BaseResultMap">
|
||||
select * from ent_inspection_record where inspection_device_id = #{deviceId}
|
||||
select eir.* ,eu.name
|
||||
from ent_inspection_record eir
|
||||
left join ent_user eu on eir.inspection_user_id = eu.ent_user_id
|
||||
where device_id = #{deviceId} and del_state = 1
|
||||
<if test="startTime != null and '' != startTime">
|
||||
and start_time = #{startTime}
|
||||
and inspection_time > #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and '' != endTime">
|
||||
and end_time = #{endTime}
|
||||
and inspection_time < #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateEntInspectionRecord">
|
||||
update ent_inspection_record set inspection_device_id = #{data.inspectionDeviceId}, inspection_organization = #{data.inspectionOrganization},inspection_user_id = #{data.inspectionUserId},
|
||||
update ent_inspection_record set device_id = #{data.deviceId}, inspection_organization = #{data.inspectionOrganization},inspection_user_id = #{data.inspectionUserId},
|
||||
inspection_time = #{data.inspectionTime},inspection_state = #{data.inspectionState},inspection_text = #{data.inspectionText},modify_by = #{data.modifyBy},modify_time = #{data.modifyTime}
|
||||
where inspection_id = #{data.inspectionId}
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_inspection_record set del_state = 2 where inspection_id = #{data.inspectionId}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -17,9 +17,13 @@
|
|||
<sql id="Base_Column_List">
|
||||
op_instruction_id, op_instruction_name, op_instruction_description, create_by, create_time, modify_by, modify_time
|
||||
</sql>
|
||||
<update id="updateStateOperatingInstruction">
|
||||
update ent_operating_instruction set del_state = 2 where op_instruction_id = #{opInstructionId}
|
||||
</update>
|
||||
|
||||
<select id="selectOperatingInstructions" resultMap="BaseResultMap">
|
||||
select * from ent_operating_instruction where device_id = #{deviceId}
|
||||
select * from ent_operating_instruction where del_state = 1 and
|
||||
device_id = #{deviceId}
|
||||
<if test="null != name and '' != name">
|
||||
and op_instruction_name like concat('%',#{name},'%')
|
||||
</if>
|
||||
|
|
@ -27,6 +31,7 @@
|
|||
|
||||
<update id="updateEntOperatingInstruction">
|
||||
update ent_operating_instruction set op_instruction_name = #{data.opInstructionName},op_instruction_description = #{data.opInstructionDescription},modify_time = #{data.modifyTime},modify_by = #{data.modifyBy}
|
||||
where op_instruction_id = #{opInstructionId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.rzyc.mapper.EntPostListDetailMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.rzyc.model.EntPostListDetail">
|
||||
<id column="ListDetailId" property="ListDetailId" />
|
||||
<result column="ListFactorId" property="ListFactorId" />
|
||||
<result column="SysUserId" property="SysUserId" />
|
||||
<result column="WorkTitle" property="WorkTitle" />
|
||||
<result column="WorkCnt" property="WorkCnt" />
|
||||
<result column="WorkFile" property="WorkFile" />
|
||||
<result column="StartTime" property="StartTime" />
|
||||
<result column="EndTime" property="EndTime" />
|
||||
<result column="OTCType" property="OTCType" />
|
||||
<result column="OTCId" property="OTCId" />
|
||||
<result column="enterprise_id" property="enterpriseId" />
|
||||
<result column="ent_post_task_id" property="entPostTaskId" />
|
||||
<result column="IsFinish" property="IsFinish" />
|
||||
<result column="FinishTime" property="FinishTime" />
|
||||
<result column="del_state" property="delState" />
|
||||
<result column="CreatedOn" property="CreatedOn" />
|
||||
<result column="CreatedBy" property="CreatedBy" />
|
||||
<result column="ModifiedOn" property="ModifiedOn" />
|
||||
<result column="ModifiedBy" property="ModifiedBy" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
ListDetailId, ListFactorId, SysUserId, WorkTitle, WorkCnt, WorkFile, StartTime, EndTime, OTCType, OTCId, enterprise_id, ent_post_task_id, IsFinish, FinishTime, del_state, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy
|
||||
</sql>
|
||||
<select id="selectListDetail" resultMap="BaseResultMap">
|
||||
select * from ent_post_list_detail where SysUserId = #{userId}
|
||||
<if test="null != postListId and '' != postListId">
|
||||
and ListFactorId = #{postListId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -32,6 +32,10 @@
|
|||
post_list_id, post_id, ent_user_id, enterprise_id, ent_list_id, list_id, item_title, item_content, sort_id, year_num, standard, frequency, finish_state, red_alert, yellow_alert, del_state, create_time, create_by, modify_time, modify_by
|
||||
</sql>
|
||||
|
||||
<delete id="deleteEntPostList">
|
||||
delete from ent_post_list where ent_user_id = #{entUserId}
|
||||
</delete>
|
||||
|
||||
<select id="selectEntPostList" resultMap="BaseResultMap">
|
||||
select epl.*,sum(case when task_state = 2 then 1 else 0 end)as finishCount from ent_post_list epl left join ent_post_task ept on epl.post_list_id = ept.post_list_id
|
||||
where epl.enterprise_id = #{enterpriseId} and epl.ent_user_id = #{entUserId}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@
|
|||
task_id, post_id, ent_user_id, enterprise_id, ent_list_id, list_id, post_list_id, item_title, item_content, start_time, ent_time, task_state, frequency, del_state, create_time, create_by, modify_time, modify_by
|
||||
</sql>
|
||||
|
||||
<delete id="deleteEntPostTaskList">
|
||||
delete from ent_post_task where ent_user_id = #{entUserId}
|
||||
</delete>
|
||||
|
||||
<select id="selectEntUserPostTask" resultMap="BaseResultMap">
|
||||
select * from ent_post_task where enterprise_id = #{enterpriseId}
|
||||
<if test="null != entUserId and '' != entUserId">
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
</sql>
|
||||
|
||||
<select id="selectRepairPlan" resultMap="BaseResultMap">
|
||||
select * from ent_repair_plan where repair_device_id = #{deviceId}
|
||||
select * from ent_repair_plan where repair_device_id = #{deviceId} and del_state = 1
|
||||
</select>
|
||||
|
||||
<update id="updateRepairPlan">
|
||||
|
|
@ -32,4 +32,8 @@
|
|||
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_repair_plan set del_state = 2 where repair_plan_id = #{repairPlanId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
</sql>
|
||||
|
||||
<select id="repairRecord" resultMap="BaseResultMap">
|
||||
select * from ent_repair_record where device_id = #{deviceId}
|
||||
select * from ent_repair_record where device_id = #{deviceId} and del_state = 1
|
||||
</select>
|
||||
|
||||
<update id="repairRecordUpdate">
|
||||
|
|
@ -40,4 +40,8 @@
|
|||
where repair_record_id = #{repairRecordId}
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_repair_record set del_state = 2 where repair_record_id = #{repairRecordId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<result column="create_time" property="createTime" />
|
||||
<result column="modify_by" property="modifyBy" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="name" property="name"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
|
|
@ -22,7 +23,8 @@
|
|||
</sql>
|
||||
|
||||
<select id="reportRecord" resultMap="BaseResultMap">
|
||||
select * from ent_report_repair where device_id = #{deviceId}
|
||||
select err.*,eu.name from ent_report_repair err left join ent_user eu on err.report_repair_person = eu.ent_user_id
|
||||
where device_id = #{deviceId} and del_state = 1
|
||||
</select>
|
||||
|
||||
|
||||
|
|
@ -33,4 +35,8 @@
|
|||
where report_repair_id = #{data.reportRepairId}
|
||||
</update>
|
||||
|
||||
<update id="updateDelState">
|
||||
update ent_report_repair set del_state = 2 where report_repair_id = #{reportRepairId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -51,4 +51,8 @@
|
|||
delete from ent_user_credential where credential_id = #{credentialId}
|
||||
</delete>
|
||||
|
||||
<delete id="delEntUserCredential">
|
||||
delete from ent_user_credential where ent_user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -289,7 +289,11 @@
|
|||
update notice set read_state = 1 where checkUserId = #{checkUserId}
|
||||
</update>
|
||||
|
||||
<!--批量插入-->
|
||||
<update id="oneButtonRead">
|
||||
update notice set read_state = 1 where checkUserId = #{userId}
|
||||
</update>
|
||||
|
||||
<!--批量插入-->
|
||||
<insert id="insertList" parameterType="com.rzyc.model.Notice">
|
||||
insert into notice (id, title, checkUserId,
|
||||
companyId, content, read_state,
|
||||
|
|
@ -327,4 +331,29 @@
|
|||
AND nt.`type` = 7
|
||||
ORDER BY nt.`create_time` DESC
|
||||
</select>
|
||||
|
||||
<select id="selectNotices" resultMap="BaseResultMap">
|
||||
select * from notice where 1=1
|
||||
<if test="null != type and '' != type">
|
||||
and `type` = #{type}
|
||||
</if>
|
||||
<if test="null != userId and '' != userId">
|
||||
and checkUserId = #{userId}
|
||||
</if>
|
||||
order by read_state
|
||||
</select>
|
||||
|
||||
<resultMap id="numberMap" type="com.rzyc.model.Notice">
|
||||
<result column="total" jdbcType="BIGINT" property="total" />
|
||||
<result column="read" jdbcType="BIGINT" property="read" />
|
||||
<result column="unread" jdbcType="BIGINT" property="unread" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectEntNoticeNumber" resultMap="numberMap">
|
||||
select sum(case when read_state = 1 then 1 else 0 end)as `read`,
|
||||
sum(case when read_state = 2 then 1 else 0 end)as `unread`,
|
||||
count(id)as total
|
||||
from notice where checkUserId = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ public class Swagger2Config {
|
|||
//标题
|
||||
.title("PROJECT API")
|
||||
.description("通过访问swagger-ui.html,实现接口测试、文档生成")
|
||||
.termsOfServiceUrl("http://121.40.106.103:8030/pzh")
|
||||
//设置联系方式
|
||||
.version("1.0")
|
||||
.build();
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public class RedisUtil {
|
|||
* 普通缓存放入并设置时间
|
||||
* @param key 键
|
||||
* @param value 值
|
||||
* @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
|
||||
* @param time 时间(秒) time要大于0 如果time小于等于0 将设置默认8小时
|
||||
* @return true成功 false 失败
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import org.jasypt.encryption.pbe.config.EnvironmentPBEConfig;
|
|||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class Test {
|
||||
public class TestEncryptor {
|
||||
|
||||
@NotNull
|
||||
private String a;
|
||||
|
|
@ -547,6 +547,9 @@ public class BaseController {
|
|||
@Autowired
|
||||
protected EntEmRehearsalMapper entEmRehearsalMapper;
|
||||
|
||||
@Autowired
|
||||
protected EntPostListDetailMapper entPostListDetailMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 新都文件地址处理
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ public class EmergencyEquipmentController {
|
|||
@ApiImplicitParam(name = "enterpriseId", value = "企业id",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "page", value = "page",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "page",required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "name", value = "专家名",required = false, dataType = "string"),
|
||||
@ApiImplicitParam(name = "entEmExpertClass", value = "entEmExpertClass",required = false, dataType = "string"),
|
||||
@ApiImplicitParam(name = "entEmExpertCategory", value = "entEmExpertCategory",required = false, dataType = "string"),
|
||||
})
|
||||
|
|
@ -104,8 +105,9 @@ public class EmergencyEquipmentController {
|
|||
@RequestParam(required = true)Integer page,
|
||||
@RequestParam(required = true)Integer pageSize,
|
||||
String entEmExpertClass,
|
||||
String entEmExpertCategory)throws Exception{
|
||||
return pcBusinessService.entEmExpertList(enterpriseId,page,pageSize,entEmExpertClass,entEmExpertCategory);
|
||||
String entEmExpertCategory,
|
||||
String name)throws Exception{
|
||||
return pcBusinessService.entEmExpertList(enterpriseId,page,pageSize,entEmExpertClass,entEmExpertCategory,name);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.common.utils.model.SingleResult;
|
|||
import com.rzyc.config.MethodAnnotation;
|
||||
import com.rzyc.model.*;
|
||||
import com.rzyc.model.dto.*;
|
||||
import com.rzyc.service.MobileBusinessService;
|
||||
import com.rzyc.service.PcBusinessService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
|
|
@ -31,9 +32,12 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
|
||||
PcBusinessService pcBusinessService;
|
||||
|
||||
MobileBusinessService mobileBusinessService;
|
||||
|
||||
|
||||
public EnterpriseEquipmentController(PcBusinessService pcBusinessService) {
|
||||
|
||||
public EnterpriseEquipmentController(PcBusinessService pcBusinessService,MobileBusinessService mobileBusinessService) {
|
||||
this.mobileBusinessService = mobileBusinessService;
|
||||
this.pcBusinessService = pcBusinessService;
|
||||
}
|
||||
|
||||
|
|
@ -68,14 +72,15 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
@ApiImplicitParam(name = "enterpriseId", value = "公司id", required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "typeId", value = "设备类型id", required = false, dataType = "string"),
|
||||
@ApiImplicitParam(name = "page", value = "page", required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "pageSize", required = true, dataType = "string")
|
||||
@ApiImplicitParam(name = "pageSize", value = "pageSize", required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "keyWord", value = "关键字", required = false, dataType = "string")
|
||||
})
|
||||
@GetMapping(value = "/entEquipmentList")
|
||||
@PreAuthorize("hasAnyAuthority('entEquipmentList','entEquipmentList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEquipmentList","entEquipmentList:update"},name = "企业设备列表")
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntDevice>> entEquipmentList(@RequestParam(required = true) String enterpriseId, String typeId,Integer page,Integer pageSize)throws Exception{
|
||||
return pcBusinessService.entEquipmentList(enterpriseId,typeId,page,pageSize);
|
||||
public SingleResult<List<EntDevice>> entEquipmentList(@RequestParam(required = true) String enterpriseId, String typeId,Integer page,Integer pageSize,String keyWord)throws Exception{
|
||||
return pcBusinessService.entEquipmentList(enterpriseId,typeId,page,pageSize,keyWord);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -313,7 +318,7 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
@PreAuthorize("hasAnyAuthority('inspectionRecord','inspectionRecord:update')")
|
||||
@MethodAnnotation(authorizations = {"inspectionRecord","inspectionRecord:update"},name = "送检记录")
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntInspectionRecord>> inspectionRecord(@Param("startTime") String startTime, @Param("endTime")String endTime,Integer page,Integer pageSize,String deviceId)throws Exception {
|
||||
public SingleResult<List<EntInspectionRecord>> inspectionRecord(String startTime, String endTime,Integer page,Integer pageSize,String deviceId)throws Exception {
|
||||
return pcBusinessService.inspectionRecord(startTime, endTime, page, pageSize,deviceId);
|
||||
}
|
||||
|
||||
|
|
@ -439,8 +444,8 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
@PreAuthorize("hasAnyAuthority('operatingInstructions','operatingInstructions:update')")
|
||||
@MethodAnnotation(authorizations = {"operatingInstructions","operatingInstructions:update"},name = "操作规程")
|
||||
@ResponseBody
|
||||
public SingleResult<EntOperatingInstruction> operatingInstructions(@RequestBody OperatingInstructionDto operatingInstructionDto)throws Exception{
|
||||
return pcBusinessService.operatingInstructions(operatingInstructionDto);
|
||||
public SingleResult<EntOperatingInstruction> operatingInstructions(String name,String deviceId,Integer page,Integer pageSize)throws Exception{
|
||||
return pcBusinessService.operatingInstructions(name,deviceId,page,pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -457,6 +462,20 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*删除操作规程
|
||||
* @throws Exception
|
||||
* */
|
||||
@ApiOperation(value = "删除操作规程", notes = "删除操作规程")
|
||||
@PostMapping(value = "/delStateOperatingInstruction")
|
||||
@PreAuthorize("hasAnyAuthority('operatingInstructions:delete')")
|
||||
@MethodAnnotation(authorizations = {"operatingInstructions:delete"},name = "删除操作规程")
|
||||
@ResponseBody
|
||||
public SingleResult delStateOperatingInstruction(String opInstructionId)throws Exception{
|
||||
return pcBusinessService.delStateOperatingInstruction(opInstructionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备过期列表
|
||||
* @return Data
|
||||
|
|
@ -475,6 +494,155 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业设备删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备删除", notes = "企业设备删除")
|
||||
@PostMapping(value = "/entDeviceDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDevice:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDevice:delete"},name = "企业设备删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceDelete(@RequestParam(required = true) String deviceId)throws Exception{
|
||||
return pcBusinessService.entDeviceDelete(deviceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备周期巡检删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备周期巡检删除", notes = "企业设备周期巡检删除")
|
||||
@PostMapping(value = "/deviceInspectionCycleDelete")
|
||||
@PreAuthorize("hasAnyAuthority('deviceInspectionCycle:delete')")
|
||||
@MethodAnnotation(authorizations = {"deviceInspectionCycle:delete"},name = "企业设备周期巡检删除")
|
||||
@ResponseBody
|
||||
public SingleResult deviceInspectionCycleDelete(@RequestParam(required = true) String deviceInspectionCycleId)throws Exception{
|
||||
return pcBusinessService.deviceInspectionCycleDelete(deviceInspectionCycleId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业设备巡检记录删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备巡检记录删除", notes = "企业设备巡检记录删除")
|
||||
@PostMapping(value = "/deviceEntInsRecordDelete")
|
||||
@PreAuthorize("hasAnyAuthority('deviceEntInsRecord:delete')")
|
||||
@MethodAnnotation(authorizations = {"deviceEntInsRecord:delete"},name = "企业设备巡检记录删除")
|
||||
@ResponseBody
|
||||
public SingleResult deviceEntInsRecordDelete(@RequestParam(required = true) String deviceEntInsRecordId)throws Exception{
|
||||
return pcBusinessService.deviceEntInsRecordDelete(deviceEntInsRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备保养计划删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备保养计划删除", notes = "企业设备保养计划删除")
|
||||
@PostMapping(value = "/entDeviceMaintenancePlanDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceMaintenancePlan:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceMaintenancePlan:delete"},name = "企业设备保养计划删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceMaintenancePlanDelete(@RequestParam(required = true) String deviceEntInsPlanId)throws Exception{
|
||||
return pcBusinessService.entDeviceMaintenancePlanDelete(deviceEntInsPlanId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 企业设备保养记录删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备保养记录删除", notes = "企业设备保养记录删除")
|
||||
@PostMapping(value = "/entDeviceMaintenanceRecordDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceMaintenanceRecord:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceMaintenanceRecord:delete"},name = "企业设备保养记录删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceMaintenanceRecordDelete(@RequestParam(required = true) String deviceEntInsRecordId)throws Exception{
|
||||
return pcBusinessService.entDeviceMaintenanceRecordDelete(deviceEntInsRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备送检记录删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备送检记录删除", notes = "企业设备送检记录删除")
|
||||
@PostMapping(value = "/entDeviceEntInspectionRecordDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceEntInspectionRecord:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceEntInspectionRecord:delete"},name = "企业设备送检记录删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceEntInspectionRecordDelete(@RequestParam(required = true) String deviceEntInspectionRecordId)throws Exception{
|
||||
return pcBusinessService.entDeviceEntInspectionRecordDelete(deviceEntInspectionRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备维修计划删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备维修计划删除", notes = "企业设备维修计划删除")
|
||||
@PostMapping(value = "/entDeviceRepairPlanDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceEntRepairPlan:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceEntRepairPlan:delete"},name = "企业设备维修计划删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceRepairPlanDelete(@RequestParam(required = true) String repairPlanId)throws Exception{
|
||||
return pcBusinessService.entDeviceRepairPlanDelete(repairPlanId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业设备维修记录删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备维修记录删除", notes = "企业设备维修记录删除")
|
||||
@PostMapping(value = "/entDeviceRepairRecordDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceEntRepairRecord:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceEntRepairRecord:delete"},name = "企业设备维修记录删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceRepairRecordDelete(@RequestParam(required = true) String repairRecordId)throws Exception{
|
||||
return pcBusinessService.entDeviceRepairRecordDelete(repairRecordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备故障报修删除
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备故障报修删除", notes = "企业设备故障报修删除")
|
||||
@PostMapping(value = "/entDeviceReportRepairDelete")
|
||||
@PreAuthorize("hasAnyAuthority('entDeviceReportRepair:delete')")
|
||||
@MethodAnnotation(authorizations = {"entDeviceReportRepair:delete"},name = "企业设备故障报修删除")
|
||||
@ResponseBody
|
||||
public SingleResult entDeviceReportRepairDelete(@RequestParam(required = true) String reportRepair)throws Exception{
|
||||
return pcBusinessService.entDeviceReportRepairDelete(reportRepair);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 小程序-企业设备
|
||||
* @return Data
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "小程序-企业设备", notes = "小程序-企业设备")
|
||||
@GetMapping(value = "/mobileEntDevice")
|
||||
@PreAuthorize("hasAnyAuthority('mobileEntDevice')")
|
||||
@MethodAnnotation(authorizations = {"mobileEntDevice"},name = "小程序-企业设备")
|
||||
@ResponseBody
|
||||
public SingleResult mobileEntDevice(String modelState,@RequestParam(required = true)Integer page,@RequestParam(required = true)Integer pageSize)throws Exception{
|
||||
return mobileBusinessService.mobileEntDevice(modelState,page,pageSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ public class PersonalController extends BaseController{
|
|||
@PreAuthorize("hasAnyAuthority('entUserCredential','entUserCredential:update')")
|
||||
@MethodAnnotation(authorizations = {"entUserCredential","entUserCredential:update"},name = "企业用户证照表")
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntUserCredential>> entUserCredential(@RequestParam(required = true) String entUserId, @RequestParam(required = true) Integer page, @RequestParam(required = true)Integer pageSize,Integer credentialState,String enterpriseId)throws Exception{
|
||||
public SingleResult<List<EntUserCredential>> entUserCredential(String entUserId, @RequestParam(required = true) Integer page, @RequestParam(required = true)Integer pageSize,Integer credentialState,String enterpriseId)throws Exception{
|
||||
return pcBusinessService.entUserCredential(enterpriseId,entUserId,page,pageSize,credentialState);
|
||||
}
|
||||
|
||||
|
|
@ -369,8 +369,6 @@ public class PersonalController extends BaseController{
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增和修改公司岗位人员
|
||||
* @param addOrUpdateEntUserDto
|
||||
|
|
@ -389,8 +387,6 @@ public class PersonalController extends BaseController{
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 手动企业分配任务
|
||||
* @param listDto
|
||||
|
|
@ -407,8 +403,34 @@ public class PersonalController extends BaseController{
|
|||
return pcBusinessService.manualAssignmentTask(listDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动企业添加履职记录
|
||||
* @param entPostListDetailDto 履职记录dto
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "手动企业添加履职记录", notes = "手动企业添加履职记录")
|
||||
@PostMapping(value = "/manualAddListDetail")
|
||||
@PreAuthorize("hasAnyAuthority('entPostListDetail:update')")
|
||||
@MethodAnnotation(authorizations = {"entPostListDetail:update"},name = "手动企业添加履职记录")
|
||||
@ResponseBody
|
||||
public SingleResult manualAddListDetail(@RequestBody EntPostListDetailDto entPostListDetailDto)throws Exception{
|
||||
return pcBusinessService.manualAddListDetail(entPostListDetailDto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询履职记录列表
|
||||
* */
|
||||
@ApiOperation(value = "查询履职记录列表", notes = "查询履职记录列表")
|
||||
@GetMapping(value = "/selectPostListDetail")
|
||||
@PreAuthorize("hasAnyAuthority('entPostListDetail:update')")
|
||||
@MethodAnnotation(authorizations = {"entPostListDetail:update"},name = "查询履职记录列表")
|
||||
@ResponseBody
|
||||
public SingleResult selectPostListDetail(String postListId,String userId)throws Exception{
|
||||
return pcBusinessService.selectPostListDetail(postListId,userId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增和修改公司岗位
|
||||
|
|
@ -466,7 +488,52 @@ public class PersonalController extends BaseController{
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 消息通知接口
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "消息通知接口", notes = "消息通知接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "1.修改隐患 2.履职 3:系统通知 4:检查签名 5:履职提醒 7:文件下达",required = false, dataType = "string")
|
||||
})
|
||||
@GetMapping(value = "/entNotice")
|
||||
@PreAuthorize("hasAnyAuthority('entNotice')")
|
||||
@MethodAnnotation(authorizations = {"entNotice"},name = "消息通知接口")
|
||||
@ResponseBody
|
||||
public SingleResult<List<Notice>> notice(String type,Integer page,Integer pageSize)throws Exception{
|
||||
return pcBusinessService.notices(type,page,pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息一键已读
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "消息一键已读", notes = "消息一键已读")
|
||||
@GetMapping(value = "/oneButtonRead")
|
||||
@PreAuthorize("hasAnyAuthority('entNotice')")
|
||||
@MethodAnnotation(authorizations = {"entNotice"},name = "消息一键已读")
|
||||
@ResponseBody
|
||||
public SingleResult oneButtonRead()throws Exception{
|
||||
return pcBusinessService.oneButtonRead();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 消息通知数量
|
||||
* @return list
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "消息通知数量", notes = "消息通知数量")
|
||||
@GetMapping(value = "/entNoticeNumber")
|
||||
@PreAuthorize("hasAnyAuthority('entNotice')")
|
||||
@MethodAnnotation(authorizations = {"entNotice"},name = "消息通知数量")
|
||||
@ResponseBody
|
||||
public SingleResult entNoticeNumber()throws Exception{
|
||||
return pcBusinessService.entNoticeNumber();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,372 @@
|
|||
package com.rzyc.service;
|
||||
|
||||
|
||||
import com.common.utils.Constants;
|
||||
import com.common.utils.DateUtils;
|
||||
import com.common.utils.RandomNumber;
|
||||
import com.common.utils.model.Code;
|
||||
import com.common.utils.model.Message;
|
||||
import com.common.utils.model.SingleResult;
|
||||
import com.rzyc.bean.OaTaskTime;
|
||||
import com.rzyc.controller.BaseController;
|
||||
import com.rzyc.enums.DelState;
|
||||
import com.rzyc.mapper.EntPostListMapper;
|
||||
import com.rzyc.mapper.EntPostTaskMapper;
|
||||
import com.rzyc.mapper.ent.EntUserMapper;
|
||||
import com.rzyc.mapper.ent.InEntListMapper;
|
||||
import com.rzyc.model.EntPostList;
|
||||
import com.rzyc.model.EntPostTask;
|
||||
import com.rzyc.model.dto.AddOrUpdateEntUserPostListDto;
|
||||
import com.rzyc.model.ent.EntUser;
|
||||
import com.rzyc.model.ent.InEntList;
|
||||
import com.rzyc.model.user.SysUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 企业移动端业务 Service
|
||||
* @author Xuwanxin
|
||||
* @date 2022/12/8
|
||||
* */
|
||||
public class AssignmentTaskThread implements Runnable{
|
||||
|
||||
|
||||
private String entUser;
|
||||
|
||||
private String enterpriseId;
|
||||
|
||||
private String postId;
|
||||
|
||||
private String createByUserId;
|
||||
|
||||
private EntPostListMapper entPostListMapper;
|
||||
|
||||
private EntPostTaskMapper entPostTaskMapper;
|
||||
|
||||
private InEntListMapper inEntListMapper;
|
||||
|
||||
private EntUserMapper entUserMapper;
|
||||
|
||||
public AssignmentTaskThread(String entUser, String enterpriseId, String postId, EntPostListMapper entPostListMapper, EntPostTaskMapper entPostTaskMapper,InEntListMapper inEntListMapper,String createByUserId,EntUserMapper entUserMapper) {
|
||||
this.entUser = entUser;
|
||||
this.enterpriseId = enterpriseId;
|
||||
this.postId = postId;
|
||||
this.entPostListMapper = entPostListMapper;
|
||||
this.entPostTaskMapper = entPostTaskMapper;
|
||||
this.inEntListMapper = inEntListMapper;
|
||||
this.createByUserId = createByUserId;
|
||||
this.entUserMapper = entUserMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
//插入清单和任务
|
||||
try {
|
||||
autoAssignmentTask(entUser,enterpriseId,postId,createByUserId);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void autoAssignmentTask(String userId,String enterpriseId,String postId,String createByUserId) throws Exception {
|
||||
entPostListMapper.deleteEntPostList(userId);
|
||||
entPostTaskMapper.deleteEntPostTaskList(userId);
|
||||
List<InEntList> inEntLists = inEntListMapper.selectByEnterpriseId(enterpriseId);
|
||||
for (InEntList ie:inEntLists) {
|
||||
AddOrUpdateEntUserPostListDto addOrUpdateEntUserPostTaskDto = new AddOrUpdateEntUserPostListDto();
|
||||
addOrUpdateEntUserPostTaskDto.setEntUserId(userId);
|
||||
addOrUpdateEntUserPostTaskDto.setEnterpriseId(enterpriseId);
|
||||
addOrUpdateEntUserPostTaskDto.setPostId(postId);
|
||||
addOrUpdateEntUserPostTaskDto.setEntListId(ie.getEntListId());
|
||||
addOrUpdateEntUserPostTaskDto.setFrequency(ie.getFrequency());
|
||||
addOrUpdateEntUserPostTaskDto.setItemContent(ie.getItemContent());
|
||||
addOrUpdateEntUserPostTaskDto.setItemTitle(ie.getItemTitle());
|
||||
addOrUpdateEntUserPostTaskDto.setListId(ie.getListId());
|
||||
addOrUpdateEntUserPostTaskDto.setStandard(ie.getStandard());
|
||||
insertListAndTask(addOrUpdateEntUserPostTaskDto,createByUserId);
|
||||
}
|
||||
}
|
||||
|
||||
private SingleResult insertListAndTask(AddOrUpdateEntUserPostListDto addOrUpdateEntUserPostTaskDto,String createByUserId) throws Exception {
|
||||
EntPostList entPostList = new EntPostList();
|
||||
SingleResult singleResult = new SingleResult();
|
||||
BeanUtils.copyProperties(addOrUpdateEntUserPostTaskDto,entPostList);
|
||||
entPostList.setCreateBy(createByUserId);
|
||||
entPostList.setCreateTime(new Date());
|
||||
entPostList.setDelState(DelState.NOT_DEL.getState());
|
||||
entPostList.setPostListId(RandomNumber.getUUid());
|
||||
int result = entPostListMapper.insert(entPostList);
|
||||
if (result != 1 ){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
//插入任务
|
||||
addFactorTask(entPostList,createByUserId);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建岗位任务
|
||||
* @param entPostList
|
||||
* @throws Exception
|
||||
*/
|
||||
public void addFactorTask(EntPostList entPostList,String entUserId)throws Exception{
|
||||
//任务列表
|
||||
List<EntPostTask> entTasks = new ArrayList<>();
|
||||
if(1 == entPostList.getStandard()){
|
||||
entTasks = this.getYearTask(entPostList,entUserId);
|
||||
}else if(2 == entPostList.getStandard()){
|
||||
entTasks = this.getHalfYearTask(entPostList,entUserId);
|
||||
}else if(4 == entPostList.getStandard()){
|
||||
entTasks = this.getQuarterTask(entPostList,entUserId);
|
||||
}else if(12 == entPostList.getStandard()){
|
||||
entTasks = this.getMonthTask(entPostList,entUserId);
|
||||
}
|
||||
if(null != entTasks && entTasks.size() > 0){
|
||||
entPostTaskMapper.insertList(entTasks);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取年任务信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<EntPostTask> getYearTask(EntPostList entPostList, String entUserId)throws Exception{
|
||||
List<EntPostTask> entPostTasks = new ArrayList<>();
|
||||
EntPostTask ept = new EntPostTask();
|
||||
EntUser entUser = entUserMapper.selectById(entUserId);
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
String startTime = year + "-01-01 00:00:01";
|
||||
String endTime = year + "-12-31 23:59:59";
|
||||
String subject = year+"年工作任务:"+entPostList.getItemTitle();
|
||||
ept.setItemTitle(subject);
|
||||
ept.setFrequency(entPostList.getFrequency());
|
||||
ept.setTaskState(1);
|
||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||
ept.setItemContent(entPostList.getItemContent());
|
||||
ept.setPostId(entPostList.getPostId());
|
||||
ept.setEntUserId(entPostList.getEntUserId());
|
||||
ept.setListId(entPostList.getListId());
|
||||
ept.setPostListId(entPostList.getPostListId());
|
||||
ept.setEntListId(entPostList.getPostListId());
|
||||
ept.setTaskId(RandomNumber.getUUid());
|
||||
Date start = DateUtils.parseString2Date(startTime, Constants.DATA);
|
||||
Date end = DateUtils.parseString2Date(endTime,Constants.DATA);
|
||||
ept.setStartTime(start);
|
||||
ept.setEntTime(end);
|
||||
ept.setDelState(DelState.NOT_DEL.getState());
|
||||
ept.setCreateBy(entUser.getName());
|
||||
ept.setCreateTime(new Date());
|
||||
ept.setModifyBy(entUser.getName());
|
||||
ept.setModifyTime(new Date());
|
||||
entPostTasks.add(ept);
|
||||
return entPostTasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取半年任务信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<EntPostTask> getHalfYearTask(EntPostList entPostList,String entUserId)throws Exception{
|
||||
List<EntPostTask> entPostTasks = new ArrayList<>();
|
||||
List<OaTaskTime> taskTimes = this.getTaskTime(entPostList.getStandard());
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
EntUser entUser = entUserMapper.selectById(entUserId);
|
||||
for (OaTaskTime taskTime : taskTimes){
|
||||
EntPostTask ept = new EntPostTask();
|
||||
String subject = year+"年工作任务:"+entPostList.getItemTitle();
|
||||
ept.setItemTitle(subject);
|
||||
ept.setFrequency(entPostList.getFrequency());
|
||||
ept.setTaskState(1);
|
||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||
ept.setItemContent(entPostList.getItemContent());
|
||||
ept.setPostId(entPostList.getPostId());
|
||||
ept.setEntUserId(entPostList.getEntUserId());
|
||||
ept.setListId(entPostList.getListId());
|
||||
ept.setPostListId(entPostList.getPostListId());
|
||||
ept.setEntListId(entPostList.getPostListId());
|
||||
ept.setTaskId(RandomNumber.getUUid());
|
||||
Date start = DateUtils.parseString2Date(taskTime.getStartTime(),Constants.DATA);
|
||||
Date end = DateUtils.parseString2Date(taskTime.getEndTime(),Constants.DATA);
|
||||
ept.setStartTime(start);
|
||||
ept.setEntTime(end);
|
||||
ept.setDelState(DelState.NOT_DEL.getState());
|
||||
ept.setCreateBy(entUser.getName());
|
||||
ept.setCreateTime(new Date());
|
||||
ept.setModifyBy(entUser.getName());
|
||||
ept.setModifyTime(new Date());
|
||||
entPostTasks.add(ept);
|
||||
}
|
||||
return entPostTasks;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取季度任务信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<EntPostTask> getQuarterTask(EntPostList entPostList,String entUserId)throws Exception{
|
||||
List<EntPostTask> entPostTasks = new ArrayList<>();
|
||||
List<OaTaskTime> taskTimes = this.getTaskTime(entPostList.getStandard());
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
Integer index = 1;
|
||||
for (OaTaskTime taskTime : taskTimes){
|
||||
EntPostTask ept = new EntPostTask();
|
||||
EntUser entUser = entUserMapper.selectById(entUserId);
|
||||
String subject = year+"年第"+index+"季度工作任务::"+entPostList.getItemTitle();
|
||||
ept.setItemTitle(subject);
|
||||
ept.setFrequency(entPostList.getFrequency());
|
||||
ept.setTaskState(1);
|
||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||
ept.setItemContent(entPostList.getItemContent());
|
||||
ept.setPostId(entPostList.getPostId());
|
||||
ept.setEntUserId(entPostList.getEntUserId());
|
||||
ept.setListId(entPostList.getListId());
|
||||
ept.setPostListId(entPostList.getPostListId());
|
||||
ept.setEntListId(entPostList.getPostListId());
|
||||
ept.setTaskId(RandomNumber.getUUid());
|
||||
Date start = DateUtils.parseString2Date(taskTime.getStartTime(),Constants.DATA);
|
||||
Date end = DateUtils.parseString2Date(taskTime.getEndTime(),Constants.DATA);
|
||||
ept.setStartTime(start);
|
||||
ept.setEntTime(end);
|
||||
ept.setDelState(DelState.NOT_DEL.getState());
|
||||
ept.setCreateBy(entUser.getName());
|
||||
ept.setCreateTime(new Date());
|
||||
ept.setModifyBy(entUser.getName());
|
||||
ept.setModifyTime(new Date());
|
||||
entPostTasks.add(ept);
|
||||
index++;
|
||||
}
|
||||
return entPostTasks;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取月任务信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<EntPostTask> getMonthTask(EntPostList entPostList,String entUserId)throws Exception{
|
||||
List<EntPostTask> entPostTasks = new ArrayList<>();
|
||||
List<OaTaskTime> taskTimes = this.getTaskTime(entPostList.getStandard());
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
Integer index = 1;
|
||||
for (OaTaskTime taskTime : taskTimes){
|
||||
EntPostTask ept = new EntPostTask();
|
||||
EntUser entUser = entUserMapper.selectById(entUserId);
|
||||
String subject = year+"年第"+index+"月工作任务:"+entPostList.getFrequency();
|
||||
ept.setItemTitle(subject);
|
||||
ept.setItemContent(entPostList.getItemContent());
|
||||
ept.setFrequency(entPostList.getFrequency());
|
||||
ept.setTaskState(1);
|
||||
ept.setEnterpriseId(entPostList.getEnterpriseId());
|
||||
ept.setPostId(entPostList.getPostId());
|
||||
ept.setEntUserId(entPostList.getEntUserId());
|
||||
ept.setListId(entPostList.getListId());
|
||||
ept.setPostListId(entPostList.getPostListId());
|
||||
ept.setEntListId(entPostList.getPostListId());
|
||||
ept.setTaskId(RandomNumber.getUUid());
|
||||
Date start = DateUtils.parseString2Date(taskTime.getStartTime(),Constants.DATA);
|
||||
Date end = DateUtils.parseString2Date(taskTime.getEndTime(),Constants.DATA);
|
||||
ept.setStartTime(start);
|
||||
ept.setEntTime(end);
|
||||
ept.setDelState(DelState.NOT_DEL.getState());
|
||||
ept.setCreateBy(entUser.getName());
|
||||
ept.setCreateTime(new Date());
|
||||
ept.setModifyBy(entUser.getName());
|
||||
ept.setModifyTime(new Date());
|
||||
entPostTasks.add(ept);
|
||||
index++;
|
||||
}
|
||||
return entPostTasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务时间段
|
||||
* @param checkstandard
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private List<OaTaskTime> getTaskTime(Integer checkstandard)throws Exception{
|
||||
List<OaTaskTime> oaTaskTimes = new LinkedList<>();
|
||||
List<Integer> months = new ArrayList<>();
|
||||
Integer year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
if(2 == checkstandard){
|
||||
months.add(1);
|
||||
months.add(7);
|
||||
for (Integer month : months){
|
||||
|
||||
Integer endMonth = month + 5;
|
||||
Integer day = DateUtils.getMonthLastDay(year,endMonth);
|
||||
OaTaskTime oaTaskTime = new OaTaskTime();
|
||||
oaTaskTime.setStartTime(year+"-0"+month+"-01 00:00:01");
|
||||
if(endMonth < 10){
|
||||
oaTaskTime.setEndTime(year+"-0"+endMonth+"-"+day+" 23:59:59");
|
||||
}else{
|
||||
oaTaskTime.setEndTime(year+"-"+endMonth+"-"+day+" 23:59:59");
|
||||
}
|
||||
oaTaskTimes.add(oaTaskTime);
|
||||
}
|
||||
}else if(4 == checkstandard){
|
||||
months.add(1);
|
||||
months.add(4);
|
||||
months.add(7);
|
||||
months.add(10);
|
||||
for (Integer month : months){
|
||||
|
||||
Integer entMonth = month + 2;
|
||||
Integer day = DateUtils.getMonthLastDay(year,entMonth);
|
||||
OaTaskTime oaTaskTime = new OaTaskTime();
|
||||
|
||||
String startMonthStr = "";
|
||||
String endMonthStr = "";
|
||||
if(month < 10){
|
||||
startMonthStr = "0"+month;
|
||||
}else{
|
||||
startMonthStr = ""+month;
|
||||
}
|
||||
if(entMonth < 10){
|
||||
endMonthStr = "0"+entMonth;
|
||||
}else{
|
||||
endMonthStr = entMonth+"";
|
||||
}
|
||||
oaTaskTime.setStartTime(year+"-"+startMonthStr+"-01 00:00:01");
|
||||
oaTaskTime.setEndTime(year+"-"+endMonthStr+"-"+day+" 23:59:59");
|
||||
oaTaskTimes.add(oaTaskTime);
|
||||
}
|
||||
}else if(12 == checkstandard){
|
||||
months.add(1);
|
||||
months.add(2);
|
||||
months.add(3);
|
||||
months.add(4);
|
||||
months.add(5);
|
||||
months.add(6);
|
||||
months.add(7);
|
||||
months.add(8);
|
||||
months.add(9);
|
||||
months.add(10);
|
||||
months.add(11);
|
||||
months.add(12);
|
||||
for (Integer month : months){
|
||||
Integer day = DateUtils.getMonthLastDay(year,month);
|
||||
OaTaskTime oaTaskTime = new OaTaskTime();
|
||||
String startMonthStr = "";
|
||||
if(month < 10){
|
||||
startMonthStr = "0"+month;
|
||||
}else{
|
||||
startMonthStr = ""+month;
|
||||
}
|
||||
oaTaskTime.setStartTime(year+"-"+startMonthStr+"-01 00:00:01");
|
||||
oaTaskTime.setEndTime(year+"-"+startMonthStr+"-"+day+" 23:59:59");
|
||||
oaTaskTimes.add(oaTaskTime);
|
||||
}
|
||||
}
|
||||
return oaTaskTimes;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.rzyc.service;
|
||||
|
||||
|
||||
import com.common.utils.model.SingleResult;
|
||||
import com.common.utils.pager.PageOperation;
|
||||
import com.rzyc.controller.BaseController;
|
||||
import com.rzyc.model.EntDevice;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业移动端业务 Service
|
||||
* @author Xuwanxin
|
||||
* @date 2022/12/8
|
||||
* */
|
||||
@Service
|
||||
public class MobileBusinessService extends BaseController {
|
||||
|
||||
@PageOperation
|
||||
public SingleResult mobileEntDevice(String modelState,Integer page,Integer pageSize){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
List<EntDevice>devices = entDeviceMapper.mobileEntDevice(modelState);
|
||||
singleResult.setData(devices);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ import com.rzyc.model.dto.SparePartDto;
|
|||
import com.rzyc.model.ent.InEntList;
|
||||
import com.rzyc.model.ent.SysEnterprise;
|
||||
|
||||
import org.apache.commons.math3.analysis.function.Sin;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -134,7 +135,7 @@ public class PcBusinessService extends BaseController {
|
|||
public List<EntPostTask> entUserPostTask(EntUserPostTaskDto entUserPostTaskDto) throws Exception {
|
||||
entUserPostTaskDto.setPostId(getUserPostId());
|
||||
//当listId为null时,默认第一个日常清单,查询所有正在进行中的任务
|
||||
if (null == entUserPostTaskDto.getListId()){
|
||||
if (null == entUserPostTaskDto.getListId() && (null != entUserPostTaskDto.getTaskState()&& 3 != entUserPostTaskDto.getTaskState())){
|
||||
//2为正在进行中
|
||||
entUserPostTaskDto.setTaskState(1);
|
||||
}
|
||||
|
|
@ -263,9 +264,13 @@ public class PcBusinessService extends BaseController {
|
|||
d.setEntUserId(entUser.getEntUserId());
|
||||
}
|
||||
singleResult = this.entUserCredentialUpdate(addOrUpdateEntUserDto.getEntUserCredentialUpdateDtos());
|
||||
}else {
|
||||
entUserCredentialMapper.delEntUserCredential(entUser.getEntUserId());
|
||||
}
|
||||
//插入清单和任务
|
||||
autoAssignmentTask(entUser.getEntUserId(),addOrUpdateEntUserDto.getEnterpriseId(),addOrUpdateEntUserDto.getPostId());
|
||||
AssignmentTaskThread textThread = new AssignmentTaskThread(entUser.getEntUserId(),addOrUpdateEntUserDto.getEnterpriseId(),addOrUpdateEntUserDto.getPostId(),entPostListMapper,entPostTaskMapper,inEntListMapper,getUserId(),entUserMapper);
|
||||
Thread thread=new Thread(textThread);
|
||||
thread.start();
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
|
@ -338,9 +343,9 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult entEquipmentList(String enterpriseId, String typeId,Integer page,Integer pageSize){
|
||||
public SingleResult entEquipmentList(String enterpriseId, String typeId,Integer page,Integer pageSize,String keyWord){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Page<EntDevice> devices = (Page<EntDevice>) entDeviceMapper.selectEntEquipmentList(enterpriseId,typeId);
|
||||
Page<EntDevice> devices = (Page<EntDevice>) entDeviceMapper.selectEntEquipmentList(enterpriseId,typeId,keyWord);
|
||||
singleResult.setDataPager(devices);
|
||||
return singleResult;
|
||||
}
|
||||
|
|
@ -474,8 +479,13 @@ public class PcBusinessService extends BaseController {
|
|||
Date nextTime = calculationDays(addOrUpdateDeviceInspectionCycleDto.getInspectionCycle());
|
||||
entDeviceInsCycle.setNextTimeInspection(nextTime);
|
||||
if (null != addOrUpdateDeviceInspectionCycleDto && null != addOrUpdateDeviceInspectionCycleDto.getInspectionId()){
|
||||
entDeviceInsCycle.setModifyBy(getUserId());
|
||||
entDeviceInsCycle.setModifyTime(new Date());
|
||||
result = entDeviceInsCycleMapper.updateDeviceInspectionCycle(entDeviceInsCycle);
|
||||
}else {
|
||||
entDeviceInsCycle.setInspectionId(RandomNumber.getUUid());
|
||||
entDeviceInsCycle.setCreateBy(getUserId());
|
||||
entDeviceInsCycle.setCreateTime(new Date());
|
||||
result = entDeviceInsCycleMapper.insert(entDeviceInsCycle);
|
||||
}
|
||||
if (result != 1 ){
|
||||
|
|
@ -485,7 +495,7 @@ public class PcBusinessService extends BaseController {
|
|||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult addOrUpdateInspectionRecord(AddOrUpdateInspectionRecordDto addOrUpdateInspectionRecordDto){
|
||||
public SingleResult addOrUpdateInspectionRecord(AddOrUpdateInspectionRecordDto addOrUpdateInspectionRecordDto) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
EntInsRecord entInsRecord = new EntInsRecord();
|
||||
BeanUtils.copyProperties(addOrUpdateInspectionRecordDto,entInsRecord);
|
||||
|
|
@ -496,11 +506,16 @@ public class PcBusinessService extends BaseController {
|
|||
if (cycle != null) {
|
||||
entInsRecord.setCycleId(cycle.getInspectionId());
|
||||
}
|
||||
entInsRecord.setModifyBy(getUserId());
|
||||
entInsRecord.setModifyTime(new Date());
|
||||
result = entInsRecordMapper.updateInspectionRecord(entInsRecord);
|
||||
}else {
|
||||
if (cycle != null) {
|
||||
entInsRecord.setCycleId(cycle.getInspectionId());
|
||||
}
|
||||
entInsRecord.setInsRecordId(RandomNumber.getUUid());
|
||||
entInsRecord.setCreateBy(getUserId());
|
||||
entInsRecord.setCreateTime(new Date());
|
||||
result = entInsRecordMapper.insert(entInsRecord);
|
||||
}
|
||||
if (result != 1 ){
|
||||
|
|
@ -647,6 +662,8 @@ public class PcBusinessService extends BaseController {
|
|||
entInspectionRecord.setInspectionId(RandomNumber.getUUid());
|
||||
entInspectionRecord.setCreateBy(getUserId());
|
||||
entInspectionRecord.setCreateTime(new Date());
|
||||
//state 1 是待检测
|
||||
entInspectionRecord.setInspectionState(1);
|
||||
result = entInspectionRecordMapper.insert(entInspectionRecord);
|
||||
}
|
||||
if (result != 1 ){
|
||||
|
|
@ -678,9 +695,9 @@ public class PcBusinessService extends BaseController {
|
|||
BeanUtils.copyProperties(reportRecordDto,entReportRepair);
|
||||
int result = 0;
|
||||
if (null != reportRecordDto && null != entReportRepair.getReportRepairId()){
|
||||
entReportRepairMapper.updateReportRecord(entReportRepair);
|
||||
result = entReportRepairMapper.updateReportRecord(entReportRepair);
|
||||
}else {
|
||||
entReportRepairMapper.insert(entReportRepair);
|
||||
result = entReportRepairMapper.insert(entReportRepair);
|
||||
}
|
||||
if (result != 1 ){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
|
|
@ -690,10 +707,10 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult operatingInstructions(OperatingInstructionDto operatingInstructionDto){
|
||||
public SingleResult operatingInstructions(String name,String deviceId,Integer page,Integer pageSize){
|
||||
SingleResult SingleResult = new SingleResult();
|
||||
Page<EntOperatingInstruction> page = (Page<EntOperatingInstruction>) entOperatingInstructionMapper.selectOperatingInstructions(operatingInstructionDto.getName(),operatingInstructionDto.getDeviceId());
|
||||
SingleResult.setDataPager(page);
|
||||
Page<EntOperatingInstruction> p = (Page<EntOperatingInstruction>) entOperatingInstructionMapper.selectOperatingInstructions(name,deviceId);
|
||||
SingleResult.setDataPager(p);
|
||||
return SingleResult;
|
||||
}
|
||||
|
||||
|
|
@ -721,22 +738,9 @@ public class PcBusinessService extends BaseController {
|
|||
return insertListAndTask(addOrUpdateEntUserPostTaskDto);
|
||||
}
|
||||
|
||||
public void autoAssignmentTask(String userId,String enterpriseId,String postId) throws Exception {
|
||||
List<InEntList>inEntLists = inEntListMapper.selectByEnterpriseId(enterpriseId);
|
||||
for (InEntList ie:inEntLists) {
|
||||
AddOrUpdateEntUserPostListDto addOrUpdateEntUserPostTaskDto = new AddOrUpdateEntUserPostListDto();
|
||||
addOrUpdateEntUserPostTaskDto.setEntUserId(userId);
|
||||
addOrUpdateEntUserPostTaskDto.setEnterpriseId(enterpriseId);
|
||||
addOrUpdateEntUserPostTaskDto.setPostId(postId);
|
||||
addOrUpdateEntUserPostTaskDto.setEntListId(ie.getEntListId());
|
||||
addOrUpdateEntUserPostTaskDto.setFrequency(ie.getFrequency());
|
||||
addOrUpdateEntUserPostTaskDto.setItemContent(ie.getItemContent());
|
||||
addOrUpdateEntUserPostTaskDto.setItemTitle(ie.getItemTitle());
|
||||
addOrUpdateEntUserPostTaskDto.setListId(ie.getListId());
|
||||
addOrUpdateEntUserPostTaskDto.setStandard(ie.getStandard());
|
||||
insertListAndTask(addOrUpdateEntUserPostTaskDto);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private SingleResult insertListAndTask(AddOrUpdateEntUserPostListDto addOrUpdateEntUserPostTaskDto) throws Exception {
|
||||
EntPostList entPostList = new EntPostList();
|
||||
|
|
@ -757,6 +761,7 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public SingleResult inListStatistic(String enterpriseId,String listId,String keyWord,Integer page,Integer pageSize){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
HashMap map = new HashMap();
|
||||
|
|
@ -806,6 +811,10 @@ public class PcBusinessService extends BaseController {
|
|||
map.put("unfinished",unfinishedPercent);
|
||||
double haveInHand = Arith.div(entPostTaskStatistic.getHaveInHand(),total) * 100;
|
||||
map.put("haveInHand",haveInHand);
|
||||
//数量
|
||||
map.put("finishNumber",entPostTaskStatistic.getFinished());
|
||||
map.put("unFinishNumber",entPostTaskStatistic.getOvertime());
|
||||
map.put("haveInHandNumber",entPostTaskStatistic.getHaveInHand());
|
||||
singleResult.setData(map);
|
||||
}else {
|
||||
map.put("finished",0);
|
||||
|
|
@ -824,10 +833,10 @@ public class PcBusinessService extends BaseController {
|
|||
private String getUserPostId() throws Exception {
|
||||
String userId = getUserId();
|
||||
if (StringUtils.isNotBlank(userId)){
|
||||
Object object = redisUtil.get("postId:userId"+userId);
|
||||
Object object = redisUtil.get(redisUtil.appendSymbol(RedisKeys.POSTID.getKey(),RedisKeys.USERID.getKey())+userId);
|
||||
if (null == object){
|
||||
EntUser entUser = entUserMapper.selectById(userId);
|
||||
redisUtil.set("postId:userId"+userId,entUser.getPostId());
|
||||
redisUtil.set(redisUtil.appendSymbol(RedisKeys.POSTID.getKey(),RedisKeys.USERID.getKey())+userId,entUser.getPostId());
|
||||
return entUser.getPostId();
|
||||
}else {
|
||||
return (String)object;
|
||||
|
|
@ -876,9 +885,9 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult entEmExpertList(String enterpriseId,Integer page,Integer pageSize,String entEmExpertClass,String entEmExpertCategory){
|
||||
public SingleResult entEmExpertList(String enterpriseId,Integer page,Integer pageSize,String entEmExpertClass,String entEmExpertCategory,String name){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Page<EntEmExpert>list = (Page<EntEmExpert>)entEmExpertMapper.selectEntEmExpertList(enterpriseId,entEmExpertClass,entEmExpertCategory);
|
||||
Page<EntEmExpert>list = (Page<EntEmExpert>)entEmExpertMapper.selectEntEmExpertList(enterpriseId,entEmExpertClass,entEmExpertCategory,name);
|
||||
singleResult.setDataPager(list);
|
||||
return singleResult;
|
||||
}
|
||||
|
|
@ -912,14 +921,14 @@ public class PcBusinessService extends BaseController {
|
|||
SingleResult singleResult = new SingleResult();
|
||||
EntEmReservePlan entEmReservePlan = new EntEmReservePlan();
|
||||
BeanUtils.copyProperties(entEmReservePlanDto,entEmReservePlan);
|
||||
if(null != entEmReservePlan.getEntEmReservePlanId()){
|
||||
EntEmReservePlan reservePlan = entEmReservePlanMapper.selectById(entEmReservePlan.getEntEmReservePlanId());
|
||||
if(null != reservePlan && null != reservePlan.getEntEmReservePlanId()){
|
||||
entEmReservePlan.setModifyBy(getUserId());
|
||||
entEmReservePlan.setModifyTime(new Date());
|
||||
entEmReservePlanMapper.updateEntEmReservePlan(entEmReservePlan);
|
||||
}else {
|
||||
entEmReservePlan.setCreateBy(getUserId());
|
||||
entEmReservePlan.setCreateTime(new Date());
|
||||
entEmReservePlan.setEntEmReservePlanId(RandomNumber.getUUid());
|
||||
entEmReservePlanMapper.insert(entEmReservePlan);
|
||||
}
|
||||
return singleResult;
|
||||
|
|
@ -938,14 +947,14 @@ public class PcBusinessService extends BaseController {
|
|||
SingleResult singleResult = new SingleResult();
|
||||
EntEmRehearsal entEmRehearsal = new EntEmRehearsal();
|
||||
BeanUtils.copyProperties(entEmRehearsalDto,entEmRehearsal);
|
||||
if(null != entEmRehearsal.getEntEmRehearsalId()){
|
||||
EntEmRehearsal emRehearsal = entEmRehearsalMapper.selectById(entEmRehearsal.getEntEmRehearsalId());
|
||||
if(null != emRehearsal && null != emRehearsal.getEntEmRehearsalId()){
|
||||
entEmRehearsal.setModifyBy(getUserId());
|
||||
entEmRehearsal.setModifyTime(new Date());
|
||||
entEmRehearsalMapper.updateEntEmRehearsal(entEmRehearsal);
|
||||
}else {
|
||||
entEmRehearsal.setCreateBy(getUserId());
|
||||
entEmRehearsal.setCreateTime(new Date());
|
||||
entEmRehearsal.setEntEmRehearsalId(RandomNumber.getUUid());
|
||||
entEmRehearsalMapper.insert(entEmRehearsal);
|
||||
}
|
||||
return singleResult;
|
||||
|
|
@ -1009,14 +1018,18 @@ public class PcBusinessService extends BaseController {
|
|||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult repairRecordUpdate(EntRepairRecordDto entRepairRecordDto){
|
||||
public SingleResult repairRecordUpdate(EntRepairRecordDto entRepairRecordDto) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
EntRepairRecord entRepairRecord = new EntRepairRecord();
|
||||
BeanUtils.copyProperties(entRepairRecordDto,entRepairRecord);
|
||||
int result = 0;
|
||||
if (null != entRepairRecordDto && null != entRepairRecordDto.getRepairRecordId()){
|
||||
entRepairRecord.setModifyBy(getUserId());
|
||||
entRepairRecord.setModifyTime(new Date());
|
||||
result =entRepairRecordMapper.repairRecordUpdate(entRepairRecord);
|
||||
}else {
|
||||
entRepairRecord.setCreateBy(getUserId());
|
||||
entRepairRecord.setCreateTime(new Date());
|
||||
result = entRepairRecordMapper.insert(entRepairRecord);
|
||||
}
|
||||
if (result <= 0){
|
||||
|
|
@ -1026,6 +1039,151 @@ public class PcBusinessService extends BaseController {
|
|||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceDelete(String deviceId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entDeviceMapper.updateDelState(deviceId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult deviceInspectionCycleDelete(String deviceInspectionCycleId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entDeviceInsCycleMapper.updateDelState(deviceInspectionCycleId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult deviceEntInsRecordDelete(String deviceEntInsRecordId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entInsRecordMapper.updateDelState(deviceEntInsRecordId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceMaintenancePlanDelete(String deviceEntInsPlanId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entDeviceMaintenancePlanMapper.updateDelState(deviceEntInsPlanId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
public SingleResult entDeviceMaintenanceRecordDelete(String deviceEntInsRecordId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entDeviceMaintenanceRecordMapper.updateDelState(deviceEntInsRecordId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceEntInspectionRecordDelete(String deviceEntInspectionRecordId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entInspectionRecordMapper.updateDelState(deviceEntInspectionRecordId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceRepairPlanDelete(String repairPlanId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entRepairPlanMapper.updateDelState(repairPlanId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceRepairRecordDelete(String repairRecordId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entRepairRecordMapper.updateDelState(repairRecordId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entDeviceReportRepairDelete(String reportRepair){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entReportRepairMapper.updateDelState(reportRepair);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult notices(String type,Integer page,Integer pageSize) throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
String userId = getUserId();
|
||||
List<Notice>notices = noticeMapper.selectNotices(type,userId);
|
||||
singleResult.setData(notices);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult entNoticeNumber() throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
String userId = getUserId();
|
||||
Notice notice = noticeMapper.selectEntNoticeNumber(userId);
|
||||
singleResult.setData(notice);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult delStateOperatingInstruction(String opInstructionId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = entOperatingInstructionMapper.updateStateOperatingInstruction(opInstructionId);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
public SingleResult oneButtonRead() throws Exception {
|
||||
SingleResult singleResult = new SingleResult();
|
||||
int result = noticeMapper.oneButtonRead(getUserId());
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult manualAddListDetail(EntPostListDetailDto entPostListDetailDto){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
EntPostListDetail entPostListDetail = new EntPostListDetail();
|
||||
BeanUtils.copyProperties(entPostListDetailDto,entPostListDetail);
|
||||
int result = entPostListDetailMapper.insert(entPostListDetail);
|
||||
if (result <= 0){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult selectPostListDetail(String postListId,String userId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
List<EntPostListDetail> list = entPostListDetailMapper.selectListDetail(postListId,userId);
|
||||
singleResult.setData(list);
|
||||
return singleResult;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&
|
||||
username: rzyc
|
||||
password: ENC(FDlRK2MAcJBMF7UBHBJPLGzRkpWQ4T6dgYP2bDnTodQ=)
|
||||
tomcat:
|
||||
|
|
|
|||
|
|
@ -37,9 +37,6 @@ spring:
|
|||
application:
|
||||
name: log
|
||||
|
||||
|
||||
|
||||
|
||||
#数据库
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user