导入模板修改

master
zhaocheng 2 years ago
parent 8a439b935b
commit 97a57f60bc
  1. 3
      app/controller/Repeat.php
  2. 6
      extend/service/CarInfoHandle.php
  3. BIN
      public/static/tpl.xlsx

@ -158,8 +158,7 @@ class Repeat extends BaseController
Db::startTrans();
try {
Db::query("insert into car_info_t( `id`, `register_date`, `car_man`, `car_number`, `car_phone`, `car_frame_no`, `car_no`, `engine_no`, `factory_model`, `purchase_price`, `company`, `insurer1_date`, `insurer2_date`, `id_man`, `id_number`, `id_phone`, `insured_man`, `insured_number`, `insured_phone`, `link_man_1`, `link_phone_1`, `link_man_2`, `link_phone_2`, `link_man_3`, `link_phone_3`, `is_delete`, `source`, `is_export_bhx`, `is_export_bmc`, `is_export_failed`, `is_export_none_bmc`, `is_update_bhx`, `create_timestamp`, `update_timestamp`, `is_export_failed_bmc`, `tag`)
select `id`, `register_date`, `car_man`, `car_number`, `car_phone`, `car_frame_no`, `car_no`, `engine_no`, `factory_model`, `purchase_price`, `company`, `insurer1_date`, `insurer2_date`, `id_man`, `id_number`, `id_phone`, `insured_man`, `insured_number`, `insured_phone`, `link_man_1`, `link_phone_1`, `link_man_2`, `link_phone_2`, `link_man_3`, `link_phone_3`, `is_delete`, `source`, `is_export_bhx`, `is_export_bmc`, `is_export_failed`, `is_export_none_bmc`, `is_update_bhx`, `create_timestamp`, `update_timestamp`, `is_export_failed_bmc`, `tag` from repeat_data_t where repeat_id=:id;",
['id' => $id]);
select `id`, `register_date`, `car_man`, `car_number`, `car_phone`, `car_frame_no`, `car_no`, `engine_no`, `factory_model`, `purchase_price`, `company`, `insurer1_date`, `insurer2_date`, `id_man`, `id_number`, `id_phone`, `insured_man`, `insured_number`, `insured_phone`, `link_man_1`, `link_phone_1`, `link_man_2`, `link_phone_2`, `link_man_3`, `link_phone_3`, `is_delete`, `source`, `is_export_bhx`, `is_export_bmc`, `is_export_failed`, `is_export_none_bmc`, `is_update_bhx`, `create_timestamp`, `update_timestamp`, `is_export_failed_bmc`, `tag` from repeat_data_t where repeat_id=:id;", ['id' => $id]);
Db::table('repeat_data_t')->where('repeat_id', $id)->delete();
Db::commit();
} catch (\Exception $e) {

@ -567,6 +567,12 @@ class CarInfoHandle
'factory_model' => trim(trim($worksheet->getCellByColumnAndRow(9, $row)->getValue(), '"')),
'purchase_price' => trim(trim($worksheet->getCellByColumnAndRow(10, $row)->getValue(), '"')),
'tag' => trim(trim($worksheet->getCellByColumnAndRow(11, $row)->getValue(), '"')),
'insurer2_date' => trim(trim($worksheet->getCellByColumnAndRow(12, $row)->getValue(), '"')),
'insurer1_date' => trim(trim($worksheet->getCellByColumnAndRow(13, $row)->getValue(), '"')),
'link_man_1' => trim(trim($worksheet->getCellByColumnAndRow(14, $row)->getValue(), '"')),
'link_phone_1' => trim(trim($worksheet->getCellByColumnAndRow(15, $row)->getValue(), '"')),
'link_man_2' => trim(trim($worksheet->getCellByColumnAndRow(16, $row)->getValue(), '"')),
'link_phone_2' => trim(trim($worksheet->getCellByColumnAndRow(17, $row)->getValue(), '"')),
'source' => $id,
'create_timestamp' => $now,
'update_timestamp' => $now

Binary file not shown.
Loading…
Cancel
Save