Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
sayhoChun
/
kcSpecialVehicle
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
31291c7f
authored
2017-02-13 17:55:47 +0900
by
sayhoChun
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
pk issue handled, organizationCert view handled
1 parent
651414d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
24 deletions
common/classes/ApiBoard.php
common/classes/ApiStatic.php
common/classes/ApiBoard.php
View file @
31291c7
...
...
@@ -116,7 +116,7 @@ if (! class_exists("ApiBoard"))
$this
->
setPageForDevice
(
$this
->
rownum
);
$sql
=
"
SELECT B.*, U.userID
SELECT B.*, U.userID
, U.userNo
FROM tblBoard B
JOIN tblUser U B.userFk=U.no
{
$where
}
...
...
@@ -144,7 +144,7 @@ if (! class_exists("ApiBoard"))
if
(
$result
!=
null
){
$sql
=
"
SELECT C.*, U.userID
SELECT C.*, U.userID
, U.userNo
FROM tblComment C
JOIN tblUser U ON C.userFk=U.userNo
WHERE targetFk='
{
$boardNo
}
' AND commentType='FB'
...
...
@@ -196,7 +196,7 @@ if (! class_exists("ApiBoard"))
$searchText
=
$this
->
req
[
"searchText"
];
$searchType
=
$this
->
req
[
"searchType"
];
$where
=
"status=1"
;
$where
=
"status=1
AND targetType = 1
"
;
if
(
!
empty
(
$searchText
)){
if
(
empty
(
$search_type
)){
...
...
@@ -222,7 +222,7 @@ if (! class_exists("ApiBoard"))
$this
->
setPageForDevice
(
$this
->
rownum
);
$sql
=
"
SELECT CS.*, U.userID
SELECT CS.*, U.userID
, U.userNo
FORM tblCustomerService CS
JOIN tblUser U ON CS.userFk=U.no
WHERE status=1
...
...
@@ -250,7 +250,7 @@ if (! class_exists("ApiBoard"))
if
(
$result
!=
null
){
$sql
=
"
SELECT U.userID, C.*
SELECT U.user
No, U.user
ID, C.*
FROM tblComment C
JOIN tblUser U ON C.userFk=U.userNo
WHERE targetFk='
{
$csNo
}
' AND commentType='CS'
...
...
@@ -271,19 +271,29 @@ if (! class_exists("ApiBoard"))
//AS엄체 리스트
function
getListOfCompany
(){
$provinceNumber
=
$this
->
req
[
"provinceNumber"
];
$cityNumber
=
$this
->
req
[
"cityNumber"
];
$searchText
=
$this
->
req
[
"searchText"
];
$where
=
"status=1"
;
if
(
!
empty
(
$provinceNumber
)){
$where
.=
" AND address LIKE (SELECT abbreviation FROM tblZipProvince WHERE provinceNumber='
{
$provinceNumber
}
')"
;
}
$sql
=
"
SELECT COUNT(*)
FROM tblCompany
WHERE status=1
{
$where
}
ORDER BY companyNo DESC
"
;
$this
->
rownum
=
$this
->
getValue
(
$sql
,
"rn"
);
$this
->
setPageForDevice
(
$this
->
rownum
);
$sql
=
"
SELECT
*
SELECT
companyNo, name, telephone
FROM tblCompany
WHERE status=1
{
$where
}
ORDER BY companyNo DESC
LIMIT
{
$this
->
startNum
}
,
{
$this
->
endNum
}
"
;
...
...
@@ -309,7 +319,7 @@ if (! class_exists("ApiBoard"))
if
(
$result
!=
null
){
$sql
=
"
SELECT U.userID, C.*
SELECT U.user
No, U.user
ID, C.*
FROM tblComment C
JOIN tblUser U ON C.userFk=U.userNo
WHERE targetFk='
{
$companyNo
}
' AND commentType='CP'
...
...
@@ -509,7 +519,7 @@ if (! class_exists("ApiBoard"))
function
getListOfMyProductionSpec
(){
$userFk
=
$this
->
appUser
[
"no"
];
$sql
=
"
SELECT companyName, requestDate
SELECT
productionNo,
companyName, requestDate
FROM tblProductionSpec
WHERE userFk='
{
$userFk
}
'
ORDER BY productionNO DESC
...
...
@@ -540,7 +550,7 @@ if (! class_exists("ApiBoard"))
}
$sql
=
"
SELECT companyName, requestDate
SELECT
productionNo,
companyName, requestDate
FROM tblProduntionSpec
{
$where
}
ORDER BY productionNo DESC
...
...
@@ -568,7 +578,7 @@ if (! class_exists("ApiBoard"))
//담당자 리스트
function
getListOfManager
(){
$sql
=
"
SELECT name
SELECT
managerNo,
name
FROM tblManager
WHERE status=1
ORDER BY name ASC
...
...
@@ -605,11 +615,13 @@ if (! class_exists("ApiBoard"))
$userNo
=
$this
->
appUser
[
"no"
];
$sql
=
"
SELECT companyName, requestDate
SELECT
productionNo,
companyName, requestDate
FROM tblProductionSpec PS
JOIN tblLike L ON PS.productionNo=L.productionNo
WHERE L.userNo='
{
$userNo
}
'
"
;
$result
=
$this
->
getArray
(
$sql
);
return
$this
->
makeResultJson
(
"1"
,
""
,
$result
);
}
...
...
@@ -617,6 +629,7 @@ if (! class_exists("ApiBoard"))
}
// 클래스 종료
}
?>
\ No newline at end of file
...
...
common/classes/ApiStatic.php
View file @
31291c7
...
...
@@ -16,12 +16,12 @@ if (! class_exists("ApiStatic")){
ORDER BY infoNo DESC
LIMIT 1
"
;
$
payload
=
$this
->
getRow
(
$sql
);
return
$this
->
makeResultJson
(
"1"
,
""
,
$
payload
);
$
list
=
$this
->
getRow
(
$sql
);
return
$this
->
makeResultJson
(
"1"
,
""
,
$
list
);
}
//기관인증
function
getOrganizationCert
(){
function
get
ListOf
OrganizationCert
(){
$sql
=
"
SELECT *
FROM tblOrganizationCert
...
...
@@ -31,22 +31,27 @@ if (! class_exists("ApiStatic")){
return
$this
->
makeResultJson
(
"1"
,
""
,
$list
);
}
function
getMainImage
(){
function
getInfoOfOrganizationCert
(){
$certNo
=
$this
->
req
[
"certNo"
];
$sql
=
"
SELECT imgPathMain, imgPathBuiltIn, imgPathInsulation, imgPathFreezerV, imgPathSpecial, imgPathPowerGate, imgPathWingBody, imgPathFreezerC
FROM tblMain
SELECT *
FROM tblOrganizationCert
WHERE certNo='
{
$certNo
}
'
LIMIT 1
"
;
$
resul
t
=
$this
->
getRow
(
$sql
);
return
$this
->
makeResultJson
(
"1"
,
""
,
$
result
);
$
lis
t
=
$this
->
getRow
(
$sql
);
return
$this
->
makeResultJson
(
"1"
,
""
,
$
list
)
}
function
getMainPhrase
(){
//메인 페이지 정보
function
getMain
(){
$sql
=
"
SELECT
phrase1, phrase2
SELECT
imgPathMain, phrase1, phrase2, imgPathBuiltIn, imgPathInsulation, imgPathFreezerV, imgPathSpecial, imgPathPowerGate, imgPathWingBody, imgPathFreezerC
FROM tblMain
LIMIT 1
"
;
$result
=
$this
->
getRow
(
$sql
);
return
$this
->
makeResultJson
(
"1"
,
""
,
$result
);
}
//메인페이지 공지사항
...
...
@@ -73,6 +78,7 @@ if (! class_exists("ApiStatic")){
return
$this
->
makeResultJson
(
"1"
,
""
,
$result
);
}
//메인 페이지 회사정보
function
getKCBriefInfo
(){
$sql
=
"
SELECT address, telephone, fax, eMail
...
...
@@ -80,11 +86,12 @@ if (! class_exists("ApiStatic")){
"
;
}
//탑차 분류별 리스트
function
getListOfVehicle
(){
$vehicleType
=
$this
->
req
[
"vehicleType"
];
$sql
=
"
SELECT name, imgPathVehicle
SELECT
vehicleNo,
name, imgPathVehicle
FROM tblVehicle
WHERE vehicleType='
{
$vehicleType
}
' AND status=1
ORDER BY regDate DESC
...
...
@@ -93,6 +100,7 @@ if (! class_exists("ApiStatic")){
return
$this
->
makeResultJson
(
"1"
,
""
,
$result
);
}
//탑차 정보
function
getInfoOfVehicle
(){
$vehicleNo
=
$this
->
req
[
"vehicleNo"
];
...
...
@@ -105,6 +113,7 @@ if (! class_exists("ApiStatic")){
return
$this
->
makeResultJson
(
"1"
,
""
,
$result
);
}
//도 리스트
function
getListOfProvince
(){
$sql
=
"
SELECT `provinceNumber`, `desc`, `abbreviation`
...
...
@@ -115,6 +124,7 @@ if (! class_exists("ApiStatic")){
return
$this
->
makeResultJson
(
"1"
,
""
,
$result
);
}
//시 리스트
function
getListOfCity
(){
$provinceNumber
=
$this
->
req
[
"provinceNumber"
];
...
...
Please
register
or
sign in
to post a comment