|
|
@ -7,9 +7,11 @@ 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;
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroup;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroupDetail;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroupDetail;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesShippingOrderManagement;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesShippingOrderManagement;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesShippingOrderManagementDetail;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesShippingOrderManagementDetail;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.repository.MesPartShippingGroupRepository;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
@ -33,6 +35,9 @@ public class MesShippingOrderManagementService extends BaseMesService<MesShippin
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private MesPartShippingGroupDetailService shippingGroupDetailService;
|
|
|
|
private MesPartShippingGroupDetailService shippingGroupDetailService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private MesPartShippingGroupRepository partShippingGroupRepository;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void setPackQueryBean(MesShippingOrderManagement bean, DdlPackBean packBean) {
|
|
|
|
protected void setPackQueryBean(MesShippingOrderManagement bean, DdlPackBean packBean) {
|
|
|
|
DdlPreparedPack.getStringEqualPack(bean.getShippingGroupNo(), "shippingGroupNo", packBean);
|
|
|
|
DdlPreparedPack.getStringEqualPack(bean.getShippingGroupNo(), "shippingGroupNo", packBean);
|
|
|
@ -49,6 +54,44 @@ public class MesShippingOrderManagementService extends BaseMesService<MesShippin
|
|
|
|
//插入前构造并校验数据
|
|
|
|
//插入前构造并校验数据
|
|
|
|
onInsertBean(bean);
|
|
|
|
onInsertBean(bean);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DdlPackBean partShipGroupPackBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
|
|
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(bean.getShippingGroupNo(), "shippingGroupNo", partShipGroupPackBean);
|
|
|
|
|
|
|
|
MesPartShippingGroup partShippingGroup = partShippingGroupRepository.getByProperty(partShipGroupPackBean);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(partShippingGroup)) {
|
|
|
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
|
|
|
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
|
|
|
|
.setErrorDetail("【%s】零件发运组数据为空,请检查数据", bean.getShippingGroupNo())
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(partShippingGroup.getIsLoading())) {
|
|
|
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
|
|
|
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
|
|
|
|
.setErrorDetail("【%s】零件发运组是否有装车不能为空,请检查数据", bean.getShippingGroupNo())
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(partShippingGroup.getIsFirstInstall())) {
|
|
|
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
|
|
|
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
|
|
|
|
.setErrorDetail("【%s】零件发运组是否先装车不能为空,请检查数据", bean.getShippingGroupNo())
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(partShippingGroup.getIsEnableMemory())) {
|
|
|
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
|
|
|
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
|
|
|
|
.setErrorDetail("【%s】零件发运组是否启用记忆不能为空,请检查数据", bean.getShippingGroupNo())
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bean.setIsLoading(partShippingGroup.getIsLoading());
|
|
|
|
|
|
|
|
bean.setIsFirstInstall(partShippingGroup.getIsFirstInstall());
|
|
|
|
|
|
|
|
bean.setIsEnableMemory(partShippingGroup.getIsEnableMemory());
|
|
|
|
|
|
|
|
|
|
|
|
//查询物料发运组明细数据
|
|
|
|
//查询物料发运组明细数据
|
|
|
|
DdlPackBean shipGroupPackBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
|
|
|
DdlPackBean shipGroupPackBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
|
|
|
DdlPreparedPack.getStringEqualPack(bean.getShippingGroupNo(), "shippingGroupNo", shipGroupPackBean);
|
|
|
|
DdlPreparedPack.getStringEqualPack(bean.getShippingGroupNo(), "shippingGroupNo", shipGroupPackBean);
|
|
|
@ -57,7 +100,7 @@ public class MesShippingOrderManagementService extends BaseMesService<MesShippin
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
.setErrorDetail("【%s】发运组明细数据为空,请检查数据", bean.getShippingGroupNo())
|
|
|
|
.setErrorDetail("【%s】零件发运组明细数据为空,请检查数据", bean.getShippingGroupNo())
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|