parent
4f34e0fd63
commit
3647807973
@ -0,0 +1,105 @@
|
||||
package com.mudu.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mudu.base.controller.BaseController;
|
||||
import com.mudu.base.domain.AjaxResult;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mudu.entity.ASafeRwzq;
|
||||
import com.mudu.service.ASafeRwzqService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (ASafeRwzq)表控制层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2024-03-18 16:58:08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("pharmaceuticals/aSafeRwzq")
|
||||
@Api(tags = "")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ASafeRwzqController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private ASafeRwzqService aSafeRwzqService;
|
||||
|
||||
/**
|
||||
* 分页条件查询所有数据
|
||||
*
|
||||
* @param page 分页条件
|
||||
* @param aSafeRwzq 查询条件
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页条件查询", response = ASafeRwzq.class)
|
||||
public AjaxResult page(Page<ASafeRwzq> page, ASafeRwzq aSafeRwzq) {
|
||||
return success(aSafeRwzqService.page(page, new QueryWrapper<>(aSafeRwzq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation(value = "通过主键查询单条", response = ASafeRwzq.class)
|
||||
public AjaxResult getById(@PathVariable Serializable id) {
|
||||
return success(aSafeRwzqService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param aSafeRwzq 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增", response = ASafeRwzq.class)
|
||||
public AjaxResult insert(@RequestBody ASafeRwzq aSafeRwzq) {
|
||||
return success(aSafeRwzqService.save(aSafeRwzq));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param aSafeRwzq 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改")
|
||||
public AjaxResult update(@RequestBody ASafeRwzq aSafeRwzq) {
|
||||
return success(aSafeRwzqService.updateById(aSafeRwzq));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param idList 主键集合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除")
|
||||
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
|
||||
return success(aSafeRwzqService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
package com.mudu.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* (ASafeRwzq)表实体类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2024-03-18 16:58:08
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("实体类")
|
||||
@TableName(value = "a_safe_rwzq")
|
||||
public class ASafeRwzq implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 755354791962163485L;
|
||||
private String xxbh;
|
||||
/**
|
||||
* 周期开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "周期开始时间")
|
||||
private Date zqkssj;
|
||||
/**
|
||||
* 周期结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "周期结束时间")
|
||||
private Date zqjssj;
|
||||
/**
|
||||
* 任务类型,QYZC,WGXC,AJB,JNRY
|
||||
*/
|
||||
@ApiModelProperty(value = "任务类型,QYZC,WGXC,AJB,JNRY")
|
||||
private String rwlx;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String bmbh;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date gxsj;
|
||||
/**
|
||||
* 入库时间
|
||||
*/
|
||||
@ApiModelProperty(value = "入库时间")
|
||||
private Date rksj;
|
||||
private String gxry;
|
||||
private String rkry;
|
||||
/**
|
||||
* 记录状态
|
||||
*/
|
||||
@ApiModelProperty(value = "记录状态")
|
||||
private Integer jlzt;
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.mudu.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mudu.entity.ASafeRwzq;
|
||||
|
||||
/**
|
||||
* (ASafeRwzq)表数据库访问层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2024-03-18 16:58:08
|
||||
*/
|
||||
public interface ASafeRwzqMapper extends BaseMapper<ASafeRwzq> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.mudu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mudu.entity.ASafeRwzq;
|
||||
|
||||
/**
|
||||
* (ASafeRwzq)表服务接口
|
||||
*
|
||||
* @author wu
|
||||
* @since 2024-03-18 16:58:08
|
||||
*/
|
||||
public interface ASafeRwzqService extends IService<ASafeRwzq> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.mudu.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mudu.mapper.ASafeRwzqMapper;
|
||||
import com.mudu.entity.ASafeRwzq;
|
||||
import com.mudu.service.ASafeRwzqService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* (ASafeRwzq)表服务实现类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2024-03-18 16:58:08
|
||||
*/
|
||||
@Service("aSafeRwzqService")
|
||||
public class ASafeRwzqServiceImpl extends ServiceImpl<ASafeRwzqMapper, ASafeRwzq> implements ASafeRwzqService {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in new issue