|
|
@ -29,12 +29,18 @@ import cn.hutool.core.bean.BeanUtil; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.yxt.anrui.base.api.baseinternalpurchase.BaseInternalPurchaseDetailsVo; |
|
|
|
import com.yxt.anrui.base.api.baseinternalpurchase.BaseInternalPurchaseFeign; |
|
|
|
import com.yxt.anrui.base.api.basemanufacturer.BaseManufacturerAllVo; |
|
|
|
import com.yxt.anrui.base.api.basemanufacturer.BaseManufacturerFeign; |
|
|
|
import com.yxt.anrui.base.api.baseoutsourcingapplication.BaseOutsourcingApplicationDetailsVo; |
|
|
|
import com.yxt.anrui.base.api.baseoutsourcingapplication.BaseOutsourcingApplicationFeign; |
|
|
|
import com.yxt.anrui.base.api.basevehicle.BaseVehicleDto; |
|
|
|
import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign; |
|
|
|
import com.yxt.anrui.base.api.basevehiclebrand.BaseVehicleBrand; |
|
|
|
import com.yxt.anrui.base.api.basevehiclebrand.BaseVehicleBrandFeign; |
|
|
|
import com.yxt.anrui.base.api.busvehicleapply.BusVehicleApplyDetailsVo; |
|
|
|
import com.yxt.anrui.base.api.busvehicleapply.BusVehicleApplyFeign; |
|
|
|
import com.yxt.anrui.base.common.enums.ManPurOrderType; |
|
|
|
import com.yxt.anrui.base.common.enums.OperVehicleState; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordDto; |
|
|
@ -119,6 +125,12 @@ public class ScmVehicleExamineService extends MybatisBaseService<ScmVehicleExami |
|
|
|
|
|
|
|
@Autowired |
|
|
|
BaseManufacturerFeign baseManufacturerFeign; |
|
|
|
@Autowired |
|
|
|
private BusVehicleApplyFeign busVehicleApplyFeign; |
|
|
|
@Autowired |
|
|
|
private BaseInternalPurchaseFeign baseInternalPurchaseFeign; |
|
|
|
@Autowired |
|
|
|
private BaseVehicleBrandFeign baseVehicleBrandFeign; |
|
|
|
|
|
|
|
|
|
|
|
private QueryWrapper<ScmVehicleExamine> createQueryWrapper(ScmVehicleExamineQuery query) { |
|
|
@ -186,6 +198,36 @@ public class ScmVehicleExamineService extends MybatisBaseService<ScmVehicleExami |
|
|
|
if ("1".equals(record.getInspectedType())) { |
|
|
|
record.setShowInspectedBtn(true); |
|
|
|
} |
|
|
|
String purchaseTypeKey = record.getPurchaseTypeKey(); |
|
|
|
String businessSid = record.getBusinessSid(); |
|
|
|
if ("001".equals(purchaseTypeKey)){//排产
|
|
|
|
BusVehicleApplyDetailsVo busVehicleApplyDetailsVo = busVehicleApplyFeign.fetchSid(businessSid).getData(); |
|
|
|
String carBrandSid = busVehicleApplyDetailsVo.getCarBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
record.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
}else if ("002".equals(purchaseTypeKey)){//外采
|
|
|
|
BaseOutsourcingApplicationDetailsVo baseOutsourcingApplicationDetailsVo = baseOutsourcingApplicationFeign.fetchBySid(businessSid).getData(); |
|
|
|
String carBrandSid = baseOutsourcingApplicationDetailsVo.getCarBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
record.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
}else if ("003".equals(purchaseTypeKey)){//内购
|
|
|
|
BaseInternalPurchaseDetailsVo baseInternalPurchaseDetailsVo = baseInternalPurchaseFeign.fetchDetailsBySid(businessSid).getData(); |
|
|
|
String carBrandSid = baseInternalPurchaseDetailsVo.getBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
record.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return iPage; |
|
|
|
} |
|
|
@ -289,6 +331,36 @@ public class ScmVehicleExamineService extends MybatisBaseService<ScmVehicleExami |
|
|
|
List<String> factoryImages = new ArrayList<>(); |
|
|
|
List<String> carInspectedImages = new ArrayList<>(); |
|
|
|
AppScmVehicleExamineInfoVo vo = baseMapper.getCarInspectedInfo(inspectedSid); |
|
|
|
String businessSid = vo.getBusinessSid(); |
|
|
|
String purchaseTypeKey = vo.getPurchaseKey(); |
|
|
|
if ("001".equals(purchaseTypeKey)){//排产
|
|
|
|
BusVehicleApplyDetailsVo busVehicleApplyDetailsVo = busVehicleApplyFeign.fetchSid(businessSid).getData(); |
|
|
|
String carBrandSid = busVehicleApplyDetailsVo.getCarBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
vo.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
}else if ("002".equals(purchaseTypeKey)){//外采
|
|
|
|
BaseOutsourcingApplicationDetailsVo baseOutsourcingApplicationDetailsVo = baseOutsourcingApplicationFeign.fetchBySid(businessSid).getData(); |
|
|
|
String carBrandSid = baseOutsourcingApplicationDetailsVo.getCarBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
vo.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
}else if ("003".equals(purchaseTypeKey)){//内购
|
|
|
|
BaseInternalPurchaseDetailsVo baseInternalPurchaseDetailsVo = baseInternalPurchaseFeign.fetchDetailsBySid(businessSid).getData(); |
|
|
|
String carBrandSid = baseInternalPurchaseDetailsVo.getBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
vo.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ManPurOrderType.ManOrderType.WC_ORDER.getCode().equals(vo.getPurchaseKey())) { |
|
|
|
vo.setEditVin(true); |
|
|
|
} else { |
|
|
@ -351,7 +423,36 @@ public class ScmVehicleExamineService extends MybatisBaseService<ScmVehicleExami |
|
|
|
List<String> carInspectedImages = new ArrayList<>(); |
|
|
|
|
|
|
|
AppScmVehicleExamineDetailsVo vo = baseMapper.getCarInspected(inspectedSid); |
|
|
|
|
|
|
|
String businessSid = vo.getBusinessSid(); |
|
|
|
String purchaseTypeKey = vo.getPurchaseTypeKey(); |
|
|
|
if ("001".equals(purchaseTypeKey)){//排产
|
|
|
|
BusVehicleApplyDetailsVo busVehicleApplyDetailsVo = busVehicleApplyFeign.fetchSid(businessSid).getData(); |
|
|
|
String carBrandSid = busVehicleApplyDetailsVo.getCarBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
vo.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
}else if ("002".equals(purchaseTypeKey)){//外采
|
|
|
|
BaseOutsourcingApplicationDetailsVo baseOutsourcingApplicationDetailsVo = baseOutsourcingApplicationFeign.fetchBySid(businessSid).getData(); |
|
|
|
String carBrandSid = baseOutsourcingApplicationDetailsVo.getCarBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
vo.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
}else if ("003".equals(purchaseTypeKey)){//内购
|
|
|
|
BaseInternalPurchaseDetailsVo baseInternalPurchaseDetailsVo = baseInternalPurchaseFeign.fetchDetailsBySid(businessSid).getData(); |
|
|
|
String carBrandSid = baseInternalPurchaseDetailsVo.getBrandSid(); |
|
|
|
if (StringUtils.isNotBlank(carBrandSid)){ |
|
|
|
BaseVehicleBrand baseVehicleBrand = baseVehicleBrandFeign.fetchBySid(carBrandSid); |
|
|
|
BaseManufacturerAllVo data = baseManufacturerFeign.details(baseVehicleBrand.getManufacturerSid()).getData(); |
|
|
|
String manufacturerName = data.getBaseManufacturerDto().getManufacturerName(); |
|
|
|
vo.setManufacturerName(manufacturerName); |
|
|
|
} |
|
|
|
} |
|
|
|
List<ScmVehinspectItemVo> scmVehinspectItemVos = scmVehinspectItemService.selInfoByVehInspectSid(inspectedSid); |
|
|
|
List<AppScmInspectionItemVo> inspectionItemVos = new ArrayList<>(); |
|
|
|
for (ScmVehinspectItemVo scmVehinspectItemVo : scmVehinspectItemVos) { |
|
|
|