|
|
|
@ -8,6 +8,7 @@ import cn.estsh.i3plus.ext.mes.api.busi.IMesSpotCheckOrderService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.apiservice.config.AuthUtilExt;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base.BaseMesService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
|
|
|
|
|
import cn.estsh.i3plus.icloud.core.sdk.ICoreUtilCloud;
|
|
|
|
|
import cn.estsh.i3plus.mes.api.iservice.base.IStateMachineRouteDesignService;
|
|
|
|
|
import cn.estsh.i3plus.mes.api.iservice.busi.ISyncFuncService;
|
|
|
|
@ -15,8 +16,6 @@ import cn.estsh.i3plus.mes.apiservice.util.DateUtil;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.WmsConstWords;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
|
|
|
@ -126,18 +125,10 @@ public class MesSpotCheckOrderService extends BaseMesService<MesSpotCheckOrder>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//生成单据号
|
|
|
|
|
// GenSerialNoModel genSerialNoModel = new GenSerialNoModel(MesCommonConstant.SPOT_CHECK_ORDER_NO_RULE);
|
|
|
|
|
// List<String> resultList = syncFuncService.syncSerialNo(genSerialNoModel, bean.getCreateUser(), bean.getOrganizeCode(), 1).getResultList();
|
|
|
|
|
|
|
|
|
|
String orderNo="";
|
|
|
|
|
BaseResultBean<LinkedHashMap> orderResutlBean = sysOrderNoRuleCloud.getOrderNo(MesCommonConstant.SPOT_CHECK_ORDER_NO_RULE);
|
|
|
|
|
if (orderResutlBean != null && orderResutlBean.isSuccess()) {
|
|
|
|
|
orderNo = orderResutlBean.getResultObject().get(WmsConstWords.CORE_ORDER_NO).toString();
|
|
|
|
|
} else {
|
|
|
|
|
orderNo = TimeTool.getDateTime().replaceAll("-", "") + String.valueOf((int) (Math.random() * 9000) + 1000);
|
|
|
|
|
}
|
|
|
|
|
GenSerialNoModel genSerialNoModel = new GenSerialNoModel(MesCommonConstant.SPOT_CHECK_ORDER_NO_RULE);
|
|
|
|
|
String orderNo = (String) syncFuncService.syncSerialNo(genSerialNoModel, AuthUtil.getSessionUser().getUserName(), AuthUtil.getOrganizeCode(), MesExtConstWords.ONE).getResultList().iterator().next();
|
|
|
|
|
//保存单据
|
|
|
|
|
BeanUtils.copyProperties(equipmentSpotCheck, bean, "id");
|
|
|
|
|
BeanUtils.copyProperties(equipmentSpotCheck, bean, MesExtConstWords.ID);
|
|
|
|
|
|
|
|
|
|
bean.setSpotCheckOrderNo(orderNo);
|
|
|
|
|
bean.setSystemSyncStatus(CommonEnumUtil.FALSE);
|
|
|
|
|