18 changed files with 1078 additions and 0 deletions
@ -0,0 +1,104 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格员工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Data |
|||
public class IcWorkLogDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* agency_id的所有上级 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 网格Id【场所区域】 |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 日志类型【admin库sys_dict_data表value值】 |
|||
*/ |
|||
private String logType; |
|||
|
|||
/** |
|||
* 日志日期 |
|||
*/ |
|||
private String logDate; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 手机 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,84 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格员工作日志附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Data |
|||
public class IcWorkLogFileDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 日志Id |
|||
*/ |
|||
private String logId; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String url; |
|||
|
|||
/** |
|||
* 文件名 |
|||
*/ |
|||
private String fileName; |
|||
|
|||
/** |
|||
* 文件类型,0图片 |
|||
*/ |
|||
private String fileType; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
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.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.IcWorkLogDTO; |
|||
import com.epmet.excel.IcWorkLogExcel; |
|||
import com.epmet.service.IcWorkLogService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 网格员工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icWorkLog") |
|||
public class IcWorkLogController { |
|||
|
|||
@Autowired |
|||
private IcWorkLogService icWorkLogService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcWorkLogDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IcWorkLogDTO> page = icWorkLogService.page(params); |
|||
return new Result<PageData<IcWorkLogDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
|||
public Result<IcWorkLogDTO> get(@PathVariable("id") String id){ |
|||
IcWorkLogDTO data = icWorkLogService.get(id); |
|||
return new Result<IcWorkLogDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody IcWorkLogDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icWorkLogService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcWorkLogDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icWorkLogService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icWorkLogService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<IcWorkLogDTO> list = icWorkLogService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, IcWorkLogExcel.class); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
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.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.IcWorkLogFileDTO; |
|||
import com.epmet.excel.IcWorkLogFileExcel; |
|||
import com.epmet.service.IcWorkLogFileService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 网格员工作日志附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icWorkLogFile") |
|||
public class IcWorkLogFileController { |
|||
|
|||
@Autowired |
|||
private IcWorkLogFileService icWorkLogFileService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcWorkLogFileDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IcWorkLogFileDTO> page = icWorkLogFileService.page(params); |
|||
return new Result<PageData<IcWorkLogFileDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
|||
public Result<IcWorkLogFileDTO> get(@PathVariable("id") String id){ |
|||
IcWorkLogFileDTO data = icWorkLogFileService.get(id); |
|||
return new Result<IcWorkLogFileDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody IcWorkLogFileDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icWorkLogFileService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcWorkLogFileDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icWorkLogFileService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icWorkLogFileService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<IcWorkLogFileDTO> list = icWorkLogFileService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, IcWorkLogFileExcel.class); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.IcWorkLogEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 网格员工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Mapper |
|||
public interface IcWorkLogDao extends BaseDao<IcWorkLogEntity> { |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.IcWorkLogFileEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 网格员工作日志附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Mapper |
|||
public interface IcWorkLogFileDao extends BaseDao<IcWorkLogFileEntity> { |
|||
|
|||
} |
@ -0,0 +1,74 @@ |
|||
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-08-05 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_work_log") |
|||
public class IcWorkLogEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* agency_id的所有上级 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 网格Id【场所区域】 |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 日志类型【admin库sys_dict_data表value值】 |
|||
*/ |
|||
private String logType; |
|||
|
|||
/** |
|||
* 日志日期 |
|||
*/ |
|||
private String logDate; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 手机 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
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-08-05 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_work_log_file") |
|||
public class IcWorkLogFileEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 日志Id |
|||
*/ |
|||
private String logId; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String url; |
|||
|
|||
/** |
|||
* 文件名 |
|||
*/ |
|||
private String fileName; |
|||
|
|||
/** |
|||
* 文件类型,0图片 |
|||
*/ |
|||
private String fileType; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,69 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格员工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Data |
|||
public class IcWorkLogExcel { |
|||
|
|||
@Excel(name = "唯一标识") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户Id") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "组织Id") |
|||
private String agencyId; |
|||
|
|||
@Excel(name = "agency_id的所有上级") |
|||
private String pids; |
|||
|
|||
@Excel(name = "网格Id【场所区域】") |
|||
private String gridId; |
|||
|
|||
@Excel(name = "标题") |
|||
private String title; |
|||
|
|||
@Excel(name = "日志类型【admin库sys_dict_data表value值】") |
|||
private String logType; |
|||
|
|||
@Excel(name = "日志日期") |
|||
private String logDate; |
|||
|
|||
@Excel(name = "内容") |
|||
private String content; |
|||
|
|||
@Excel(name = "备注") |
|||
private String remark; |
|||
|
|||
@Excel(name = "手机") |
|||
private String mobile; |
|||
|
|||
@Excel(name = "删除标识:0.未删除 1.已删除") |
|||
private Integer delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格员工作日志附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Data |
|||
public class IcWorkLogFileExcel { |
|||
|
|||
@Excel(name = "唯一标识") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户Id") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "日志Id") |
|||
private String logId; |
|||
|
|||
@Excel(name = "地址") |
|||
private String url; |
|||
|
|||
@Excel(name = "文件名") |
|||
private String fileName; |
|||
|
|||
@Excel(name = "文件类型,0图片") |
|||
private String fileType; |
|||
|
|||
@Excel(name = "内容") |
|||
private Integer sort; |
|||
|
|||
@Excel(name = "删除标识:0.未删除 1.已删除") |
|||
private Integer delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 网格员工作日志附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Component |
|||
public class IcWorkLogFileRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 网格员工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Component |
|||
public class IcWorkLogRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -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.IcWorkLogFileDTO; |
|||
import com.epmet.entity.IcWorkLogFileEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 网格员工作日志附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
public interface IcWorkLogFileService extends BaseService<IcWorkLogFileEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcWorkLogFileDTO> |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
PageData<IcWorkLogFileDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcWorkLogFileDTO> |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
List<IcWorkLogFileDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcWorkLogFileDTO |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
IcWorkLogFileDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
void save(IcWorkLogFileDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
void update(IcWorkLogFileDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -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.IcWorkLogDTO; |
|||
import com.epmet.entity.IcWorkLogEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 网格员工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
public interface IcWorkLogService extends BaseService<IcWorkLogEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcWorkLogDTO> |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
PageData<IcWorkLogDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcWorkLogDTO> |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
List<IcWorkLogDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcWorkLogDTO |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
IcWorkLogDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
void save(IcWorkLogDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
void update(IcWorkLogDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-08-05 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,87 @@ |
|||
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.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.IcWorkLogFileDao; |
|||
import com.epmet.dto.IcWorkLogFileDTO; |
|||
import com.epmet.entity.IcWorkLogFileEntity; |
|||
import com.epmet.redis.IcWorkLogFileRedis; |
|||
import com.epmet.service.IcWorkLogFileService; |
|||
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; |
|||
|
|||
/** |
|||
* 网格员工作日志附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Service |
|||
public class IcWorkLogFileServiceImpl extends BaseServiceImpl<IcWorkLogFileDao, IcWorkLogFileEntity> implements IcWorkLogFileService { |
|||
|
|||
@Autowired |
|||
private IcWorkLogFileRedis icWorkLogFileRedis; |
|||
|
|||
@Override |
|||
public PageData<IcWorkLogFileDTO> page(Map<String, Object> params) { |
|||
IPage<IcWorkLogFileEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcWorkLogFileDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcWorkLogFileDTO> list(Map<String, Object> params) { |
|||
List<IcWorkLogFileEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcWorkLogFileDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcWorkLogFileEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcWorkLogFileEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcWorkLogFileDTO get(String id) { |
|||
IcWorkLogFileEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcWorkLogFileDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcWorkLogFileDTO dto) { |
|||
IcWorkLogFileEntity entity = ConvertUtils.sourceToTarget(dto, IcWorkLogFileEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcWorkLogFileDTO dto) { |
|||
IcWorkLogFileEntity entity = ConvertUtils.sourceToTarget(dto, IcWorkLogFileEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
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.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.IcWorkLogDao; |
|||
import com.epmet.dto.IcWorkLogDTO; |
|||
import com.epmet.entity.IcWorkLogEntity; |
|||
import com.epmet.redis.IcWorkLogRedis; |
|||
import com.epmet.service.IcWorkLogService; |
|||
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; |
|||
|
|||
/** |
|||
* 网格员工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-08-05 |
|||
*/ |
|||
@Service |
|||
public class IcWorkLogServiceImpl extends BaseServiceImpl<IcWorkLogDao, IcWorkLogEntity> implements IcWorkLogService { |
|||
|
|||
@Autowired |
|||
private IcWorkLogRedis icWorkLogRedis; |
|||
|
|||
@Override |
|||
public PageData<IcWorkLogDTO> page(Map<String, Object> params) { |
|||
IPage<IcWorkLogEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcWorkLogDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcWorkLogDTO> list(Map<String, Object> params) { |
|||
List<IcWorkLogEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcWorkLogDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcWorkLogEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcWorkLogEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcWorkLogDTO get(String id) { |
|||
IcWorkLogEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcWorkLogDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcWorkLogDTO dto) { |
|||
IcWorkLogEntity entity = ConvertUtils.sourceToTarget(dto, IcWorkLogEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcWorkLogDTO dto) { |
|||
IcWorkLogEntity entity = ConvertUtils.sourceToTarget(dto, IcWorkLogEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
<?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.IcWorkLogDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.IcWorkLogEntity" id="icWorkLogMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="title" column="TITLE"/> |
|||
<result property="logType" column="LOG_TYPE"/> |
|||
<result property="logDate" column="LOG_DATE"/> |
|||
<result property="content" column="CONTENT"/> |
|||
<result property="remark" column="REMARK"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,23 @@ |
|||
<?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.IcWorkLogFileDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.IcWorkLogFileEntity" id="icWorkLogFileMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="logId" column="LOG_ID"/> |
|||
<result property="url" column="URL"/> |
|||
<result property="fileName" column="FILE_NAME"/> |
|||
<result property="fileType" column="FILE_TYPE"/> |
|||
<result property="sort" column="SORT"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue