Browse Source

完善入库保存

master
yxt_djz 3 years ago
parent
commit
13f0b5cc2e
  1. 34
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmapplyinbound/ScmApplyInboundService.java
  2. 2
      anrui-scm/anrui-scm-ui/.env.development

34
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmapplyinbound/ScmApplyInboundService.java

@ -1,6 +1,7 @@
package com.yxt.anrui.scm.biz.scmapplyinbound;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.thread.ThreadUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -470,16 +471,10 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) {
ScmApplyInbound scmApplyInbound = scmApplyInboundService.fetchBySid(businessSid);
List<ScmApplyInboundVehicleDto> scmApplyInboundVehicleDtos = scmApplyInboundVehicleService.fetchByMainSid(businessSid);
List<BaseVehicleDto> baseVehicleDtos = new ArrayList<>();
ResultBean<List<String>> resultBean1 = saveEntryCarInspectedInfo(bv, businessSid, booad, scmApplyInbound, scmApplyInboundVehicleDtos);
if (!resultBean1.getSuccess()) {
return rb.setMsg("验车业务模块的数据推送失败!");
}
for (ScmApplyInboundVehicleDto scmApplyInboundVehicleDto : scmApplyInboundVehicleDtos) {
saveItem(resultBean1);
newBaseVehicleDto(bv, booad, baseVehicleDtos, scmApplyInboundVehicleDto);
}
baseVehicleFeign.saveOrUpdate(baseVehicleDtos, OperVehicleState.EventType.RZ_SAVEVEH.getCode());
ResultBean<List<String>> sids = scmVehicleExamineService.saveEntryCarInspectedInfoBatch(scmApplyInbound.getPriceDate(),
bv.getUserSid(),booad,businessSid,scmApplyInboundVehicleDtos);
saveItem(sids);
newBaseVehicleDto(booad, scmApplyInboundVehicleDtos);
// 入账审批通关修改采购订单状态 state = 1
if (booad.getManPurOrderTypeKey().equals(ManPurOrderType.ManOrderType.PC_ORDER.getCode())) {
busVehicleOrderFeign.updateState(scmApplyInbound.getVehicleOrderSid());
@ -491,15 +486,14 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa
}
}
private void newBaseVehicleDto(BusinessVariables bv, ScmApplyInbound booad, List<BaseVehicleDto> baseVehicleDtos, ScmApplyInboundVehicleDto scmApplyInboundVehicleDto) {
private void newBaseVehicleDto(ScmApplyInbound booad,List<ScmApplyInboundVehicleDto> scmApplyInboundVehicleDtos) {
List<BaseVehicleDto> baseVehicleDtos=new ArrayList<>();
for(ScmApplyInboundVehicleDto s:scmApplyInboundVehicleDtos){
//车辆台账推送数据
BaseVehicleDto baseVehicleDto = new BaseVehicleDto();
baseVehicleDto.setVinNo(scmApplyInboundVehicleDto.getVinNo());
baseVehicleDto.setVinNo(s.getVinNo());
baseVehicleDto.setModelSid(booad.getModelSid());
baseVehicleDto.setModelName(booad.getModelName());
String userSid = bv.getUserSid();
ResultBean<String> pathSidByUserSid = sysStaffOrgFeign.getPathSidByUserSid(userSid);
String data = pathSidByUserSid.getData();
baseVehicleDto.setCreateOrgSid(booad.getUseOrgSid());
baseVehicleDto.setCreateOrgName(booad.getUseOrgName());
baseVehicleDto.setUseOrgSid(booad.getUseOrgSid());
@ -531,6 +525,8 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa
baseVehicleDto.setManPurOrderTypeValue(booad.getManPurOrderTypeValue());
baseVehicleDtos.add(baseVehicleDto);
}
ThreadUtil.execute(() -> baseVehicleFeign.saveOrUpdate(baseVehicleDtos, OperVehicleState.EventType.RZ_SAVEVEH.getCode()));
}
private void saveItem( ResultBean<List<String>> resultBean1) {
List<ScmVehinspectItemDto> list=new ArrayList();
@ -543,14 +539,6 @@ public class ScmApplyInboundService extends MybatisBaseService<ScmApplyInboundMa
}
scmVehinspectItemService.saveItem(list);
}
private ResultBean<List<String>> saveEntryCarInspectedInfo(BusinessVariables bv, String businessSid, ScmApplyInbound booad,
ScmApplyInbound scmApplyInbound,
List<ScmApplyInboundVehicleDto> scmApplyInboundVehicleDtos) {
ResultBean<List<String>> resultBean1 = scmVehicleExamineService.saveEntryCarInspectedInfoBatch(scmApplyInbound.getPriceDate(),bv.getUserSid(),booad,businessSid,scmApplyInboundVehicleDtos);
return resultBean1;
}
/**
* 创建采购入库单
* @param scmApplyInbound

2
anrui-scm/anrui-scm-ui/.env.development

@ -7,5 +7,5 @@ VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
##VUE_APP_URL = "http://26077a35f5.wicp.vip"
##VUE_APP_URL = "http://192.168.1.116:8111"
VUE_APP_URL = "http://120.46.172.184:8111"
VUE_APP_URL = "http://127.0.0.1:8111"
##VUE_APP_URL = "http://1mn7264414.qicp.vip"

Loading…
Cancel
Save