20260813 :: 실사>CAPI 기기 예약 수정 및 CAPI 기기 예약 현황 추가
This commit is contained in:
@@ -1,19 +1,54 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
|
||||
|
||||
set dbin = server.CreateObject("ADODB.CONNECTION")
|
||||
|
||||
|
||||
device_id = request("device_id")
|
||||
use_yn = request("use_yn")
|
||||
disuse_rsn_cd = request("disuse_rsn_cd")
|
||||
|
||||
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
|
||||
Response.AddHeader "Pragma","no-cache"
|
||||
Response.AddHeader "cache-control", "no-staff"
|
||||
Response.Expires = -1
|
||||
|
||||
if disuse_rsn_cd = "" then
|
||||
disuse_value = "NULL"
|
||||
else
|
||||
disuse_value = "'" & disuse_rsn_cd & "'"
|
||||
end if
|
||||
|
||||
now_year = Right(left(now(),4),2)
|
||||
now_month = mid(now(),6,2)
|
||||
now_day = mid(now(),9,2)
|
||||
now_hour = right("0" & hour(now), 2)
|
||||
now_minute = right("0" & minute(now), 2)
|
||||
now_second = right("0" & second(now), 2)
|
||||
now_micro = right("000" & (timer * 1000) Mod 1000, 3)
|
||||
|
||||
d_no = "G" & now_year & now_month & now_day & now_hour & now_minute & now_second & now_micro ' <20><EFBFBD>ID
|
||||
|
||||
query = ""
|
||||
query = query & " UPDATE project2.dbo.T_DEVICE_USE "
|
||||
query = query & " SET USE_YN = 'N', MODIFY_DT = getdate() "
|
||||
query = query & " WHERE DEVICE_ID IN (" & device_id & ") AND USE_YN = 'Y' "
|
||||
query = query & " INSERT INTO project2.dbo.T_DEVICE_USE_NEW "
|
||||
query = query & " (DEVICE_ID, P_CHILD_SN, MAN_ID, USE_ST_DT, USE_ED_DT, USE_YN, D_NO, MODIFY_DT, INSERT_DT, INSERT_USER) "
|
||||
query = query & " SELECT ID, P_CHILD_SN, MAN_ID, ISNULL(USE_ST_DT, ''), ISNULL(USE_ED_DT, ''), '" & use_yn & "', '" & d_no & "', getdate(), getdate(), '" & session("User_number") & "' "
|
||||
query = query & " FROM project2.dbo.T_DEVICE_NEW "
|
||||
query = query & " WHERE ID IN (" & device_id & ") AND ISNULL(P_CHILD_SN, '') <> '' "
|
||||
|
||||
dbin.Open adoConn
|
||||
dbin.Execute query
|
||||
dbin.Close
|
||||
|
||||
query = ""
|
||||
query = query & " UPDATE project2.dbo.T_DEVICE_NEW "
|
||||
query = query & " SET USE_YN = '" & use_yn & "', "
|
||||
query = query & " DISUSE_RSN_CD = " & disuse_value & ", "
|
||||
query = query & " P_CHILD_SN = '', "
|
||||
query = query & " MAN_ID = NULL, "
|
||||
query = query & " USE_ST_DT = NULL, "
|
||||
query = query & " USE_ED_DT = NULL, "
|
||||
query = query & " INSERT_USER = NULL "
|
||||
query = query & " WHERE ID IN (" & device_id & ")"
|
||||
|
||||
dbin.Open adoConn
|
||||
dbin.Execute query, i
|
||||
|
||||
Reference in New Issue
Block a user