81 changed files with 3967 additions and 190 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,34 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-待提醒弹框-提醒内容列表-接口入参 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class MemosToRemindFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 4859779755214502427L; |
||||
|
public interface MemoAttr extends CustomerClientShowGroup {} |
||||
|
/** |
||||
|
* 待提醒业务Id |
||||
|
*/ |
||||
|
@NotBlank(message = "待提醒业务Id不能为空", groups = { MemoAttr.class }) |
||||
|
private String memoId; |
||||
|
/** |
||||
|
* 到期提醒时间,不传值默认查询当前时间之前的数据(yyyy-MM-dd) |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private String remindTime; |
||||
|
|
||||
|
//token中用户Id
|
||||
|
private String userId; |
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,42 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-待提醒弹框-提醒内容列表-接口返参 |
||||
|
**/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
public class MemosToRemindResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 4769136806332933579L; |
||||
|
|
||||
|
/** |
||||
|
* 对应业务数据Id |
||||
|
*/ |
||||
|
private String memoId; |
||||
|
/** |
||||
|
* 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary |
||||
|
*/ |
||||
|
private String type; |
||||
|
/** |
||||
|
* 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary |
||||
|
*/ |
||||
|
private String typeName; |
||||
|
/** |
||||
|
* 提醒内容 |
||||
|
*/ |
||||
|
private String content; |
||||
|
/** |
||||
|
* 提醒时间(日期类型) |
||||
|
*/ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private String remindTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/3/21 15:11 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CommunityListResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 4336149113821131764L; |
||||
|
|
||||
|
private String orgId; |
||||
|
|
||||
|
private String orgName; |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/3/15 10:43 上午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DelPartyServiceCenterResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -2238226229442700788L; |
||||
|
|
||||
|
private String date; |
||||
|
private String matterId; |
||||
|
private String timeId; |
||||
|
private String startTime; |
||||
|
private String endTime; |
||||
|
private String centerName; |
||||
|
} |
||||
@ -0,0 +1,115 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MemoAttachmentDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* REMIND_MSG.ID 业务(工作日志、难点堵点、人员关怀)表Id |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String remindMsgId; |
||||
|
|
||||
|
/** |
||||
|
* 文件名 |
||||
|
*/ |
||||
|
private String fileName; |
||||
|
|
||||
|
/** |
||||
|
* 附件名(uuid随机生成) |
||||
|
*/ |
||||
|
private String attachmentName; |
||||
|
|
||||
|
/** |
||||
|
* 文件大小,单位b |
||||
|
*/ |
||||
|
private Integer attachmentSize; |
||||
|
|
||||
|
/** |
||||
|
* 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) |
||||
|
*/ |
||||
|
private String attachmentFormat; |
||||
|
|
||||
|
/** |
||||
|
* 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) |
||||
|
*/ |
||||
|
private String attachmentType; |
||||
|
|
||||
|
/** |
||||
|
* 附件地址 |
||||
|
*/ |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
/** |
||||
|
* 语音或视频时长,秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,80 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-属性表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MemoAttrDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 唯一标识 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 提醒时间 |
||||
|
*/ |
||||
|
private Date remindTime; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 阅读标记1 已读;0未读 |
||||
|
*/ |
||||
|
private Integer readFlag; |
||||
|
|
||||
|
/** |
||||
|
* 接收人ID |
||||
|
*/ |
||||
|
private String receiver; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,120 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-人文关怀 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MemoConcernDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 唯一标识(同memo_attr表Id) |
||||
|
*/ |
||||
|
@NotBlank(message = "ID不能为空", groups = { UpdateGroup.class }) |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 关怀类型 |
||||
|
*/ |
||||
|
private String concernType; |
||||
|
|
||||
|
/** |
||||
|
* 关怀对象 |
||||
|
*/ |
||||
|
@NotBlank(message = "关怀人员不能为空", groups = { AddGroup.class, UpdateGroup.class }) |
||||
|
private String resiName; |
||||
|
|
||||
|
/** |
||||
|
* 关怀对象电话 |
||||
|
*/ |
||||
|
private String phone; |
||||
|
|
||||
|
/** |
||||
|
* 关怀对象地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 关怀事项 |
||||
|
*/ |
||||
|
@NotBlank(message = "关怀事项不能为空", groups = { AddGroup.class, UpdateGroup.class }) |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* 预计关怀时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date scheduledTime; |
||||
|
|
||||
|
/** |
||||
|
* 实际执行时间(预留字段) |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date actualTime; |
||||
|
|
||||
|
/** |
||||
|
* 状态 0未完成 1已完成 |
||||
|
*/ |
||||
|
private Integer status; |
||||
|
|
||||
|
/** |
||||
|
* 提醒时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date remindTime; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 操作人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
/** |
||||
|
* 附件 |
||||
|
*/ |
||||
|
private List<MemoAttachmentDTO> attachmentList; |
||||
|
} |
||||
@ -0,0 +1,91 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-难点读点 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MemoDifficultyDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 唯一标识(同memo_attr表Id) |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 内容 |
||||
|
*/ |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* 解决方式 |
||||
|
*/ |
||||
|
private String resolveWay; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 预计处理时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date scheduledTime; |
||||
|
|
||||
|
/** |
||||
|
* 提醒时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date remindTime; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
private List<MemoAttachmentDTO> attachmentList; |
||||
|
} |
||||
@ -0,0 +1,89 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-工作日志 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MemoWorkDiaryDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 唯一标识(同memo_attr表Id) |
||||
|
*/ |
||||
|
@NotBlank(message = "ID不能为空", groups = { UpdateGroup.class }) |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 工作事项 |
||||
|
*/ |
||||
|
private String workType; |
||||
|
|
||||
|
/** |
||||
|
* 内容 |
||||
|
*/ |
||||
|
@NotBlank(message = "内容不能为空", groups = { AddGroup.class, UpdateGroup.class }) |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* 提醒时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date remindTime; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** |
||||
|
* 附件 |
||||
|
*/ |
||||
|
private List<MemoAttachmentDTO> attachmentList; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import com.epmet.dto.MemoAttachmentDTO; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-难点读点 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AddMemoDifficultyFromDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
public interface AddMemoDifficulty extends CustomerClientShowGroup {} |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 内容 |
||||
|
*/ |
||||
|
@NotBlank(message = "难点堵点内容不能为空", groups = { AddMemoDifficulty.class }) |
||||
|
@Length(max = 500, message = "难点堵点内容最多为50个字", groups = { AddMemoDifficulty.class }) |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* 解决方式 |
||||
|
*/ |
||||
|
@Length(max = 500, message = "解决方式最多为500个字", groups = { AddMemoDifficulty.class }) |
||||
|
private String resolveWay; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
@Length(max = 200, message = "备注最多为200个字", groups = { AddMemoDifficulty.class }) |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 预计处理时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date scheduledTime; |
||||
|
|
||||
|
/** |
||||
|
* 提醒时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date remindTime; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 附件集合 |
||||
|
*/ |
||||
|
private List<MemoAttachmentDTO> attachmentList; |
||||
|
|
||||
|
//token中客户ID
|
||||
|
private String customerId; |
||||
|
//token中用户Id
|
||||
|
private String userId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 17:11 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class MemoConcernFormDTO extends PageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -2355555089163762829L; |
||||
|
private String userId; |
||||
|
private String id; |
||||
|
private String readFlag = "0"; |
||||
|
private String content; |
||||
|
private String concernType; |
||||
|
private String resiName; |
||||
|
private String status; |
||||
|
private String startTime; |
||||
|
private String endTime; |
||||
|
private String scheduledStartTime; |
||||
|
private String scheduledEndTime; |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-难点读点 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MemoDifficultyDetailFromDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
public interface Detail extends CustomerClientShowGroup {} |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
@NotBlank(message = "难点堵点Id不能为空", groups = { Detail.class }) |
||||
|
private String id; |
||||
|
/** |
||||
|
* 阅读标记1 已读;0未读 |
||||
|
*/ |
||||
|
@NotNull(message = "阅读标记不能为空", groups = { Detail.class }) |
||||
|
private Integer readFlag; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 难点堵点列表 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class MemoDifficultyFormDTO extends PageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 3101320969471756516L; |
||||
|
|
||||
|
/** |
||||
|
* 内容摘要 |
||||
|
*/ |
||||
|
private String content; |
||||
|
/** |
||||
|
* 起始预计处理时间 |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private String scheduledStartTime; |
||||
|
/** |
||||
|
* 终止预计处理时间 |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private String scheduledEndTime; |
||||
|
/** |
||||
|
* 起始创建时间Y-%m-%d |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private String startTime; |
||||
|
/** |
||||
|
* 终止创建时间 |
||||
|
*/ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
private String endTime; |
||||
|
|
||||
|
//token中用户Id
|
||||
|
private String userId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 15:09 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class MemoWorkDiaryFormDTO extends PageFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 3101320969471756516L; |
||||
|
private String userId; |
||||
|
private String id; |
||||
|
private String readFlag = "0"; |
||||
|
private String content; |
||||
|
private String workType; |
||||
|
private String startTime; |
||||
|
private String endTime; |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
package com.epmet.constant; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 16:56 |
||||
|
*/ |
||||
|
public interface MemoConstant { |
||||
|
String WORK_DIARY = "work_diary"; |
||||
|
String CONCERN = "concern"; |
||||
|
String DIFFICULTY = "difficulty"; |
||||
|
} |
||||
@ -0,0 +1,72 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.MemoAttachmentDTO; |
||||
|
import com.epmet.service.MemoAttachmentService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("memoAttachment") |
||||
|
public class MemoAttachmentController { |
||||
|
|
||||
|
@Autowired |
||||
|
private MemoAttachmentService memoAttachmentService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<MemoAttachmentDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<MemoAttachmentDTO> page = memoAttachmentService.page(params); |
||||
|
return new Result<PageData<MemoAttachmentDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<MemoAttachmentDTO> get(@PathVariable("id") String id){ |
||||
|
MemoAttachmentDTO data = memoAttachmentService.get(id); |
||||
|
return new Result<MemoAttachmentDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody MemoAttachmentDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
memoAttachmentService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody MemoAttachmentDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
memoAttachmentService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
memoAttachmentService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,106 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.MemoAttrDTO; |
||||
|
import com.epmet.dto.form.MemosToRemindFormDTO; |
||||
|
import com.epmet.dto.result.MemosToRemindResultDTO; |
||||
|
import com.epmet.service.MemoAttrService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-属性表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("memoAttr") |
||||
|
public class MemoAttrController { |
||||
|
|
||||
|
@Autowired |
||||
|
private MemoAttrService memoAttrService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<MemoAttrDTO>> page(@RequestParam Map<String, Object> params) { |
||||
|
PageData<MemoAttrDTO> page = memoAttrService.page(params); |
||||
|
return new Result<PageData<MemoAttrDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
||||
|
public Result<MemoAttrDTO> get(@PathVariable("id") String id) { |
||||
|
MemoAttrDTO data = memoAttrService.get(id); |
||||
|
return new Result<MemoAttrDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody MemoAttrDTO dto) { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
memoAttrService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody MemoAttrDTO dto) { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
memoAttrService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids) { |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
memoAttrService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-待提醒弹框-提醒内容列表 |
||||
|
**/ |
||||
|
@PostMapping("memosToRemind") |
||||
|
public Result<List<MemosToRemindResultDTO>> memosToRemind(@LoginUser TokenDto tokenDTO, @RequestBody MemosToRemindFormDTO formDTO) { |
||||
|
formDTO.setUserId(tokenDTO.getUserId()); |
||||
|
return new Result<List<MemosToRemindResultDTO>>().ok(memoAttrService.memosToRemind(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-待提醒时间列表 |
||||
|
**/ |
||||
|
@PostMapping("memoTime") |
||||
|
public Result<List<String>> memoTime(@LoginUser TokenDto tokenDTO) { |
||||
|
return new Result<List<String>>().ok(memoAttrService.memoTime(tokenDTO.getUserId())); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-提醒列表-我知道了 |
||||
|
**/ |
||||
|
@PostMapping("setReaded") |
||||
|
public Result setReaded(@RequestBody MemosToRemindFormDTO formDTO) { |
||||
|
ValidatorUtils.validateEntity(formDTO, MemosToRemindFormDTO.MemoAttr.class); |
||||
|
memoAttrService.setReaded(formDTO.getMemoId()); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,198 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import cn.afterturn.easypoi.word.WordExportUtil; |
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.DateUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.MemoConcernDTO; |
||||
|
import com.epmet.dto.form.MemoConcernFormDTO; |
||||
|
import com.epmet.service.MemoConcernService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.io.IOUtils; |
||||
|
import org.apache.poi.xwpf.usermodel.XWPFDocument; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.http.HttpHeaders; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.ServletOutputStream; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.FileOutputStream; |
||||
|
import java.io.IOException; |
||||
|
import java.io.InputStream; |
||||
|
import java.io.OutputStream; |
||||
|
import java.net.URL; |
||||
|
import java.net.URLEncoder; |
||||
|
import java.nio.file.Files; |
||||
|
import java.nio.file.Path; |
||||
|
import java.nio.file.Paths; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-人文关怀 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("memoConcern") |
||||
|
public class MemoConcernController { |
||||
|
|
||||
|
@Autowired |
||||
|
private MemoConcernService memoConcernService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<MemoConcernDTO>> page(@LoginUser TokenDto tokenDto, @RequestBody MemoConcernFormDTO formDTO){ |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
PageData<MemoConcernDTO> page = memoConcernService.page(formDTO); |
||||
|
return new Result<PageData<MemoConcernDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<MemoConcernDTO> get(@RequestBody MemoConcernFormDTO formDTO){ |
||||
|
MemoConcernDTO data = memoConcernService.get(formDTO); |
||||
|
return new Result<MemoConcernDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@LoginUser TokenDto tokenDto, @RequestBody MemoConcernDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
|
||||
|
dto.setCustomerId(tokenDto.getCustomerId()); |
||||
|
dto.setCreatedBy(tokenDto.getUserId()); |
||||
|
memoConcernService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@LoginUser TokenDto tokenDto, @RequestBody MemoConcernDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
dto.setCustomerId(tokenDto.getCustomerId()); |
||||
|
memoConcernService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
memoConcernService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/{id}/exportWord") |
||||
|
public void exportWord(@PathVariable("id") String id, HttpServletResponse response) throws Exception { |
||||
|
String templateFilePath = loadTemplate("memo_concern_export_template.docx"); |
||||
|
MemoConcernFormDTO formDTO = new MemoConcernFormDTO(); |
||||
|
formDTO.setId(id); |
||||
|
MemoConcernDTO data = memoConcernService.get(formDTO); |
||||
|
|
||||
|
if (data == null) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未找到id为" + id + "的关怀项目", "未找到该关怀项目"); |
||||
|
} |
||||
|
|
||||
|
Map<String, Object> map = BeanUtil.beanToMap(data); |
||||
|
|
||||
|
// 创建时间
|
||||
|
if (data.getCreatedTime() != null) { |
||||
|
String createTimeStr = DateUtils.format(data.getCreatedTime(), "yyyy年MM月dd日 HH:mm"); |
||||
|
map.put("createTime", createTimeStr); |
||||
|
} else { |
||||
|
map.put("createTime", ""); |
||||
|
} |
||||
|
|
||||
|
// 预计关怀时间
|
||||
|
if (data.getScheduledTime() != null) { |
||||
|
String scheduledTimeStr = DateUtils.format(data.getScheduledTime(), "yyyy年MM月dd日 HH:mm"); |
||||
|
map.put("scheduledTime", scheduledTimeStr); |
||||
|
} else { |
||||
|
map.put("scheduledTime", ""); |
||||
|
} |
||||
|
|
||||
|
//状态
|
||||
|
map.put("statusName", new Integer(0).equals(data.getStatus()) ? "未完成" : "已完成"); |
||||
|
|
||||
|
XWPFDocument doc = WordExportUtil.exportWord07(templateFilePath, map); |
||||
|
|
||||
|
String suffix = templateFilePath.substring(templateFilePath.lastIndexOf(".")); |
||||
|
|
||||
|
response.setHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); |
||||
|
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); |
||||
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;fileName=" + URLEncoder.encode("人员关怀详情", "UTF-8") + suffix); |
||||
|
|
||||
|
ServletOutputStream fos = null; |
||||
|
try { |
||||
|
fos = response.getOutputStream(); |
||||
|
doc.write(fos); |
||||
|
} finally { |
||||
|
if (fos != null) { |
||||
|
fos.close(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 加载模板 |
||||
|
* @param templateFileName |
||||
|
* @return |
||||
|
* @throws IOException |
||||
|
*/ |
||||
|
private String loadTemplate(String templateFileName) throws IOException { |
||||
|
String homeDir = System.getProperty("user.home"); |
||||
|
Path templates = Paths.get(homeDir, "epmet_files", "templates"); |
||||
|
if (Files.notExists(templates)) { |
||||
|
Files.createDirectories(templates); |
||||
|
} |
||||
|
|
||||
|
Path templateFilePath = templates.resolve(templateFileName); |
||||
|
String templateFilePathStr = templateFilePath.toString(); |
||||
|
if (Files.exists(templateFilePath)) { |
||||
|
return templateFilePathStr; |
||||
|
} |
||||
|
|
||||
|
// 将项目中的模板拷贝至用户家目录中
|
||||
|
OutputStream os = null; |
||||
|
InputStream is = null; |
||||
|
try { |
||||
|
is = this.getClass().getClassLoader().getResourceAsStream("templates/" + templateFileName); |
||||
|
os = new FileOutputStream(templateFilePathStr); |
||||
|
IOUtils.copy(is, os); |
||||
|
} finally { |
||||
|
try { |
||||
|
if (is != null) { |
||||
|
is.close(); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); |
||||
|
log.error("【导出工作日志doc】关闭输入流出错:{}", errorMsg); |
||||
|
} |
||||
|
try { |
||||
|
if (os != null) { |
||||
|
os.close(); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); |
||||
|
log.error("【导出工作日志doc】关闭输出流出错:{}", errorMsg); |
||||
|
} |
||||
|
} |
||||
|
return templateFilePathStr; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,183 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import cn.afterturn.easypoi.word.WordExportUtil; |
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.DateUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dto.MemoDifficultyDTO; |
||||
|
import com.epmet.dto.form.AddMemoDifficultyFromDTO; |
||||
|
import com.epmet.dto.form.MemoDifficultyDetailFromDTO; |
||||
|
import com.epmet.dto.form.MemoDifficultyFormDTO; |
||||
|
import com.epmet.service.MemoDifficultyService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.io.IOUtils; |
||||
|
import org.apache.poi.xwpf.usermodel.XWPFDocument; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.http.HttpHeaders; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.ServletOutputStream; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.FileOutputStream; |
||||
|
import java.io.IOException; |
||||
|
import java.io.InputStream; |
||||
|
import java.io.OutputStream; |
||||
|
import java.net.URLEncoder; |
||||
|
import java.nio.file.Files; |
||||
|
import java.nio.file.Path; |
||||
|
import java.nio.file.Paths; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-难点读点 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("memoDifficulty") |
||||
|
public class MemoDifficultyController { |
||||
|
|
||||
|
@Autowired |
||||
|
private MemoDifficultyService memoDifficultyService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<MemoDifficultyDTO>> page(@LoginUser TokenDto tokenDto, @RequestBody MemoDifficultyFormDTO formDTO){ |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
PageData<MemoDifficultyDTO> page = memoDifficultyService.page(formDTO); |
||||
|
return new Result<PageData<MemoDifficultyDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<MemoDifficultyDTO> get(@PathVariable("id") String id){ |
||||
|
MemoDifficultyDTO data = memoDifficultyService.get(id); |
||||
|
return new Result<MemoDifficultyDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@LoginUser TokenDto tokenDTO, @RequestBody AddMemoDifficultyFromDTO dto){ |
||||
|
ValidatorUtils.validateEntity(dto, AddMemoDifficultyFromDTO.AddMemoDifficulty.class); |
||||
|
dto.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
dto.setUserId(tokenDTO.getUserId()); |
||||
|
memoDifficultyService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@LoginUser TokenDto tokenDTO, @RequestBody AddMemoDifficultyFromDTO dto){ |
||||
|
dto.setCustomerId(tokenDTO.getCustomerId()); |
||||
|
memoDifficultyService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
memoDifficultyService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("detail") |
||||
|
public Result<AddMemoDifficultyFromDTO> detail(@RequestBody MemoDifficultyDetailFromDTO fromDTO){ |
||||
|
ValidatorUtils.validateEntity(fromDTO, MemoDifficultyDetailFromDTO.Detail.class); |
||||
|
return new Result<AddMemoDifficultyFromDTO>().ok(memoDifficultyService.detail(fromDTO)); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/{id}/exportWord") |
||||
|
public void exportWord(@PathVariable("id") String id, HttpServletResponse response) throws Exception { |
||||
|
String templateFilePath = loadTemplate("memo_difficulty_export_template.docx"); |
||||
|
MemoDifficultyDTO data = memoDifficultyService.get(id); |
||||
|
|
||||
|
if (data == null) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未找到id为" + id + "的难点堵点项", "未找到该难点堵点项"); |
||||
|
} |
||||
|
|
||||
|
Map<String, Object> map = BeanUtil.beanToMap(data); |
||||
|
|
||||
|
String createTimeStr = DateUtils.format(data.getCreatedTime(), "yyyy年MM月dd日 HH:mm"); |
||||
|
map.put("createTime", createTimeStr); |
||||
|
|
||||
|
String scheduledTimeStr = DateUtils.format(data.getScheduledTime(), "yyyy年MM月dd日 HH:mm"); |
||||
|
map.put("scheduledTime", scheduledTimeStr); |
||||
|
|
||||
|
XWPFDocument doc = WordExportUtil.exportWord07(templateFilePath, map); |
||||
|
|
||||
|
String suffix = templateFilePath.substring(templateFilePath.lastIndexOf(".")); |
||||
|
|
||||
|
response.setHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); |
||||
|
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); |
||||
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;fileName=" + URLEncoder.encode("难点堵点详情", "UTF-8") + suffix); |
||||
|
|
||||
|
ServletOutputStream fos = null; |
||||
|
try { |
||||
|
fos = response.getOutputStream(); |
||||
|
doc.write(fos); |
||||
|
} finally { |
||||
|
if (fos != null) { |
||||
|
fos.close(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 加载模板 |
||||
|
* @param templateFileName |
||||
|
* @return |
||||
|
* @throws IOException |
||||
|
*/ |
||||
|
private String loadTemplate(String templateFileName) throws IOException { |
||||
|
String homeDir = System.getProperty("user.home"); |
||||
|
Path templates = Paths.get(homeDir, "epmet_files", "templates"); |
||||
|
if (Files.notExists(templates)) { |
||||
|
Files.createDirectories(templates); |
||||
|
} |
||||
|
|
||||
|
Path templateFilePath = templates.resolve(templateFileName); |
||||
|
String templateFilePathStr = templateFilePath.toString(); |
||||
|
if (Files.exists(templateFilePath)) { |
||||
|
return templateFilePathStr; |
||||
|
} |
||||
|
|
||||
|
// 将项目中的模板拷贝至用户家目录中
|
||||
|
OutputStream os = null; |
||||
|
InputStream is = null; |
||||
|
try { |
||||
|
is = this.getClass().getClassLoader().getResourceAsStream("templates/" + templateFileName); |
||||
|
os = new FileOutputStream(templateFilePathStr); |
||||
|
IOUtils.copy(is, os); |
||||
|
} finally { |
||||
|
try { |
||||
|
if (is != null) { |
||||
|
is.close(); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); |
||||
|
log.error("【导出工作日志doc】关闭输入流出错:{}", errorMsg); |
||||
|
} |
||||
|
try { |
||||
|
if (os != null) { |
||||
|
os.close(); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); |
||||
|
log.error("【导出工作日志doc】关闭输出流出错:{}", errorMsg); |
||||
|
} |
||||
|
} |
||||
|
return templateFilePathStr; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,175 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import cn.afterturn.easypoi.word.WordExportUtil; |
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.DateUtils; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.MemoWorkDiaryDTO; |
||||
|
import com.epmet.dto.form.MemoWorkDiaryFormDTO; |
||||
|
import com.epmet.service.MemoWorkDiaryService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.io.IOUtils; |
||||
|
import org.apache.poi.xwpf.usermodel.XWPFDocument; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.http.HttpHeaders; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.ServletOutputStream; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.io.FileOutputStream; |
||||
|
import java.io.IOException; |
||||
|
import java.io.InputStream; |
||||
|
import java.io.OutputStream; |
||||
|
import java.net.URL; |
||||
|
import java.net.URLEncoder; |
||||
|
import java.nio.file.Files; |
||||
|
import java.nio.file.Path; |
||||
|
import java.nio.file.Paths; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.Map; |
||||
|
import java.util.Optional; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 备忘录-工作日志 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("memoWorkDiary") |
||||
|
public class MemoWorkDiaryController { |
||||
|
|
||||
|
@Autowired |
||||
|
private MemoWorkDiaryService memoWorkDiaryService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<MemoWorkDiaryDTO>> page(@LoginUser TokenDto tokenDto, @RequestBody MemoWorkDiaryFormDTO formDTO){ |
||||
|
formDTO.setUserId(tokenDto.getUserId()); |
||||
|
PageData<MemoWorkDiaryDTO> page = memoWorkDiaryService.page(formDTO); |
||||
|
return new Result<PageData<MemoWorkDiaryDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<MemoWorkDiaryDTO> get(@RequestBody MemoWorkDiaryFormDTO formDTO){ |
||||
|
MemoWorkDiaryDTO data = memoWorkDiaryService.get(formDTO); |
||||
|
return new Result<MemoWorkDiaryDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@LoginUser TokenDto tokenDto, @RequestBody MemoWorkDiaryDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
dto.setCustomerId(tokenDto.getCustomerId()); |
||||
|
dto.setCreatedBy(tokenDto.getUserId()); |
||||
|
memoWorkDiaryService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@LoginUser TokenDto tokenDto, @RequestBody MemoWorkDiaryDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
dto.setCustomerId(tokenDto.getCustomerId()); |
||||
|
memoWorkDiaryService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
memoWorkDiaryService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/{id}/exportWord") |
||||
|
public void exportWord(@PathVariable("id") String id, HttpServletResponse response) throws Exception { |
||||
|
String templateFilePath = loadTemplate("memo_work_diary_export_template.docx"); |
||||
|
MemoWorkDiaryFormDTO form = new MemoWorkDiaryFormDTO(); |
||||
|
form.setId(id); |
||||
|
MemoWorkDiaryDTO data = memoWorkDiaryService.get(form); |
||||
|
|
||||
|
Map<String, Object> map = BeanUtil.beanToMap(data); |
||||
|
String createTimeStr = DateUtils.format(data.getCreatedTime(), "yyyy年MM月dd日 HH:mm"); |
||||
|
map.put("createTime", createTimeStr); |
||||
|
|
||||
|
XWPFDocument doc = WordExportUtil.exportWord07(templateFilePath, map); |
||||
|
|
||||
|
String suffix = templateFilePath.substring(templateFilePath.lastIndexOf(".")); |
||||
|
|
||||
|
response.setHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); |
||||
|
response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); |
||||
|
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;fileName=" + URLEncoder.encode("工作日志详情", "UTF-8") + suffix); |
||||
|
|
||||
|
ServletOutputStream fos = null; |
||||
|
try { |
||||
|
fos = response.getOutputStream(); |
||||
|
doc.write(fos); |
||||
|
} finally { |
||||
|
if (fos != null) { |
||||
|
fos.close(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 加载模板 |
||||
|
* @param templateFileName |
||||
|
* @return |
||||
|
* @throws IOException |
||||
|
*/ |
||||
|
private String loadTemplate(String templateFileName) throws IOException { |
||||
|
String homeDir = System.getProperty("user.home"); |
||||
|
Path templates = Paths.get(homeDir, "epmet_files", "templates"); |
||||
|
if (Files.notExists(templates)) { |
||||
|
Files.createDirectories(templates); |
||||
|
} |
||||
|
|
||||
|
Path templateFilePath = templates.resolve(templateFileName); |
||||
|
String templateFilePathStr = templateFilePath.toString(); |
||||
|
if (Files.exists(templateFilePath)) { |
||||
|
return templateFilePathStr; |
||||
|
} |
||||
|
|
||||
|
// 将项目中的模板拷贝至用户家目录中
|
||||
|
OutputStream os = null; |
||||
|
InputStream is = null; |
||||
|
try { |
||||
|
is = this.getClass().getClassLoader().getResourceAsStream("templates/" + templateFileName); |
||||
|
os = new FileOutputStream(templateFilePathStr); |
||||
|
IOUtils.copy(is, os); |
||||
|
} finally { |
||||
|
try { |
||||
|
if (is != null) { |
||||
|
is.close(); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); |
||||
|
log.error("【导出工作日志doc】关闭输入流出错:{}", errorMsg); |
||||
|
} |
||||
|
try { |
||||
|
if (os != null) { |
||||
|
os.close(); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); |
||||
|
log.error("【导出工作日志doc】关闭输出流出错:{}", errorMsg); |
||||
|
} |
||||
|
} |
||||
|
return templateFilePathStr; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.MemoAttachmentEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface MemoAttachmentDao extends BaseDao<MemoAttachmentEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.result.MemosToRemindResultDTO; |
||||
|
import com.epmet.entity.MemoAttrEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-属性表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface MemoAttrDao extends BaseDao<MemoAttrEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 查询提醒内容列表,有时间的按时间查询,没有的查询当前日期之前的数据 |
||||
|
**/ |
||||
|
List<MemosToRemindResultDTO> memosToRemind(@Param("remindTime") String remindTime, @Param("userId") String userId); |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 查询某个人当前日期之后,当日0点之前待提醒时间节点列表 |
||||
|
**/ |
||||
|
List<String> memoTime(@Param("userId") String userId); |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.MemoConcernDTO; |
||||
|
import com.epmet.dto.form.MemoConcernFormDTO; |
||||
|
import com.epmet.entity.MemoConcernEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-人文关怀 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface MemoConcernDao extends BaseDao<MemoConcernEntity> { |
||||
|
/** |
||||
|
* 查询列表 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link List < MemoConcernDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 15:31 |
||||
|
*/ |
||||
|
List<MemoConcernDTO> getPage(MemoConcernFormDTO formDTO); |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.MemoDifficultyDTO; |
||||
|
import com.epmet.dto.MemoWorkDiaryDTO; |
||||
|
import com.epmet.dto.form.AddMemoDifficultyFromDTO; |
||||
|
import com.epmet.dto.form.MemoDifficultyFormDTO; |
||||
|
import com.epmet.entity.MemoDifficultyEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-难点读点 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface MemoDifficultyDao extends BaseDao<MemoDifficultyEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 难点堵点查询列表 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
List<MemoDifficultyDTO> getPage(MemoDifficultyFormDTO formDTO); |
||||
|
|
||||
|
AddMemoDifficultyFromDTO selectByDifficutyId(@Param("id") String id); |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.MemoWorkDiaryDTO; |
||||
|
import com.epmet.dto.form.MemoWorkDiaryFormDTO; |
||||
|
import com.epmet.entity.MemoWorkDiaryEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-工作日志 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface MemoWorkDiaryDao extends BaseDao<MemoWorkDiaryEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 查询列表 |
||||
|
* |
||||
|
* @Param formDTO |
||||
|
* @Return {@link List< MemoWorkDiaryDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 15:31 |
||||
|
*/ |
||||
|
List<MemoWorkDiaryDTO> getPage(MemoWorkDiaryFormDTO formDTO); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("memo_attachment") |
||||
|
public class MemoAttachmentEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* REMIND_MSG.ID 业务(工作日志、难点堵点、人员关怀)表Id |
||||
|
*/ |
||||
|
private String remindMsgId; |
||||
|
|
||||
|
/** |
||||
|
* 文件名 |
||||
|
*/ |
||||
|
private String fileName; |
||||
|
|
||||
|
/** |
||||
|
* 附件名(uuid随机生成) |
||||
|
*/ |
||||
|
private String attachmentName; |
||||
|
|
||||
|
/** |
||||
|
* 文件大小,单位b |
||||
|
*/ |
||||
|
private Integer attachmentSize; |
||||
|
|
||||
|
/** |
||||
|
* 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) |
||||
|
*/ |
||||
|
private String attachmentFormat; |
||||
|
|
||||
|
/** |
||||
|
* 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) |
||||
|
*/ |
||||
|
private String attachmentType; |
||||
|
|
||||
|
/** |
||||
|
* 附件地址 |
||||
|
*/ |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
/** |
||||
|
* 语音或视频时长,秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 物理删除 |
||||
|
*/ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String delFlag; |
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.FieldStrategy; |
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import org.apache.ibatis.type.JdbcType; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-属性表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("memo_attr") |
||||
|
public class MemoAttrEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 提醒时间 |
||||
|
*/ |
||||
|
@TableField(value="REMIND_TIME",updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.TIMESTAMP) |
||||
|
private Date remindTime; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 阅读标记1 已读;0未读 |
||||
|
*/ |
||||
|
private Integer readFlag; |
||||
|
|
||||
|
/** |
||||
|
* 接收人ID |
||||
|
*/ |
||||
|
private String receiver; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,73 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.FieldStrategy; |
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import org.apache.ibatis.type.JdbcType; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-人文关怀 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("memo_concern") |
||||
|
public class MemoConcernEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 关怀类型 |
||||
|
*/ |
||||
|
private String concernType; |
||||
|
|
||||
|
/** |
||||
|
* 关怀对象 |
||||
|
*/ |
||||
|
private String resiName; |
||||
|
|
||||
|
/** |
||||
|
* 关怀对象电话 |
||||
|
*/ |
||||
|
private String phone; |
||||
|
|
||||
|
/** |
||||
|
* 关怀对象地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 关怀事项 |
||||
|
*/ |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* 预计关怀时间 |
||||
|
*/ |
||||
|
@TableField(value="SCHEDULED_TIME",updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.TIMESTAMP) |
||||
|
private Date scheduledTime; |
||||
|
|
||||
|
/** |
||||
|
* 实际执行时间(预留字段) |
||||
|
*/ |
||||
|
@TableField(value="ACTUAL_TIME",updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.TIMESTAMP) |
||||
|
private Date actualTime; |
||||
|
|
||||
|
/** |
||||
|
* 状态 0未完成 1已完成 |
||||
|
*/ |
||||
|
private Integer status; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.FieldStrategy; |
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import org.apache.ibatis.type.JdbcType; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-难点读点 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("memo_difficulty") |
||||
|
public class MemoDifficultyEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 内容 |
||||
|
*/ |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* 解决方式 |
||||
|
*/ |
||||
|
private String resolveWay; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 预计处理时间 |
||||
|
*/ |
||||
|
@TableField(value="SCHEDULED_TIME",updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.TIMESTAMP) |
||||
|
private Date scheduledTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-工作日志 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("memo_work_diary") |
||||
|
public class MemoWorkDiaryEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 工作事项 |
||||
|
*/ |
||||
|
private String workType; |
||||
|
|
||||
|
/** |
||||
|
* 内容 |
||||
|
*/ |
||||
|
private String content; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,98 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.MemoAttachmentDTO; |
||||
|
import com.epmet.entity.MemoAttachmentEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
public interface MemoAttachmentService extends BaseService<MemoAttachmentEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<MemoAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
PageData<MemoAttachmentDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<MemoAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
List<MemoAttachmentDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return MemoAttachmentDTO |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
MemoAttachmentDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void save(MemoAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void update(MemoAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 根据备忘录ID查询附件 |
||||
|
* |
||||
|
* @Param memoId |
||||
|
* @Return {@link List< MemoAttachmentDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 15:56 |
||||
|
*/ |
||||
|
List<MemoAttachmentDTO> getListByMemoId(String memoId); |
||||
|
|
||||
|
/** |
||||
|
* 根据备忘录ID删除附件 |
||||
|
* |
||||
|
* @Param memoId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 15:57 |
||||
|
*/ |
||||
|
void deleteByMemoId(String memoId); |
||||
|
} |
||||
@ -0,0 +1,98 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.MemoAttrDTO; |
||||
|
import com.epmet.dto.form.MemosToRemindFormDTO; |
||||
|
import com.epmet.dto.result.MemosToRemindResultDTO; |
||||
|
import com.epmet.entity.MemoAttrEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-属性表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
public interface MemoAttrService extends BaseService<MemoAttrEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<MemoAttrDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
PageData<MemoAttrDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<MemoAttrDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
List<MemoAttrDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return MemoAttrDTO |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
MemoAttrDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void save(MemoAttrDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void update(MemoAttrDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-待提醒弹框-提醒内容列表 |
||||
|
**/ |
||||
|
List<MemosToRemindResultDTO> memosToRemind(MemosToRemindFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-待提醒时间列表 |
||||
|
**/ |
||||
|
List<String> memoTime(String userId); |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-提醒列表-我知道了 |
||||
|
**/ |
||||
|
void setReaded(String memoId); |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.MemoConcernDTO; |
||||
|
import com.epmet.dto.form.MemoConcernFormDTO; |
||||
|
import com.epmet.entity.MemoConcernEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-人文关怀 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
public interface MemoConcernService extends BaseService<MemoConcernEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<MemoConcernDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
PageData<MemoConcernDTO> page(MemoConcernFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<MemoConcernDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
List<MemoConcernDTO> list(MemoConcernFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return MemoConcernDTO |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
MemoConcernDTO get(MemoConcernFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void save(MemoConcernDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void update(MemoConcernDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,88 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.MemoDifficultyDTO; |
||||
|
import com.epmet.dto.form.AddMemoDifficultyFromDTO; |
||||
|
import com.epmet.dto.form.MemoDifficultyFormDTO; |
||||
|
import com.epmet.dto.form.MemoDifficultyDetailFromDTO; |
||||
|
import com.epmet.entity.MemoDifficultyEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-难点读点 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
public interface MemoDifficultyService extends BaseService<MemoDifficultyEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<MemoDifficultyDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
PageData<MemoDifficultyDTO> page(MemoDifficultyFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<MemoDifficultyDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
List<MemoDifficultyDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return MemoDifficultyDTO |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
MemoDifficultyDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void save(AddMemoDifficultyFromDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void update(AddMemoDifficultyFromDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 详情接口 |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
AddMemoDifficultyFromDTO detail(MemoDifficultyDetailFromDTO fromDTO); |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.MemoWorkDiaryDTO; |
||||
|
import com.epmet.dto.form.MemoWorkDiaryFormDTO; |
||||
|
import com.epmet.entity.MemoWorkDiaryEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-工作日志 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
public interface MemoWorkDiaryService extends BaseService<MemoWorkDiaryEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return PageData<MemoWorkDiaryDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
PageData<MemoWorkDiaryDTO> page(MemoWorkDiaryFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return java.util.List<MemoWorkDiaryDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
List<MemoWorkDiaryDTO> list(MemoWorkDiaryFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param formDTO |
||||
|
* @return MemoWorkDiaryDTO |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
MemoWorkDiaryDTO get(MemoWorkDiaryFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void save(MemoWorkDiaryDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void update(MemoWorkDiaryDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-03-15 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,123 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.MemoAttachmentDao; |
||||
|
import com.epmet.dto.MemoAttachmentDTO; |
||||
|
import com.epmet.entity.MemoAttachmentEntity; |
||||
|
import com.epmet.service.MemoAttachmentService; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class MemoAttachmentServiceImpl extends BaseServiceImpl<MemoAttachmentDao, MemoAttachmentEntity> implements MemoAttachmentService { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<MemoAttachmentDTO> page(Map<String, Object> params) { |
||||
|
IPage<MemoAttachmentEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, MemoAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<MemoAttachmentDTO> list(Map<String, Object> params) { |
||||
|
List<MemoAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, MemoAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<MemoAttachmentEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<MemoAttachmentEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public MemoAttachmentDTO get(String id) { |
||||
|
MemoAttachmentEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, MemoAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(MemoAttachmentDTO dto) { |
||||
|
MemoAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttachmentEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(MemoAttachmentDTO dto) { |
||||
|
MemoAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttachmentEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据备忘录ID查询附件 |
||||
|
* |
||||
|
* @param memoId |
||||
|
* @Param memoId |
||||
|
* @Return {@link List< MemoAttachmentDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 15:56 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<MemoAttachmentDTO> getListByMemoId(String memoId) { |
||||
|
LambdaQueryWrapper<MemoAttachmentEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(MemoAttachmentEntity::getRemindMsgId, memoId); |
||||
|
wrapper.orderByAsc(MemoAttachmentEntity::getSort); |
||||
|
List<MemoAttachmentEntity> list = baseDao.selectList(wrapper); |
||||
|
if (CollectionUtils.isEmpty(list)) { |
||||
|
return Collections.emptyList(); |
||||
|
} |
||||
|
return ConvertUtils.sourceToTarget(list, MemoAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据备忘录ID删除附件 |
||||
|
* |
||||
|
* @param memoId |
||||
|
* @Param memoId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/3/15 15:57 |
||||
|
*/ |
||||
|
@Override |
||||
|
public void deleteByMemoId(String memoId) { |
||||
|
LambdaQueryWrapper<MemoAttachmentEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(MemoAttachmentEntity::getRemindMsgId, memoId); |
||||
|
baseDao.delete(wrapper); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,125 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.MemoAttrDao; |
||||
|
import com.epmet.dto.MemoAttrDTO; |
||||
|
import com.epmet.dto.form.MemosToRemindFormDTO; |
||||
|
import com.epmet.dto.result.MemosToRemindResultDTO; |
||||
|
import com.epmet.entity.MemoAttrEntity; |
||||
|
import com.epmet.service.MemoAttrService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-属性表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Slf4j |
||||
|
public class MemoAttrServiceImpl extends BaseServiceImpl<MemoAttrDao, MemoAttrEntity> implements MemoAttrService { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<MemoAttrDTO> page(Map<String, Object> params) { |
||||
|
IPage<MemoAttrEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, MemoAttrDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<MemoAttrDTO> list(Map<String, Object> params) { |
||||
|
List<MemoAttrEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, MemoAttrDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<MemoAttrEntity> getWrapper(Map<String, Object> params) { |
||||
|
String id = (String) params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<MemoAttrEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public MemoAttrDTO get(String id) { |
||||
|
MemoAttrEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, MemoAttrDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(MemoAttrDTO dto) { |
||||
|
MemoAttrEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttrEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(MemoAttrDTO dto) { |
||||
|
MemoAttrEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttrEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-待提醒弹框-提醒内容列表 |
||||
|
**/ |
||||
|
@Override |
||||
|
public List<MemosToRemindResultDTO> memosToRemind(MemosToRemindFormDTO formDTO) { |
||||
|
//1.查询提醒内容列表,有时间的按时间查询,没有的查询当前日期之前的数据
|
||||
|
List<MemosToRemindResultDTO> resultList = baseDao.memosToRemind(formDTO.getRemindTime(), formDTO.getUserId()); |
||||
|
return resultList; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-待提醒时间列表 |
||||
|
**/ |
||||
|
@Override |
||||
|
public List<String> memoTime(String userId) { |
||||
|
List<String> resultList = baseDao.memoTime(userId); |
||||
|
return resultList; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Author sun |
||||
|
* @Description 书记日志-提醒列表-我知道了 |
||||
|
**/ |
||||
|
@Override |
||||
|
public void setReaded(String memoId) { |
||||
|
MemoAttrEntity entity = baseDao.selectById(memoId); |
||||
|
if (null == entity) { |
||||
|
log.warn(String.format("书记日志-提醒列表-修改阅读状态失败,提醒记录不存在,提醒记录Id", memoId)); |
||||
|
} |
||||
|
entity.setReadFlag(NumConstant.ONE); |
||||
|
if (baseDao.updateById(entity) < NumConstant.ONE) { |
||||
|
log.warn(String.format("书记日志-提醒列表-修改阅读状态失败,提醒记录Id", memoId)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,157 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.constant.MemoConstant; |
||||
|
import com.epmet.dao.MemoConcernDao; |
||||
|
import com.epmet.dto.MemoAttachmentDTO; |
||||
|
import com.epmet.dto.MemoAttrDTO; |
||||
|
import com.epmet.dto.MemoConcernDTO; |
||||
|
import com.epmet.dto.form.MemoConcernFormDTO; |
||||
|
import com.epmet.entity.MemoAttachmentEntity; |
||||
|
import com.epmet.entity.MemoConcernEntity; |
||||
|
import com.epmet.service.MemoAttachmentService; |
||||
|
import com.epmet.service.MemoAttrService; |
||||
|
import com.epmet.service.MemoConcernService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.concurrent.atomic.AtomicInteger; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-人文关怀 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class MemoConcernServiceImpl extends BaseServiceImpl<MemoConcernDao, MemoConcernEntity> implements MemoConcernService { |
||||
|
|
||||
|
@Resource |
||||
|
private MemoAttrService memoAttrService; |
||||
|
@Resource |
||||
|
private MemoAttachmentService memoAttachmentService; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<MemoConcernDTO> page(MemoConcernFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
List<MemoConcernDTO> list = baseDao.getPage(formDTO); |
||||
|
PageInfo<MemoConcernDTO> pageInfo = new PageInfo<>(list); |
||||
|
return new PageData<>(list, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<MemoConcernDTO> list(MemoConcernFormDTO formDTO) { |
||||
|
List<MemoConcernDTO> list = baseDao.getPage(formDTO); |
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public MemoConcernDTO get(MemoConcernFormDTO formDTO) { |
||||
|
MemoConcernEntity entity = baseDao.selectById(formDTO.getId()); |
||||
|
MemoConcernDTO dto = ConvertUtils.sourceToTarget(entity, MemoConcernDTO.class); |
||||
|
if (null != dto) { |
||||
|
//获取提醒时间
|
||||
|
MemoAttrDTO memoAttr = memoAttrService.get(formDTO.getId()); |
||||
|
if (null != memoAttr) { |
||||
|
dto.setRemindTime(memoAttr.getRemindTime()); |
||||
|
} |
||||
|
//获取附件列表
|
||||
|
List<MemoAttachmentDTO> attachmentList = memoAttachmentService.getListByMemoId(formDTO.getId()); |
||||
|
dto.setAttachmentList(attachmentList); |
||||
|
} |
||||
|
//更新阅读状态
|
||||
|
if (NumConstant.ONE_STR.equals(formDTO.getReadFlag())) { |
||||
|
MemoAttrDTO memoAttrDTO = memoAttrService.get(formDTO.getId()); |
||||
|
memoAttrDTO.setReadFlag(NumConstant.ONE); |
||||
|
memoAttrDTO.setUpdatedTime(null); |
||||
|
memoAttrService.update(memoAttrDTO); |
||||
|
} |
||||
|
return dto; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(MemoConcernDTO dto) { |
||||
|
MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class); |
||||
|
insert(entity); |
||||
|
|
||||
|
//保存属性
|
||||
|
MemoAttrDTO attr = ConvertUtils.sourceToTarget(dto, MemoAttrDTO.class); |
||||
|
attr.setId(entity.getId()); |
||||
|
attr.setType(MemoConstant.CONCERN); |
||||
|
attr.setReadFlag(NumConstant.ZERO); |
||||
|
attr.setReceiver(dto.getCreatedBy()); |
||||
|
memoAttrService.save(attr); |
||||
|
|
||||
|
//删除原来的附件
|
||||
|
memoAttachmentService.deleteByMemoId(entity.getId()); |
||||
|
//保存新的照片
|
||||
|
if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { |
||||
|
AtomicInteger i = new AtomicInteger(NumConstant.ZERO); |
||||
|
List<MemoAttachmentEntity> list = dto.getAttachmentList().stream().map(item -> { |
||||
|
MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); |
||||
|
e.setCustomerId(dto.getCustomerId()); |
||||
|
e.setRemindMsgId(entity.getId()); |
||||
|
e.setSort(i.getAndIncrement()); |
||||
|
return e; |
||||
|
}).collect(Collectors.toList()); |
||||
|
memoAttachmentService.insertBatch(list); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(MemoConcernDTO dto) { |
||||
|
MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class); |
||||
|
updateById(entity); |
||||
|
|
||||
|
//时间有变动时保存属性,readFlag变为0
|
||||
|
MemoAttrDTO attr = memoAttrService.get(dto.getId()); |
||||
|
if (dto.getRemindTime() != attr.getRemindTime()) { |
||||
|
attr.setRemindTime(dto.getRemindTime()); |
||||
|
attr.setReadFlag(NumConstant.ZERO); |
||||
|
attr.setUpdatedTime(null); |
||||
|
memoAttrService.update(attr); |
||||
|
} |
||||
|
|
||||
|
//删除原来的附件
|
||||
|
memoAttachmentService.deleteByMemoId(entity.getId()); |
||||
|
//保存新的照片
|
||||
|
if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { |
||||
|
AtomicInteger i = new AtomicInteger(NumConstant.ZERO); |
||||
|
List<MemoAttachmentEntity> list = dto.getAttachmentList().stream().map(item -> { |
||||
|
MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); |
||||
|
e.setCustomerId(dto.getCustomerId()); |
||||
|
e.setRemindMsgId(dto.getId()); |
||||
|
e.setSort(i.getAndIncrement()); |
||||
|
return e; |
||||
|
}).collect(Collectors.toList()); |
||||
|
memoAttachmentService.insertBatch(list); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
List<String> list = Arrays.asList(ids); |
||||
|
baseDao.deleteBatchIds(list); |
||||
|
memoAttrService.delete(ids); |
||||
|
list.forEach(id -> { |
||||
|
//删除附件
|
||||
|
memoAttachmentService.deleteByMemoId(id); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,161 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.MemoDifficultyDao; |
||||
|
import com.epmet.dto.MemoAttachmentDTO; |
||||
|
import com.epmet.dto.MemoAttrDTO; |
||||
|
import com.epmet.dto.MemoDifficultyDTO; |
||||
|
import com.epmet.dto.form.AddMemoDifficultyFromDTO; |
||||
|
import com.epmet.dto.form.MemoDifficultyFormDTO; |
||||
|
import com.epmet.dto.form.MemoDifficultyDetailFromDTO; |
||||
|
import com.epmet.entity.MemoAttachmentEntity; |
||||
|
import com.epmet.entity.MemoAttrEntity; |
||||
|
import com.epmet.entity.MemoDifficultyEntity; |
||||
|
import com.epmet.service.MemoAttachmentService; |
||||
|
import com.epmet.service.MemoAttrService; |
||||
|
import com.epmet.service.MemoDifficultyService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import oracle.sql.NUMBER; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.concurrent.atomic.AtomicInteger; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-难点读点 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao, MemoDifficultyEntity> implements MemoDifficultyService { |
||||
|
@Autowired |
||||
|
private MemoAttrService memoAttrService; |
||||
|
@Autowired |
||||
|
private MemoAttachmentService memoAttachmentService; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<MemoDifficultyDTO> page(MemoDifficultyFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
List<MemoDifficultyDTO> list = baseDao.getPage(formDTO); |
||||
|
PageInfo<MemoDifficultyDTO> pageInfo = new PageInfo<>(list); |
||||
|
return new PageData<>(list, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<MemoDifficultyDTO> list(Map<String, Object> params) { |
||||
|
List<MemoDifficultyEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, MemoDifficultyDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<MemoDifficultyEntity> getWrapper(Map<String, Object> params) { |
||||
|
String id = (String) params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<MemoDifficultyEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public MemoDifficultyDTO get(String id) { |
||||
|
MemoDifficultyEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, MemoDifficultyDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(AddMemoDifficultyFromDTO dto) { |
||||
|
//1.新增难点堵点数据
|
||||
|
MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class); |
||||
|
insert(entity); |
||||
|
//2.新增备忘录记录数据
|
||||
|
MemoAttrEntity memoAttr = new MemoAttrEntity(); |
||||
|
memoAttr.setId(entity.getId()); |
||||
|
memoAttr.setCustomerId(dto.getCustomerId()); |
||||
|
memoAttr.setRemindTime(dto.getRemindTime()); |
||||
|
memoAttr.setType("difficulty"); |
||||
|
memoAttr.setReceiver(dto.getUserId()); |
||||
|
memoAttrService.insert(memoAttr); |
||||
|
//3.新增难点堵点附件数据
|
||||
|
if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { |
||||
|
AtomicInteger i = new AtomicInteger(NumConstant.ZERO); |
||||
|
List<MemoAttachmentEntity> list = dto.getAttachmentList().stream().map(item -> { |
||||
|
MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); |
||||
|
e.setCustomerId(dto.getCustomerId()); |
||||
|
e.setRemindMsgId(entity.getId()); |
||||
|
e.setSort(i.getAndIncrement()); |
||||
|
return e; |
||||
|
}).collect(Collectors.toList()); |
||||
|
memoAttachmentService.insertBatch(list); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(AddMemoDifficultyFromDTO dto) { |
||||
|
//1.更新难点堵点主表数据
|
||||
|
MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class); |
||||
|
updateById(entity); |
||||
|
//2.附件表数据全删全增
|
||||
|
memoAttachmentService.deleteByMemoId(dto.getId()); |
||||
|
if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { |
||||
|
AtomicInteger i = new AtomicInteger(NumConstant.ZERO); |
||||
|
List<MemoAttachmentEntity> list = dto.getAttachmentList().stream().map(item -> { |
||||
|
MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); |
||||
|
e.setCustomerId(dto.getCustomerId()); |
||||
|
e.setRemindMsgId(dto.getId()); |
||||
|
e.setSort(i.getAndIncrement()); |
||||
|
return e; |
||||
|
}).collect(Collectors.toList()); |
||||
|
memoAttachmentService.insertBatch(list); |
||||
|
} |
||||
|
//3.判断更新提醒记录表提醒时间
|
||||
|
MemoAttrDTO memoAttr = new MemoAttrDTO(); |
||||
|
memoAttr.setId(dto.getId()); |
||||
|
memoAttr.setRemindTime(dto.getRemindTime()); |
||||
|
memoAttr.setReadFlag(NumConstant.ZERO); |
||||
|
memoAttrService.update(memoAttr); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
memoAttrService.delete(ids); |
||||
|
for (String id : ids) { |
||||
|
//物理删除附件
|
||||
|
memoAttachmentService.deleteByMemoId(id); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public AddMemoDifficultyFromDTO detail(MemoDifficultyDetailFromDTO fromDTO) { |
||||
|
//0.判断已读,则修改已读标记
|
||||
|
if (fromDTO.getReadFlag() == NumConstant.ONE) { |
||||
|
memoAttrService.setReaded(fromDTO.getId()); |
||||
|
} |
||||
|
//1.查询难点堵点主表数据
|
||||
|
AddMemoDifficultyFromDTO resultDTO = baseDao.selectByDifficutyId(fromDTO.getId()); |
||||
|
//2.查询对应附件数据
|
||||
|
List<MemoAttachmentDTO> attachmentList = memoAttachmentService.getListByMemoId(fromDTO.getId()); |
||||
|
resultDTO.setAttachmentList(attachmentList); |
||||
|
return resultDTO; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,156 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.constant.MemoConstant; |
||||
|
import com.epmet.dao.MemoWorkDiaryDao; |
||||
|
import com.epmet.dto.MemoAttachmentDTO; |
||||
|
import com.epmet.dto.MemoAttrDTO; |
||||
|
import com.epmet.dto.MemoWorkDiaryDTO; |
||||
|
import com.epmet.dto.form.MemoWorkDiaryFormDTO; |
||||
|
import com.epmet.entity.MemoAttachmentEntity; |
||||
|
import com.epmet.entity.MemoWorkDiaryEntity; |
||||
|
import com.epmet.service.MemoAttachmentService; |
||||
|
import com.epmet.service.MemoAttrService; |
||||
|
import com.epmet.service.MemoWorkDiaryService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.concurrent.atomic.AtomicInteger; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 备忘录-工作日志 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-03-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class MemoWorkDiaryServiceImpl extends BaseServiceImpl<MemoWorkDiaryDao, MemoWorkDiaryEntity> implements MemoWorkDiaryService { |
||||
|
|
||||
|
@Resource |
||||
|
private MemoAttrService memoAttrService; |
||||
|
@Resource |
||||
|
private MemoAttachmentService memoAttachmentService; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<MemoWorkDiaryDTO> page(MemoWorkDiaryFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
List<MemoWorkDiaryDTO> list = baseDao.getPage(formDTO); |
||||
|
PageInfo<MemoWorkDiaryDTO> pageInfo = new PageInfo<>(list); |
||||
|
return new PageData<>(list, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<MemoWorkDiaryDTO> list(MemoWorkDiaryFormDTO formDTO) { |
||||
|
List<MemoWorkDiaryDTO> list = baseDao.getPage(formDTO); |
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public MemoWorkDiaryDTO get(MemoWorkDiaryFormDTO formDTO) { |
||||
|
MemoWorkDiaryEntity entity = baseDao.selectById(formDTO.getId()); |
||||
|
MemoWorkDiaryDTO dto = ConvertUtils.sourceToTarget(entity, MemoWorkDiaryDTO.class); |
||||
|
if (null != dto) { |
||||
|
//获取提醒时间
|
||||
|
MemoAttrDTO memoAttr = memoAttrService.get(formDTO.getId()); |
||||
|
if (null != memoAttr) { |
||||
|
dto.setRemindTime(memoAttr.getRemindTime()); |
||||
|
} |
||||
|
//获取附件列表
|
||||
|
List<MemoAttachmentDTO> attachmentList = memoAttachmentService.getListByMemoId(formDTO.getId()); |
||||
|
dto.setAttachmentList(attachmentList); |
||||
|
} |
||||
|
//更新阅读状态
|
||||
|
if (NumConstant.ONE_STR.equals(formDTO.getReadFlag())) { |
||||
|
MemoAttrDTO memoAttrDTO = memoAttrService.get(formDTO.getId()); |
||||
|
memoAttrDTO.setReadFlag(NumConstant.ONE); |
||||
|
memoAttrDTO.setUpdatedTime(null); |
||||
|
memoAttrService.update(memoAttrDTO); |
||||
|
} |
||||
|
return dto; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(MemoWorkDiaryDTO dto) { |
||||
|
MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class); |
||||
|
insert(entity); |
||||
|
|
||||
|
//保存属性
|
||||
|
MemoAttrDTO attr = ConvertUtils.sourceToTarget(dto, MemoAttrDTO.class); |
||||
|
attr.setId(entity.getId()); |
||||
|
attr.setType(MemoConstant.WORK_DIARY); |
||||
|
attr.setReadFlag(NumConstant.ZERO); |
||||
|
attr.setReceiver(dto.getCreatedBy()); |
||||
|
memoAttrService.save(attr); |
||||
|
|
||||
|
//删除原来的附件
|
||||
|
memoAttachmentService.deleteByMemoId(entity.getId()); |
||||
|
//保存新的照片
|
||||
|
if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { |
||||
|
AtomicInteger i = new AtomicInteger(NumConstant.ZERO); |
||||
|
List<MemoAttachmentEntity> list = dto.getAttachmentList().stream().map(item -> { |
||||
|
MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); |
||||
|
e.setCustomerId(dto.getCustomerId()); |
||||
|
e.setRemindMsgId(entity.getId()); |
||||
|
e.setSort(i.getAndIncrement()); |
||||
|
return e; |
||||
|
}).collect(Collectors.toList()); |
||||
|
memoAttachmentService.insertBatch(list); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(MemoWorkDiaryDTO dto) { |
||||
|
MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class); |
||||
|
updateById(entity); |
||||
|
|
||||
|
//时间有变动时保存属性,readFlag变为0
|
||||
|
MemoAttrDTO attr = memoAttrService.get(dto.getId()); |
||||
|
if (dto.getRemindTime() != attr.getRemindTime()) { |
||||
|
attr.setRemindTime(dto.getRemindTime()); |
||||
|
attr.setReadFlag(NumConstant.ZERO); |
||||
|
attr.setUpdatedTime(null); |
||||
|
memoAttrService.update(attr); |
||||
|
} |
||||
|
|
||||
|
//删除原来的附件
|
||||
|
memoAttachmentService.deleteByMemoId(entity.getId()); |
||||
|
//保存新的照片
|
||||
|
if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { |
||||
|
AtomicInteger i = new AtomicInteger(NumConstant.ZERO); |
||||
|
List<MemoAttachmentEntity> list = dto.getAttachmentList().stream().map(item -> { |
||||
|
MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); |
||||
|
e.setCustomerId(dto.getCustomerId()); |
||||
|
e.setRemindMsgId(dto.getId()); |
||||
|
e.setSort(i.getAndIncrement()); |
||||
|
return e; |
||||
|
}).collect(Collectors.toList()); |
||||
|
memoAttachmentService.insertBatch(list); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
List<String> list = Arrays.asList(ids); |
||||
|
baseDao.deleteBatchIds(list); |
||||
|
memoAttrService.delete(ids); |
||||
|
list.forEach(id -> { |
||||
|
//删除附件
|
||||
|
memoAttachmentService.deleteByMemoId(id); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,86 @@ |
|||||
|
CREATE TABLE `memo_attachment` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`REMIND_MSG_ID` varchar(64) NOT NULL COMMENT 'REMIND_MSG.ID 业务(工作日志、难点堵点、人员关怀)表Id', |
||||
|
`FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', |
||||
|
`ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名(uuid随机生成)', |
||||
|
`ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小,单位b', |
||||
|
`ATTACHMENT_FORMAT` varchar(64) NOT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', |
||||
|
`ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', |
||||
|
`ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', |
||||
|
`DURATION` int(11) DEFAULT '0' COMMENT '语音或视频时长,秒', |
||||
|
`SORT` int(1) NOT NULL COMMENT '排序字段', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='备忘录-附件表'; |
||||
|
|
||||
|
CREATE TABLE `memo_attr` ( |
||||
|
`ID` varchar(32) NOT NULL COMMENT '唯一标识', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`REMIND_TIME` datetime DEFAULT NULL COMMENT '提醒时间', |
||||
|
`TYPE` varchar(32) NOT NULL COMMENT '业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary', |
||||
|
`READ_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '阅读标记1 已读;0未读', |
||||
|
`RECEIVER` varchar(32) NOT NULL COMMENT '接收人ID', |
||||
|
`DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='备忘录-属性(通知)表'; |
||||
|
|
||||
|
CREATE TABLE `memo_concern` ( |
||||
|
`ID` varchar(32) NOT NULL COMMENT '唯一标识(同memo_attr表Id)', |
||||
|
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
||||
|
`CONCERN_TYPE` varchar(64) DEFAULT NULL COMMENT '关怀类型', |
||||
|
`RESI_NAME` varchar(64) NOT NULL COMMENT '关怀人员', |
||||
|
`PHONE` varchar(64) DEFAULT NULL COMMENT '关怀对象电话', |
||||
|
`ADDRESS` varchar(64) DEFAULT NULL COMMENT '关怀对象地址', |
||||
|
`CONTENT` varchar(1024) NOT NULL COMMENT '关怀事项', |
||||
|
`SCHEDULED_TIME` datetime DEFAULT NULL COMMENT '预计关怀时间', |
||||
|
`ACTUAL_TIME` datetime DEFAULT NULL COMMENT '实际执行时间(预留字段)', |
||||
|
`STATUS` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0未完成 1已完成', |
||||
|
`DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '操作人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='备忘录-人文关怀'; |
||||
|
|
||||
|
CREATE TABLE `memo_difficulty` ( |
||||
|
`ID` varchar(32) NOT NULL COMMENT '唯一标识(同memo_attr表Id)', |
||||
|
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
||||
|
`CONTENT` varchar(1024) NOT NULL COMMENT '内容', |
||||
|
`RESOLVE_WAY` varchar(512) DEFAULT NULL COMMENT '解决方式', |
||||
|
`REMARK` varchar(255) DEFAULT NULL COMMENT '备注', |
||||
|
`SCHEDULED_TIME` datetime DEFAULT NULL COMMENT '预计处理时间', |
||||
|
`DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='备忘录-难点读点'; |
||||
|
|
||||
|
CREATE TABLE `memo_work_diary` ( |
||||
|
`ID` varchar(32) NOT NULL COMMENT '唯一标识(同memo_attr表Id)', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`CONTENT` varchar(1024) NOT NULL COMMENT '内容', |
||||
|
`WORK_TYPE` varchar(64) DEFAULT NULL COMMENT '工作事项', |
||||
|
`DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='备忘录-工作日志'; |
||||
@ -0,0 +1,8 @@ |
|||||
|
<?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.epmet.dao.MemoAttachmentDao"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,96 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.MemoAttrDao"> |
||||
|
|
||||
|
<select id="memosToRemind" resultType="com.epmet.dto.result.MemosToRemindResultDTO"> |
||||
|
SELECT a.memoId, a.remindTime, a.type, a.typeName, a.content FROM ( |
||||
|
SELECT |
||||
|
ma.id memoId, |
||||
|
ma.remind_time remindTime, |
||||
|
ma.type type, |
||||
|
'人员关怀' typeName, |
||||
|
mc.content content |
||||
|
FROM |
||||
|
memo_attr ma |
||||
|
INNER JOIN memo_concern mc ON ma.type = 'concern' AND ma.id = mc.id |
||||
|
WHERE |
||||
|
ma.del_flag = '0' |
||||
|
AND mc.del_flag = '0' |
||||
|
AND ma.read_flag = '0' |
||||
|
AND ma.receiver = #{userId} |
||||
|
<choose> |
||||
|
<when test='remindTime != "" and remindTime != null'> |
||||
|
AND ma.remind_time = #{remindTime} |
||||
|
</when> |
||||
|
<otherwise> |
||||
|
AND ma.remind_time <![CDATA[<=]]> NOW() |
||||
|
</otherwise> |
||||
|
</choose> |
||||
|
|
||||
|
UNION ALL |
||||
|
|
||||
|
SELECT |
||||
|
ma.id memoId, |
||||
|
ma.remind_time remindTime, |
||||
|
ma.type type, |
||||
|
'难点堵点' typeName, |
||||
|
md.content content |
||||
|
FROM |
||||
|
memo_attr ma |
||||
|
INNER JOIN memo_difficulty md ON ma.type = 'difficulty' AND ma.id = md.id |
||||
|
WHERE |
||||
|
ma.del_flag = '0' |
||||
|
AND md.del_flag = '0' |
||||
|
AND ma.read_flag = '0' |
||||
|
AND ma.receiver = #{userId} |
||||
|
<choose> |
||||
|
<when test='remindTime != "" and remindTime != null'> |
||||
|
AND ma.remind_time = #{remindTime} |
||||
|
</when> |
||||
|
<otherwise> |
||||
|
AND ma.remind_time <![CDATA[<=]]> NOW() |
||||
|
</otherwise> |
||||
|
</choose> |
||||
|
|
||||
|
UNION ALL |
||||
|
|
||||
|
SELECT |
||||
|
ma.id memoId, |
||||
|
ma.remind_time remindTime, |
||||
|
ma.type type, |
||||
|
'工作日志' typeName, |
||||
|
mwd.content content |
||||
|
FROM |
||||
|
memo_attr ma |
||||
|
INNER JOIN memo_work_diary mwd ON ma.type = 'work_diary' AND ma.id = mwd.id |
||||
|
WHERE |
||||
|
ma.del_flag = '0' |
||||
|
AND mwd.del_flag = '0' |
||||
|
AND ma.read_flag = '0' |
||||
|
AND ma.receiver = #{userId} |
||||
|
<choose> |
||||
|
<when test='remindTime != "" and remindTime != null'> |
||||
|
AND ma.remind_time = #{remindTime} |
||||
|
</when> |
||||
|
<otherwise> |
||||
|
AND ma.remind_time <![CDATA[<=]]> NOW() |
||||
|
</otherwise> |
||||
|
</choose> |
||||
|
) a ORDER BY a.remindTime ASC |
||||
|
</select> |
||||
|
|
||||
|
<select id="memoTime" resultType="java.lang.String"> |
||||
|
SELECT DISTINCT |
||||
|
DATE_FORMAT(remind_time, '%Y-%m-%d %H:%i') remindTime |
||||
|
FROM |
||||
|
memo_attr |
||||
|
WHERE |
||||
|
del_flag = '0' |
||||
|
AND receiver = #{userId} |
||||
|
AND remind_time > NOW() |
||||
|
AND remind_time <![CDATA[<]]> CURDATE() + 1 |
||||
|
ORDER BY remind_time ASC |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,53 @@ |
|||||
|
<?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.epmet.dao.MemoConcernDao"> |
||||
|
|
||||
|
<select id="getPage" resultType="com.epmet.dto.MemoConcernDTO"> |
||||
|
SELECT |
||||
|
a.ID, |
||||
|
a.CONCERN_TYPE, |
||||
|
a.RESI_NAME, |
||||
|
a.PHONE, |
||||
|
a.ADDRESS, |
||||
|
a.CONTENT, |
||||
|
a.SCHEDULED_TIME, |
||||
|
a.ACTUAL_TIME, |
||||
|
a.STATUS, |
||||
|
b.REMIND_TIME, |
||||
|
a.CREATED_TIME |
||||
|
FROM memo_concern a |
||||
|
INNER JOIN memo_attr b ON a.ID = b.ID AND b.DEL_FLAG = '0' |
||||
|
WHERE |
||||
|
a.DEL_FLAG = '0' |
||||
|
AND a.CREATED_BY = #{userId} |
||||
|
<if test='null != content and "" != content'> |
||||
|
AND a.CONTENT LIKE concat('%', #{content}, '%') |
||||
|
</if> |
||||
|
<if test='null != resiName and "" != resiName'> |
||||
|
AND a.RESI_NAME LIKE concat('%', #{resiName}, '%') |
||||
|
</if> |
||||
|
<if test='null != concernType and "" != concernType'> |
||||
|
AND a.CONCERN_TYPE LIKE concat('%', #{concernType}, '%') |
||||
|
</if> |
||||
|
<if test='null != status and "" != status'> |
||||
|
AND a.STATUS = #{status} |
||||
|
</if> |
||||
|
<if test='null != startTime and "" != startTime'> |
||||
|
AND DATE_FORMAT(a.CREATED_TIME, "%Y-%m-%d") >= #{startTime} |
||||
|
</if> |
||||
|
<if test='null != endTime and "" != endTime'> |
||||
|
AND DATE_FORMAT(a.CREATED_TIME, "%Y-%m-%d") <= #{endTime} |
||||
|
</if> |
||||
|
<if test='null != scheduledStartTime and "" != scheduledStartTime'> |
||||
|
AND DATE_FORMAT(a.SCHEDULED_TIME, "%Y-%m-%d") >= #{scheduledStartTime} |
||||
|
</if> |
||||
|
<if test='null != scheduledEndTime and "" != scheduledEndTime'> |
||||
|
AND DATE_FORMAT(a.SCHEDULED_TIME, "%Y-%m-%d") <= #{scheduledEndTime} |
||||
|
</if> |
||||
|
ORDER BY a.CREATED_TIME DESC |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,58 @@ |
|||||
|
<?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.epmet.dao.MemoDifficultyDao"> |
||||
|
|
||||
|
<select id="getPage" resultType="com.epmet.dto.MemoDifficultyDTO"> |
||||
|
SELECT |
||||
|
md.id, |
||||
|
md.customer_id, |
||||
|
md.content, |
||||
|
md.resolve_way, |
||||
|
md.remark, |
||||
|
md.scheduled_time, |
||||
|
md.created_time, |
||||
|
ma.remind_time |
||||
|
FROM |
||||
|
memo_difficulty md |
||||
|
INNER JOIN memo_attr ma ON md.id = ma.id and ma.del_flag = '0' |
||||
|
WHERE |
||||
|
md.del_flag = '0' |
||||
|
AND md.created_by = #{userId} |
||||
|
<if test='null != content and "" != content'> |
||||
|
AND md.content LIKE concat('%', #{content}, '%') |
||||
|
</if> |
||||
|
<if test='null != scheduledStartTime and "" != scheduledStartTime'> |
||||
|
AND DATE_FORMAT(md.scheduled_time, "%Y-%m-%d") >= #{scheduledStartTime} |
||||
|
</if> |
||||
|
<if test='null != scheduledEndTime and "" != scheduledEndTime'> |
||||
|
AND DATE_FORMAT(md.scheduled_time, "%Y-%m-%d") <= #{scheduledEndTime} |
||||
|
</if> |
||||
|
<if test='null != startTime and "" != startTime'> |
||||
|
AND DATE_FORMAT(md.created_time, "%Y-%m-%d") >= #{startTime} |
||||
|
</if> |
||||
|
<if test='null != endTime and "" != endTime'> |
||||
|
AND DATE_FORMAT(md.created_time, "%Y-%m-%d") <= #{endTime} |
||||
|
</if> |
||||
|
ORDER BY md.created_time DESC |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectByDifficutyId" resultType="com.epmet.dto.form.AddMemoDifficultyFromDTO"> |
||||
|
SELECT |
||||
|
md.id, |
||||
|
md.customer_id, |
||||
|
md.content, |
||||
|
md.resolve_way, |
||||
|
md.remark, |
||||
|
md.scheduled_time, |
||||
|
md.created_time, |
||||
|
ma.remind_time |
||||
|
FROM |
||||
|
memo_difficulty md |
||||
|
INNER JOIN memo_attr ma ON md.id = ma.id and ma.del_flag = '0' |
||||
|
WHERE |
||||
|
md.del_flag = '0' |
||||
|
AND md.id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,37 @@ |
|||||
|
<?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.epmet.dao.MemoWorkDiaryDao"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<select id="getPage" resultType="com.epmet.dto.MemoWorkDiaryDTO"> |
||||
|
SELECT |
||||
|
a.ID, |
||||
|
a.CUSTOMER_ID, |
||||
|
a.WORK_TYPE, |
||||
|
a.CONTENT, |
||||
|
b.REMIND_TIME, |
||||
|
a.CREATED_TIME |
||||
|
FROM memo_work_diary a |
||||
|
INNER JOIN memo_attr b ON a.ID = b.ID AND b.DEL_FLAG = '0' |
||||
|
WHERE |
||||
|
a.DEL_FLAG = '0' |
||||
|
AND a.CREATED_BY = #{userId} |
||||
|
<if test='null != content and "" != content'> |
||||
|
AND a.CONTENT LIKE concat('%', #{content}, '%') |
||||
|
</if> |
||||
|
<if test='null != workType and "" != workType'> |
||||
|
AND a.WORK_TYPE LIKE concat('%', #{workType}, '%') |
||||
|
</if> |
||||
|
<if test='null != startTime and "" != startTime'> |
||||
|
AND DATE_FORMAT(a.CREATED_TIME, "%Y-%m-%d") >= #{startTime} |
||||
|
</if> |
||||
|
<if test='null != endTime and "" != endTime'> |
||||
|
AND DATE_FORMAT(a.CREATED_TIME, "%Y-%m-%d") <= #{endTime} |
||||
|
</if> |
||||
|
ORDER BY a.CREATED_TIME DESC |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,48 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import cn.afterturn.easypoi.excel.annotation.ExcelCollection; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2022/3/18 19:00 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CollectListExcelResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -5659769436514116680L; |
||||
|
/** |
||||
|
* 户主姓名 |
||||
|
*/ |
||||
|
@Excel(name = "户主姓名",width = 30, needMerge = true) |
||||
|
private String houseHolderName; |
||||
|
|
||||
|
/** |
||||
|
* 居住地址 |
||||
|
*/ |
||||
|
@Excel(name = "居住地址",width = 40, needMerge = true) |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 房屋类型,1:自有, 0:租住 |
||||
|
*/ |
||||
|
@Excel(name = "房屋类型",replace = { "自有_1", "租住_0"}, width = 30, needMerge = true) |
||||
|
private String houseType; |
||||
|
|
||||
|
/** |
||||
|
* 居住人数 |
||||
|
*/ |
||||
|
@Excel(name = "居住成员人数",width = 30, needMerge = true) |
||||
|
private Integer totalResi; |
||||
|
|
||||
|
@ExcelCollection(name="家庭成员") |
||||
|
private List<CollectListMemberExcelResultDTO> listP = new ArrayList<>(); |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* desc: |
||||
|
* |
||||
|
* @author: LiuJanJun |
||||
|
* @date: 2022/3/21 5:09 下午 |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CollectListMemberExcelResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -4290962585956172531L; |
||||
|
/** |
||||
|
* 成员名字 |
||||
|
*/ |
||||
|
@Excel(name = "成员姓名", width = 30) |
||||
|
private String memberName; |
||||
|
|
||||
|
/** |
||||
|
* 成员身份证 |
||||
|
*/ |
||||
|
@Excel(name = "成员身份证号", width = 30) |
||||
|
private String memberIdNum; |
||||
|
|
||||
|
/** |
||||
|
* 成员电话 |
||||
|
*/ |
||||
|
@Excel(name = "成员手机号", width = 30) |
||||
|
private String memberMobile; |
||||
|
|
||||
|
/** |
||||
|
* 核酸检测次数 |
||||
|
*/ |
||||
|
@Excel(name = "参加几轮核酸检测", width = 30) |
||||
|
private String heSuanCount = "0"; |
||||
|
|
||||
|
/** |
||||
|
* 疫苗是否全程接种,1:全程接种,2:未全程接种,3:为接种 |
||||
|
*/ |
||||
|
@Excel(name = "疫苗接种情况",replace = { "全程接种_1", "未全程接种_2", "未接种_0" }, width = 30) |
||||
|
private String ymjz; |
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue