diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pda_manage/iostorage/server/dto/PdaFormInMst.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pda_manage/iostorage/server/dto/PdaFormInMst.java index 64047efc..8cfddf62 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pda_manage/iostorage/server/dto/PdaFormInMst.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pda_manage/iostorage/server/dto/PdaFormInMst.java @@ -1,6 +1,5 @@ package org.nl.wms.pda_manage.iostorage.server.dto; -import com.baomidou.mybatisplus.annotation.TableField; import lombok.Data; import java.io.Serializable; @@ -18,6 +17,17 @@ public class PdaFormInMst implements Serializable { private static final long serialVersionUID = 1L; + + /** + * 实体明细key(固定值:生产入库:FEntity,采购入库:FInStockEntry) + */ + private String entity; + + /** + * 是否更新(生产入库必须参数,固定值:false) + */ + private String isNew; + /** * 载具编码 */ @@ -30,20 +40,13 @@ public class PdaFormInMst implements Serializable { * 条码 */ private String bar_code; - /** - * 关联生产订单号/收料清单号 - */ - private String moNumber; + /** - * 关联生产订单号/收料清单号明细序号 - */ - private String moEntrySeq; - - /** - * 物料id + * 对应明细:生产入库单,采购入库单-物料FMaterialID */ private String material_id; + /** * 物料code */ @@ -58,47 +61,78 @@ public class PdaFormInMst implements Serializable { * 物料规格 */ private String material_spec; + /** - * 单位id + * 对应明细:生产入库单,采购入库单-单位FUnitID */ private String unit_id; + /** - * 基本单位/采购单位Id + * 基本单位 */ - private String remainInStockUnitId; + private String baseUnitId; + + + /** + * 对应明细:采购入库单-采购员FPurchaserId + */ + private String purchaserId; /** * 单位名称 */ private String unit_name; + + /** - * 入库数量/采购数量 + * 对应明细:生产入库单-入库数量FRealQty/采购入库单-采购数量FRealQty */ private Integer qty; /** - * 入库组织/收料组织FStockOrgId + * 对应明细:生产入库单-应收数量FMustQty + */ + private Integer mustQty; + + + /** + * 对应明细:生产入库单-入库类型FInStockType,默认: 1 + */ + private String inStockType; + + + + /** + * 对应明细:生产入库单-生产车间FWorkShopId1 + */ + private String workShopId1; + + + + /** + * 对应表头:生产入库单-入库组织FStockOrgId/采购入库单-收料组织FStockOrgId */ private String stockOrgId; + /** - * 生产组织/采购组织FPurchase0rgId + * 对应表头:生产入库单-生产组织prdOrgId/采购入库单-采购组织FPurchaseOrgId */ private String prdOrgId; /** - * ERP仓库 + * 对应明细:生产入库单-ERP仓库FStockId */ private String stockId; /** - * ERP仓库库存状态Id + * 对应明细:生产入库单-库存状态FStockStatusId,默认: 10000 */ private String stockStatusId; @@ -107,68 +141,113 @@ public class PdaFormInMst implements Serializable { * 入库仓库 */ private String stor_code; + /** * 单重 */ private String single_weight; + /** * 批次 */ private String pcsn; + /** - * 单据类型 + * 对应明细:生产入库单,采购入库单-单据批次FLot */ - private String billTypeId; + private String lot; + + /** - * 单据类型 + * 对应表头:生产入库单-单据类型FBillType:默认(SCRKD01_SYS)/采购入库单-单据类型FBillTypeID:默认(RKD01_SYS) */ private String billType; + + /** - * 供应商Id + * 供应商Id,对应采购入库表头:FSupplierId */ private String supplierId; /** - * 货主 + * 对应明细:生产入库单-货主FOwnerId */ private String ownerId_Id; - /** - * 货主表头 + * 对应表头:生产入库单-货主FOwnerId0 */ private String ownerIdHead_Id; + /** + * 对应表头:采购入库单-业务类型FBusinessType:默认(CG) + */ + private String businessType; + + /** * 货主类型表头 */ private String ownerTypeIdHead; /** - * 货主类型id + * 对应明细:生产入库单-货主类型FOwnerTypeId,默认(BD_OwnerOrg) */ private String ownerTypeId; /** - * 保管者类型Id + * 对应明细:生产入库单-保管者类型FKeeperTypeId,默认(BD_KeeperOrg) */ private String keeperTypeId; + + /** - * 保管者Id + * 对应明细:生产入库单-保管者FKeeperId */ private String keeperId; - /** - * 业务类型 - */ - private String businessType; + /** * 入库时间 */ private String date; + /** + * 对应明细:生产入库单-含税价FTaxPrice + */ + private String taxPrice; + + + + /** + * 对应明细:生产入库单-关联订单号Id-FMoId + */ + private String moId; + + + /** + * 对应明细:生产入库单-关联订单号FMoBillNo/采购入库单-关联订单号FPoOrderNo + */ + private String moNumber; + + /** + * 对应明细:生产入库单-关联订单号明细Id-FMoEntryId/采购入库单-关联订单号明细FPoOrderEntryId + */ + private String moEntryId; + + + + /** + * 对应明细:生产入库单-关联源头订单号明细Id-FSrcEntryId/采购入库单-关联源头订单号编号FSrcBillNo + */ + private String srcBillNo; + + + + + } diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java index bf1d9802..02bf878e 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/pm_manage/form_data/service/impl/PmFormDataServiceImpl.java @@ -1,12 +1,14 @@ package org.nl.wms.pm_manage.form_data.service.impl; import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.nl.common.TableDataInfo; import org.nl.common.domain.constant.DictConstantPool; @@ -49,6 +51,7 @@ import java.util.stream.Collectors; * @since 2024-03-25 */ @Service +@Slf4j public class PmFormDataServiceImpl extends ServiceImpl implements IPmFormDataService { diff --git a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/quartz/task/SyncErpBillsScheduleService.java b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/quartz/task/SyncErpBillsScheduleService.java index 0477311c..4d53cfb5 100644 --- a/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/quartz/task/SyncErpBillsScheduleService.java +++ b/wms_pro/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/quartz/task/SyncErpBillsScheduleService.java @@ -54,7 +54,7 @@ public class SyncErpBillsScheduleService { MDC.put("requestIp", "127.0.0.1"); MDC.put("requestTime", DateUtil.now()); LuceneAppender.traceIdTL.set(BaseCode.intToChars(IdUtil.getLongId())); - List list = syncFormMappingServiceImpl.list(new LambdaQueryWrapper().eq(SyncFormMapping::getForm_type, "PRD_MO")); + List list = syncFormMappingServiceImpl.list(new LambdaQueryWrapper().eq(SyncFormMapping::getForm_type, "PUR_ReceiveBill")); list.forEach(this::syncData); } finally { LuceneAppender.traceIdTL.remove(); @@ -74,7 +74,7 @@ public class SyncErpBillsScheduleService { BeanUtils.copyProperties(erpSec, identifyInfo); K3CloudApi cloudApi = new K3CloudApi(identifyInfo); String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); - String filterString = "FCreateDate >= '" + "2024-11-29" + " 00:00:00' and FCreateDate <= '" + today + " 23:59:59'"; + String filterString = "FCreateDate >= '" + "2024-11-27" + " 00:00:00' and FCreateDate <= '" + today + " 23:59:59'"; ErpQuery query = new ErpQuery(); query.setFilterString(filterString); query.setFormId(syncFormMapping.getForm_type()); @@ -112,10 +112,8 @@ public class SyncErpBillsScheduleService { log.error("ERP单据同步同步失败:{}", error); } List pmFormDataAll = new ArrayList<>(); - for (Object r : result) { - List pmFormData1 = formDataService.syncAnalyse(syncFormMapping, JSON.toJSONString(r)); - log.info(JSON.toJSONString(pmFormData1)); + log.info(JSON.toJSONString(r)); pmFormDataAll.addAll(formDataService.syncAnalyse(syncFormMapping, JSON.toJSONString(r))); } //今天已同步单据