forked from I3-YF/i3plus-mes-pcn-yfai
PCN长度修改类型获取接口
parent
abc8599d73
commit
92f9a79e97
@ -0,0 +1,19 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.api.base;
|
||||
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesCutLengthModifyType;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description : 物料信息
|
||||
* @Reference :
|
||||
* @Author : junsheng.li
|
||||
* @CreateDate 2024/6/13 15:18
|
||||
* @Modify:
|
||||
**/
|
||||
public interface IMesCutLengthModifyTypeService {
|
||||
|
||||
@ApiOperation(value = "查询物料信息")
|
||||
List<MesCutLengthModifyType> queryMesCutLengthModifyTypeList(MesCutLengthModifyType cutLengthModifyType);
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.base;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesCutLengthModifyTypeService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesPartService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesCutLengthModifyType;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPart;
|
||||
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 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.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Description : 长度修改类型
|
||||
* @Reference :
|
||||
* @Author : junsheng.li
|
||||
* @CreateDate 2024/6/13 15:13
|
||||
* @Modify:
|
||||
**/
|
||||
@RestController
|
||||
@Api(tags = "长度修改类型")
|
||||
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mes-cut-length-modify-type")
|
||||
public class MesCutLengthModifyTypeController {
|
||||
|
||||
@Autowired
|
||||
private IMesCutLengthModifyTypeService cutLengthModifyTypeService;
|
||||
|
||||
@GetMapping("/query")
|
||||
@ApiOperation(value = "查询信息")
|
||||
public ResultBean queryMesCutLengthModifyType(MesCutLengthModifyType cutLengthModifyType) {
|
||||
try {
|
||||
return ResultBean.success("查询成功").setResultList(cutLengthModifyTypeService.queryMesCutLengthModifyTypeList(cutLengthModifyType));
|
||||
} catch (ImppBusiException imppException) {
|
||||
return ResultBean.fail(imppException);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesCutLengthModifyTypeService;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesCutLengthModifyType;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.MesCutLengthModifyTypeRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @PROJECT_NAME: i3plus-mes-yfai
|
||||
* @DESCRIPTION:
|
||||
* @USER: xinwang.yi
|
||||
* @DATE: 2024-09-05 14:26
|
||||
*/
|
||||
@Service
|
||||
public class MesCutLengthModifyTypeService implements IMesCutLengthModifyTypeService {
|
||||
|
||||
@Autowired
|
||||
private MesCutLengthModifyTypeRepository cutLengthModifyTypeRepository;
|
||||
|
||||
@Override
|
||||
public List<MesCutLengthModifyType> queryMesCutLengthModifyTypeList(MesCutLengthModifyType cutLengthModifyType) {
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(cutLengthModifyType.getOrganizeCode());
|
||||
return cutLengthModifyTypeRepository.findByHqlWhere(packBean);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue