同步bug,单据上传到智业定时任务问题,查询是否可以上传问题,自动同步问题等修改

purchase
anthonyywj2 3 years ago
parent f73f0d0556
commit 1361c92269

@ -156,20 +156,6 @@ public class SystemParamConfigController {
} catch (Exception e) {
return ResultVOUtils.error(500, "格式错误!");
}
} else if (systemParamConfigSaveRequest.getParamKey().equals("auto_submit_order")) {
try {
int time = 1;
if (!"0".equals(systemParamConfigSaveRequest.getParamValue())) {
time = Integer.parseInt(systemParamConfigSaveRequest.getParamValue());
}
String cornStr = CronUtils.parseHourIntervel(time);
ScheduledEntity scheduledEntity = new ScheduledEntity();
scheduledEntity.setCron(cornStr);
scheduledEntity.setCronName("submitOrderTask");
scheduledDao.modifyScheduled(scheduledEntity);
} catch (Exception e) {
return ResultVOUtils.error(500, "格式错误!");
}
}
return ResultVOUtils.success("修改成功");
}

@ -19,11 +19,13 @@ import com.glxp.api.admin.entity.basic.UdiEntity;
import com.glxp.api.admin.entity.business.StockOrderEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.entity.inout.*;
import com.glxp.api.admin.entity.inventory.InvBusUserEntity;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.httpclient.SpsDirectClient;
import com.glxp.api.admin.req.basic.BasicEntrustRecRequest;
import com.glxp.api.admin.req.business.StockOrderFilterRequest;
import com.glxp.api.admin.req.inout.*;
import com.glxp.api.admin.req.inventory.FilterInvBusUserRequest;
import com.glxp.api.admin.req.inventory.FilterInvUserRequest;
import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
@ -33,6 +35,7 @@ import com.glxp.api.admin.service.basic.EntrustReceService;
import com.glxp.api.admin.service.business.StockOrderService;
import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.service.inout.*;
import com.glxp.api.admin.service.inventory.InvBusUserService;
import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.admin.thread.InvProductsTrService;
import com.glxp.api.admin.thread.IoTransInoutService;
@ -95,6 +98,8 @@ public class OrderController {
@Resource
SpsDirectClient spsDirectClient;
@Resource
InvBusUserService invBusUserService;
@AuthRuleAnnotation("")
@GetMapping("udiwms/inout/order/getUdi")
@ -272,10 +277,6 @@ public class OrderController {
StockOrderEntity stockOrderEntity = stockOrderService.findByBillNo(orderFilterRequest.getOrderId());
if (stockOrderEntity == null || stockOrderEntity.getOrderIdFk() == null) {
// SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("sps_sync_review_order");
if (bussinessTypeEntity.isEntrutSpms()) {
BaseResponse baseResponse = spsDirectClient.downloadOrder(orderFilterRequest.getOrderId(), userId + "", orderFilterRequest.getAction());
return baseResponse;
@ -285,16 +286,19 @@ public class OrderController {
return ResultVOUtils.error(500, "非" + bussinessTypeEntity.getName() + "类型单据!");
} else if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_CHECKED)) {
if (StrUtil.isNotEmpty(stockOrderEntity.getLocStorageCode())) {
List<WarehouseUserEntity> warehouseUserEntities = new ArrayList<>();
List<InvBusUserEntity> warehouseUserEntities = new ArrayList<>();
List<InvWarehouseEntity> invWarehouseEntities = new ArrayList<>();
if (StrUtil.isNotEmpty(stockOrderEntity.getInvWarehouseCode())) {
FilterInvUserRequest filterInvUserRequest = new FilterInvUserRequest();
filterInvUserRequest.setCode(stockOrderEntity.getInvWarehouseCode());
filterInvUserRequest.setUserid(userId.longValue());
warehouseUserEntities = warehouseUserService.filterWarehouseUsers(filterInvUserRequest);
FilterInvBusUserRequest filterInvBusUserRequest = new FilterInvBusUserRequest();
filterInvBusUserRequest.setSubInvCode(stockOrderEntity.getInvWarehouseCode());
filterInvBusUserRequest.setUserId(userId + "");
warehouseUserEntities = invBusUserService.filterInvBusUser(filterInvBusUserRequest);
} else {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setCode(stockOrderEntity.getLocStorageCode());
filterInvWarehouseRequest.setUserId(userId);
invWarehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest);
}
@ -310,9 +314,7 @@ public class OrderController {
} else {
return ResultVOUtils.error(500, "单据已委托验收完成!");
}
if (CollUtil.isEmpty(warehouseUserEntities) && CollUtil.isEmpty(entrustReceEntities)) {
if (CollUtil.isEmpty(warehouseUserEntities) && CollUtil.isEmpty(entrustReceEntities) && CollUtil.isEmpty(invWarehouseEntities)) {
return ResultVOUtils.error(500, "权限不足,无法验收!");
}
}

@ -40,6 +40,8 @@ public class UdiDlHttpClient {
BeanUtils.copyProperties(productInfoEntity, udiInfoEntity);
udiInfoEntity.setUuid(myUuid);
udiInfoEntity.setOriginUuid(productInfoEntity.getUuid());
udiInfoEntity.setQxlb(productInfoEntity.getCplx());
udiInfoEntity.setCplb(productInfoEntity.getHchzsb());
udiInfoEntities.add(udiInfoEntity);
}
return udiInfoEntities;
@ -79,6 +81,8 @@ public class UdiDlHttpClient {
for (ProductInfoEntity productInfoEntity : datas) {
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
BeanUtils.copyProperties(productInfoEntity, udiInfoEntity);
udiInfoEntity.setQxlb(productInfoEntity.getCplx());
udiInfoEntity.setCplb(productInfoEntity.getHchzsb());
udiInfoEntities.add(udiInfoEntity);
}
return udiInfoEntities;

@ -17,11 +17,13 @@ public class FilterThrOrderRequest extends ListPageRequest {
private String billFlag; //单据状态,0.未签字1.已签字
private String billAction;
private String corpName;
private String lastUpdateTime;
private String originType;
private String unitIdFk;
private Integer editStatus;
private String originType;
private String status;
private String thirdSys;
private Integer editStatus;
private String lastUpdateTime;
private List<ErpOrderResponse> erpOrderResponses;
}

@ -145,6 +145,9 @@ public class StockOrderServiceImpl implements StockOrderService {
public StockOrderEntity findByBillNo(String orderId) {
StockOrderFilterRequest stockOrderFilterRequest = new StockOrderFilterRequest();
stockOrderFilterRequest.setBillNo(orderId);
if (orderId == null) {
return null;
}
return stockOrderDao.findOne(stockOrderFilterRequest);
}
@ -203,7 +206,8 @@ public class StockOrderServiceImpl implements StockOrderService {
udiwmsOrderRequest.setId(id);
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysDao.selectByThirdId(thirdSysBusApiEntity.getThirdSys());
String response = httpOkClient.uCloudPost(basicThirdSysEntity.getThridUrl() + "/udiwms/erp/submitOrders", udiwmsOrderRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {});
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode().equals(20000)) {
return ResultVOUtils.success("提交成功");
} else {

@ -178,7 +178,9 @@ public class ThrInvWarehouseServiceImpl implements ThrInvWarehouseService {
int count = thrSubInvWarehouseDao.countSubInvByParentInvId(id);
if (count > 0) {
return ResultVOUtils.error(500, "请先删除子仓库!");
}
} else
thrInvWarehouseDao.deleteById(id);
return ResultVOUtils.success("删除成功");
}
}

@ -522,7 +522,6 @@ public class DlBasicService {
orderEntity.setFromType(ConstantStatus.FROM_UDISP);
orderEntity.setReceiveStatus(0);
orderEntity.setErpFk(null);
// String value = systemParamConfigService.selectValueByParamKey("syns_out_change");
if (!orderEntity.isSyncOutChange())
orderEntity.setOutChangeEnable(false);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
@ -530,17 +529,14 @@ public class DlBasicService {
if (temp == null) {
mapper.importOrder(orderEntity);
if (CollUtil.isNotEmpty(syncDataResponse.getWarehouseEntityList())) {
try {
CodesTempDao codeMappert = batchSession.getMapper(CodesTempDao.class);
List<WarehouseEntity> warehouseEntityList = syncDataResponse.getWarehouseEntityList();
for (WarehouseEntity warehouseEntity : warehouseEntityList) {
if (warehouseEntity.getOrderId().equals(orderEntity.getId())) {
codeMappert.replaceCodesTempSingle(warehouseEntity);
}
CodesTempDao codeMappert = batchSession.getMapper(CodesTempDao.class);
List<WarehouseEntity> warehouseEntityList = syncDataResponse.getWarehouseEntityList();
for (WarehouseEntity warehouseEntity : warehouseEntityList) {
if (warehouseEntity.getOrderId().equals(orderEntity.getId())) {
codeMappert.replaceCodesTempSingle(warehouseEntity);
}
batchSession.commit();
} catch (Exception e) {
}
batchSession.commit();
}
}

@ -117,7 +117,7 @@ public class OrderSubmitTask implements SchedulingConfigurer {
if (CollUtil.isNotEmpty(orderIds)) {
for (String orderId : orderIds) {
StockOrderEntity stockOrderEntity = stockOrderService.findByBillNo(orderId);
StockOrderEntity stockOrderEntity = stockOrderService.findById(orderId);
if (stockOrderEntity == null) {
continue;
}
@ -177,15 +177,15 @@ public class OrderSubmitTask implements SchedulingConfigurer {
}
BussinessLocalTypeEntity bussinessLocalTypeEntity = bussinessLocalTypeService.findBTByAction(stockOrderEntity.getBillType());
if (stockOrderEntity.getStatus() == ConstantStatus.SORDER_DELIVER) {
if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_DELIVER)) {
if (!syncUploadDataSetEntity.isOrderScanFinish()) {
continue;
}
} else if (stockOrderEntity.getStatus() == ConstantStatus.SORDER_CHECKED) {
} else if (stockOrderEntity.getStatus() .equals( ConstantStatus.SORDER_CHECKED)) {
if (!syncUploadDataSetEntity.isOrderUnReceive()) {
continue;
}
} else if (stockOrderEntity.getStatus() == ConstantStatus.SORDER_CHECK) {
} else if (stockOrderEntity.getStatus() .equals( ConstantStatus.SORDER_CHECK)) {
if (!syncUploadDataSetEntity.isOrderUnCheck()) {
continue;
}
@ -195,7 +195,7 @@ public class OrderSubmitTask implements SchedulingConfigurer {
}
if (bussinessLocalTypeEntity != null
&& isConatin(syncUploadDataSetEntity.getBusTypes(), bussinessLocalTypeEntity.getLocalAction())
&& isConatin(syncUploadDataSetEntity.getBusTypes(), bussinessLocalTypeEntity.getAction())
) {
BaseResponse baseResponse = stockOrderService.submitOrderToThirdys(orderId);
if (baseResponse.getCode() == 20000) {

@ -154,15 +154,15 @@ public class ThrProductsDlService {
for (List<ThrProductsEntity> data : splitList) {
thrProductsService.insertThrProductss(data);
}
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
if (filterThrProductsRequest.getThirdSysFk().equals(basicThirdSysEntity.getThirdId())) {
for (ThrProductsEntity thrProductsEntity : thrProductsEntities) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectByMainIdLimitOne(thrProductsEntity.getCode());
if (udiRelevanceEntity == null) {
udiContrastService.createOnlyMainId(thrProductsEntity.getCode());
}
}
}
// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
// if (filterThrProductsRequest.getThirdSysFk().equals(basicThirdSysEntity.getThirdId())) {
// for (ThrProductsEntity thrProductsEntity : thrProductsEntities) {
// UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectByMainIdLimitOne(thrProductsEntity.getCode());
// if (udiRelevanceEntity == null) {
// udiContrastService.createOnlyMainId(thrProductsEntity.getCode());
// }
// }
// }
redisUtil.set(Constant.dlThrProducts, "false");
thrProductsImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
thrProductsImportLogService.updateImportLog(thrProductsImportLogEntity);

@ -27,22 +27,18 @@
<insert id="insertProductsDetailImport" keyProperty="id"
parameterType="com.glxp.api.admin.entity.thrsys.ThrProductsImportDetailEntity">
insert INTO thr_products_import_detail
(
code,name,measname,spec,registerNo,manufactory,
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
thirdSysFk,updateTime ,genKeyFk ,supName,price )
values
(
#{code},
#{name},
#{measname},
#{spec},
#{registerNo},
#{manufactory},
#{cplb}, #{flbm}, #{qxlb}, #{ybbm},#{sptm},
#{tyshxydm}, #{zczbhhzbapzbh}, #{ylqxzcrbarmc}, #{ylqxzcrbarywmc},#{cpms}
#{thirdSysFk},#{updateTime},#{genKeyFk},#{supName},#{price}
)
(code, name, measname, spec, registerNo, manufactory,
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
thirdSysFk, updateTime, genKeyFk, supName, price)
values (#{code},
#{name},
#{measname},
#{spec},
#{registerNo},
#{manufactory},
#{cplb}, #{flbm}, #{qxlb}, #{ybbm}, #{sptm},
#{tyshxydm}, #{zczbhhzbapzbh}, #{ylqxzcrbarmc}, #{ylqxzcrbarywmc}, #{cpms}
#{thirdSysFk}, #{updateTime}, #{genKeyFk}, #{supName}, #{price})
</insert>
<insert id="insertProductsDetailImports" keyProperty="id" parameterType="java.util.List">
@ -63,17 +59,22 @@
#{item.manufactory},
#{item.cplb}, #{item.flbm}, #{item.qxlb}, #{item.ybbm},#{item.sptm},
#{item.tyshxydm}, #{item.zczbhhzbapzbh}, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc},#{item.cpms},
#{item.thirdSysFk} ,#{item.updateTime},#{item.genKeyFk} ,#{item.supName} ,{item.price} )
#{item.thirdSysFk} ,#{item.updateTime},#{item.genKeyFk} ,#{item.supName} ,#{item.price} )
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE FROM thr_products_import_detail WHERE id = #{id}
DELETE
FROM thr_products_import_detail
WHERE id = #{id}
</delete>
<delete id="deleteByGenkey" parameterType="Map">
DELETE FROM thr_products_import_detail WHERE genKeyFk = #{genKey}
DELETE
FROM thr_products_import_detail
WHERE genKeyFk = #{genKey}
</delete>
<update id="updateProductsDetailImport" parameterType="com.glxp.api.admin.entity.thrsys.ThrProductsImportDetailEntity">
<update id="updateProductsDetailImport"
parameterType="com.glxp.api.admin.entity.thrsys.ThrProductsImportDetailEntity">
UPDATE thr_products_import_detail
<trim prefix="set" suffixOverrides=",">
<if test="code != null">code=#{code},</if>

Loading…
Cancel
Save