29 files modified
1 files added
| New file |
| | |
| | | package org.springblade.common.config; |
| | | |
| | | import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.reflection.MetaObject; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class MetaObjectConfig implements MetaObjectHandler { |
| | | |
| | | @Override |
| | | public void insertFill(MetaObject metaObject) { |
| | | //设置自动插入填充 |
| | | this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("happenTime", new Date(), metaObject); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | //设置自动修改填充 |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | } |
| | | } |
| | |
| | | return townList; |
| | | } |
| | | // 如果是居民 |
| | | if (type==2){ |
| | | if (type==2 || type==3){ |
| | | return getInhabitantInfo(list); |
| | | } |
| | | } |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.task.dto.TaskBailReportingEventDTO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.task.entity.TaskBailReportingEventEntity; |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入taskBailReportingEvent") |
| | | public R save(@Valid @RequestBody TaskBailReportingEventEntity taskBailReportingEvent) { |
| | | public R save(@Valid @RequestBody TaskBailReportingEventDTO taskBailReportingEvent) { |
| | | return R.status(taskBailReportingEventService.saveBailReporting(taskBailReportingEvent)); |
| | | } |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.task.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.task.entity.TaskEntity; |
| | | import org.springblade.modules.task.service.ITaskService; |
| | | import org.springblade.modules.task.vo.TaskVO; |
| | | import org.springblade.modules.task.wrapper.TaskWrapper; |
| | | import org.springblade.modules.task.service.ITaskService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * 任务表 控制器 |
| | |
| | | return R.status(taskService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | @PostMapping("/countNumber") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "统计用户标签报事数量") |
| | | public R countNumber(@RequestParam(value = "houseCode",required = false) String houseCode, @RequestParam(value = "status",required = false) Integer status) { |
| | | return R.data(taskService.countNumber(houseCode, status)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.task.dto.TaskHotelReportingDTO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.task.entity.TaskHotelReportingEntity; |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入taskHotelReporting") |
| | | public R save(@Valid @RequestBody TaskHotelReportingEntity taskHotelReporting) { |
| | | public R save(@Valid @RequestBody TaskHotelReportingDTO taskHotelReporting) { |
| | | return R.status(taskHotelReportingService.saveHotelReporting(taskHotelReporting)); |
| | | } |
| | | |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.task.dto.TaskLabelReportingEventDTO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.task.entity.TaskLabelReportingEventEntity; |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入taskLabelReportingEvent") |
| | | public R save(@Valid @RequestBody TaskLabelReportingEventEntity taskLabelReportingEvent) { |
| | | public R save(@Valid @RequestBody TaskLabelReportingEventDTO taskLabelReportingEvent) { |
| | | return R.status(taskLabelReportingEventService.saveReportingEven(taskLabelReportingEvent)); |
| | | } |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.task.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springblade.modules.task.entity.TaskBailReportingEventEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | public class TaskBailReportingEventDTO extends TaskBailReportingEventEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springblade.modules.task.entity.TaskHotelReportingEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | public class TaskHotelReportingDTO extends TaskHotelReportingEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springblade.modules.task.entity.TaskLabelReportingEventEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | public class TaskLabelReportingEventDTO extends TaskLabelReportingEventEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "返回-位置图片") |
| | | private String returnImageUrls; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ApiModelProperty(value = "创建时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | @ApiModelProperty(value = "更新时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.util.Date; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 任务表 实体类 |
| | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 门牌地址编码 |
| | | */ |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ApiModelProperty(value = "创建时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | @ApiModelProperty(value = "更新时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "确认标记") |
| | | private String confirmFlag; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ApiModelProperty(value = "创建时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | @ApiModelProperty(value = "更新时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty(value = "发生时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date happenTime; |
| | | /** |
| | | * 用户ID |
| | |
| | | @ApiModelProperty(value = "标签名称") |
| | | private String labelName; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @ApiModelProperty(value = "创建时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | @ApiModelProperty(value = "更新时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.mapper; |
| | | |
| | | import org.springblade.modules.task.entity.TaskBailReportingEventEntity; |
| | | import org.springblade.modules.task.vo.TaskBailReportingEventVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | import org.springblade.modules.task.entity.TaskBailReportingEventEntity; |
| | | import org.springblade.modules.task.vo.TaskBailReportingEventVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @param taskBailReportingEvent |
| | | * @return |
| | | */ |
| | | List<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage page, TaskBailReportingEventVO taskBailReportingEvent); |
| | | List<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage page, @Param("vo") TaskBailReportingEventVO taskBailReportingEvent); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <select id="selectTaskBailReportingEventPage" resultMap="taskBailReportingEventResultMap"> |
| | | select * from jczz_task_bail_reporting_event where is_deleted = 0 |
| | | <if test="vo.checkUserId != null and vo.checkUserId != ''"> |
| | | AND check_user_id = #{vo.checkUserId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.task.mapper; |
| | | |
| | | import org.springblade.modules.task.entity.TaskHotelReportingEntity; |
| | | import org.springblade.modules.task.vo.TaskHotelReportingVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.task.entity.TaskHotelReportingEntity; |
| | | import org.springblade.modules.task.vo.TaskHotelReportingVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @param taskHotelReporting |
| | | * @return |
| | | */ |
| | | List<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage page, TaskHotelReportingVO taskHotelReporting); |
| | | List<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage page, @Param("vo") TaskHotelReportingVO taskHotelReporting); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <select id="selectTaskHotelReportingPage" resultMap="taskHotelReportingResultMap"> |
| | | select * from jczz_task_hotel_reporting where is_deleted = 0 |
| | | <if test="vo.checkUserId != null and vo.checkUserId != ''"> |
| | | AND check_user_id = #{vo.checkUserId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.task.mapper; |
| | | |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | import org.springblade.modules.task.entity.TaskLabelReportingEventEntity; |
| | | import org.springblade.modules.task.vo.TaskLabelReportingEventVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | * @param taskLabelReportingEvent |
| | | * @return |
| | | */ |
| | | List<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage page, TaskLabelReportingEventVO taskLabelReportingEvent); |
| | | List<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage page, @Param("vo") TaskLabelReportingEventVO taskLabelReportingEvent); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <select id="selectTaskLabelReportingEventPage" resultMap="taskLabelReportingEventResultMap"> |
| | | select * from jczz_task_label_reporting_event where is_deleted = 0 |
| | | <if test="vo.userId != null and vo.userId != ''"> |
| | | AND user_id = #{vo.checkUserId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="status" property="status"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | <result column="house_code" property="houseCode"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | package org.springblade.modules.task.service; |
| | | |
| | | import liquibase.pro.packaged.B; |
| | | import org.springblade.modules.task.dto.TaskBailReportingEventDTO; |
| | | import org.springblade.modules.task.entity.TaskBailReportingEventEntity; |
| | | import org.springblade.modules.task.vo.TaskBailReportingEventVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | |
| | | IPage<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage<TaskBailReportingEventVO> page, TaskBailReportingEventVO taskBailReportingEvent); |
| | | |
| | | |
| | | Boolean saveBailReporting(TaskBailReportingEventEntity taskBailReportingEvent); |
| | | Boolean saveBailReporting(TaskBailReportingEventDTO taskBailReportingEvent); |
| | | |
| | | Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent); |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.service; |
| | | |
| | | import org.springblade.modules.task.dto.TaskHotelReportingDTO; |
| | | import org.springblade.modules.task.entity.TaskHotelReportingEntity; |
| | | import org.springblade.modules.task.vo.TaskHotelReportingVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | |
| | | * @param taskHotelReporting |
| | | * @return |
| | | */ |
| | | boolean saveHotelReporting(TaskHotelReportingEntity taskHotelReporting); |
| | | boolean saveHotelReporting(TaskHotelReportingDTO taskHotelReporting); |
| | | |
| | | Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting); |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.service; |
| | | |
| | | import org.springblade.modules.task.dto.TaskLabelReportingEventDTO; |
| | | import org.springblade.modules.task.entity.TaskLabelReportingEventEntity; |
| | | import org.springblade.modules.task.vo.TaskLabelReportingEventVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | |
| | | IPage<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage<TaskLabelReportingEventVO> page, TaskLabelReportingEventVO taskLabelReportingEvent); |
| | | |
| | | |
| | | Boolean saveReportingEven(TaskLabelReportingEventEntity taskLabelReportingEvent); |
| | | Boolean saveReportingEven(TaskLabelReportingEventDTO taskLabelReportingEvent); |
| | | |
| | | Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent); |
| | | } |
| | |
| | | * @param createUser |
| | | * @return |
| | | */ |
| | | Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser); |
| | | Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser,String houseCode); |
| | | |
| | | /** |
| | | * @param type |
| | |
| | | */ |
| | | public Long updateTask(Integer type, String name, Integer frequency, String remark, Long updateUser, Long id, Integer status); |
| | | |
| | | Object countNumber(String houseCode, Integer status); |
| | | } |
| | |
| | | |
| | | import org.springblade.common.constant.DictConstant; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.task.dto.TaskBailReportingEventDTO; |
| | | import org.springblade.modules.task.entity.TaskBailReportingEventEntity; |
| | | import org.springblade.modules.task.service.ITaskService; |
| | | import org.springblade.modules.task.vo.TaskBailReportingEventVO; |
| | |
| | | |
| | | |
| | | @Override |
| | | public Boolean saveBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) { |
| | | Long aLong = taskService.saveTask(1, DictConstant.BAIL_PENDING_TRIAL, 3, "", AuthUtil.getUserId()); |
| | | public Boolean saveBailReporting(TaskBailReportingEventDTO taskBailReportingEvent) { |
| | | Long aLong = taskService.saveTask(1, DictConstant.BAIL_PENDING_TRIAL, 3, "", AuthUtil.getUserId(),taskBailReportingEvent.getHouseCode()); |
| | | if (aLong > 0) { |
| | | taskBailReportingEvent.setTaskId(aLong); |
| | | taskBailReportingEvent.setCheckUserId(AuthUtil.getUserId()); |
| | |
| | | import org.springblade.common.constant.DictConstant; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.task.dto.TaskHotelReportingDTO; |
| | | import org.springblade.modules.task.entity.TaskHotelReportingEntity; |
| | | import org.springblade.modules.task.mapper.TaskHotelReportingMapper; |
| | | import org.springblade.modules.task.service.ITaskHotelReportingService; |
| | |
| | | |
| | | |
| | | @Override |
| | | public boolean saveHotelReporting(TaskHotelReportingEntity taskHotelReporting) { |
| | | Long aLong = taskService.saveTask(1, DictConstant.HOTEL_SECURITY, 2, "", AuthUtil.getUserId()); |
| | | public boolean saveHotelReporting(TaskHotelReportingDTO taskHotelReporting) { |
| | | Long aLong = taskService.saveTask(1, DictConstant.HOTEL_SECURITY, 2, "", AuthUtil.getUserId(),taskHotelReporting.getHouseCode()); |
| | | if (aLong > 0) { |
| | | taskHotelReporting.setTaskId(aLong); |
| | | taskHotelReporting.setCheckUserId(AuthUtil.getUserId()); |
| | |
| | | import org.springblade.common.constant.DictConstant; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.task.dto.TaskLabelReportingEventDTO; |
| | | import org.springblade.modules.task.entity.TaskLabelReportingEventEntity; |
| | | import org.springblade.modules.task.mapper.TaskLabelReportingEventMapper; |
| | | import org.springblade.modules.task.service.ITaskLabelReportingEventService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Boolean saveReportingEven(TaskLabelReportingEventEntity taskLabelReportingEvent) { |
| | | public Boolean saveReportingEven(TaskLabelReportingEventDTO taskLabelReportingEvent) { |
| | | String name; |
| | | switch (taskLabelReportingEvent.getEventType()) { |
| | | case "1": |
| | |
| | | default: |
| | | name = ""; |
| | | } |
| | | Long aLong = taskService.saveTask(1, name, 1, "", AuthUtil.getUserId()); |
| | | Long aLong = taskService.saveTask(1, name, 1, "", AuthUtil.getUserId(),taskLabelReportingEvent.getHouseCode()); |
| | | if (aLong > 0) { |
| | | taskLabelReportingEvent.setTaskId(aLong); |
| | | taskLabelReportingEvent.setUserId(AuthUtil.getUserId()); |
| | |
| | | package org.springblade.modules.task.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.task.entity.TaskEntity; |
| | | import org.springblade.modules.task.mapper.TaskMapper; |
| | | import org.springblade.modules.task.service.ITaskService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 任务表 服务实现类 |
| | |
| | | */ |
| | | @Service |
| | | public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, TaskEntity> implements ITaskService { |
| | | |
| | | |
| | | @Override |
| | | public IPage<TaskVO> selectTaskPage(IPage<TaskVO> page, TaskVO task) { |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser) { |
| | | public Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser, String houseCode) { |
| | | TaskEntity taskEntity = new TaskEntity(); |
| | | taskEntity.setType(type); |
| | | taskEntity.setName(name); |
| | |
| | | taskEntity.setRemark(remark); |
| | | taskEntity.setCreateTime(new Date()); |
| | | taskEntity.setCreateUser(createUser); |
| | | taskEntity.setHouseCode(houseCode); |
| | | return baseMapper.insert(taskEntity) > 0 ? taskEntity.getId() : 0; |
| | | } |
| | | |
| | |
| | | taskEntity.setStatus(status); |
| | | return baseMapper.updateById(taskEntity) > 0 ? 1L : 0; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Object countNumber(String houseCode, Integer status) { |
| | | Map<String, Object> objectObjectHashMap = new HashMap<>(); |
| | | // 总数 |
| | | Long all = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery().eq(TaskEntity::getCreateUser, AuthUtil.getUserId() )); |
| | | // 已处理 |
| | | Long processed = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery().eq(TaskEntity::getCreateUser, AuthUtil.getUserId()) |
| | | .eq(TaskEntity::getStatus, 2)); |
| | | objectObjectHashMap.put("all", all); |
| | | objectObjectHashMap.put("processed", processed); |
| | | return objectObjectHashMap; |
| | | } |
| | | } |
| | |
| | | # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 |
| | | # commandTimeout: 5000 |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3308/jczz?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | url: jdbc:mysql://127.0.0.1:3306/jczz?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: root |
| | | |
| | |
| | | direct-buffers: true |
| | | |
| | | spring: |
| | | profiles: |
| | | active: test |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | #driver-class-name: org.postgresql.Driver |