单据同步

master
anthonywj 2 years ago
parent 8dc444be01
commit 9f946d35c6

@ -51,6 +51,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.rmi.server.UID;
import java.util.Date;
import java.util.List;
@ -172,8 +173,8 @@ public class ThrProductsAddDiController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
String remark=thrProductsAddDiEntity.getRemark();
Integer status=thrProductsAddDiEntity.getStatus();
String remark = thrProductsAddDiEntity.getRemark();
Integer status = thrProductsAddDiEntity.getStatus();
thrProductsAddDiEntity.setAuditTime(new Date());
thrProductsAddDiEntity.setAuditUser(customerService.getUserId() + "");
@ -206,7 +207,9 @@ public class ThrProductsAddDiController {
//字段更新
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(udiRelIdFk);
//更新产品信息
UdiProductEntity udiProductEntity = udiProductService.findByUuid(udiRelevanceEntity.getUuid());
// UdiProductEntity udiProductEntity = udiProductService.findByUuid(udiRelevanceEntity.getUuid());
UdiProductEntity udiProductEntity = new UdiProductEntity();
udiProductEntity.setUuid(udiRelevanceEntity.getUuid());
udiProductEntity.setSptm(thrProductsAddDiResponse.getSptm());
udiProductEntity.setYbbm(thrProductsAddDiResponse.getYbbm());
udiProductEntity.setMeasname(thrProductsAddDiResponse.getMeasname());
@ -257,7 +260,7 @@ public class ThrProductsAddDiController {
thrProductsAddDiEntity.setRemark(remark);
thrProductsAddDiEntity.setStatus(status);
thrProductsAddDiService.updateDiProduct(thrProductsAddDiEntity);
}else {
} else {
thrProductsAddDiEntity.setRemark(remark);
thrProductsAddDiEntity.setStatus(status);
thrProductsAddDiService.updateDiProduct(thrProductsAddDiEntity);

@ -13,7 +13,7 @@ import java.util.List;
/**
* <p>
*
*
* </p>
*
* @author
@ -47,7 +47,7 @@ public class SupCertSetEntity {
/**
* (1:23.
*/
@TableField("foreign")
@TableField("`foreign`")
private Integer foreign;
/**

@ -3,10 +3,10 @@ package com.glxp.api.entity.sync;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class SyncDataSetEntity {
private Integer id;
private int typeBus; //业务单据类型
private int typeScan; //扫码单据类型
@ -15,11 +15,13 @@ public class SyncDataSetEntity {
private int basicCorp; //往来单位字典
private int basicDept; //部门字典
private int basicInv; //仓库字典
private int basicThirdDept; //第三方那个部门信息
private int basicThirdProducts; //第三方产品信息
private int basicThirdCorp; //第三方往来信息
private int basicThirdInv; //第三方仓库信息
private int basicThirdBusOrder; //第三方业务单据
private int dbDiProducts; //DI产品信息
private int dbDiCompany; //DI企业信息
private int udiCodeLost; // UDI码补齐
private int udiCodeRel; //UDI码关联关系
@ -63,5 +65,4 @@ public class SyncDataSetEntity {
private int productCert;
}

@ -16,11 +16,13 @@ public class SyncDataSetResponse {
private int basicCorp;
private int basicInv;
private int basicDept;
private int basicThirdDept;
private int basicThirdProducts;
private int basicThirdCorp;
private int basicThirdInv;
private int basicThirdBusOrder;
private int dbDiProducts;
private int dbDiCompany;
private int udiCodeLost; // UDI码补齐
private int udiCodeRel; //UDI码关联关系

@ -211,8 +211,11 @@ public class IoChangeInoutService {
outOrder.setCustomerId(Constant.SYSTEM_CUSTOMER_ID);
InvWarehouseEntity curInv = invWarehouseService.findByInvSubByCode(orderEntity.getInvCode());
InvWarehouseEntity upInv = invWarehouseService.findByInvSubByCode(curInv.getParentCode());
outOrder.setFromInvCode(upInv.getCode());
outOrder.setFromDeptCode(upInv.getParentId());
if (upInv != null) {
outOrder.setFromInvCode(upInv.getCode());
outOrder.setFromDeptCode(upInv.getParentId());
}
//原先流程---使用流转单据默认仓库
// outOrder.setFromInvCode(bussinessChangeTypeEntity.getDefaultInvCode());
// outOrder.setFromDeptCode(bussinessChangeTypeEntity.getDefaultDeptCode());

@ -83,7 +83,7 @@ public class SpsSyncDownloadService {
log.info("创建单据同步任务");
//自动创建要求被下载已完成单据任务.
// 1.判断是否同步任务已存在
BasicExportStatusEntity basicExportStatusEntity1 = basicExportService.findByData(ConstantStatus.SYNC_SCAN_ORDER, 0);
BasicExportStatusEntity basicExportStatusEntity1 = basicExportService.findByData(ConstantStatus.SYNC_SCAN_ORDER, 1);
if (basicExportStatusEntity1 == null) {
BaseResponse<SpsSyncOrderResponse> baseResponse = findOrder(getRequest(ConstantStatus.SYNC_SCAN_ORDER));
@ -106,7 +106,7 @@ public class SpsSyncDownloadService {
// 创建国家库同步任务
public void syncDiProductsTask() {
BasicExportStatusEntity basicExportStatusEntity4 = basicExportService.findByData(ConstantStatus.SYNC_DI_PRODUCTS, 0);
BasicExportStatusEntity basicExportStatusEntity4 = basicExportService.findByData(ConstantStatus.SYNC_DI_PRODUCTS, 1);
if (basicExportStatusEntity4 == null) {
BaseResponse<SpSyncUdiResponse> baseResponse = syncUdi(getRequest(ConstantStatus.SYNC_DI_PRODUCTS));
SpSyncUdiResponse spSyncUdiResponse = baseResponse.getData();
@ -688,12 +688,15 @@ public class SpsSyncDownloadService {
BeanUtils.copyProperties(spsSyncDataRequest, productInfoFilterRequest);
productInfoFilterRequest.setUpdateTime(spsSyncDataRequest.getLastUpdateTime());
List<ProductInfoEntity> productInfoEntityList = productInfoService.syncDlUdi(productInfoFilterRequest);
spSyncUdiResponse.setProductInfoEntityList(productInfoEntityList);
}
if (syncDataSetEntity.getDbDiCompany() == 2) {
UdiCompanyRequest udiCompanyRequest = new UdiCompanyRequest();
BeanUtils.copyProperties(spsSyncDataRequest, udiCompanyRequest);
udiCompanyRequest.setUpdateTime(spsSyncDataRequest.getLastUpdateTime());
List<UdiCompanyEntity> udiCompanyEntities = udiCompanyService.syncDlCompany(udiCompanyRequest);
spSyncUdiResponse.setUdiCompanyEntities(udiCompanyEntities);
spSyncUdiResponse.setProductInfoEntityList(productInfoEntityList);
}
return ResultVOUtils.success(spSyncUdiResponse);

@ -132,27 +132,6 @@
)
</if>
</if>
<if test="supInoivceSearch != null and invoiceActions1 == null and invoiceActions1.size() == 0">
<if test="invoiceActions2 != null and invoiceActions2.size() != 0">
and (
`action` in
<foreach collection="invoiceActions2" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and status = 7
)
</if>
</if>
<if test="supInoivceSearch != null and invoiceActions2 == null and invoiceActions2.size() == 0">
<if test="invoiceActions1 != null and invoiceActions2 == null">
AND (`action` in
<foreach collection="invoiceActions1" index="index" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and status = 10)
</if>
</if>
</where>
order by createTime desc
</select>

@ -12,13 +12,17 @@
<insert id="insert" parameterType="com.glxp.api.entity.sync.SyncDataSetEntity">
replace
INTO sync_data_set(id, typeBus, typeScan,
typeThird, basicProducts, basicCorp, basicInv, basicThirdProducts, basicThirdCorp,
basicThirdInv
, basicThirdBusOrder, orderScanFinish, dbDiProducts, downstreamEnable, syncTime,
orderUnReceive, orderUnCheck, busTypes, sysUser, orderSyncTime, orderSyncStart,
basicSyncStart, entrustAction
, unCheckCert, checkedCert, companyCert, manufacturerCert, productCert, basicType, basicDept)
INTO sync_data_set( id, typeBus, typeScan,
typeThird, basicProducts, basicCorp, basicInv, basicThirdProducts, basicThirdCorp
, basicThirdInv
, basicThirdBusOrder, orderScanFinish, dbDiProducts, downstreamEnable, syncTime
, syncDownloadTime,
orderUnReceive, orderUnCheck, busTypes, sysUser, syncIp, orderSyncTime
, orderSyncStart, basicSyncStart, entrustAction
, unCheckCert, checkedCert, companyCert, manufacturerCert, productCert, basicDept
, systemConfig
, printConfig, scanChangeConfig, supCert, dbDiCompany, busChangeConfig
, udiCodeLost, udiCodeRel)
values (#{id},
#{typeBus},
#{typeScan},
@ -34,15 +38,19 @@
#{dbDiProducts},
#{downstreamEnable},
#{syncTime},
#{syncDownloadTime},
#{orderUnReceive},
#{orderUnCheck},
#{busTypes},
#{sysUser},
#{syncIp},
#{orderSyncTime},
#{orderSyncStart},
#{basicSyncStart},
#{entrustAction},
#{unCheckCert},
#{checkedCert}, #{companyCert}, #{manufacturerCert}, #{productCert}, #{basicType}, #{basicDept})
#{checkedCert}, #{companyCert}, #{manufacturerCert}, #{productCert}, #{basicDept},
#{systemConfig}, #{printConfig}, #{scanChangeConfig}, #{supCert}, #{dbDiCompany}, #{busChangeConfig},
#{udiCodeLost}, #{udiCodeRel})
</insert>
</mapper>

@ -1,7 +1,8 @@
# 字段新增 表名字段名字段类型修改方式1新增2修改3删除
CALL Pro_Temp_ColumnWork('sync_data_set', 'udi_code_lost', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'udi_code_rel', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeLost', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeRel', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'dbDiCompany', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_order', 'fromReceiveBillNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'fromThrBillNo', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order', 'syncStatus', 'tinyint ', 1);

Loading…
Cancel
Save