diff --git a/common/src/main/java/com/foreverwin/mesnac/common/aspect/ExportAspect.java b/common/src/main/java/com/foreverwin/mesnac/common/aspect/ExportAspect.java index 25435dc0..f9d5067f 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/aspect/ExportAspect.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/aspect/ExportAspect.java @@ -87,7 +87,7 @@ public class ExportAspect { }//for //------------------------------------------------------------------------------------------------------------------- Object result = joinPoint.proceed(args); - JSONObject resultJson = JSON.parseObject(JSON.toJSONStringWithDateFormat(result, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat)); + JSONObject resultJson = JSON.parseObject(JSON.toJSONString(result)); if (resultJson.get("data") instanceof List) { List dataList = (List)resultJson.get("data"); exportData(exportCode, dataList, request, attributes.getResponse()); diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java index b57c5b3c..95ffed54 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java @@ -494,18 +494,20 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl stepOperationList = routerStepService.findRouterOperationByRouterBo(site, router.getHandle()); + StringBuilder operationDesc = new StringBuilder(); for (int i = 0; i < stepOperationList.size(); i++) { RouterStepDto stepOperation = stepOperationList.get(i); - if (stepOperation.getStepId().equals(prodReadyTask.getStepId())) { - seq = i; + operationDesc.append(stepOperation.getOperationDesc()) ; + if (i!=stepOperationList.size()-1){ + operationDesc.append(","); } } - if (seq != stepOperationList.size() - 1) { - RouterStepDto stepOperation = stepOperationList.get(seq + 1); - labelPrintDto.setOperation(stepOperation.getOperationDesc()); - } + labelPrintDto.setOperation(operationDesc.toString()); + labelPrintDtoList.add(labelPrintDto); printData = JSON.toJSONString(labelPrintDtoList); //打印记录 diff --git a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/client/ItemWSClient.java b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/client/ItemWSClient.java index 1aed110e..fbac4db0 100644 --- a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/client/ItemWSClient.java +++ b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/client/ItemWSClient.java @@ -69,7 +69,7 @@ public class ItemWSClient { //物料类型(FERT(已完成)/ROH(原始)/HALB(半成品)/KMAT(可配置)/INST(安装)/VERP(包装)/FHMI(生产资源/工具)/CSTM(自定义)) String itemTypeDesc = jsonObject.getString("materialType"); if (!"已完成".equals(itemTypeDesc) && !"原始".equals(itemTypeDesc) && !"半成品".equals(itemTypeDesc)) { - throw BusinessException.build("物料类型可维护的值为:FERT(已完成)、ROH(原始)、HALB(半成品)"); + throw BusinessException.build("物料类型可维护的值为:已完成、原始、半成品"); } String itemType = "ROH"; switch (itemTypeDesc) { @@ -88,19 +88,19 @@ public class ItemWSClient { //采购类型(M(制造)/P(采购)/B(制造/采购)) String procurementTypeDesc = jsonObject.getString("itemType"); - if (!"M".equals(procurementTypeDesc) && !"P".equals(procurementTypeDesc) && !"B".equals(procurementTypeDesc)) { - throw BusinessException.build("采购类型可维护的值为:M(制造)、P(采购)、B(制造/采购)"); + if (!"制造".equals(procurementTypeDesc) && !"采购".equals(procurementTypeDesc) && !"制造/采购".equals(procurementTypeDesc)) { + throw BusinessException.build("采购类型可维护的值为:制造、采购、制造/采购"); } String procurementType = "P"; switch (procurementTypeDesc) { case "采购": - itemType = "P"; + procurementType = "P"; break; case "制造/采购": - itemType = "B"; + procurementType = "B"; break; case "制造": - itemType = "M"; + procurementType = "M"; break; default: break; @@ -146,7 +146,7 @@ public class ItemWSClient { case "任意数字": itemConfiguration.setQuantityRestriction(QuantityRestriction.ANY_NUMBER); break; - case "正数": + case "整数": itemConfiguration.setQuantityRestriction(QuantityRestriction.WHOLE_NUMBER); break; default: diff --git a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/ItemHandler.java b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/ItemHandler.java index 538e0b92..d70c81ae 100644 --- a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/ItemHandler.java +++ b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/handler/ItemHandler.java @@ -62,10 +62,9 @@ public class ItemHandler extends BaseHandler { jsonObject.put("site", site); ItemFullConfiguration itemFull = ItemWSClient.find(jsonObject); if (itemFull == null) { - resultMessage = "物料主数据不存在"; + resultMessage = ItemWSClient.insert(jsonObject); } else { - ItemWSClient.update(jsonObject, itemFull); - return 1; + resultMessage = ItemWSClient.update(jsonObject, itemFull); } if (resultMessage != null) { @@ -74,6 +73,8 @@ public class ItemHandler extends BaseHandler { buffer.append("第" + index + "行:" + I18nUtil.getI18nText("MaterData.import.update.fail", params) + "\n"); return 0; } + + return 1; } return 0; diff --git a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/service/MasterObjectDefine.java b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/service/MasterObjectDefine.java index 127acdd3..e2dbc203 100644 --- a/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/service/MasterObjectDefine.java +++ b/dataimport/src/main/java/com/foreverwin/mesnac/dataimport/service/MasterObjectDefine.java @@ -20,12 +20,12 @@ public class MasterObjectDefine { cvsHeadsMapping = new HashMap<>(); cvsHeadsMapping.put("seqNum","序号"); - cvsHeadsMapping.put("item", "*物料编码"); + cvsHeadsMapping.put("item", "物料编码"); cvsHeadsMapping.put("itemDesc", "物料描述(中文)"); - cvsHeadsMapping.put("materialType", "物料类型"); - cvsHeadsMapping.put("itemType", "采购类型"); + cvsHeadsMapping.put("materialType", "物料类型(原始|半成品|已完成)"); + cvsHeadsMapping.put("itemType", "采购类型(采购|制造/采购|制造)"); cvsHeadsMapping.put("lotSize","批次大小"); - cvsHeadsMapping.put("qtyRestriction","数量限制"); + cvsHeadsMapping.put("qtyRestriction","数量限制(仅1.0|任意数字|整数)"); cvsHeadsMapping.put("unit","计量单位"); break; diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java index e4eac07b..b07adae2 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java @@ -356,7 +356,7 @@ public class PodTemplateServiceImpl implements PodTemplateService { SfcDispatchDto sfcdispatch = new SfcDispatchDto(); sfcdispatch.setHandle(HandleEnum.SFC_DISPATCH.getHandle(site, dispatchNo)); sfcdispatch = sfcDispatchCommonService.findSfcDispatchBySfc(sfcdispatch); - sendErp(sfc, stepId, qty, BigDecimal.ZERO, sfcdispatch.getProdHours()); + sendErp(sfc, stepId, qty, BigDecimal.ZERO, qty.multiply(sfcdispatch.getProdHours())); } } catch (Exception e) { ExceptionUtil.throwException(e);