拉动组明细 接口加查询条件

tags/yfai-mes-ext-v2.4
王杰 5 months ago
parent da514d59d9
commit a186bb7d63

@ -1,6 +1,7 @@
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base; package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.api.base.IMesPartPullDetailService; import cn.estsh.i3plus.ext.mes.api.base.IMesPartPullDetailService;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum; import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
@ -25,9 +26,9 @@ public class MesPartPullDetailService extends BaseMesService<MesPartPullDetail>
//43112 MES:PC拉动单页面问题 6.同一拉动组-根据工位代码&零件号做唯一校验 //43112 MES:PC拉动单页面问题 6.同一拉动组-根据工位代码&零件号做唯一校验
if (!StringUtil.isEmpty(item.getWorkCellCode())&&!StringUtil.isEmpty(item.getPartNo())){ if (!StringUtil.isEmpty(item.getWorkCellCode())&&!StringUtil.isEmpty(item.getPartNo())){
DdlPackBean partPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode()); DdlPackBean partPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(item.getPullCode(), "pullCode", partPackBean); DdlPreparedPack.getStringEqualPack(item.getPullCode(), MesExtConstWords.PULL_CODE, partPackBean);
DdlPreparedPack.getStringEqualPack(item.getPartNo(), "partNo", partPackBean); DdlPreparedPack.getStringEqualPack(item.getPartNo(), MesExtConstWords.PART_NO, partPackBean);
DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), "workCellCode", partPackBean); DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, partPackBean);
boolean flg = baseRDao.isExitByHql(partPackBean); boolean flg = baseRDao.isExitByHql(partPackBean);
if (flg) { if (flg) {
throw ImppExceptionBuilder.newInstance() throw ImppExceptionBuilder.newInstance()
@ -48,10 +49,10 @@ public class MesPartPullDetailService extends BaseMesService<MesPartPullDetail>
//同一拉动组-根据工位代码&零件号做唯一校验 //同一拉动组-根据工位代码&零件号做唯一校验
if (!StringUtil.isEmpty(item.getWorkCellCode())&&!StringUtil.isEmpty(item.getPartNo())){ if (!StringUtil.isEmpty(item.getWorkCellCode())&&!StringUtil.isEmpty(item.getPartNo())){
DdlPackBean partPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode()); DdlPackBean partPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(item.getPullCode(), "pullCode", partPackBean); DdlPreparedPack.getStringEqualPack(item.getPullCode(), MesExtConstWords.PULL_CODE, partPackBean);
DdlPreparedPack.getStringEqualPack(item.getPartNo(), "partNo", partPackBean); DdlPreparedPack.getStringEqualPack(item.getPartNo(), MesExtConstWords.PART_NO, partPackBean);
DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), "workCellCode", partPackBean); DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, partPackBean);
DdlPreparedPack.getNumNOEqualPack(item.getId(),"id",partPackBean); DdlPreparedPack.getNumNOEqualPack(item.getId(),MesExtConstWords.ID, partPackBean);
boolean flg = baseRDao.isExitByHql(partPackBean); boolean flg = baseRDao.isExitByHql(partPackBean);
if (flg) { if (flg) {
throw ImppExceptionBuilder.newInstance() throw ImppExceptionBuilder.newInstance()
@ -63,10 +64,16 @@ public class MesPartPullDetailService extends BaseMesService<MesPartPullDetail>
} }
} }
} }
@Override
protected void setPackQueryBean(MesPartPullDetail bean, DdlPackBean packBean) { protected void setPackQueryBean(MesPartPullDetail bean, DdlPackBean packBean) {
DdlPreparedPack.getStringLikerPack(bean.getPullCode(), "pullCode", packBean); DdlPreparedPack.getStringLikerPack(bean.getPullCode(), MesExtConstWords.PULL_CODE, packBean);
DdlPreparedPack.getStringLikerPack(bean.getWorkCellCode(), "workCellCode", packBean); DdlPreparedPack.getStringLikerPack(bean.getPullName(), MesExtConstWords.PULL_NAME, packBean);
DdlPreparedPack.getStringLikerPack(bean.getPartNo(), MesExtConstWords.PART_NO, packBean);
DdlPreparedPack.getStringLikerPack(bean.getPullAddr(), MesExtConstWords.PULL_ADDR, packBean);
DdlPreparedPack.getStringLikerPack(bean.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, packBean);
} }
@Override @Override
public void validateImport(List<MesPartPullDetail> beanList) { public void validateImport(List<MesPartPullDetail> beanList) {
@ -77,8 +84,8 @@ public class MesPartPullDetailService extends BaseMesService<MesPartPullDetail>
DdlPackBean seriesPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode()); DdlPackBean seriesPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(item.getPullCode(), "pullCode", seriesPackBean); DdlPreparedPack.getStringEqualPack(item.getPullCode(), MesExtConstWords.PULL_CODE, seriesPackBean);
DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), "workCellCode", seriesPackBean); DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, seriesPackBean);
boolean flg = baseRDao.isExitByHql(seriesPackBean); boolean flg = baseRDao.isExitByHql(seriesPackBean);
if (flg) { if (flg) {
throw ImppExceptionBuilder.newInstance() throw ImppExceptionBuilder.newInstance()

@ -539,7 +539,7 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
MesPrintQueue printQueue = new MesPrintQueue(); MesPrintQueue printQueue = new MesPrintQueue();
BeanUtils.copyProperties(workOrder, printQueue, MesExtConstWords.ID); BeanUtils.copyProperties(workOrder, printQueue, MesExtConstWords.ID);
printQueue.setPrintQueueType(MesExtEnumUtil.PRINT_QUEUE_TYPE.WORK_ORDER_ASSEMBLY.getValue()); printQueue.setPrintQueueType(MesExtEnumUtil.PRINT_QUEUE_TYPE.PRINT_WORK_ORDER_ASSEMBLY.getValue());
printQueue.setPrintStatus(MesExtEnumUtil.PRINT_STATUS.UNPRINT.getValue()); printQueue.setPrintStatus(MesExtEnumUtil.PRINT_STATUS.UNPRINT.getValue());
return printQueueRepository.save(printQueue); return printQueueRepository.save(printQueue);
} }
@ -2558,7 +2558,7 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
if (StringUtil.isEmpty(workOrderNo) || StringUtil.isEmpty(organizeCode)) return; if (StringUtil.isEmpty(workOrderNo) || StringUtil.isEmpty(organizeCode)) return;
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(workOrderNo, MesExtConstWords.WORK_ORDER_NO, packBean); DdlPreparedPack.getStringEqualPack(workOrderNo, MesExtConstWords.WORK_ORDER_NO, packBean);
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PRINT_QUEUE_TYPE.WORK_ORDER_ASSEMBLY.getValue(), MesExtConstWords.PRINT_QUEUE_TYPE, packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PRINT_QUEUE_TYPE.PRINT_WORK_ORDER_ASSEMBLY.getValue(), MesExtConstWords.PRINT_QUEUE_TYPE, packBean);
printQueueRepository.updateByProperties( printQueueRepository.updateByProperties(
new String[]{MesExtConstWords.MODIFY_USER, MesExtConstWords.MODIFY_DATE_TIME, MesExtConstWords.PRINT_STATUS}, new String[]{MesExtConstWords.MODIFY_USER, MesExtConstWords.MODIFY_DATE_TIME, MesExtConstWords.PRINT_STATUS},
new Object[]{userName, TimeTool.getNowTime(true), MesExtEnumUtil.PRINT_STATUS.FAILURE.getValue()}, packBean); new Object[]{userName, TimeTool.getNowTime(true), MesExtEnumUtil.PRINT_STATUS.FAILURE.getValue()}, packBean);

@ -193,6 +193,12 @@ public class MesExtConstWords {
public static final String PULL_ORDER_STATUS = "pullOrderStatus"; public static final String PULL_ORDER_STATUS = "pullOrderStatus";
//打印队列类型 //打印队列类型
public static final String PRINT_QUEUE_TYPE = "printQueueType"; public static final String PRINT_QUEUE_TYPE = "printQueueType";
//拉动组代码
public static final String PULL_CODE = "pullCode";
//拉动组名称
public static final String PULL_NAME = "pullName";
//拉动地址
public static final String PULL_ADDR = "pullAddr";
//时间[开始/结束]条件 //时间[开始/结束]条件
public static final String START_TIME_START = "startTimeStart"; public static final String START_TIME_START = "startTimeStart";

Loading…
Cancel
Save