Merge remote-tracking branch 'origin/dev' into dev

dev
xiangwei.zhang 2 months ago
commit c5e1bf8cbc

@ -0,0 +1,7 @@
package cn.estsh.i3plus.ext.mes.api.base;
import cn.estsh.i3plus.pojo.mes.bean.MesQueueOrderPushCellCfg;
public interface IMesQueueOrderPushCellCfgService extends IBaseMesService<MesQueueOrderPushCellCfg> {
}

@ -0,0 +1,13 @@
package cn.estsh.i3plus.ext.mes.apiservice.controller.base;
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.mes.bean.MesQueueOrderPushCellCfg;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api("生产队列推送工位配置信息")
@RestController
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesQueueOrderPushCellCfg")
public class MesQueueOrderPushCellCfgController extends BaseMesController<MesQueueOrderPushCellCfg>{
}

@ -0,0 +1,88 @@
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.api.base.IMesQueueOrderPushCellCfgService;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesQueueOrderPushCellCfg;
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
import cn.estsh.impp.framework.boot.util.ValidatorBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Slf4j
public class MesQueueOrderPushCellCfgService extends BaseMesService<MesQueueOrderPushCellCfg> implements IMesQueueOrderPushCellCfgService {
@Override
protected void setPackQueryBean(MesQueueOrderPushCellCfg bean, DdlPackBean packBean) {
DdlPreparedPack.getStringLikerPack(bean.getPushSourceCode(), MesExtConstWords.PUSH_SOURCE_CODE, packBean);
DdlPreparedPack.getNumEqualPack(bean.getPushType(), MesExtConstWords.PUSH_TYPE, packBean);
DdlPreparedPack.getStringEqualPack(bean.getAreaCode(), MesExtConstWords.AREA_CODE, packBean);
DdlPreparedPack.getStringLikerPack(bean.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
DdlPreparedPack.getStringLikerPack(bean.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, packBean);
}
@Override
protected void onInsertBean(MesQueueOrderPushCellCfg item) {
ValidatorBean.checkNotNull(item.getAreaCode(), "区域代码不能为空");
ValidatorBean.checkNotNull(item.getWorkCenterCode(), "生产线代码不能为空");
ValidatorBean.checkNotNull(item.getWorkCellCode(), "工位代码不能为空");
ValidatorBean.checkNotNull(item.getPushSourceCode(), "推送来源代码不能为空");
ValidatorBean.checkNotNull(item.getPushType(), "推送工位类型不能为空");
DdlPackBean packBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(item.getPushSourceCode(), MesExtConstWords.PUSH_SOURCE_CODE, packBean);
DdlPreparedPack.getStringEqualPack(item.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, packBean);
DdlPreparedPack.getNumEqualPack(item.getPushType(), MesExtConstWords.PUSH_TYPE, packBean);
Boolean flg = baseRDao.isExitByHql(packBean);
if (flg) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
.setErrorDetail("推送来源代码[%s]生产线代码[%s]工位代码[%s]类型[%s]信息已经存在,请检查数据",
item.getPushSourceCode(), item.getWorkCenterCode(), item.getWorkCellCode(), MesExtEnumUtil.QUEUE_ORDER_CELL_PUSH_TYPE.valueOfDescription(item.getPushType()))
.build();
}
}
@Override
protected void onUpdateBean(MesQueueOrderPushCellCfg item) {
ValidatorBean.checkNotNull(item.getAreaCode(), "区域代码不能为空");
ValidatorBean.checkNotNull(item.getWorkCenterCode(), "生产线代码不能为空");
ValidatorBean.checkNotNull(item.getWorkCellCode(), "工位代码不能为空");
ValidatorBean.checkNotNull(item.getPushSourceCode(), "推送来源代码不能为空");
ValidatorBean.checkNotNull(item.getPushType(), "推送工位类型不能为空");
DdlPackBean packBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(item.getPushSourceCode(), MesExtConstWords.PUSH_SOURCE_CODE, packBean);
DdlPreparedPack.getStringEqualPack(item.getWorkCenterCode(), MesExtConstWords.WORK_CENTER_CODE, packBean);
DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), MesExtConstWords.WORK_CELL_CODE, packBean);
DdlPreparedPack.getNumEqualPack(item.getPushType(), MesExtConstWords.PUSH_TYPE, packBean);
DdlPreparedPack.getNumNOEqualPack(item.getId(), MesExtConstWords.ID, packBean);
Boolean flg = baseRDao.isExitByHql(packBean);
if (flg) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
.setErrorDetail("推送来源代码[%s]生产线代码[%s]工位代码[%s]类型[%s]信息已经存在,请检查数据",
item.getPushSourceCode(), item.getWorkCenterCode(), item.getWorkCellCode(), MesExtEnumUtil.QUEUE_ORDER_CELL_PUSH_TYPE.valueOfDescription(item.getPushType()))
.build();
}
}
@Override
public List<MesQueueOrderPushCellCfg> validateReturnImport(List<MesQueueOrderPushCellCfg> beanList) {
for (MesQueueOrderPushCellCfg item : beanList) {
onInsertBean(item);
}
return beanList;
}
}

