1.下发接口修改
2.工单接口开发
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
package com.njcn.process.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 计划回退
|
||||
@@ -10,10 +20,38 @@ import lombok.Data;
|
||||
* @date 2024/5/30
|
||||
*/
|
||||
@Data
|
||||
@TableName("")
|
||||
@TableName("supv_plan_return")
|
||||
public class SupvPlanReturn {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 计划主键
|
||||
*/
|
||||
private String planId;
|
||||
|
||||
/**
|
||||
* 拒绝理由
|
||||
*/
|
||||
private String rejectReason;
|
||||
|
||||
/**
|
||||
* 评论
|
||||
*/
|
||||
private String rejectComment;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||
@JsonSerialize(using = LocalDateTimeSerializer.class)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
@@ -8,7 +9,9 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.process.mapper.SupvPlanReturnMapper;
|
||||
import com.njcn.process.pojo.po.SupvPlanReturn;
|
||||
import com.njcn.process.service.ISupvPlanReturnService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -31,15 +34,26 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class SupvPlanReturnController extends BaseController {
|
||||
|
||||
private final SupvPlanReturnMapper supvPlanReturnMapper;
|
||||
private final ISupvPlanReturnService iSupvPlanReturnService;
|
||||
|
||||
@PostMapping("reject")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("新增技术监督计划")
|
||||
@ApiImplicitParam(name = "supvPlanParam",value = "请求体",required = true)
|
||||
public HttpResult<Object> reject(@RequestBody @Validated SupvPlanReturn supvPlanReturn){
|
||||
@ApiImplicitParam(name = "supvPlanReturn",value = "请求体",required = true)
|
||||
public HttpResult<Object> reject(@RequestBody SupvPlanReturn supvPlanReturn){
|
||||
String methodDescribe = getMethodDescribe("reject");
|
||||
supvPlanReturnMapper.insert(supvPlanReturn);
|
||||
iSupvPlanReturnService.add(supvPlanReturn);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("pageList")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("新增技术监督计划")
|
||||
@ApiImplicitParam(name = "supvPlanReturn",value = "请求体",required = true)
|
||||
public HttpResult<Page<SupvPlanReturn>> pageList(@RequestBody BaseParam baseParam){
|
||||
String methodDescribe = getMethodDescribe("pageList");
|
||||
Page<SupvPlanReturn> page = iSupvPlanReturnService.pageList(baseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.process.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.process.pojo.po.SupvPlanReturn;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 总部监督计划退回表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2024-06-17
|
||||
*/
|
||||
public interface ISupvPlanReturnService extends IService<SupvPlanReturn> {
|
||||
|
||||
|
||||
boolean add(SupvPlanReturn supvPlanReturn);
|
||||
|
||||
|
||||
|
||||
Page<SupvPlanReturn> pageList(BaseParam baseParam);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.njcn.process.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.process.mapper.SupvPlanReturnMapper;
|
||||
import com.njcn.process.pojo.po.SupvPlanReturn;
|
||||
import com.njcn.process.service.ISupvPlanReturnService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 总部监督计划退回表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2024-06-17
|
||||
*/
|
||||
@Service
|
||||
public class SupvPlanReturnServiceImpl extends ServiceImpl<SupvPlanReturnMapper, SupvPlanReturn> implements ISupvPlanReturnService {
|
||||
|
||||
@Override
|
||||
public boolean add(SupvPlanReturn supvPlanReturn) {
|
||||
return this.save(supvPlanReturn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<SupvPlanReturn> pageList(BaseParam baseParam) {
|
||||
LambdaQueryWrapper<SupvPlanReturn> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.between(SupvPlanReturn::getCreateTime,baseParam.getSearchBeginTime(),baseParam.getSearchEndTime());
|
||||
return this.page(new Page<>(PageFactory.getPageNum(baseParam),PageFactory.getPageSize(baseParam)),lambdaQueryWrapper);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user