production specification api modified and tested, event comment added
Showing
2 changed files
with
119 additions
and
22 deletions
... | @@ -78,7 +78,25 @@ if (! class_exists("ApiBoard")) | ... | @@ -78,7 +78,25 @@ if (! class_exists("ApiBoard")) |
78 | WHERE eventNo='{$eventNo}' | 78 | WHERE eventNo='{$eventNo}' |
79 | "; | 79 | "; |
80 | $result=$this->getArray($sql); | 80 | $result=$this->getArray($sql); |
81 | return $this->makeResultJson("1", "", $result); | 81 | |
82 | if($result != null){ | ||
83 | $sql=" | ||
84 | SELECT C.*, U.userID, U.userNo | ||
85 | FROM tblComment C | ||
86 | JOIN tblUser U ON C.userFk=U.userNo | ||
87 | WHERE targetFk='{$eventNo}' AND commentType='EV' | ||
88 | ORDER BY C.commentGroup DESC, C.gOrder ASC | ||
89 | "; | ||
90 | |||
91 | $commentList=$this->getArray($sql); | ||
92 | |||
93 | return $this->makeResultJson("1", "", $result, Array( | ||
94 | "commentList" => $commentList | ||
95 | )); | ||
96 | } | ||
97 | else{ | ||
98 | return $this->makeResultJson("-1000", "내역이 없습니다."); | ||
99 | } | ||
82 | } | 100 | } |
83 | 101 | ||
84 | function getListCountBoard(){ | 102 | function getListCountBoard(){ |
... | @@ -484,71 +502,137 @@ if (! class_exists("ApiBoard")) | ... | @@ -484,71 +502,137 @@ if (! class_exists("ApiBoard")) |
484 | //$userFk = $this->appUser["no"]; | 502 | //$userFk = $this->appUser["no"]; |
485 | $userFk = $this->req["userFk"]; | 503 | $userFk = $this->req["userFk"]; |
486 | $requestDate=$this->req["requestDate"]; | 504 | $requestDate=$this->req["requestDate"]; |
505 | $customerName=$this->req["customerName"]; | ||
487 | $companyName=$this->req["companyName"]; | 506 | $companyName=$this->req["companyName"]; |
488 | $vehicleTON=$this->req["vehicleTON"]; | 507 | $vehicleTON=$this->req["vehicleTON"]; |
489 | $vehicleText=$this->req["vehicleText"]; | 508 | $vehicleText=$this->req["vehicleText"]; |
490 | $vehicleType=$this->req["vehicleType"]; | 509 | $vehicleType=$this->req["vehicleType"]; |
491 | $productName=$this->req["productName"]; | 510 | $productName=$this->req["productName"]; |
492 | $telephone=$this->req["telephone"]; | 511 | $telephone=$this->req["telephone"]; |
493 | $managerFk=$this->req["managerFk"]; | ||
494 | $type=$this->req["type"]; | 512 | $type=$this->req["type"]; |
513 | $typeValue=$this->req["typeValue"]; | ||
495 | $internalLength=$this->req["internalLength"]; | 514 | $internalLength=$this->req["internalLength"]; |
496 | $internalHeight=$this->req["internalHeight"]; | 515 | $internalHeight=$this->req["internalHeight"]; |
497 | $internalWidth=$this->req["internalWidth"]; | 516 | $internalWidth=$this->req["internalWidth"]; |
498 | $alCoil=$this->req["alCoil"]; | 517 | $alCoil=$this->req["alCoil"]; |
518 | $alCoilValue=$this->req["alCoilValue"]; | ||
499 | $floor=$this->req["floor"]; | 519 | $floor=$this->req["floor"]; |
500 | $floorValue=$this->req["floorValue"]; | 520 | $floorValueT=$this->req["floorValueT"]; |
521 | $floorValueText=$this->req["floorValueText"]; | ||
501 | $tent=$this->req["tent"]; | 522 | $tent=$this->req["tent"]; |
502 | $sideBoard=$this->req["sideBoard"]; | 523 | $sideBoard=$this->req["sideBoard"]; |
524 | $sideBoardValue=$this->req["sideBoardValue"]; | ||
503 | $windStopper=$this->req["windStopper"]; | 525 | $windStopper=$this->req["windStopper"]; |
526 | $windStopperValue=$this->req["windStopperValue"]; | ||
504 | $freezer=$this->req["freezer"]; | 527 | $freezer=$this->req["freezer"]; |
505 | $gate=$this->req["gate"]; | 528 | $freezerValue=$this->req["freezerValue"]; |
529 | $gateType=$this->req["gateType"]; | ||
530 | $gateSize=$this->req["gateSize"]; | ||
531 | $gateValue=$this->req["gateValue"]; | ||
506 | $load=$this->req["load"]; | 532 | $load=$this->req["load"]; |
533 | $frontBack=$this->req["frontBack"]; | ||
507 | $eTrackGate=$this->req["eTrackGate"]; | 534 | $eTrackGate=$this->req["eTrackGate"]; |
508 | $eTrackWing=$this->req["eTrackWing"]; | 535 | $eTrackWing=$this->req["eTrackWing"]; |
509 | $turnBuckle=$this->req["turnBuckle"]; | 536 | $eTrackValue=$this->req["eTrackValue"]; |
510 | $toolBucket=$this->req["toolBucket"]; | 537 | $toolBucket=$this->req["toolBucket"]; |
538 | $toolBucketValue=$this->req["toolBucketValue"]; | ||
511 | $bumperFootHold=$this->req["bumperFootHold"]; | 539 | $bumperFootHold=$this->req["bumperFootHold"]; |
512 | $wingProtector=$this->req["wingProtector"]; | 540 | $wingProtector=$this->req["wingProtector"]; |
513 | $axis=$this->req["axis"]; | 541 | $axis=$this->req["axis"]; |
514 | $axisValue=$this->req["axisValue"]; | 542 | $axisValue=$this->req["axisValue"]; |
543 | $balance=$this->req["balance"]; | ||
515 | $specialAddition=$this->req["specialAddition"]; | 544 | $specialAddition=$this->req["specialAddition"]; |
516 | 545 | ||
517 | $sql=" | 546 | $sql=" |
518 | INSERT INTO tblProductionSpec(userFk, requestDate, companyName, vehicleTON, vehicleText, vehicleType, productName, telephone, managerFk, `type`, internalLength, internalHeight, internalWidth, alCoil, | 547 | INSERT INTO tblProductionSpec( |
519 | `floor`, floorValue, tent, sideBoard, windStopper, freezer, gate, `load`, eTrackGate, eTrackWing, turnBuckle, toolBucket, bumperFootHold, wingProtector, axis, axisValue, specialAddition, status, regDate) | 548 | userFk, |
549 | requestDate, | ||
550 | customerName, | ||
551 | companyName, | ||
552 | vehicleTON, | ||
553 | vehicleText, | ||
554 | vehicleType, | ||
555 | productName, | ||
556 | telephone, | ||
557 | `type`, | ||
558 | typeValue, | ||
559 | internalLength, | ||
560 | internalHeight, | ||
561 | internalWidth, | ||
562 | alCoil, | ||
563 | alCoilValue, | ||
564 | `floor`, | ||
565 | floorValueT, | ||
566 | floorValueText, | ||
567 | tent, | ||
568 | sideBoard, | ||
569 | sideBoardValue, | ||
570 | windStopper, | ||
571 | windStopperValue, | ||
572 | freezer, | ||
573 | freezerValue, | ||
574 | gateType, | ||
575 | gateSize, | ||
576 | gateValue, | ||
577 | `load`, | ||
578 | frontBack, | ||
579 | eTrackGate, | ||
580 | eTrackWing, | ||
581 | eTrackValue, | ||
582 | toolBucket, | ||
583 | toolBucketValue, | ||
584 | bumperFootHold, | ||
585 | wingProtector, | ||
586 | axis, | ||
587 | axisValue, | ||
588 | balance, | ||
589 | specialAddition, | ||
590 | status, | ||
591 | regDate | ||
592 | ) | ||
520 | VALUES | 593 | VALUES |
521 | ( | 594 | ( |
522 | '{$userFk}', | 595 | '{$userFk}', |
523 | '{$requestDate}', | 596 | '{$requestDate}', |
597 | '{$customerName}', | ||
524 | '{$companyName}', | 598 | '{$companyName}', |
525 | '{$vehicleTON}', | 599 | '{$vehicleTON}', |
526 | '{$vehicleText}', | 600 | '{$vehicleText}', |
527 | '{$vehicleType}', | 601 | '{$vehicleType}', |
528 | '{$productName}', | 602 | '{$productName}', |
529 | '{$telephone}', | 603 | '{$telephone}', |
530 | '{$managerFk}', | ||
531 | '{$type}', | 604 | '{$type}', |
605 | '{$typeValue}', | ||
532 | '{$internalLength}', | 606 | '{$internalLength}', |
533 | '{$internalHeight}', | 607 | '{$internalHeight}', |
534 | '{$internalWidth}', | 608 | '{$internalWidth}', |
535 | '{$alCoil}', | 609 | '{$alCoil}', |
610 | '{$alCoilValue}', | ||
536 | '{$floor}', | 611 | '{$floor}', |
537 | '{$floorValue}', | 612 | '{$floorValueT}', |
613 | '{$floorValueText}', | ||
538 | '{$tent}', | 614 | '{$tent}', |
539 | '{$sideBoard}', | 615 | '{$sideBoard}', |
616 | '{$sideBoardValue}', | ||
540 | '{$windStopper}', | 617 | '{$windStopper}', |
618 | '{$windStopperValue}', | ||
541 | '{$freezer}', | 619 | '{$freezer}', |
542 | '{$gate}', | 620 | '{$freezerValue}', |
621 | '{$gateType}', | ||
622 | '{$gateSize}', | ||
623 | '{$gateValue}', | ||
543 | '{$load}', | 624 | '{$load}', |
625 | '{$frontBack}', | ||
544 | '{$eTrackGate}', | 626 | '{$eTrackGate}', |
545 | '{$eTrackWing}', | 627 | '{$eTrackWing}', |
546 | '{$turnBuckle}', | 628 | '{$eTrackValue}', |
547 | '{$toolBucket}', | 629 | '{$toolBucket}', |
630 | '{$toolBucketValue}', | ||
548 | '{$bumperFootHold}', | 631 | '{$bumperFootHold}', |
549 | '{$wingProtector}', | 632 | '{$wingProtector}', |
550 | '{$axis}', | 633 | '{$axis}', |
551 | '{$axisValue}', | 634 | '{$axisValue}', |
635 | '{$balance}', | ||
552 | '{$specialAddition}', | 636 | '{$specialAddition}', |
553 | 1, | 637 | 1, |
554 | NOW() | 638 | NOW() |
... | @@ -591,7 +675,7 @@ if (! class_exists("ApiBoard")) | ... | @@ -591,7 +675,7 @@ if (! class_exists("ApiBoard")) |
591 | function getListOfProductionSpec(){ | 675 | function getListOfProductionSpec(){ |
592 | $dateFormer=$this->req["dateFormer"]; | 676 | $dateFormer=$this->req["dateFormer"]; |
593 | $dateLatter=$this->req["dateLatter"]; | 677 | $dateLatter=$this->req["dateLatter"]; |
594 | $managerFk=$this->req["managerFk"]; | 678 | $userFk=$this->req["userFk"]; |
595 | 679 | ||
596 | $where="WHERE status=1"; | 680 | $where="WHERE status=1"; |
597 | if(!empty($dateFormer)){ | 681 | if(!empty($dateFormer)){ |
... | @@ -601,7 +685,7 @@ if (! class_exists("ApiBoard")) | ... | @@ -601,7 +685,7 @@ if (! class_exists("ApiBoard")) |
601 | $where .= " AND DATE_FORMAT(requestDate, '%Y%m%d') <= DATE_FORMAT('{$dateLatter}', '%Y%m%d')"; | 685 | $where .= " AND DATE_FORMAT(requestDate, '%Y%m%d') <= DATE_FORMAT('{$dateLatter}', '%Y%m%d')"; |
602 | } | 686 | } |
603 | if(!empty($managerFk)){ | 687 | if(!empty($managerFk)){ |
604 | $where .= " AND managerFk='{$managerFk}'"; | 688 | $where .= " AND userFk'{$userFk}'"; |
605 | } | 689 | } |
606 | 690 | ||
607 | $sql=" | 691 | $sql=" |
... | @@ -634,8 +718,9 @@ if (! class_exists("ApiBoard")) | ... | @@ -634,8 +718,9 @@ if (! class_exists("ApiBoard")) |
634 | $productionNo=$this->req["productionNo"]; | 718 | $productionNo=$this->req["productionNo"]; |
635 | $productionNo=3; | 719 | $productionNo=3; |
636 | $sql=" | 720 | $sql=" |
637 | SELECT * | 721 | SELECT PS.*, U.userNo, U.userName |
638 | FROM tblProductionSpec | 722 | FROM tblProductionSpec PS |
723 | JOIN tblUser U ON PS.userFk=U.userNo | ||
639 | WHERE productionNo='{$productionNo}' | 724 | WHERE productionNo='{$productionNo}' |
640 | "; | 725 | "; |
641 | $info=$this->getRow($sql); | 726 | $info=$this->getRow($sql); |
... | @@ -645,10 +730,10 @@ if (! class_exists("ApiBoard")) | ... | @@ -645,10 +730,10 @@ if (! class_exists("ApiBoard")) |
645 | //담당자 리스트 | 730 | //담당자 리스트 |
646 | function getListOfManager(){ | 731 | function getListOfManager(){ |
647 | $sql=" | 732 | $sql=" |
648 | SELECT managerNo, name | 733 | SELECT userNo, userName |
649 | FROM tblManager | 734 | FROM tblUser |
650 | WHERE status=1 | 735 | WHERE userType=2 AND STATUS=1 |
651 | ORDER BY name ASC | 736 | ORDER BY userName ASC; |
652 | "; | 737 | "; |
653 | $list=$this->getArray($sql); | 738 | $list=$this->getArray($sql); |
654 | if(sizeof($list)>0) | 739 | if(sizeof($list)>0) | ... | ... |
... | @@ -197,6 +197,7 @@ $(document).ready(function(){ | ... | @@ -197,6 +197,7 @@ $(document).ready(function(){ |
197 | data:{ | 197 | data:{ |
198 | "userFk" : 1, | 198 | "userFk" : 1, |
199 | "requestDate" : "2017-10-18", | 199 | "requestDate" : "2017-10-18", |
200 | "customerName" : "전세호", | ||
200 | "companyName" : "리치", | 201 | "companyName" : "리치", |
201 | "vehicleTON" : "123123", | 202 | "vehicleTON" : "123123", |
202 | "vehicleText" : "vehicleText", | 203 | "vehicleText" : "vehicleText", |
... | @@ -205,26 +206,37 @@ $(document).ready(function(){ | ... | @@ -205,26 +206,37 @@ $(document).ready(function(){ |
205 | "telephone" : "01001011", | 206 | "telephone" : "01001011", |
206 | "managerFk" : "1", | 207 | "managerFk" : "1", |
207 | "type" : "R", | 208 | "type" : "R", |
209 | "typeValue" : "RRRR", | ||
208 | "internalLength" : 108, | 210 | "internalLength" : 108, |
209 | "internalHeight" : 120, | 211 | "internalHeight" : 120, |
210 | "internalWidth" : 32, | 212 | "internalWidth" : 32, |
211 | "alCoil" : "G", | 213 | "alCoil" : "G", |
214 | "alCoilValue" : "GGGGG", | ||
212 | "floor" : "C", | 215 | "floor" : "C", |
213 | "floorValue" : 22, | 216 | "floorValueT" : 13, |
217 | "floorValueText" : "CCCC", | ||
214 | "tent" : 0, | 218 | "tent" : 0, |
215 | "sideBoard" : 1, | 219 | "sideBoard" : 1, |
220 | "sideBoardValue" : "SSSS", | ||
216 | "windStopper" : 1, | 221 | "windStopper" : 1, |
222 | "windStopperValue" : "WWWWW", | ||
217 | "freezer" : 0, | 223 | "freezer" : 0, |
218 | "gate" : 2, | 224 | "freezerValue" : "FFFFF", |
225 | "gateType" : 2, | ||
226 | "gateSize" : 2, | ||
227 | "gateValue" : "GGGGG", | ||
219 | "load" : "S", | 228 | "load" : "S", |
229 | "frontBack" : 2, | ||
220 | "eTrackGate" : 0, | 230 | "eTrackGate" : 0, |
221 | "eTrackWing" : 1, | 231 | "eTrackWing" : 1, |
222 | "turnBuckle" : "rkskek", | 232 | "eTrackValue" : "EEEEEE", |
223 | "toolBucket" : 2, | 233 | "toolBucket" : 2, |
234 | "toolBucketValue" : "TTTTT", | ||
224 | "bumberFootHold" : 1, | 235 | "bumberFootHold" : 1, |
225 | "wingProtector" : 2, | 236 | "wingProtector" : 2, |
226 | "axis" : 1, | 237 | "axis" : 1, |
227 | "axisValue" : "302", | 238 | "axisValue" : "302", |
239 | "balance" : 10241024, | ||
228 | "specialAddition" : "special" | 240 | "specialAddition" : "special" |
229 | }, | 241 | }, |
230 | success : function(data){ | 242 | success : function(data){ | ... | ... |
-
Please register or sign in to post a comment