|
|
|
@ -148,6 +148,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
for (WarehouseUserEntity warehouseUserEntity : syncDataResponse.getWarehouseUserEntities()) {
|
|
|
|
|
warehouseUserDao.insertOrUpdate(warehouseUserEntity);
|
|
|
|
|
}
|
|
|
|
|
remark.append("仓库用户信息:").append(syncDataResponse.getWarehouseUserEntities().size()).append("条\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//仓库单据类型表
|
|
|
|
@ -155,6 +156,8 @@ public class SpsSyncUploadController {
|
|
|
|
|
for (WarehouseBussinessTypeEntity warehouseUserEntity : syncDataResponse.getWarehouseBussinessTypeEntities()) {
|
|
|
|
|
warehouseBussinessTypeDao.insertOrUpdate(warehouseUserEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
remark.append("仓库所属单据类型:").append(syncDataResponse.getWarehouseBussinessTypeEntities().size()).append("条\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -169,6 +172,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
mapper.insertUdiRelevance(basicUnitMaintainEntity);
|
|
|
|
|
}
|
|
|
|
|
batchSession.commit();
|
|
|
|
|
remark.append("耗材字典:").append(syncDataResponse.getUdiRelevanceEntities().size()).append("条\n");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -197,7 +201,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
mapper.importBasicUnitMaintain(basicUnitMaintainEntity);
|
|
|
|
|
}
|
|
|
|
|
batchSession.commit();
|
|
|
|
|
remark.append("往来单位:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
remark.append("往来单位:").append(syncDataResponse.getBasicUnitMaintainEntities().size()).append("条\n");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -212,6 +216,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
mapper.importCompanyProductRelevance(companyProductRelevanceEntity);
|
|
|
|
|
}
|
|
|
|
|
batchSession.commit();
|
|
|
|
|
remark.append("供应商关联产品信息:").append(syncDataResponse.getCompanyProductRelevanceEntities().size()).append("条\n");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -227,26 +232,26 @@ public class SpsSyncUploadController {
|
|
|
|
|
mapper.insertThrInvWarehouse(thrInvWarehouseEntity);
|
|
|
|
|
}
|
|
|
|
|
batchSession.commit();
|
|
|
|
|
remark.append("第三方仓库:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
remark.append("第三方仓库:").append(syncDataResponse.getThrInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//仓库用户表
|
|
|
|
|
if (CollUtil.isNotEmpty(syncDataResponse.getWarehouseUserEntities())) {
|
|
|
|
|
for (WarehouseUserEntity warehouseUserEntity : syncDataResponse.getWarehouseUserEntities()) {
|
|
|
|
|
warehouseUserDao.insertOrUpdate(warehouseUserEntity);
|
|
|
|
|
}
|
|
|
|
|
remark.append("仓库用户:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//仓库单据类型表
|
|
|
|
|
if (CollUtil.isNotEmpty(syncDataResponse.getWarehouseBussinessTypeEntities())) {
|
|
|
|
|
for (WarehouseBussinessTypeEntity warehouseUserEntity : syncDataResponse.getWarehouseBussinessTypeEntities()) {
|
|
|
|
|
warehouseBussinessTypeDao.insertOrUpdate(warehouseUserEntity);
|
|
|
|
|
}
|
|
|
|
|
remark.append("仓库单据:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// //仓库用户表
|
|
|
|
|
// if (CollUtil.isNotEmpty(syncDataResponse.getWarehouseUserEntities())) {
|
|
|
|
|
// for (WarehouseUserEntity warehouseUserEntity : syncDataResponse.getWarehouseUserEntities()) {
|
|
|
|
|
// warehouseUserDao.insertOrUpdate(warehouseUserEntity);
|
|
|
|
|
// }
|
|
|
|
|
// remark.append("仓库用户:").append(syncDataResponse.getWarehouseUserEntities().size()).append("条\n");
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// //仓库单据类型表
|
|
|
|
|
// if (CollUtil.isNotEmpty(syncDataResponse.getWarehouseBussinessTypeEntities())) {
|
|
|
|
|
// for (WarehouseBussinessTypeEntity warehouseUserEntity : syncDataResponse.getWarehouseBussinessTypeEntities()) {
|
|
|
|
|
// warehouseBussinessTypeDao.insertOrUpdate(warehouseUserEntity);
|
|
|
|
|
// }
|
|
|
|
|
// remark.append("仓库单据:").append(syncDataResponse.getWarehouseBussinessTypeEntities().size()).append("条\n");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//第三方产品信息导入
|
|
|
|
@ -260,7 +265,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
mapper.insertThrProducts(thrProductsEntity);
|
|
|
|
|
}
|
|
|
|
|
batchSession.commit();
|
|
|
|
|
remark.append("第三方产品信息:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
remark.append("第三方产品信息:").append(syncDataResponse.getThrProductsEntities().size()).append("条\n");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -276,7 +281,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
mapper.importThrCorp(thrCorpEntity);
|
|
|
|
|
});
|
|
|
|
|
batchSession.commit();
|
|
|
|
|
remark.append("第三方往来单位:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
remark.append("第三方往来单位:").append(syncDataResponse.getThrCorpEntities().size()).append("条\n");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -291,7 +296,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
mapper.importThrOrder(thrOrderEntity);
|
|
|
|
|
});
|
|
|
|
|
batchSession.commit();
|
|
|
|
|
remark.append("第三方业务单据:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
remark.append("第三方业务单据:").append(syncDataResponse.getThrOrderEntities().size()).append("条\n");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -306,7 +311,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
mapper.importThrOrderDetail(thrOrderDetailEntity);
|
|
|
|
|
});
|
|
|
|
|
batchSession.commit();
|
|
|
|
|
remark.append("第三方业务单据详情:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
remark.append("第三方业务单据详情:").append(syncDataResponse.getThrOrderDetailEntities().size()).append("条\n");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -318,7 +323,7 @@ public class SpsSyncUploadController {
|
|
|
|
|
authAdmin.setLastModifyTime(null);
|
|
|
|
|
authAdmin.setCustomerId(110);
|
|
|
|
|
authAdminService.replaceAuthAdmin(authAdmin);
|
|
|
|
|
remark.append("用户信息:").append(syncDataResponse.getInvWarehouseEntities().size()).append("条\n");
|
|
|
|
|
remark.append("用户信息:").append(syncDataResponse.getAuthAdminList().size()).append("条\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -443,11 +448,11 @@ public class SpsSyncUploadController {
|
|
|
|
|
orderEntity.setReceiveStatus(0);
|
|
|
|
|
orderEntity.setErpFk(null);
|
|
|
|
|
|
|
|
|
|
String value = systemParamConfigService.selectValueByParamKey("syns_out_change");
|
|
|
|
|
if (value.equals("1")) {
|
|
|
|
|
orderEntity.setOutChangeEnable(true);
|
|
|
|
|
} else
|
|
|
|
|
// String value = systemParamConfigService.selectValueByParamKey("syns_out_change");
|
|
|
|
|
if (!orderEntity.isSyncOutChange()) {
|
|
|
|
|
orderEntity.setOutChangeEnable(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
|
|
|
|
|
|
|
|
|
|
OrderEntity temp = orderService.findById(orderEntity.getId());
|
|
|
|
|