|
|
@ -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()
|
|
|
|