JIS物料拉动PCN页面2

tags/yfai-pcn-ext-v2.3
gsz 9 months ago
parent 188741a4dd
commit 8290261d5b

@ -121,7 +121,7 @@ public class MesPullingOrderInfoController {
throw new ImppBusiException("拉动单明细状态不为未送料状态!"); throw new ImppBusiException("拉动单明细状态不为未送料状态!");
} }
MesPullingOrderPartInfo pullingOrderInfo = mesPullingOrderInfoService.doMesPullingOrderInfoJisScan(info, AuthUtil.getSessionUser().getUserName()); MesPullingOrderPartInfo pullingOrderInfo = mesPullingOrderInfoService.doMesPullingOrderInfoJisScan(info, AuthUtil.getSessionUser().getUserName());
return ResultBean.success("拉动单打印成功") return ResultBean.success("JIS物料拉动校验条码成功")
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()) .setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode())
.setResultObject(pullingOrderInfo); .setResultObject(pullingOrderInfo);
} catch (ImppBusiException e) { } catch (ImppBusiException e) {
@ -134,9 +134,16 @@ public class MesPullingOrderInfoController {
@ApiOperation(value = "JIS物料拉动-送料按钮") @ApiOperation(value = "JIS物料拉动-送料按钮")
public ResultBean doMesPullingOrderInfoSend(@RequestBody List<MesPullingOrderPartInfo> infoList) { public ResultBean doMesPullingOrderInfoSend(@RequestBody List<MesPullingOrderPartInfo> infoList) {
try { try {
for (MesPullingOrderPartInfo partInfo : infoList) {
if (MesExtEnumUtil.PULL_ORDER_PART_STATUS.SENTED.getValue()==partInfo.getStatus()) {
throw new ImppBusiException("JIS物料拉动状态不为未送料状态");
}
if (MesExtEnumUtil.PART_PULL_DETAIL_COLOR.RED.getCode()==partInfo.getColor()) {
throw new ImppBusiException("JIS物料拉动需要扫描条码校验");
}
}
List<MesPullingOrderPartInfo> pullingOrderInfos = mesPullingOrderInfoService.doMesPullingOrderInfoSend(infoList, AuthUtil.getSessionUser().getUserName()); List<MesPullingOrderPartInfo> pullingOrderInfos = mesPullingOrderInfoService.doMesPullingOrderInfoSend(infoList, AuthUtil.getSessionUser().getUserName());
return ResultBean.success("拉动单打印成功") return ResultBean.success("拉动单送料成功")
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()) .setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode())
.setResultList(pullingOrderInfos); .setResultList(pullingOrderInfos);
} catch (ImppBusiException e) { } catch (ImppBusiException e) {

@ -184,9 +184,9 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService {
//查询拉动单主表是JIS拉动且拉动状态为10 //查询拉动单主表是JIS拉动且拉动状态为10
String append = packBean.getWhereAppend() + String append = packBean.getWhereAppend() +
" AND EXISTS (select 1 from MesPullingOrderInfo po where po.pullingOrderNo = model.pullingOrderNo" + " AND EXISTS (select 1 from MesPullingOrderInfo po where po.pullingOrderNo = model.pullingOrderNo" +
" and po.pullOrderType=20 and po.pullOrderStatus =10 and po.workCenterCode ='"+bean.getWorkCenterCode()+"' " ; " and po.pullOrderType=20 and po.workCenterCode ='" + bean.getWorkCenterCode() + "' ";
packBean.setWhereAppend(append + " )"); packBean.setWhereAppend(append + " )");
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue(), CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"status", "createDatetime"}, packBean); DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue(), CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"status", "pullingOrderNo"}, packBean);
pager = PagerHelper.getPager(pager, mesPullingOrderPartInfoRepository.findByHqlWhereCount(packBean)); pager = PagerHelper.getPager(pager, mesPullingOrderPartInfoRepository.findByHqlWhereCount(packBean));
@ -203,13 +203,11 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService {
MesPartPullDetail mesPartPullDetail = pullCodePartMap.get(partInfo.getPullCode() + "=" + partInfo.getPartNo()).get(0); MesPartPullDetail mesPartPullDetail = pullCodePartMap.get(partInfo.getPullCode() + "=" + partInfo.getPartNo()).get(0);
partInfo.setScanValidationType(StringUtil.isEmpty(mesPartPullDetail.getScanValidationType()) ? 10 : mesPartPullDetail.getScanValidationType()); partInfo.setScanValidationType(StringUtil.isEmpty(mesPartPullDetail.getScanValidationType()) ? 10 : mesPartPullDetail.getScanValidationType());
partInfo.setRuleValidation(StringUtil.isEmpty(mesPartPullDetail.getRuleValidation()) ? "" : mesPartPullDetail.getRuleValidation()); partInfo.setRuleValidation(StringUtil.isEmpty(mesPartPullDetail.getRuleValidation()) ? "" : mesPartPullDetail.getRuleValidation());
if (partInfo.getScanValidationType() == 10) { if (mesPartPullDetail.getScanValidationType() == MesExtEnumUtil.PART_PULL_DETAIL_SCAN_VALIDATION_TYPE.UN_VALIDATE.getValue()) {
partInfo.setColor(MesExtEnumUtil.PART_PULL_DETAIL_COLOR.WHITE.getCode()); partInfo.setColor(MesExtEnumUtil.PART_PULL_DETAIL_COLOR.WHITE.getCode());
} else { }else if (partInfo.getColor()==MesExtEnumUtil.PART_PULL_DETAIL_COLOR.WHITE.getCode()){
partInfo.setColor(MesExtEnumUtil.PART_PULL_DETAIL_COLOR.RED.getCode()); partInfo.setColor(MesExtEnumUtil.PART_PULL_DETAIL_COLOR.RED.getCode());
} }
}else {
partInfo.setColor(MesExtEnumUtil.PART_PULL_DETAIL_COLOR.WHITE.getCode());
} }
} }
} }
@ -258,6 +256,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService {
return true; return true;
} }
} }
@Override @Override
public List<MesPullingOrderPartInfo> doMesPullingOrderInfoSend(List<MesPullingOrderPartInfo> infoList, String userName) { public List<MesPullingOrderPartInfo> doMesPullingOrderInfoSend(List<MesPullingOrderPartInfo> infoList, String userName) {
List<MesPullingOrderPartInfo> result = new ArrayList<>(); List<MesPullingOrderPartInfo> result = new ArrayList<>();

Loading…
Cancel
Save