diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetLcController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetLcController.java new file mode 100644 index 0000000..b56dd9f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetLcController.java @@ -0,0 +1,94 @@ +package com.ruoyi.tc.controller; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.tc.domain.AssetLc; +import com.ruoyi.tc.domain.request.AssetLcRequest; +import com.ruoyi.tc.service.AssetLcService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.data.domain.PageRequest; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.validation.Valid; + +/** + * 任务流程(AssetLc)表控制层 + * + * @author makejava + * @since 2024-11-18 14:46:40 + */ +@Api("任务流程") +@RestController +@RequestMapping("/unit/assetLc") +public class AssetLcController extends BaseController { + /** + * 服务对象 + */ + @Resource + private AssetLcService assetLcService; + + /** + * 分页查询 + * + * @param assetLc 筛选条件 + * @param req 分页对象 + * @return 查询结果 + */ + @GetMapping("/page") + @ApiOperation(value = "分页查询", response = AssetLc.class) + public AjaxResult queryByPage(Page assetLc, AssetLcRequest req) { + return AjaxResult.success(this.assetLcService.queryByPage(assetLc, req)); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @ApiOperation(value = "通过主键查询单条数据", response = AssetLc.class) + @GetMapping("{id}") + public AjaxResult queryById(@PathVariable("id") Integer id) { + return AjaxResult.success(this.assetLcService.queryById(id)); + } + + /** + * 新增数据 + * + * @param assetLc 实体 + * @return 新增结果 + */ + @ApiOperation(value = "新增数据") + @PostMapping("/add") + public AjaxResult add(@RequestBody @Valid AssetLc assetLc) { + return AjaxResult.success(this.assetLcService.insert(assetLc)); + } + + /** + * 编辑数据 + * + * @param assetLc 实体 + * @return 编辑结果 + */ + @ApiOperation(value = "新增数据") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody @Valid AssetLc assetLc) { + return AjaxResult.success(this.assetLcService.update(assetLc)); + } + + /** + * 删除数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @PostMapping("/deleteById/{id}") + public AjaxResult deleteById(@PathVariable("id") Integer id) { + return AjaxResult.success(this.assetLcService.deleteById(id)); + } + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java new file mode 100644 index 0000000..e48d079 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java @@ -0,0 +1,85 @@ +package com.ruoyi.tc.controller; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.tc.domain.AssetTask; +import com.ruoyi.tc.service.AssetTaskService; +import org.springframework.data.domain.PageRequest; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * 任务主表(AssetTask)表控制层 + * + * @author makejava + * @since 2024-11-18 13:22:58 + */ +@RestController +@RequestMapping("/unit/assetTask") +public class AssetTaskController extends BaseController { + /** + * 服务对象 + */ + @Resource + private AssetTaskService assetTaskService; + + /** + * 分页查询 + * + * @param assetTask 筛选条件 + * @param pageRequest 分页对象 + * @return 查询结果 + */ + @GetMapping + public AjaxResult queryByPage(Page assetTask, PageRequest pageRequest) { + return AjaxResult.success(this.assetTaskService.queryByPage(assetTask, pageRequest)); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public AjaxResult queryById(@PathVariable("id") Integer id) { + return AjaxResult.success(this.assetTaskService.queryById(id)); + } + + /** + * 新增数据 + * + * @param assetTask 实体 + * @return 新增结果 + */ + @PostMapping + public AjaxResult add(AssetTask assetTask) { + return AjaxResult.success(this.assetTaskService.insert(assetTask)); + } + + /** + * 编辑数据 + * + * @param assetTask 实体 + * @return 编辑结果 + */ + @PutMapping + public AjaxResult edit(AssetTask assetTask) { + return AjaxResult.success(this.assetTaskService.update(assetTask)); + } + + /** + * 删除数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @DeleteMapping + public AjaxResult deleteById(Integer id) { + return AjaxResult.success(this.assetTaskService.deleteById(id)); + } + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/AssetLc.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/AssetLc.java new file mode 100644 index 0000000..46841a4 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/AssetLc.java @@ -0,0 +1,124 @@ +package com.ruoyi.tc.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * 任务流程(AssetLc)实体类 + * + * @author makejava + * @since 2024-11-18 14:46:40 + */ +@Data +@ApiModel("任务流程实体类") +public class AssetLc implements Serializable { + private static final long serialVersionUID = 660117917021496292L; + /** + * 主键id + */ + @ApiModelProperty("主键id") + private Integer id; + /** + * 任务id + */ + @ApiModelProperty("任务id") + private Integer taskId; + /** + * 管理员下发时间 + */ + @ApiModelProperty("管理员下发时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime xfTime; + /** + * 单位核查完成提交时间 + */ + @ApiModelProperty("单位核查完成提交时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime dwhcTime; + /** + * 管理员审核驳回时间 + */ + @ApiModelProperty("管理员审核驳回时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime shbhTime; + /** + * 单位重新核查提交时间 + */ + @ApiModelProperty("单位重新核查提交时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime dwcxhcTime; + /** + * 管理员审核通过时间 + */ + @ApiModelProperty("管理员审核通过时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime shtgTime; + /** + * 用户id + */ + @ApiModelProperty("用户id") + private Integer ueserId; + /** + * 部门id + */ + @ApiModelProperty("部门id") + private Integer deptId; + /** + * 创建者id + */ + @ApiModelProperty("创建者id") + private Integer createId; + /** + * 创建人 + */ + @ApiModelProperty("创建人") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + /** + * 更新着id + */ + @ApiModelProperty("更新着id") + private Integer updateId; + /** + * 更新者 + */ + @ApiModelProperty("更新者") + private String updateBy; + /** + * 更新时间 + */ + @ApiModelProperty("更新时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + /** + * 版本 + */ + @ApiModelProperty("版本") + private String version; + /** + * 备注 + */ + @ApiModelProperty("备注") + private String remark; + + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/AssetTask.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/AssetTask.java new file mode 100644 index 0000000..265342d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/AssetTask.java @@ -0,0 +1,125 @@ +package com.ruoyi.tc.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * 任务主表(AssetTask)实体类 + * + * @author makejava + * @since 2024-11-18 13:23:05 + */ +@Data +@ApiModel("任务主表实体类") +public class AssetTask implements Serializable { + private static final long serialVersionUID = -32109581884572792L; + /** + * 主键id + */ + @ApiModelProperty("主键id") + private Integer id; + /** + * 任务编号 + */ + @ApiModelProperty("任务编号") + private String taskId; + /** + * 任务名称 + */ + @ApiModelProperty("任务名称") + private String taskName; + /** + * 任务下发时间 + */ + @ApiModelProperty("任务下发时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime taskTime; + /** + * 任务截至时间 + */ + @ApiModelProperty("任务截至时间") + private String taskDeadline; + /** + * 任务完成时间 + */ + @ApiModelProperty("任务完成时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime taskFinishTime; + /** + * 任务状态1:进行中,2:正常完成,3:超期完成,4:正常完成,5:审核驳回 + */ + @ApiModelProperty("任务状态1:进行中,2:正常完成,3:超期完成,4:正常完成,5:审核驳回") + private String taskStatus; + /** + * 单位id + */ + @ApiModelProperty("单位id") + private Integer dwId; + /** + * 创建者id + */ + /** + * 用户id + */ + @ApiModelProperty("用户id") + private Integer userId; + /** + * 部门id + */ + @ApiModelProperty("部门id") + private Integer deptId; + /** + * 创建者id + */ + @ApiModelProperty("创建者id") + private Integer createId; + /** + * 创建人 + */ + @ApiModelProperty("创建人") + private String createBy; + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + /** + * 更新着id + */ + @ApiModelProperty("更新着id") + private Integer updateId; + /** + * 更新者 + */ + @ApiModelProperty("更新者") + private String updateBy; + /** + * 更新时间 + */ + @ApiModelProperty("更新时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + /** + * 版本 + */ + @ApiModelProperty("版本") + private String version; + /** + * 备注 + */ + @ApiModelProperty("备注") + private String reamark; + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/request/AssetLcRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/request/AssetLcRequest.java new file mode 100644 index 0000000..42c989d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/request/AssetLcRequest.java @@ -0,0 +1,56 @@ +package com.ruoyi.tc.domain.request; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +/** + * @author dong + * @since 2024/11/18 15:12 + */ +@Data +@Api("任务主表查询请求类") +public class AssetLcRequest { + /** + * 任务名称 + */ + @ApiModelProperty("任务名称") + private String taskName; + + + /** + * 任务编号 + */ + @ApiModelProperty("任务编号") + private String taskId; + + + /** + * 任务状态1:进行中,2:正常完成,3:超期完成,4:正常完成,5:审核驳回 + */ + @ApiModelProperty("任务状态1:进行中,2:正常完成,3:超期完成,4:正常完成,5:审核驳回") + private String taskStatus; + + /** + * 任务开始时间 + */ + @ApiModelProperty("任务开始时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime begainTime; + + + /** + * 任务结束时间 + */ + @ApiModelProperty("任务结束时间") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime endTime; + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetLcMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetLcMapper.java new file mode 100644 index 0000000..57e02d9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetLcMapper.java @@ -0,0 +1,97 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.tc.domain.AssetLc; +import com.ruoyi.tc.domain.request.AssetLcRequest; +import org.apache.ibatis.annotations.Param; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import java.util.List; + +/** + * 任务流程(AssetLc)表数据库访问层 + * + * @author makejava + * @since 2024-11-18 14:46:40 + */ +public interface AssetLcMapper { + + + /** + * 页条件查询 + * + * @param page 分页条件 + * @param pageRequest 查询条件 + * @return 填报任务 + */ + Page queryByPage(Page page, @Param("req") AssetLcRequest pageRequest); + + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + AssetLc queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param assetLc 查询条件 + * @param pageable 分页对象 + * @return 对象列表 + */ + List queryAllByLimit(AssetLc assetLc, @Param("pageable") Pageable pageable); + + /** + * 统计总行数 + * + * @param assetLc 查询条件 + * @return 总行数 + */ + long count(AssetLc assetLc); + + /** + * 新增数据 + * + * @param assetLc 实例对象 + * @return 影响行数 + */ + int insert(AssetLc assetLc); + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities List 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities List 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List entities); + + /** + * 修改数据 + * + * @param assetLc 实例对象 + * @return 影响行数 + */ + int update(AssetLc assetLc); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetTaskMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetTaskMapper.java new file mode 100644 index 0000000..edc980b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetTaskMapper.java @@ -0,0 +1,95 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.tc.domain.AssetTask; +import org.apache.ibatis.annotations.Param; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import java.util.List; + +/** + * 任务主表(AssetTask)表数据库访问层 + * + * @author makejava + * @since 2024-11-18 13:22:58 + */ +public interface AssetTaskMapper extends BaseMapper { + + + /** + * 页条件查询 + * + * @param page 分页条件 + * @param pageRequest 查询条件 + * @return 填报任务 + */ + Page queryByPage(Page page, @Param("req") PageRequest pageRequest); + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + AssetTask queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param assetTask 查询条件 + * @param pageable 分页对象 + * @return 对象列表 + */ + List queryAllByLimit(AssetTask assetTask, @Param("pageable") Pageable pageable); + + /** + * 统计总行数 + * + * @param assetTask 查询条件 + * @return 总行数 + */ + long count(AssetTask assetTask); + + /** + * 新增数据 + * + * @param assetTask 实例对象 + * @return 影响行数 + */ + int insert(AssetTask assetTask); + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities List 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities List 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List entities); + + /** + * 修改数据 + * + * @param assetTask 实例对象 + * @return 影响行数 + */ + int update(AssetTask assetTask); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetLcService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetLcService.java new file mode 100644 index 0000000..f83b674 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetLcService.java @@ -0,0 +1,57 @@ +package com.ruoyi.tc.service; + +import com.ruoyi.tc.domain.AssetLc; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.tc.domain.request.AssetLcRequest; +import org.springframework.data.domain.PageRequest; + +/** + * 任务流程(AssetLc)表服务接口 + * + * @author makejava + * @since 2024-11-18 14:46:40 + */ +public interface AssetLcService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + AssetLc queryById(Integer id); + + /** + * 分页查询 + * + * @param assetLc 筛选条件 + * @param pageRequest 分页对象 + * @return 查询结果 + */ + Page queryByPage(PageassetLc, AssetLcRequest pageRequest); + + /** + * 新增数据 + * + * @param assetLc 实例对象 + * @return 实例对象 + */ + AssetLc insert(AssetLc assetLc); + + /** + * 修改数据 + * + * @param assetLc 实例对象 + * @return 实例对象 + */ + AssetLc update(AssetLc assetLc); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetTaskService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetTaskService.java new file mode 100644 index 0000000..37417e5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetTaskService.java @@ -0,0 +1,57 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.domain.AssetTask; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.data.domain.PageRequest; + +/** + * 任务主表(AssetTask)表服务接口 + * + * @author makejava + * @since 2024-11-18 13:23:09 + */ +public interface AssetTaskService extends IService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + AssetTask queryById(Integer id); + + /** + * 分页查询 + * + * @param assetTask 筛选条件 + * @param pageRequest 分页对象 + * @return 查询结果 + */ + Page queryByPage(Page assetTask, PageRequest pageRequest); + + /** + * 新增数据 + * + * @param assetTask 实例对象 + * @return 实例对象 + */ + AssetTask insert(AssetTask assetTask); + + /** + * 修改数据 + * + * @param assetTask 实例对象 + * @return 实例对象 + */ + AssetTask update(AssetTask assetTask); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetLcServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetLcServiceImpl.java new file mode 100644 index 0000000..bbdf617 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetLcServiceImpl.java @@ -0,0 +1,87 @@ +package com.ruoyi.tc.service.impl; + +import com.ruoyi.tc.domain.AssetLc; + +import com.ruoyi.tc.domain.AssetTask; +import com.ruoyi.tc.domain.request.AssetLcRequest; +import com.ruoyi.tc.mapper.AssetLcMapper; +import com.ruoyi.tc.service.AssetLcService; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Service; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.PageRequest; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import javax.annotation.Resource; + +/** + * 任务流程(AssetLc)表服务实现类 + * + * @author makejava + * @since 2024-11-18 14:46:40 + */ +@Service("assetLcService") +public class AssetLcServiceImpl implements AssetLcService { + @Resource + private AssetLcMapper assetLcDao; + + + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public AssetLc queryById(Integer id) { + return this.assetLcDao.queryById(id); + } + + /** + * 分页查询 + * + * @param assetLc 筛选条件 + * @param pageRequest 分页对象 + * @return 查询结果 + */ + @Override + public Page queryByPage(Page assetLc, AssetLcRequest pageRequest) { + return assetLcDao.queryByPage(assetLc, pageRequest); + + } + + /** + * 新增数据 + * + * @param assetLc 实例对象 + * @return 实例对象 + */ + @Override + public AssetLc insert(AssetLc assetLc) { + this.assetLcDao.insert(assetLc); + return assetLc; + } + + /** + * 修改数据 + * + * @param assetLc 实例对象 + * @return 实例对象 + */ + @Override + public AssetLc update(AssetLc assetLc) { + this.assetLcDao.update(assetLc); + return this.queryById(assetLc.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.assetLcDao.deleteById(id) > 0; + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java new file mode 100644 index 0000000..abb5136 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java @@ -0,0 +1,81 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.domain.AssetTask; +import com.ruoyi.tc.mapper.AssetTaskMapper; +import com.ruoyi.tc.service.AssetTaskService; +import org.springframework.data.domain.PageRequest; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +/** + * 任务主表(AssetTask)表服务实现类 + * + * @author makejava + * @since 2024-11-18 13:23:09 + */ +@Service("assetTaskService") +public class AssetTaskServiceImpl extends ServiceImpl implements AssetTaskService { + @Resource + private AssetTaskMapper assetTaskDao; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public AssetTask queryById(Integer id) { + return this.assetTaskDao.queryById(id); + } + + /** + * 分页查询 + * + * @param assetTask 筛选条件 + * @param pageRequest 分页对象 + * @return 查询结果 + */ + @Override + public Page queryByPage(Page assetTask, PageRequest pageRequest) { + return assetTaskDao.queryByPage(assetTask, pageRequest); + } + + /** + * 新增数据 + * + * @param assetTask 实例对象 + * @return 实例对象 + */ + @Override + public AssetTask insert(AssetTask assetTask) { + this.assetTaskDao.insert(assetTask); + return assetTask; + } + + /** + * 修改数据 + * + * @param assetTask 实例对象 + * @return 实例对象 + */ + @Override + public AssetTask update(AssetTask assetTask) { + this.assetTaskDao.update(assetTask); + return this.queryById(assetTask.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.assetTaskDao.deleteById(id) > 0; + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/AssetLcDao.xml b/ruoyi-admin/src/main/resources/mapper/AssetLcDao.xml new file mode 100644 index 0000000..1078686 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetLcDao.xml @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into asset_lc(task_idxf_timedwhc_timeshbh_timedwcxhc_timeshtg_timeueser_iddept_idcreate_idcreate_bycreate_timeupdate_idupdate_byupdate_timeversionremark) + values (#{taskId}#{xfTime}#{dwhcTime}#{shbhTime}#{dwcxhcTime}#{shtgTime}#{ueserId}#{deptId}#{createId}#{createBy}#{createTime}#{updateId}#{updateBy}#{updateTime}#{version}#{remark}) + + + + insert into + asset_lc(task_idxf_timedwhc_timeshbh_timedwcxhc_timeshtg_timeueser_iddept_idcreate_idcreate_bycreate_timeupdate_idupdate_byupdate_timeversionremark) + values + + (#{entity.taskId}#{entity.xfTime}#{entity.dwhcTime}#{entity.shbhTime}#{entity.dwcxhcTime}#{entity.shtgTime}#{entity.ueserId}#{entity.deptId}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.version}#{entity.remark}) + + + + + insert into + asset_lc(task_idxf_timedwhc_timeshbh_timedwcxhc_timeshtg_timeueser_iddept_idcreate_idcreate_bycreate_timeupdate_idupdate_byupdate_timeversionremark) + values + + (#{entity.taskId}#{entity.xfTime}#{entity.dwhcTime}#{entity.shbhTime}#{entity.dwcxhcTime}#{entity.shtgTime}#{entity.ueserId}#{entity.deptId}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.version}#{entity.remark}) + + on duplicate key update + task_id = values(task_id)xf_time = values(xf_time)dwhc_time = values(dwhc_time)shbh_time = + values(shbh_time)dwcxhc_time = values(dwcxhc_time)shtg_time = values(shtg_time)ueser_id = + values(ueser_id)dept_id = values(dept_id)create_id = values(create_id)create_by = values(create_by)create_time = + values(create_time)update_id = values(update_id)update_by = values(update_by)update_time = + values(update_time)version = values(version)remark = values(remark) + + + + + update asset_lc + + + task_id = #{taskId}, + + + xf_time = #{xfTime}, + + + dwhc_time = #{dwhcTime}, + + + shbh_time = #{shbhTime}, + + + dwcxhc_time = #{dwcxhcTime}, + + + shtg_time = #{shtgTime}, + + + ueser_id = #{ueserId}, + + + dept_id = #{deptId}, + + + create_id = #{createId}, + + + create_by = #{createBy}, + + + create_time = #{createTime}, + + + update_id = #{updateId}, + + + update_by = #{updateBy}, + + + update_time = #{updateTime}, + + + version = #{version}, + + + remark = #{remark}, + + + where id = #{id} + + + + + delete + from asset_lc + where id = #{id} + + + + diff --git a/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml b/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml new file mode 100644 index 0000000..b160744 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into asset_task(task_id, task_name, task_time, task_deadline, task_finish_time, task_status, dw_id, + create_id, create_by, create_time, update_id, update_by, update_time, user_id, dept_id, + version, reamark) + values (#{taskId}, #{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwId}, + #{createId}, #{createBy}, #{createTime}, #{updateId}, #{updateBy}, #{updateTime}, #{userId}, #{deptId}, + #{version}, #{reamark}) + + + + insert into + asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark) + values + + (#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline},#{entity.taskFinishTime},#{entity.taskStatus},#{entity.dwId},#{entity.createId},#{entity.createBy},#{entity.createTime},#{entity.updateId},#{entity.updateBy},#{entity.updateTime},#{entity.userId},#{entity.deptId},#{entity.version},#{entity.reamark}) + + + + + insert into + asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark) + values + + (#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline}#{entity.taskFinishTime}#{entity.taskStatus}#{entity.dwId}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.userId}#{entity.deptId}#{entity.version}#{entity.reamark}) + + on duplicate key update + task_id = values(task_id)task_name = values(task_name)task_time = values(task_time)task_deadline = + values(task_deadline)task_finish_time = values(task_finish_time)task_status = values(task_status)dw_id = + values(dw_id)create_id = values(create_id)create_by = values(create_by)create_time = + values(create_time)update_id = values(update_id)update_by = values(update_by)update_time = + values(update_time)user_id = values(user_id)dept_id = values(dept_id)version = values(version)reamark = + values(reamark) + + + + + update asset_task + + + task_id = #{taskId}, + + + task_name = #{taskName}, + + + task_time = #{taskTime}, + + + task_deadline = #{taskDeadline}, + + + task_finish_time = #{taskFinishTime}, + + + task_status = #{taskStatus}, + + + dw_id = #{dwId}, + + + create_id = #{createId}, + + + create_by = #{createBy}, + + + create_time = #{createTime}, + + + update_id = #{updateId}, + + + update_by = #{updateBy}, + + + update_time = #{updateTime}, + + + user_id = #{userId}, + + + dept_id = #{deptId}, + + + version = #{version}, + + + reamark = #{reamark}, + + + where id = #{id} + + + + + delete + from asset_task + where id = #{id} + + + + diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AssetLcMapper.xml similarity index 97% rename from ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml rename to ruoyi-system/src/main/resources/mapper/system/AssetLcMapper.xml index 554db54..438d484 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/AssetLcMapper.xml @@ -1,105 +1,105 @@ - - - - - - - - - - - - - - - - - select dict_id, dict_name, dict_type, status, create_by, create_time, remark - from sys_dict_type - - - - - - - - - - - - - - delete from sys_dict_type where dict_id = #{dictId} - - - - delete from sys_dict_type where dict_id in - - #{dictId} - - - - - update sys_dict_type - - dict_name = #{dictName}, - dict_type = #{dictType}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where dict_id = #{dictId} - - - - insert into sys_dict_type( - dict_name, - dict_type, - status, - remark, - create_by, - create_time - )values( - #{dictName}, - #{dictType}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - + + + + + + + + + + + + + + + + + select dict_id, dict_name, dict_type, status, create_by, create_time, remark + from sys_dict_type + + + + + + + + + + + + + + delete from sys_dict_type where dict_id = #{dictId} + + + + delete from sys_dict_type where dict_id in + + #{dictId} + + + + + update sys_dict_type + + dict_name = #{dictName}, + dict_type = #{dictType}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where dict_id = #{dictId} + + + + insert into sys_dict_type( + dict_name, + dict_type, + status, + remark, + create_by, + create_time + )values( + #{dictName}, + #{dictType}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + \ No newline at end of file