10994015 1 year ago
parent
commit
4c177f24b5
  1. 50
      wms/contract/api/postContractData.php

50
wms/contract/api/postContractData.php

@ -178,56 +178,6 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "") {
$maintainance = "E"; $maintainance = "E";
$repairerid = $mworker; $repairerid = $mworker;
$repairername = $worker['name']; $repairername = $worker['name'];
<<<<<<< HEAD
=======
foreach($facilityno as $fno){
$sql_str = "INSERT INTO facility (contractno, define, facilityno, latitude, longitude, customerid, weight, numberofpassenger, numberofstop, numberoffloor, opentype, speed, repairtype, maintainance, facility_kind, address, repairerid, repairername, creater, create_at, area, takecertificatedate, licensedate)
VALUES (:contractno, :define, :facilityno, :latitude, :longitude, :customerid, :weight, :numberofpassenger, :numberofstop, :numberoffloor, :opentype, :speed, :repairtype, :maintainance, :facility_kind, :address, :repairerid, :repairername, :creater, :create_at, :area, :takecertificatedate, :licensedate)";
$stmt = $conn -> prepare($sql_str);
$stmt -> bindParam(':contractno' ,$contractno);
$stmt -> bindParam(':define' ,$define);
$stmt -> bindParam(':facilityno' ,$fno);
$stmt -> bindParam(':latitude' ,$latitude);
$stmt -> bindParam(':longitude' ,$longitude);
$stmt -> bindParam(':customerid' ,$customerid);
$stmt -> bindParam(':weight' ,$weight);
$stmt -> bindParam(':numberofpassenger' ,$numberofpassenger);
$stmt -> bindParam(':numberofstop' ,$numberofstop);
$stmt -> bindParam(':numberoffloor' ,$numberoffloor);
$stmt -> bindParam(':opentype' ,$opentype);
$stmt -> bindParam(':speed' ,$speed);
$stmt -> bindParam(':repairtype' ,$repairtype);
$stmt -> bindParam(':maintainance' ,$maintainance);
$stmt -> bindParam(':facility_kind' ,$facility_kind);
$stmt -> bindParam(':address' ,$address);
$stmt -> bindParam(':repairerid' ,$repairerid);
$stmt -> bindParam(':repairername' ,$repairername);
$stmt -> bindParam(':creater' ,$creater);
$stmt -> bindParam(':create_at' ,$create_at);
$stmt -> bindParam(':area' ,$area);
$stmt -> bindParam(':takecertificatedate' ,$takecertificatedate);
$stmt -> bindParam(':licensedate' ,$licensedate);
$result = $stmt -> execute();
}
//create schedule table
$comboMo = new CreateComboNo();
$sql_str = 'INSERT INTO schedule (contractno, facilityno, combono, repairerid, repairername, duedate, creater, create_at) VALUES (:contractno, :facilityno, :combono, :repairerid, :repairername, :duedate, :creater, :create_at)';
$stmt = $conn -> prepare($sql_str);
$stmt -> bindParam(':contractno' ,$contractno);
$stmt -> bindParam(':facilityno' ,$facilityno);
$stmt -> bindParam(':combono' ,$combono);
$stmt -> bindParam(':repairerid' ,$repairerid);
$stmt -> bindParam(':repairername' ,$repairername);
$stmt -> bindParam(':duedate' ,$duedate);
$stmt -> bindParam(':creater' ,$creater);
$stmt -> bindParam(':create_at' ,$create_at);
$result = $stmt -> execute();
>>>>>>> f6b04618 (1106)
foreach($facilityno as $fno){ foreach($facilityno as $fno){

Loading…
Cancel
Save