dengyj 3 gadi atpakaļ
vecāks
revīzija
56465f01a2

+ 13 - 0
src/main/java/com/steerinfo/baseinfo/meterbasecar/controller/MeterBaseCarController.java

@@ -5,6 +5,8 @@ import com.steerinfo.baseinfo.appverificationcode.mapper.AppVerificationCodeMapp
 import com.steerinfo.baseinfo.appverificationcode.model.AppVerificationCode;
 import com.steerinfo.baseinfo.meterbasecar.mapper.MeterBaseCarMapper;
 import com.steerinfo.baseinfo.meterbasecussupcar.model.MeterBaseCusSupCar;
+import com.steerinfo.baseinfo.meterbasecustomersupplier.mapper.MeterBaseCustomerSupplierMapper;
+import com.steerinfo.baseinfo.meterbasecustomersupplier.model.MeterBaseCustomerSupplier;
 import com.steerinfo.baseinfo.meterbasedriver.mapper.MeterBaseDriverMapper;
 import com.steerinfo.baseinfo.meterbasedriver.model.MeterBaseDriver;
 import com.steerinfo.baseinfo.meterbasedriver.service.IMeterBaseDriverService;
@@ -75,6 +77,9 @@ public class MeterBaseCarController extends BaseRESTfulController {
     @Resource
     MeterBaseDriverMapper meterBaseDriverMapper;
 
+    @Resource
+    MeterBaseCustomerSupplierMapper meterBaseCustomerSupplierMapper;
+
     @Resource
     MeterBaseTravellingMerchantMapper meterBaseTravellingMerchantMapper;
 
@@ -795,6 +800,10 @@ public class MeterBaseCarController extends BaseRESTfulController {
                     if(params.get("customerSupplierNo") != null ) {
                         if(!StringUtils.isEmpty(params.get("customerSupplierNo").toString())) {
                             car.setCustomerSupplierNo(params.get("customerSupplierNo").toString());
+                            MeterBaseCustomerSupplier supplier = meterBaseCustomerSupplierMapper.selectByPrimaryKey(car.getCustomerSupplierNo());
+                            if(supplier != null) {
+                                car.setCustomerSupplierName(supplier.getCustomerSupplierName());
+                            }
                         }
                     }
                     //客商名称
@@ -866,6 +875,10 @@ public class MeterBaseCarController extends BaseRESTfulController {
                 if(params.get("customerSupplierNo") != null ) {
                     if(!StringUtils.isEmpty(params.get("customerSupplierNo").toString())) {
                         car.setCustomerSupplierNo(params.get("customerSupplierNo").toString());
+                        MeterBaseCustomerSupplier supplier = meterBaseCustomerSupplierMapper.selectByPrimaryKey(car.getCustomerSupplierNo());
+                        if(supplier != null) {
+                            car.setCustomerSupplierName(supplier.getCustomerSupplierName());
+                        }
                     }
                 }
                 //客商名称