2afe39d5 by sayhoChun

production specification api modified and tested, event comment added

1 parent 1df05bc3
......@@ -78,7 +78,25 @@ if (! class_exists("ApiBoard"))
WHERE eventNo='{$eventNo}'
";
$result=$this->getArray($sql);
return $this->makeResultJson("1", "", $result);
if($result != null){
$sql="
SELECT C.*, U.userID, U.userNo
FROM tblComment C
JOIN tblUser U ON C.userFk=U.userNo
WHERE targetFk='{$eventNo}' AND commentType='EV'
ORDER BY C.commentGroup DESC, C.gOrder ASC
";
$commentList=$this->getArray($sql);
return $this->makeResultJson("1", "", $result, Array(
"commentList" => $commentList
));
}
else{
return $this->makeResultJson("-1000", "내역이 없습니다.");
}
}
function getListCountBoard(){
......@@ -484,71 +502,137 @@ if (! class_exists("ApiBoard"))
//$userFk = $this->appUser["no"];
$userFk = $this->req["userFk"];
$requestDate=$this->req["requestDate"];
$customerName=$this->req["customerName"];
$companyName=$this->req["companyName"];
$vehicleTON=$this->req["vehicleTON"];
$vehicleText=$this->req["vehicleText"];
$vehicleType=$this->req["vehicleType"];
$productName=$this->req["productName"];
$telephone=$this->req["telephone"];
$managerFk=$this->req["managerFk"];
$type=$this->req["type"];
$typeValue=$this->req["typeValue"];
$internalLength=$this->req["internalLength"];
$internalHeight=$this->req["internalHeight"];
$internalWidth=$this->req["internalWidth"];
$alCoil=$this->req["alCoil"];
$alCoilValue=$this->req["alCoilValue"];
$floor=$this->req["floor"];
$floorValue=$this->req["floorValue"];
$floorValueT=$this->req["floorValueT"];
$floorValueText=$this->req["floorValueText"];
$tent=$this->req["tent"];
$sideBoard=$this->req["sideBoard"];
$sideBoardValue=$this->req["sideBoardValue"];
$windStopper=$this->req["windStopper"];
$windStopperValue=$this->req["windStopperValue"];
$freezer=$this->req["freezer"];
$gate=$this->req["gate"];
$freezerValue=$this->req["freezerValue"];
$gateType=$this->req["gateType"];
$gateSize=$this->req["gateSize"];
$gateValue=$this->req["gateValue"];
$load=$this->req["load"];
$frontBack=$this->req["frontBack"];
$eTrackGate=$this->req["eTrackGate"];
$eTrackWing=$this->req["eTrackWing"];
$turnBuckle=$this->req["turnBuckle"];
$eTrackValue=$this->req["eTrackValue"];
$toolBucket=$this->req["toolBucket"];
$toolBucketValue=$this->req["toolBucketValue"];
$bumperFootHold=$this->req["bumperFootHold"];
$wingProtector=$this->req["wingProtector"];
$axis=$this->req["axis"];
$axisValue=$this->req["axisValue"];
$balance=$this->req["balance"];
$specialAddition=$this->req["specialAddition"];
$sql="
INSERT INTO tblProductionSpec(userFk, requestDate, companyName, vehicleTON, vehicleText, vehicleType, productName, telephone, managerFk, `type`, internalLength, internalHeight, internalWidth, alCoil,
`floor`, floorValue, tent, sideBoard, windStopper, freezer, gate, `load`, eTrackGate, eTrackWing, turnBuckle, toolBucket, bumperFootHold, wingProtector, axis, axisValue, specialAddition, status, regDate)
INSERT INTO tblProductionSpec(
userFk,
requestDate,
customerName,
companyName,
vehicleTON,
vehicleText,
vehicleType,
productName,
telephone,
`type`,
typeValue,
internalLength,
internalHeight,
internalWidth,
alCoil,
alCoilValue,
`floor`,
floorValueT,
floorValueText,
tent,
sideBoard,
sideBoardValue,
windStopper,
windStopperValue,
freezer,
freezerValue,
gateType,
gateSize,
gateValue,
`load`,
frontBack,
eTrackGate,
eTrackWing,
eTrackValue,
toolBucket,
toolBucketValue,
bumperFootHold,
wingProtector,
axis,
axisValue,
balance,
specialAddition,
status,
regDate
)
VALUES
(
'{$userFk}',
'{$requestDate}',
'{$customerName}',
'{$companyName}',
'{$vehicleTON}',
'{$vehicleText}',
'{$vehicleType}',
'{$productName}',
'{$telephone}',
'{$managerFk}',
'{$type}',
'{$typeValue}',
'{$internalLength}',
'{$internalHeight}',
'{$internalWidth}',
'{$alCoil}',
'{$alCoilValue}',
'{$floor}',
'{$floorValue}',
'{$floorValueT}',
'{$floorValueText}',
'{$tent}',
'{$sideBoard}',
'{$sideBoardValue}',
'{$windStopper}',
'{$windStopperValue}',
'{$freezer}',
'{$gate}',
'{$freezerValue}',
'{$gateType}',
'{$gateSize}',
'{$gateValue}',
'{$load}',
'{$frontBack}',
'{$eTrackGate}',
'{$eTrackWing}',
'{$turnBuckle}',
'{$eTrackValue}',
'{$toolBucket}',
'{$toolBucketValue}',
'{$bumperFootHold}',
'{$wingProtector}',
'{$axis}',
'{$axisValue}',
'{$balance}',
'{$specialAddition}',
1,
NOW()
......@@ -591,7 +675,7 @@ if (! class_exists("ApiBoard"))
function getListOfProductionSpec(){
$dateFormer=$this->req["dateFormer"];
$dateLatter=$this->req["dateLatter"];
$managerFk=$this->req["managerFk"];
$userFk=$this->req["userFk"];
$where="WHERE status=1";
if(!empty($dateFormer)){
......@@ -601,7 +685,7 @@ if (! class_exists("ApiBoard"))
$where .= " AND DATE_FORMAT(requestDate, '%Y%m%d') <= DATE_FORMAT('{$dateLatter}', '%Y%m%d')";
}
if(!empty($managerFk)){
$where .= " AND managerFk='{$managerFk}'";
$where .= " AND userFk'{$userFk}'";
}
$sql="
......@@ -634,8 +718,9 @@ if (! class_exists("ApiBoard"))
$productionNo=$this->req["productionNo"];
$productionNo=3;
$sql="
SELECT *
FROM tblProductionSpec
SELECT PS.*, U.userNo, U.userName
FROM tblProductionSpec PS
JOIN tblUser U ON PS.userFk=U.userNo
WHERE productionNo='{$productionNo}'
";
$info=$this->getRow($sql);
......@@ -645,10 +730,10 @@ if (! class_exists("ApiBoard"))
//담당자 리스트
function getListOfManager(){
$sql="
SELECT managerNo, name
FROM tblManager
WHERE status=1
ORDER BY name ASC
SELECT userNo, userName
FROM tblUser
WHERE userType=2 AND STATUS=1
ORDER BY userName ASC;
";
$list=$this->getArray($sql);
if(sizeof($list)>0)
......
......@@ -197,6 +197,7 @@ $(document).ready(function(){
data:{
"userFk" : 1,
"requestDate" : "2017-10-18",
"customerName" : "전세호",
"companyName" : "리치",
"vehicleTON" : "123123",
"vehicleText" : "vehicleText",
......@@ -205,26 +206,37 @@ $(document).ready(function(){
"telephone" : "01001011",
"managerFk" : "1",
"type" : "R",
"typeValue" : "RRRR",
"internalLength" : 108,
"internalHeight" : 120,
"internalWidth" : 32,
"alCoil" : "G",
"alCoilValue" : "GGGGG",
"floor" : "C",
"floorValue" : 22,
"floorValueT" : 13,
"floorValueText" : "CCCC",
"tent" : 0,
"sideBoard" : 1,
"sideBoardValue" : "SSSS",
"windStopper" : 1,
"windStopperValue" : "WWWWW",
"freezer" : 0,
"gate" : 2,
"freezerValue" : "FFFFF",
"gateType" : 2,
"gateSize" : 2,
"gateValue" : "GGGGG",
"load" : "S",
"frontBack" : 2,
"eTrackGate" : 0,
"eTrackWing" : 1,
"turnBuckle" : "rkskek",
"eTrackValue" : "EEEEEE",
"toolBucket" : 2,
"toolBucketValue" : "TTTTT",
"bumberFootHold" : 1,
"wingProtector" : 2,
"axis" : 1,
"axisValue" : "302",
"balance" : 10241024,
"specialAddition" : "special"
},
success : function(data){
......