预验收清空,新增价格字段,同步设置修改

master
anthonyywj2 3 years ago
parent b5d940d15d
commit ade66b1481

@ -20,6 +20,7 @@ import com.glxp.api.admin.service.basic.*;
import com.glxp.api.admin.service.thrsys.ThrProductsService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.GennerOrderUtils;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import org.springframework.beans.BeanUtils;
@ -49,7 +50,8 @@ public class UdiContrastController {
UdiContrastService udiContrastService;
@Resource
ThrProductsService thrProductsService;
@Resource
GennerOrderUtils gennerOrderUtils;
//添加产品
@AuthRuleAnnotation("")
@ -239,6 +241,7 @@ public class UdiContrastController {
} else
udiRelevanceEntity.setManufactory(udiInfoEntities.get(0).getYlqxzcrbarmc());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
insertUdiInfos(udiInfoEntities);
}
@ -250,6 +253,7 @@ public class UdiContrastController {
udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
udiRelevanceEntity.setManufactory(udiInfoEntities.get(0).getYlqxzcrbarmc());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
insertUdiInfos(udiInfoEntities);
}
@ -268,6 +272,7 @@ public class UdiContrastController {
udiRelevanceEntity.setUuid(CustomUtil.getUUId());
udiRelevanceEntity.setManufactory(thrProductsEntity.getManufactory());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
BeanUtils.copyProperties(thrProductsEntity, udiInfoEntity);
@ -337,6 +342,7 @@ public class UdiContrastController {
return udiRelevanceEntity;
}
public void insertUdiInfos(List<UdiInfoEntity> udiInfoEntities) {
if (CollUtil.isNotEmpty(udiInfoEntities)) {
UdiInfoEntity udiInfoEntity = udiInfoService.findByUuid(udiInfoEntities.get(0).getUuid());

@ -55,9 +55,8 @@ import java.util.stream.Collectors;
@RestController
public class UdiRelevanceController {
@Resource
UdiDlHttpClient udiDlHttpClient;
GennerOrderUtils gennerOrderUtils;
@Resource
UdiRelevanceService udiRelevanceService;
@Resource
@ -471,6 +470,7 @@ public class UdiRelevanceController {
BeanUtils.copyProperties(postSmpUdiInfoRequest, udiInfoEntity);
udiInfoEntity.setUuid(udiRelevanceEntity.getUuid());
udiInfoService.insertUdiInfo(udiInfoEntity);
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
}
}

@ -13,6 +13,7 @@ import com.glxp.api.admin.service.inout.OrderDetailService;
import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.FilterUdiUtils;
import com.glxp.api.admin.util.GennerOrderUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -29,6 +30,8 @@ public class InoutUtils {
OrderService orderService;
@Resource
UdiDlHttpClient udiDlHttpClient;
@Resource
GennerOrderUtils gennerOrderUtils;
public String filterCode(WarehouseEntity warehouseEntity, List<WarehouseEntity> filterList) {
int count = 0;
@ -61,6 +64,7 @@ public class InoutUtils {
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity.setThirdId(udiInfoEntity.getThirdId());
udiRelevanceEntity.setThirdName(udiInfoEntity.getThirdName());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
List<UdiRelevanceEntity> udiRelevanceEntities = udiRelevanceService.selectByUuid(udiInfoEntity.getUuid());
udiInfoEntity.setRelId(udiRelevanceEntities.get(0).getId());

@ -127,6 +127,18 @@ public class InvPreInProductsController {
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("spms/prein/inv/products/clearAll")
public BaseResponse clearAllInvProduct(@RequestBody DeleteRequest deleteRequest) {
boolean b = invProductService.deleteAll();
if (b) {
return ResultVOUtils.success("删除成功");
} else {
return ResultVOUtils.error(500, "删除失败!");
}
}
@AuthRuleAnnotation("")
@PostMapping("spms/prein/inv/products/delete")
public BaseResponse deleteInvProduct(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {

@ -28,4 +28,6 @@ public interface InvPreInProductDao {
InvProductEntity selectExit(@Param("relIdFk") String id);
boolean deleteById(@Param("id") String id);
boolean deleteAll();
}

@ -25,4 +25,5 @@ public class SyncDataSetEntity {
private boolean orderUnReceive; //未验收单据
private boolean orderUnCheck; //待校验单据
private String busTypes; //单据类型
private String syncIp;
}

@ -22,6 +22,7 @@ public class InvProductEntity {
private String unitFk;
private String invStorageCode;
private String invWarehouseCode;
private String price;
public Integer getInCount() {
if (inCount == null)

@ -44,6 +44,7 @@ public class PostOrderRequest {
private String billType;
private String orderId;
private boolean outChangeEnable;
private boolean preCheck;
public String getStockIdFk() {
return stockIdFk;
@ -94,6 +95,14 @@ public class PostOrderRequest {
public void setOutChangeEnable(boolean outChangeEnable) {
this.outChangeEnable = outChangeEnable;
}
public boolean isPreCheck() {
return preCheck;
}
public void setPreCheck(boolean preCheck) {
this.preCheck = preCheck;
}
}
}

@ -24,6 +24,7 @@ public class SyncDataSetResponse {
private boolean orderUnCheck;
private List<String> busTypes;
private Integer syncTime;
private String syncIp;
private Integer syncDownloadTime; //定时下载时间
}

@ -24,6 +24,9 @@ public class InvProductResponse {
private String invStorageCode;
private String invStorageName;
private String price;
public Integer getInCount() {
if (inCount == null)
return 0;

@ -309,7 +309,8 @@ public class OrderServiceImpl implements OrderService {
for (StockOrderResponse stockOrderResponse : orderResponseList) {
if (!actions.contains(stockOrderResponse.getBillType())) {
BasicThirdSysBusApiEntity basicThirdSysBusApiEntity = basicThirdSysBusApiDao.selectByCode(stockOrderResponse.getBillType());
if (StrUtil.isNotBlank(basicThirdSysBusApiEntity.getThirdBuyName())) {
if (basicThirdSysBusApiEntity != null && StrUtil.isNotBlank(basicThirdSysBusApiEntity.getThirdBuyName())) {
actions.add(basicThirdSysBusApiEntity.getCode());
}
}
@ -318,7 +319,7 @@ public class OrderServiceImpl implements OrderService {
stockOrderResponse.setSubmitFlag(true);
Integer exportStatus = orderDao.selectExportStatus(stockOrderResponse.getOrderIdFk());
stockOrderResponse.setExportStatus(exportStatus);
}else {
} else {
stockOrderResponse.setSubmitFlag(false);
}
}

@ -23,4 +23,6 @@ public interface InvPreInProductService {
boolean updateInvProduct(InvProductEntity invProductEntity);
boolean deleteById(String id);
boolean deleteAll();
}

@ -73,5 +73,9 @@ public class InvPreInProductServiceImpl implements InvPreInProductService {
public boolean deleteById(String id) {
return invPreInProductDao.deleteById(id);
}
@Override
public boolean deleteAll() {
return invPreInProductDao.deleteAll();
}
}

@ -24,6 +24,7 @@ import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.service.thrsys.ThrProductsService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.GennerOrderUtils;
import com.glxp.api.admin.util.RedisUtil;
import com.glxp.api.common.res.BaseResponse;
import org.springframework.beans.BeanUtils;
@ -49,9 +50,9 @@ public class BasicBackUpdateProductService {
@Resource
private ErpBasicClient erpBasicClient;
@Resource
BasicExportService basicExportService;
@Resource
RedisUtil redisUtil;
@Resource
GennerOrderUtils gennerOrderUtils;
//定时或一键下载更新全部线上产品信息
@Async
@ -141,6 +142,7 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setThirdId(invmandocResponse.getCode());
udiRelevanceEntity1.setThirdName(invmandocResponse.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}
}
@ -315,6 +317,7 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setThirdId(onhandQueryResponse.getCode());
udiRelevanceEntity1.setThirdName(onhandQueryResponse.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}
@ -354,6 +357,7 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setThirdId(onhandQueryResponse.getCode());
udiRelevanceEntity1.setThirdName(onhandQueryResponse.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}

@ -16,6 +16,7 @@ import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.service.thrsys.ThrDataService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.GennerOrderUtils;
import com.glxp.api.admin.util.HttpClient;
import com.glxp.api.common.res.BaseResponse;
import org.springframework.beans.BeanUtils;
@ -50,6 +51,8 @@ public class BasicUdiInfoImportService {
BasicThirdSysService basicThirdSysService;
@Resource
UdiDlHttpClient udiDlHttpClient;
@Resource
GennerOrderUtils gennerOrderUtils;
//导入产品信息文件,生成产品信息,更新或插入对照表
@Async
@ -131,6 +134,7 @@ public class BasicUdiInfoImportService {
udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setUuid(udiInfoEntity.getUuid());
updateValue(udiRelevanceEntity, udiInfoImportDetailEntity, udiInfoImportLogEntity, mainId);
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
} else {
udiInfoImportDetailEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_FAIL);
@ -146,12 +150,14 @@ public class BasicUdiInfoImportService {
udiRelevanceEntity.setUuid(udiInfoEntity.getUuid());
updateValue(udiRelevanceEntity, udiInfoImportDetailEntity, udiInfoImportLogEntity, mainId);
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
} else if (temp == null) {
temp = new UdiRelevanceEntity();
temp.setUuid(udiInfoEntity.getUuid());
udiInfoImportDetailEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_SUCESS);
temp.setUpdateTime(DateUtil.formatDateTime(new Date()));
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(temp);
} else {
udiInfoImportDetailEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_FAIL);
@ -183,11 +189,13 @@ public class BasicUdiInfoImportService {
udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setUuid(udiInfoEntity.getUuid());
updateValue(udiRelevanceEntity, udiInfoImportDetailEntity, udiInfoImportLogEntity, mainId);
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
} else {
udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setUuid(udiInfoEntity.getUuid());
updateValue(udiRelevanceEntity, udiInfoImportDetailEntity, udiInfoImportLogEntity, mainId);
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
}

@ -23,10 +23,7 @@ import com.glxp.api.admin.service.basic.UdiInfoService;
import com.glxp.api.admin.service.basic.UdiRelevanceService;
import com.glxp.api.admin.service.thrsys.ThrInvProductsService;
import com.glxp.api.admin.service.thrsys.ThrProductsService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.FilterUdiUtils;
import com.glxp.api.admin.util.HttpClient;
import com.glxp.api.admin.util.*;
import com.glxp.api.common.res.BaseResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
@ -58,9 +55,7 @@ public class BasicUpdateProductService {
@Resource
BasicThirdSysService basicThirdSysService;
@Resource
private ErpBasicClient erpBasicClient;
GennerOrderUtils gennerOrderUtils;
public String addLocalProduct(CombineRequest combineRequest) {
String errMsg = null;
@ -149,7 +144,7 @@ public class BasicUpdateProductService {
udiRelevanceEntity1.setMainId(udiRelevanceEntity1.getThirdId4());
udiRelevanceEntity1.setMainName(udiRelevanceEntity1.getThirdName4());
}
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}
}
@ -213,6 +208,7 @@ public class BasicUpdateProductService {
udiRelevanceEntity1.setThirdId(onhandQueryResponse.getCode());
udiRelevanceEntity1.setThirdName(onhandQueryResponse.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}
@ -246,10 +242,14 @@ public class BasicUpdateProductService {
isAdd = true;
}
}
if (isAdd)
if (isAdd) {
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
}
} else {
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
}
}

@ -107,6 +107,9 @@ public class InvProductsTrService {
} else if (orderEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invPreProductEntity.setInCount(invPreProductEntity.getInCount() + count);
}
if (erpOrderEntity.getPrice() != null) {
invPreProductEntity.setPrice(erpOrderEntity.getPrice() + "");
}
invPreInProductService.updateInvProduct(invPreProductEntity);
}
} else if (bussinessTypeEntity.isAdvanceType()) {//预入库,则转存预入库
@ -124,6 +127,10 @@ public class InvProductsTrService {
} else if (orderEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invPreProductEntity.setInCount(invPreProductEntity.getInCount() + count);
}
if (erpOrderEntity.getPrice() != null) {
invPreProductEntity.setPrice(erpOrderEntity.getPrice() + "");
}
invPreProductService.updateInvProduct(invPreProductEntity);
}
} else { //普通出入库
@ -141,6 +148,10 @@ public class InvProductsTrService {
} else if (orderEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invProductEntity.setInCount(invProductEntity.getInCount() + count);
}
if (erpOrderEntity.getPrice() != null) {
invProductEntity.setPrice(erpOrderEntity.getPrice() + "");
}
invProductService.updateInvProduct(invProductEntity);
}
@ -152,6 +163,10 @@ public class InvProductsTrService {
if (orderEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
preInvEntity.setOutCount(preInvEntity.getOutCount() + count);
}
if (erpOrderEntity.getPrice() != null) {
preInvEntity.setPrice(erpOrderEntity.getPrice() + "");
}
invPreInProductService.updateInvProduct(preInvEntity);
}
@ -496,6 +511,7 @@ public class InvProductsTrService {
outOrder.setLocStorageCode(defaultWarehouseEntity.getCode());
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
outOrder.setPreCheck(false);
orderService.insertOrder(outOrder);
for (WarehouseEntity warehouseEntity : preOutList) {
warehouseEntity.setOrderId(outOrder.getId());
@ -571,6 +587,7 @@ public class InvProductsTrService {
outOrder.setOriginUllageSupNo(orderEntity.getId());
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
outOrder.setPreCheck(false);
orderService.insertOrder(outOrder);
for (WarehouseEntity warehouseEntity : temps) {
warehouseEntity.setOrderId(outOrder.getId());
@ -614,6 +631,7 @@ public class InvProductsTrService {
outOrder.setOriginUllageSupNo(orderEntity.getId());
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
outOrder.setPreCheck(false);
orderService.insertOrder(outOrder);
warehouseEntity.setOrderId(outOrder.getId());
warehouseEntity.setId(null);
@ -670,6 +688,7 @@ public class InvProductsTrService {
outOrder.setFromCorpId(corpName);
outOrder.setFromCorp(temps.get(0).getFromCorp());
outOrder.setCorpOrderId(CustomUtil.getId() + "x");
outOrder.setPreCheck(false);
outOrder.setLocStorageCode(orderEntity.getLocStorageCode());
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("additional_auto_submit");
if ("1".equals(systemParamConfigEntity.getParamValue())) {
@ -763,6 +782,7 @@ public class InvProductsTrService {
outOrder.setOriginUllageSupNo(orderEntity.getId());
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
outOrder.setPreCheck(false);
orderService.insertOrder(outOrder);
for (WarehouseEntity warehouseEntity : temps) {
warehouseEntity.setOrderId(outOrder.getId());
@ -797,6 +817,7 @@ public class InvProductsTrService {
invProductEntity.setZczbhhzbapzbh(erpOrderEntity.getAuthCode());
invProductEntity.setInvStorageCode(warehouseEntity.getLocStorageCode());
invProductEntity.setInvWarehouseCode(warehouseEntity.getInvWarehouseCode());
invProductEntity.setPrice(erpOrderEntity.getPrice() + "");
int count = getActCount(warehouseEntity) * warehouseEntity.getCount();
if (orderEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invProductEntity.setOutCount(count);

@ -154,7 +154,8 @@ public class IoTransInoutService {
orderSaveRequest.setLocStorageCode(warehouseEntity.getLocStorageCode());
orderSaveRequest.setMainAction(warehouseEntity.getMainAction());
orderSaveRequest.setReceiveStatus(0);
orderSaveRequest.setCreateUser(postOrderRequest.getUserId());
orderSaveRequest.setPreCheck(postOrder.isPreCheck());
orderSaveRequest.setCreateUser(postOrderRequest.getUserId());
orderSaveRequest.setFromCorp(warehouseEntity.getFromCorp());
if (postOrder.getErpOrders() != null && postOrder.getErpOrders().size() > 0)
orderSaveRequest.setFromType(ConstantStatus.FROM_PDAED);
@ -213,6 +214,7 @@ public class IoTransInoutService {
orderSaveRequest.setCorpOrderId(warehouseEntity.getCorpOrderId());
orderSaveRequest.setFromCorpId(warehouseEntity.getFromCorpId());
orderSaveRequest.setReceiveStatus(0);
orderSaveRequest.setPreCheck(postOrder.isPreCheck());
orderSaveRequest.setCreateUser(postOrderRequest.getUserId());
orderSaveRequest.setLocStorageCode(warehouseEntity.getLocStorageCode());
orderSaveRequest.setMainAction(warehouseEntity.getMainAction());
@ -368,7 +370,7 @@ public class IoTransInoutService {
orderService.updateRemark(orderEntity.getId(), "udi码" + warehouseEntity.getCode() + "当前供应商不存在此配送产品");
return;
} else {
if(StrUtil.isEmpty(warehouseEntity.getRelId())){
if (StrUtil.isEmpty(warehouseEntity.getRelId())) {
if (datas.size() == 1) {
warehouseEntity.setRelId(datas.get(0).getRlId() + "");
} else {
@ -761,6 +763,7 @@ public class IoTransInoutService {
orderEntity.setRemark("");
orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_UN);
orderEntity.setUpdateTime(new Date());
orderEntity.setErpFk(stockOrderEntity.getBillNo());
orderService.updateOrder(orderEntity);
} else {
orderEntity.setRemark("该产品DI绑定多个产品ID请在扫码单据详情绑定对应产品ID");

@ -9,10 +9,7 @@ import com.glxp.api.admin.entity.inout.OrderEntity;
import com.glxp.api.admin.entity.inout.WarehouseEntity;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.entity.thrsys.*;
import com.glxp.api.admin.req.basic.BasicUnitMaintainFilterRequest;
import com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest;
import com.glxp.api.admin.req.basic.BussinessOriginTypeFilterRequest;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.basic.*;
import com.glxp.api.admin.req.inout.OrderFilterRequest;
import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest;
import com.glxp.api.admin.req.receipt.BussinessTypeFilterRequest;
@ -128,13 +125,13 @@ public class UpBasicService {
}
}
// //供应商产品信息关联表
// FilterCompanyProductRelevanceRequest filterCompanyProductRelevanceRequest = new FilterCompanyProductRelevanceRequest();
// BeanUtils.copyProperties(basicExportStatusTimeEntity, filterCompanyProductRelevanceRequest);
// List<CompanyProductRelevanceEntity> companyProductRelevanceEntities = companyProductRelevanceService.filterCompanyProductRelevance(filterCompanyProductRelevanceRequest);
//供应商产品信息关联表
FilterCompanyProductRelevanceRequest filterCompanyProductRelevanceRequest = new FilterCompanyProductRelevanceRequest();
BeanUtils.copyProperties(basicExportStatusTimeEntity, filterCompanyProductRelevanceRequest);
List<CompanyProductRelevanceEntity> companyProductRelevanceEntities = companyProductRelevanceService.filterCompanyProductRelevance(filterCompanyProductRelevanceRequest);
SpsSyncDataResponse syncDataResponse = new SpsSyncDataResponse();
// syncDataResponse.setCompanyProductRelevanceEntities(companyProductRelevanceEntities);
syncDataResponse.setCompanyProductRelevanceEntities(companyProductRelevanceEntities);
syncDataResponse.setInvWarehouseEntities(invWarehouseEntities);
syncDataResponse.setBasicUnitMaintainEntities(basicUnitMaintainEntities);
syncDataResponse.setThrCorpEntities(thrCorpEntities);

@ -146,5 +146,13 @@ public class GennerOrderUtils {
return (cal.getTimeInMillis() - System.currentTimeMillis()) / 1000;
}
public long getRelId() {
Long incrementalSerial = redisUtil.incr("udiRelId", 1);
if (incrementalSerial == 1) {
redisUtil.expire("udiRelId", getSecondsNextEarlyMorning());
}
String curTime = System.currentTimeMillis() + "";
return Long.parseLong(curTime.substring(1, curTime.length() - 3)) + incrementalSerial;
}
}

@ -15,7 +15,8 @@
replace
INTO sync_data_set(id,typeBus, typeScan,
typeThird, basicProducts, basicCorp, basicInv, basicThirdProducts, basicThirdCorp, basicThirdInv
, basicThirdBusOrder, orderScanFinish, dbDiProducts,downstreamEnable,syncTime, syncDownloadTime,orderUnReceive,orderUnCheck,busTypes)
, basicThirdBusOrder, orderScanFinish, dbDiProducts,downstreamEnable,syncTime, syncDownloadTime,
orderUnReceive,orderUnCheck,busTypes,syncIp)
values (
#{id},
#{typeBus},
@ -30,7 +31,7 @@
#{basicThirdBusOrder},
#{orderScanFinish},
#{dbDiProducts},#{downstreamEnable},#{syncTime},#{syncDownloadTime},
#{orderUnReceive},#{orderUnCheck},#{busTypes}
#{orderUnReceive},#{orderUnCheck},#{busTypes},#{syncIp}
)
</insert>

@ -118,7 +118,7 @@
inv_prein_product.inCount,inv_prein_product.outCount
,inv_prein_product.reCount,inv_prein_product.customerId,
basic_corp.name companyName,inv_prein_product.supId,inv_prein_product.unitFk ,inv_warehouse.name
invStorageName,inv_prein_product.invStorageCode
invStorageName,inv_prein_product.invStorageCode,inv_prein_product.price
FROM inv_prein_product
inner join basic_udirel on inv_prein_product.relIdFk = basic_udirel.id
inner join basic_products on basic_udirel.uuid = basic_products.uuid
@ -192,13 +192,13 @@
insert INTO inv_prein_product
(productsName, nameCode, relIdFk, ggxh, batchNo,
productionDate, expireDate, ylqxzcrbarmc, zczbhhzbapzbh,
inCount, outCount, reCount, customerId, supId, unitFk, invStorageCode, invWarehouseCode)
inCount, outCount, reCount, customerId, supId, unitFk, invStorageCode, invWarehouseCode, price)
values (#{productsName}, #{nameCode},
#{relIdFk}, #{ggxh}, #{batchNo},
#{productionDate}, #{expireDate},
#{ylqxzcrbarmc}, #{zczbhhzbapzbh},
#{inCount}, #{outCount}, #{reCount}, #{customerId}, #{supId}, #{unitFk}
, #{invStorageCode}, #{invWarehouseCode})
, #{invStorageCode}, #{invWarehouseCode}, #{price})
</insert>
@ -207,6 +207,10 @@
FROM inv_prein_product
WHERE id = #{id}
</delete>
<delete id="deleteAll" parameterType="Map">
DELETE
FROM inv_prein_product
</delete>
<update id="updateInvProduct" parameterType="com.glxp.api.admin.entity.inventory.InvProductEntity">
UPDATE inv_prein_product
@ -228,6 +232,8 @@
<if test="unitFk != null">unitFk=#{unitFk},</if>
<if test="invStorageCode != null">invStorageCode=#{invStorageCode},</if>
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if>
<if test="price != null">price=#{price},</if>
</trim>
WHERE id = #{id}
</update>

@ -117,7 +117,7 @@
inv_pre_product.inCount,inv_pre_product.outCount
,inv_pre_product.reCount,inv_pre_product.customerId,
basic_corp.name companyName,inv_pre_product.supId,inv_pre_product.unitFk ,inv_warehouse.name
invStorageName,inv_pre_product.invStorageCode
invStorageName,inv_pre_product.invStorageCode,inv_pre_product.price
FROM inv_pre_product
inner join basic_udirel on inv_pre_product.relIdFk = basic_udirel.id
inner join basic_products on basic_udirel.uuid = basic_products.uuid
@ -191,13 +191,13 @@
insert INTO inv_pre_product
(productsName, nameCode, relIdFk, ggxh, batchNo,
productionDate, expireDate, ylqxzcrbarmc, zczbhhzbapzbh,
inCount, outCount, reCount, customerId, supId, unitFk, invStorageCode, invWarehouseCode)
inCount, outCount, reCount, customerId, supId, unitFk, invStorageCode, invWarehouseCode,price)
values (#{productsName}, #{nameCode},
#{relIdFk}, #{ggxh}, #{batchNo},
#{productionDate}, #{expireDate},
#{ylqxzcrbarmc}, #{zczbhhzbapzbh},
#{inCount}, #{outCount}, #{reCount}, #{customerId}, #{supId}, #{unitFk}
, #{invStorageCode}, #{invWarehouseCode})
, #{invStorageCode}, #{invWarehouseCode},#{price})
</insert>
@ -227,6 +227,8 @@
<if test="unitFk != null">unitFk=#{unitFk},</if>
<if test="invStorageCode != null">invStorageCode=#{invStorageCode},</if>
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if>
<if test="price != null">price=#{price},</if>
</trim>
WHERE id = #{id}
</update>

@ -114,7 +114,7 @@
basic_products.ylqxzcrbarmc,basic_products.zczbhhzbapzbh,
inv_product.inCount,inv_product.outCount
,inv_product.reCount,inv_product.customerId,basic_corp.name companyName,inv_product.unitFk,inv_product.supId
,inv_warehouse.name invStorageName,inv_product.invStorageCode
,inv_warehouse.name invStorageName,inv_product.invStorageCode,inv_product.price
FROM inv_product
inner join basic_udirel on inv_product.relIdFk = basic_udirel.id
inner join basic_products on basic_udirel.uuid = basic_products.uuid
@ -193,7 +193,7 @@
ip.customerId,
bc.name companyName,
ip.unitFk,
ip.supId,
ip.supId,ip.price,
iw.name invStorageName,
inCount,
outCount
@ -237,13 +237,13 @@
insert INTO inv_product
(productsName, nameCode, relIdFk, ggxh, batchNo,
productionDate, expireDate, ylqxzcrbarmc, zczbhhzbapzbh,
inCount, outCount, reCount, customerId, unitFk, supId, invStorageCode, invWarehouseCode)
inCount, outCount, reCount, customerId, unitFk, supId, invStorageCode, invWarehouseCode,price)
values (#{productsName}, #{nameCode},
#{relIdFk}, #{ggxh}, #{batchNo},
#{productionDate}, #{expireDate},
#{ylqxzcrbarmc}, #{zczbhhzbapzbh},
#{inCount}, #{outCount}, #{reCount}, #{customerId}, #{unitFk}, #{supId}
, #{invStorageCode}, #{invWarehouseCode})
, #{invStorageCode}, #{invWarehouseCode},#{price})
</insert>
@ -273,6 +273,7 @@
<if test="supId != null">supId=#{supId},</if>
<if test="invStorageCode != null">invStorageCode=#{invStorageCode},</if>
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if>
<if test="price != null">price=#{price},</if>
</trim>
WHERE id = #{id}
</update>

Loading…
Cancel
Save