forked from I3-YF/i3plus-mes-pcn-yfai
SPS物料拉动PCN扫描页面1
parent
bf49601ad1
commit
bc7d209620
@ -0,0 +1,20 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.api.busi;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPartPull;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPullingOrderInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @CreateDate 2024/09/12
|
||||
* @Author gsz
|
||||
*/
|
||||
public interface IMesPartPullService {
|
||||
|
||||
@ApiOperation(value = "查询拉动组")
|
||||
List<MesPartPull> queryMesPartPull(MesPartPull mesPartPull);
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.api.busi;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPullingOrderInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @CreateDate 2024/09/12
|
||||
* @Author gsz
|
||||
*/
|
||||
public interface IMesPullingOrderInfoService {
|
||||
|
||||
@ApiOperation(value = "查询拉动单")
|
||||
ListPager queryMesPullingOrderInfoByPager(MesPullingOrderInfo mesPullingOrderInfo, Pager pager);
|
||||
|
||||
void doMesPullingOrderInfoScan(MesPullingOrderInfo mesPullingOrderInfo, String userName);
|
||||
|
||||
List<MesPullingOrderInfo> doMesPullingOrderInfoPrint(MesPullingOrderInfo mesPullingOrderInfo, String userName);
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPartPullService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPullingOrderInfoService;
|
||||
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.MesPartPull;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesProdShiftRecord;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPullingOrderInfo;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拉动单
|
||||
*/
|
||||
@Api("拉动单")
|
||||
@RestController
|
||||
@RequestMapping(MesCommonConstant.MES_YANFEN+ "/mesPartPull")
|
||||
public class MesPartPullController {
|
||||
|
||||
@Autowired
|
||||
private IMesPartPullService mesPartPullService;
|
||||
|
||||
@GetMapping(value = "/query")
|
||||
@ApiOperation(value = "查询拉动单")
|
||||
public ResultBean queryMesPartPull(MesPartPull mesPartPull) {
|
||||
try {
|
||||
mesPartPull.setOrganizeCode(mesPartPull.getOrganizeCode());
|
||||
List<MesPartPull> partInspectionList= mesPartPullService.queryMesPartPull(mesPartPull);
|
||||
return ResultBean.success("查询成功").setResultList(partInspectionList);
|
||||
|
||||
} catch (ImppBusiException e) {
|
||||
return ResultBean.fail(e).build();
|
||||
} catch (Exception e) {
|
||||
return ResultBean.fail(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesTemplateService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPullingOrderInfoService;
|
||||
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.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.*;
|
||||
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
||||
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.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拉动单
|
||||
*/
|
||||
@Api("拉动单扫描工位端")
|
||||
@RestController
|
||||
@RequestMapping(MesCommonConstant.MES_YANFEN+ "/mesPullingOrderInfo")
|
||||
public class MesPullingOrderInfoController {
|
||||
|
||||
@Autowired
|
||||
private IMesPullingOrderInfoService mesPullingOrderInfoService;
|
||||
|
||||
@Autowired
|
||||
private IMesTemplateService mesTemplateService;
|
||||
@GetMapping(value = "/query-pager")
|
||||
@ApiOperation(value = "查询拉动单")
|
||||
public ResultBean queryMesProdShiftRecord(MesPullingOrderInfo mesPullingOrderInfo, Pager pager) {
|
||||
try {
|
||||
mesPullingOrderInfo.setOrganizeCode(mesPullingOrderInfo.getOrganizeCode());
|
||||
ListPager<MesProdShiftRecord> partInspectionListPager = mesPullingOrderInfoService.queryMesPullingOrderInfoByPager(mesPullingOrderInfo, pager);
|
||||
return ResultBean.success("查询成功").setListPager(partInspectionListPager);
|
||||
|
||||
} catch (ImppBusiException e) {
|
||||
return ResultBean.fail(e).build();
|
||||
} catch (Exception e) {
|
||||
return ResultBean.fail(e);
|
||||
}
|
||||
}
|
||||
@PostMapping(value = "/doScan")
|
||||
@ApiOperation(value = "拉动单扫描")
|
||||
public ResultBean doMesPullingOrderInfoScan(@RequestBody MesPullingOrderInfo mesPullingOrderInfo) {
|
||||
try {
|
||||
if (StringUtils.isEmpty(mesPullingOrderInfo.getPullingOrderNo())) {
|
||||
throw new ImppBusiException("拉动单号不能为空");
|
||||
}
|
||||
mesPullingOrderInfoService.doMesPullingOrderInfoScan(mesPullingOrderInfo, !StringUtils.isEmpty(mesPullingOrderInfo.getModifyUser())?mesPullingOrderInfo.getModifyUser(): AuthUtil.getSessionUser().getUserName());
|
||||
return ResultBean.success("拉动单扫描成功")
|
||||
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
||||
} catch (ImppBusiException e) {
|
||||
return ResultBean.fail(e).build();
|
||||
} catch (Exception e) {
|
||||
return ResultBean.fail(e);
|
||||
}
|
||||
}
|
||||
@PostMapping(value = "/doPrint")
|
||||
@ApiOperation(value = "打印未打印拉动单后修改状态")
|
||||
public ResultBean doMesPullingOrderInfoPrint(@RequestBody MesPullingOrderInfo mesPullingOrderInfo) {
|
||||
try {
|
||||
if (StringUtils.isEmpty(mesPullingOrderInfo.getWorkCenterCode())) {
|
||||
throw new ImppBusiException("产线不能为空");
|
||||
}
|
||||
List<MesPullingOrderInfo> pullingOrderInfos = mesPullingOrderInfoService.doMesPullingOrderInfoPrint(mesPullingOrderInfo, AuthUtil.getSessionUser().getUserName());
|
||||
return ResultBean.success("拉动单打印成功")
|
||||
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode())
|
||||
.setResultList(pullingOrderInfos);
|
||||
} catch (ImppBusiException e) {
|
||||
return ResultBean.fail(e).build();
|
||||
} catch (Exception e) {
|
||||
return ResultBean.fail(e);
|
||||
}
|
||||
}
|
||||
@GetMapping("/template")
|
||||
@ApiOperation(value = "查询打印模板和明细")
|
||||
public ResultBean queryMesLabelTemplate(MesLabelTemplate labelTemplate ) {
|
||||
try {
|
||||
ValidatorBean.checkNotNull(labelTemplate.getTemplateCode(), "打印模板不能为空");
|
||||
ValidatorBean.checkNotNull(labelTemplate.getOrganizeCode(), "工厂代码不能为空");
|
||||
return ResultBean.success("查询成功").setResultObject(mesTemplateService.getMesLabelTemplate(labelTemplate.getTemplateCode(), labelTemplate.getOrganizeCode()));
|
||||
|
||||
} catch (ImppBusiException imppException) {
|
||||
return ResultBean.fail(imppException);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPartPullService;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.base.util.StringUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPartPull;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MesPartPullService implements IMesPartPullService {
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(MesPartPullService.class);
|
||||
|
||||
@Autowired
|
||||
private MesPartPullRepository mesPartPullRDao;
|
||||
@Autowired
|
||||
private MesPartPullDetailRepository mesPartPullDetailRDao;
|
||||
@Autowired
|
||||
private MesWorkOrderPartRepository workOrderPartRepository;
|
||||
@Autowired
|
||||
private MesWorkCenterRepository mesWorkCenterRepository;
|
||||
|
||||
@Override
|
||||
public List<MesPartPull> queryMesPartPull(MesPartPull bean) {
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
||||
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
|
||||
DdlPreparedPack.getStringEqualPack(bean.getPullCode(), "pullCode", packBean);
|
||||
|
||||
packBean.setOrderByStr(bean.orderBy());
|
||||
|
||||
return mesPartPullRDao.findByHqlWhere(packBean);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesPullingOrderInfoService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.apiservice.util.MesPcnException;
|
||||
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.base.util.StringUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.*;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.*;
|
||||
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MesPullingOrderInfoService implements IMesPullingOrderInfoService {
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(MesPullingOrderInfoService.class);
|
||||
@Autowired
|
||||
private MesPullingOrderInfoRepository mesPullingOrderInfoRepository;
|
||||
@Autowired
|
||||
private MesPullingOrderPartInfoRepository mesPullingOrderPartInfoRepository;
|
||||
@Autowired
|
||||
private MesPartPullRepository mesPartPullRDao;
|
||||
@Autowired
|
||||
private MesPartPullDetailRepository mesPartPullDetailRDao;
|
||||
@Autowired
|
||||
private MesWorkOrderPartRepository workOrderPartRepository;
|
||||
|
||||
@Autowired
|
||||
private MesWorkCenterRepository mesWorkCenterRepository;
|
||||
@Autowired
|
||||
private MesPullingOrderExtendsRepository mesPullingOrderExtendsRepository;
|
||||
|
||||
@Override
|
||||
public ListPager<MesPullingOrderInfo> queryMesPullingOrderInfoByPager(MesPullingOrderInfo bean, Pager pager) {
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
||||
setPackQueryBean(bean, packBean);
|
||||
if (!StringUtil.isEmpty(bean.orderBy())) {
|
||||
packBean.setOrderByStr(bean.orderBy());
|
||||
} else {
|
||||
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
|
||||
}
|
||||
//
|
||||
if(!StringUtil.isEmpty(bean.getCreateDatetime())){
|
||||
DdlPreparedPack.getStringBiggerPack(bean.getCreateDatetime(), "createDatetime", packBean);
|
||||
}
|
||||
pager = PagerHelper.getPager(pager, mesPullingOrderInfoRepository.findByHqlWhereCount(packBean));
|
||||
|
||||
List<MesPullingOrderInfo> resultList = mesPullingOrderInfoRepository.findByHqlWherePage(packBean, pager);
|
||||
|
||||
return new ListPager<>(resultList, pager);
|
||||
}
|
||||
|
||||
protected void setPackQueryBean(MesPullingOrderInfo bean, DdlPackBean packBean) {
|
||||
DdlPreparedPack.getStringEqualPack(bean.getPullCode(), "pullCode", packBean);
|
||||
DdlPreparedPack.getStringEqualPack(bean.getPullingOrderNo(), "pullingOrderNo", packBean);
|
||||
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(bean.getPullOrderType(), "pullOrderType", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(bean.getPrintStatus(), "printStatus", packBean);
|
||||
//已确认、已扫描、已发送设备
|
||||
if (StringUtil.isEmpty(bean.getPullOrderStatus())){
|
||||
DdlPreparedPack.getInPackList(Arrays.asList(
|
||||
MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue(),
|
||||
MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue(),
|
||||
MesExtEnumUtil.PULL_ORDER_STATUS.SPS_PULL.getValue()), "pullOrderStatus", packBean);
|
||||
}else {
|
||||
DdlPreparedPack.getNumEqualPack(bean.getPullOrderStatus(), "pullOrderStatus", packBean);
|
||||
}
|
||||
DdlPreparedPack.getStringEqualPack(bean.getWorkOrderNo(), "workOrderNo", packBean);
|
||||
DdlPreparedPack.getStringLikerPack(bean.getPartNo(), "partNo", packBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doMesPullingOrderInfoScan(MesPullingOrderInfo bean, String userName) {
|
||||
//校验是不是第一行数据
|
||||
DdlPackBean packBeanOne = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
||||
DdlPreparedPack.getStringEqualPack(bean.getPullCode(), "pullCode", packBeanOne);
|
||||
DdlPreparedPack.getStringEqualPack(bean.getPullingOrderNo(), "pullingOrderNo", packBeanOne);
|
||||
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBeanOne);
|
||||
// DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue(), "pullOrderStatus", packBeanOne);
|
||||
MesPullingOrderInfo mesPullingOrderInfo = mesPullingOrderInfoRepository.getByProperty(packBeanOne);
|
||||
if (StringUtil.isEmpty(mesPullingOrderInfo)) {
|
||||
MesPcnException.throwMesBusiException("扫描拉动单号【%s】查询数据为空",bean.getPullingOrderNo());
|
||||
}
|
||||
if (mesPullingOrderInfo.getPullOrderStatus()!=MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue()) {
|
||||
MesPcnException.throwMesBusiException("扫描拉动单号【%s】拉动单状态不是【已确认】",bean.getPullingOrderNo());
|
||||
}
|
||||
|
||||
//强过码 todo
|
||||
if((!Objects.isNull(bean.getIsPass()) && CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue() == bean.getIsPass())){
|
||||
mesPullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue());
|
||||
ConvertBean.serviceModelUpdate(mesPullingOrderInfo, userName);
|
||||
mesPullingOrderInfoRepository.update(mesPullingOrderInfo);
|
||||
}else {
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
||||
DdlPreparedPack.getStringEqualPack(bean.getPullCode(), "pullCode", packBean);
|
||||
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue(), "pullOrderStatus", packBean);
|
||||
if (!StringUtil.isEmpty(bean.orderBy())) {
|
||||
packBean.setOrderByStr(bean.orderBy());
|
||||
} else {
|
||||
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
|
||||
}
|
||||
List<MesPullingOrderInfo> pullingOrderInfos = mesPullingOrderInfoRepository.findByHqlWhere(packBean);
|
||||
if (!CollectionUtils.isEmpty(pullingOrderInfos)){
|
||||
//按照排序 依次扫描,如果扫描不按照顺序 报错
|
||||
MesPullingOrderInfo pullingOrderInfo = pullingOrderInfos.get(0);
|
||||
if (pullingOrderInfo.getPullOrderStatus().equals(mesPullingOrderInfo.getPullOrderStatus())){
|
||||
mesPullingOrderInfo.setPullOrderStatus(MesExtEnumUtil.PULL_ORDER_STATUS.JIS_PULL.getValue());
|
||||
ConvertBean.serviceModelUpdate(mesPullingOrderInfo, userName);
|
||||
mesPullingOrderInfoRepository.update(mesPullingOrderInfo);
|
||||
}else{
|
||||
MesPcnException.throwMesBusiException("扫描拉动单号【%s】SPS排序单校验顺序错误",bean.getPullingOrderNo());
|
||||
}
|
||||
}else {
|
||||
MesPcnException.throwMesBusiException("扫描拉动单号产线拉动组【%s】数据为空",bean.getPullingOrderNo());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MesPullingOrderInfo> doMesPullingOrderInfoPrint(MesPullingOrderInfo bean, String userName) {
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
||||
DdlPreparedPack.getStringEqualPack(bean.getPullCode(), "pullCode", packBean);
|
||||
DdlPreparedPack.getStringEqualPack(bean.getPullingOrderNo(), "pullingOrderNo", packBean);
|
||||
DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PRINT_STATUS.UNPRINT.getValue(), "printStatus", packBean);
|
||||
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
|
||||
List<MesPullingOrderInfo> pullingOrderInfos = mesPullingOrderInfoRepository.findByHqlWhere(packBean);
|
||||
if (!CollectionUtils.isEmpty(pullingOrderInfos)){
|
||||
//把查出来的拉动单打印并修改打印状态为已打印
|
||||
for (MesPullingOrderInfo pullingOrderInfo : pullingOrderInfos) {
|
||||
//查询拉动组明细
|
||||
DdlPackBean partPackBean = DdlPackBean.getDdlPackBean(pullingOrderInfo.getOrganizeCode());
|
||||
DdlPreparedPack.getStringEqualPack(pullingOrderInfo.getPullingOrderNo(), "pullingOrderNo", partPackBean);
|
||||
List<MesPullingOrderPartInfo> pullingOrderPartInfos = mesPullingOrderPartInfoRepository.findByHqlWhere(partPackBean);
|
||||
if (!CollectionUtils.isEmpty(pullingOrderPartInfos)){
|
||||
pullingOrderInfo.setPartCount(pullingOrderPartInfos.size());
|
||||
pullingOrderInfo.setPullingOrderPartInfos(pullingOrderPartInfos);
|
||||
}
|
||||
|
||||
pullingOrderInfo.setPrintStatus(MesExtEnumUtil.PRINT_STATUS.PRINTED.getValue());
|
||||
ConvertBean.serviceModelUpdate(pullingOrderInfo, userName);
|
||||
}
|
||||
mesPullingOrderInfoRepository.saveAll(pullingOrderInfos);
|
||||
}
|
||||
return pullingOrderInfos;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue