新增任务周期接口

main
吴顺杰 8 months ago
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));
}
}

@ -2,9 +2,7 @@ package com.mudu.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mudu.base.controller.BaseController;
import com.mudu.base.domain.AjaxResult;
import com.mudu.entity.ASafeXcrwwz;
@ -30,7 +28,7 @@ import java.util.List;
* (ASafeXcrwwz)
*
* @author wu
* @since 2024-03-14 15:58:29
* @since 2024-03-18 16:58:07
*/
@RestController
@RequestMapping("pharmaceuticals/aSafeXcrwwz")

@ -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;
}

@ -15,14 +15,14 @@ import lombok.Data;
* (ASafeXcrwwz)
*
* @author wu
* @since 2024-03-14 15:58:30
* @since 2024-03-18 16:58:08
*/
@Data
@ApiModel("实体类")
@TableName(value = "a_safe_xcrwwz")
public class ASafeXcrwwz implements Serializable {
private static final long serialVersionUID = 900966560903431961L;
private static final long serialVersionUID = 464958940603004242L;
private String xxbh;
/**
*

@ -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> {
}

@ -7,7 +7,7 @@ import com.mudu.entity.ASafeXcrwwz;
* (ASafeXcrwwz)访
*
* @author wu
* @since 2024-03-14 15:58:29
* @since 2024-03-18 16:58:08
*/
public interface ASafeXcrwwzMapper extends BaseMapper<ASafeXcrwwz> {

@ -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> {
}

@ -7,7 +7,7 @@ import com.mudu.entity.ASafeXcrwwz;
* (ASafeXcrwwz)
*
* @author wu
* @since 2024-03-14 15:58:30
* @since 2024-03-18 16:58:08
*/
public interface ASafeXcrwwzService extends IService<ASafeXcrwwz> {

@ -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 {
}

@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
* (ASafeXcrwwz)
*
* @author wu
* @since 2024-03-14 15:58:30
* @since 2024-03-18 16:58:08
*/
@Service("aSafeXcrwwzService")
public class ASafeXcrwwzServiceImpl extends ServiceImpl<ASafeXcrwwzMapper, ASafeXcrwwz> implements ASafeXcrwwzService {

Loading…
Cancel
Save