PCN根据产线查询零件生产组信息集合

tags/yfai-pcn-ext-v2.3
yxw 8 months ago
parent 798ec0d3ff
commit ae996c361c

@ -0,0 +1,19 @@
package cn.estsh.i3plus.ext.mes.pcn.api.base;
import cn.estsh.i3plus.pojo.mes.bean.MesPartProdGroup;
import io.swagger.annotations.ApiOperation;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : xinwang.yi
* @CreateDate 2024/6/13 15:18
* @Modify:
**/
public interface IMesPartProdGroupService {
@ApiOperation(value = "查询零件生产组集合")
List<MesPartProdGroup> queryMesPartProdGroup(MesPartProdGroup partProdGroup);
}

@ -0,0 +1,42 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.base;
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesPartProdGroupService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.mes.bean.MesPartProdGroup;
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-part-prod-group")
public class MesPartProdGroupController {
@Autowired
private IMesPartProdGroupService partProdGroupService;
@GetMapping("/query")
@ApiOperation(value = "查询零件生产组信息")
public ResultBean queryMesCutLengthModifyType(MesPartProdGroup partProdGroup) {
try {
return ResultBean.success("查询成功").setResultList(partProdGroupService.queryMesPartProdGroup(partProdGroup));
} 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.IMesPartProdGroupService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesPartProdGroup;
import cn.estsh.i3plus.pojo.mes.repository.MesPartProdGroupRepository;
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-24 11:06
*/
@Service
public class MesPartProdGroupService implements IMesPartProdGroupService {
@Autowired
private MesPartProdGroupRepository partProdGroupRepository;
@Override
public List<MesPartProdGroup> queryMesPartProdGroup(MesPartProdGroup partProdGroup) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(partProdGroup.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(partProdGroup.getWorkCenterCode(), MesPcnExtConstWords.WORK_CENTER_CODE,ddlPackBean);
return partProdGroupRepository.findByHqlWhere(ddlPackBean);
}
}
Loading…
Cancel
Save