44653 电子化检验输入数量支持小数点输入

tags/yfai-pcn-ext-v2.8
王杰 5 months ago
parent 3f0a8b2d62
commit 03029876b6

@ -5,6 +5,7 @@ import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesInputDefectRecordService;
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant; import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionInputModel; import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionInputModel;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionViewModel; import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionViewModel;
import cn.estsh.i3plus.platform.common.tool.MathOperation;
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn; import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
import cn.estsh.impp.framework.boot.auth.AuthUtil; import cn.estsh.impp.framework.boot.auth.AuthUtil;
import cn.estsh.impp.framework.boot.exception.ImppBusiException; import cn.estsh.impp.framework.boot.exception.ImppBusiException;
@ -73,7 +74,7 @@ public class MesInputDefectRecordController {
try { try {
if (StringUtils.isEmpty(model.getSn()) && if (StringUtils.isEmpty(model.getSn()) &&
(StringUtils.isEmpty(model.getPartNo()) || StringUtils.isEmpty(model.getLotNo()) || StringUtils.isEmpty(model.getQty()) || model.getQty() == 0)) { (StringUtils.isEmpty(model.getPartNo()) || StringUtils.isEmpty(model.getLotNo()) || StringUtils.isEmpty(model.getQty()) || MathOperation.compareTo(model.getQty(), new Double(0)) == 0)) {
throw new ImppBusiException("条码为空或零件号+批次+数量为空"); throw new ImppBusiException("条码为空或零件号+批次+数量为空");
} }

@ -1038,7 +1038,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
mesQmsScrap.setOrganizeCode(organizeCode); mesQmsScrap.setOrganizeCode(organizeCode);
mesQmsScrap.setAsnNo(""); mesQmsScrap.setAsnNo("");
mesQmsScrap.setSource("MES"); mesQmsScrap.setSource("MES");
mesQmsScrap.setRejectQty(assemblyModel.getScrapQty().intValue()); mesQmsScrap.setRejectQty(assemblyModel.getScrapQty());
mesQmsScrap.setPartNo(assemblyModel.getAssemblyPartNo()); mesQmsScrap.setPartNo(assemblyModel.getAssemblyPartNo());
mesQmsScrap.setPartName(assemblyModel.getAssemblyPartName()); mesQmsScrap.setPartName(assemblyModel.getAssemblyPartName());
mesQmsScrap.setDefectTypeName("拆解报废"); mesQmsScrap.setDefectTypeName("拆解报废");
@ -1094,7 +1094,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
move.setLgort(srcLocate); move.setLgort(srcLocate);
move.setUmlgo(destLocate); move.setUmlgo(destLocate);
move.setPartInspectionId(partInspectionId); move.setPartInspectionId(partInspectionId);
move.setMenge(Double.valueOf(requestModel.getReworkedQty()+"")); move.setMenge(requestModel.getReworkedQty());
move.setMeins(mesPartSap.getUnit()); move.setMeins(mesPartSap.getUnit());
move.setPostDate(TimeTool.getToday()); move.setPostDate(TimeTool.getToday());
move.setPostTime(TimeTool.getTimeShortWithColon()); move.setPostTime(TimeTool.getTimeShortWithColon());

@ -675,7 +675,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
DdlPreparedPack.getNumEqualPack(inputModel.getId(), "id", packBean); DdlPreparedPack.getNumEqualPack(inputModel.getId(), "id", packBean);
DdlPreparedPack.getStringEqualPack(inputModel.getPartNo(), "partNo", packBean); DdlPreparedPack.getStringEqualPack(inputModel.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(inputModel.getLotNo(), "lotNo", packBean); DdlPreparedPack.getStringEqualPack(inputModel.getLotNo(), "lotNo", packBean);
DdlPreparedPack.getNumEqualPack(inputModel.getQty().intValue(), "qty", packBean); DdlPreparedPack.getNumEqualPack(inputModel.getQty(), "qty", packBean);
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.LOT.getValue(), "sourceType", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.LOT.getValue(), "sourceType", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean); DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean); MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean);
@ -844,7 +844,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
partInspection.setSn(model.getSn()); partInspection.setSn(model.getSn());
partInspection.setCustSn(StringUtil.isEmpty(model.getCustSn())?"":model.getCustSn()); partInspection.setCustSn(StringUtil.isEmpty(model.getCustSn())?"":model.getCustSn());
partInspection.setLotNo(model.getLotNo()); partInspection.setLotNo(model.getLotNo());
partInspection.setQty(model.getQty().intValue()); partInspection.setQty(model.getQty());
partInspection.setWorkCenterCode(model.getWorkCenterCode()); partInspection.setWorkCenterCode(model.getWorkCenterCode());
partInspection.setShiftCode(model.getShiftCode()); partInspection.setShiftCode(model.getShiftCode());
partInspection.setSourceType(model.getSourceType()); partInspection.setSourceType(model.getSourceType());

@ -663,7 +663,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
move.setFactoryCode(org); move.setFactoryCode(org);
move.setLgort(source); move.setLgort(source);
move.setUmlgo(target); move.setUmlgo(target);
move.setMenge(Double.parseDouble(model.getPartInspection().getQty().toString())); move.setMenge(model.getPartInspection().getQty());
move.setMeins(model.getPart().getUnit()); move.setMeins(model.getPart().getUnit());
move.setZrsum(zrsum); move.setZrsum(zrsum);
move.setPostDate(TimeTool.getToday()); move.setPostDate(TimeTool.getToday());

@ -145,11 +145,11 @@ public class MesProductResultErrorHandleStepService extends BaseStepService {
} else { } else {
partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue()); partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue());
} }
partInspection.setRejectQty(mesProduceSn.getQty().intValue()); partInspection.setRejectQty(mesProduceSn.getQty());
partInspection.setShiftCode(mesProduceSn.getShiftCode()); partInspection.setShiftCode(mesProduceSn.getShiftCode());
partInspection.setSn(mesProduceSn.getProductSn()); partInspection.setSn(mesProduceSn.getProductSn());
partInspection.setOrganizeCode(reqBean.getOrganizeCode()); partInspection.setOrganizeCode(reqBean.getOrganizeCode());
partInspection.setQty(mesProduceSn.getQty().intValue()); partInspection.setQty(mesProduceSn.getQty());
partInspection.setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue()); partInspection.setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue());
partInspection.setId(id); partInspection.setId(id);
ConvertBean.serviceModelInitialize(partInspection, reqBean.getUserInfo()); ConvertBean.serviceModelInitialize(partInspection, reqBean.getUserInfo());

@ -46,10 +46,10 @@ public class MesReworkTaskRequestModel {
private Integer isOrigSn; private Integer isOrigSn;
@ApiModelProperty("返工数量") @ApiModelProperty("返工数量")
private Integer reworkedQty; private Double reworkedQty;
@ApiModelProperty("报废数量") @ApiModelProperty("报废数量")
private Integer scrapQty; private Double scrapQty;
/**20 返工 30 报废 */ /**20 返工 30 报废 */
@ApiModelProperty("类型") @ApiModelProperty("类型")

Loading…
Cancel
Save