|
|
|
@ -2,8 +2,11 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
|
|
|
|
|
|
|
|
|
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.bean.ListPager;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesPart;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesPartSap;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesPartType;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
@ -14,6 +17,8 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description : 物料信息主数据
|
|
|
|
|
* @Reference :
|
|
|
|
@ -33,7 +38,17 @@ public class MesPartController {
|
|
|
|
|
@ApiOperation(value = "查询信息")
|
|
|
|
|
public ResultBean queryMesPart(MesPart mesPart, Pager pager) {
|
|
|
|
|
try {
|
|
|
|
|
return ResultBean.success("查询成功").setListPager(mesPartService.queryMesPart(mesPart, pager));
|
|
|
|
|
|
|
|
|
|
ListPager<MesPart> mesPartListPager = mesPartService.queryMesPart(mesPart, pager);
|
|
|
|
|
List<MesPart> partList = mesPartListPager.getObjectList();
|
|
|
|
|
for (MesPart part : partList) {
|
|
|
|
|
MesPartSap partSap = mesPartService.getMesPartSapByPartNo(part.getPartNo(), part.getOrganizeCode());
|
|
|
|
|
if (partSap != null) {
|
|
|
|
|
part.setUnit(partSap.getUnit());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
mesPartListPager.setObjectList(partList);
|
|
|
|
|
return ResultBean.success("查询成功").setListPager(mesPartListPager);
|
|
|
|
|
} catch (ImppBusiException imppException) {
|
|
|
|
|
return ResultBean.fail(imppException);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|