@ -210,7 +210,18 @@ public class MesShippingOrderManagementDetailService extends BaseMesService<MesS
List<MesJisShipping> mesJisShippings = new ArrayList<>();
for (MesShippingOrderManagementDetail mesShippingOrderManagementDetail : detailList) {
if (StringUtils.isEmpty(mesShippingOrderManagementDetail.getPartNo())) {
MesException.throwMesBusiException("零件号不能为空!");
}
MesShippingOrderManagement mesShippingOrderManagement = orderMap.get(mesShippingOrderManagementDetail.getPid());
MesPartShippingGroup mesPartShippingGroup = mesPartShippingGroupService.getMesPartShippingGroup(organizeCode, mesShippingOrderManagement.getShippingGroupCode());
if (mesPartShippingGroup != null) {
if (Objects.equals(mesPartShippingGroup.getConfirmPartType(), String.valueOf(MesExtEnumUtil.SHIPPING_GROUP_CONFIRM_PART_TYPE.SHIPPING_GROUP_CONFIRM_PART_TYPE_30.getValue()))) {
if (StringUtils.isEmpty(mesShippingOrderManagementDetail.getBarcode())) {
MesException.throwMesBusiException("条码不能为空!");
}
}
}
final String detailBarCode = mesShippingOrderManagementDetail.getBarcode();
if (!StringUtils.isEmpty(detailBarCode)) {
@ -227,7 +238,6 @@ public class MesShippingOrderManagementDetailService extends BaseMesService<MesS
log.info("计划数量和实际数量不相等");
return ResultBean.fail(String.format("计划数量和实际数量不相等"));
}
MesPartShippingGroup mesPartShippingGroup = mesPartShippingGroupService.getMesPartShippingGroup(organizeCode, mesShippingOrderManagement.getShippingGroupCode());
mesJisShippings.add(getMesJisShippings(mesShippingOrderManagement, mesShippingOrderManagementDetail, userName, mesPartShippingGroup));
}

@ -8,6 +8,8 @@ import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
@Data
public class MesShippingOrderManagementDetailModel {
@ -134,6 +136,12 @@ public class MesShippingOrderManagementDetailModel {
@AnnoOutputColumn(refClass = MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.class, refForeignKey = "value", value = "description")
private Integer detailsStatus;
/**
* vin
*/
@ApiParam("vin号")
private String vin;
public MesShippingOrderManagementDetailModel(){
}
@ -169,6 +177,7 @@ public class MesShippingOrderManagementDetailModel {
this.shippingGroupName = m.getShippingGroupName();
this.carSerialCode = d.getCarSerialCode();
this.id = d.getId();
this.vin = d.getVin();
}
}

@ -246,6 +246,10 @@ public class MesExtConstWords {
public static final String PART_TYPE = "partType";
//零件类型名称
public static final String PART_TYPE_NAME = "partTypeName";
//推送来源代码
public static final String PUSH_SOURCE_CODE = "pushSourceCode";
//推送工位类型
public static final String PUSH_TYPE = "pushType";
//时间[开始/结束]条件
public static final String START_TIME_START = "startTimeStart";

Loading…
Cancel
Save