forked from I3-YF/i3plus-mes-yfai
业务履历新增
parent
80402f86f0
commit
f0c39b0a6c
@ -0,0 +1,55 @@
|
||||
package cn.estsh.i3plus.ext.mes.apiservice.controller.busi;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.api.busi.IMesPojoVersionService;
|
||||
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPojoVersionDetail;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Description :
|
||||
* @Reference :
|
||||
* @Author : zxw
|
||||
* @CreateDate : 2024-07-06 下午2:56
|
||||
* @Modify:
|
||||
**/
|
||||
@RestController
|
||||
@Api(tags = "对象历史详情")
|
||||
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesPojoVersionDetail")
|
||||
public class MesPojoVersionDetailController {
|
||||
@Autowired
|
||||
private IMesPojoVersionService pojoVersionService;
|
||||
|
||||
/**
|
||||
* 查询对象历史计划
|
||||
*
|
||||
* @param pojoVersionId 对象版本id
|
||||
* @return 处理结果
|
||||
*/
|
||||
@GetMapping(value = "/get-pojo-version-id/{pojoVersionId}")
|
||||
@ApiOperation(value = "查询对象历史计划", notes = "根据所属模块与className查询对象历史计划状态")
|
||||
public ResultBean getPojoVersionDetailByPojoVersionId(@PathVariable("pojoVersionId") Long pojoVersionId) {
|
||||
try {
|
||||
// 数据校验
|
||||
ValidatorBean.checkNotZero(pojoVersionId, "对象版本id 不能为空");
|
||||
MesPojoVersionDetail pojoVersionDetail = pojoVersionService.getPojoVersionDetailByPojoVersionId(pojoVersionId);
|
||||
return ResultBean.success("操作成功")
|
||||
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode())
|
||||
.setResultObject(pojoVersionDetail);
|
||||
} catch (ImppBusiException busExcep) {
|
||||
return ResultBean.fail(busExcep);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue