001 bug fixes
This commit is contained in:
parent
8cbf148c53
commit
96c669df04
@ -38,7 +38,6 @@
|
||||
<cfreturn true />
|
||||
</cffunction>
|
||||
|
||||
|
||||
<cffunction
|
||||
name="OnRequest"
|
||||
access="public"
|
||||
@ -70,7 +69,7 @@
|
||||
<!--- <cfset this.datasources["#this.datasource#"]=getDS("#this.datasource#","datasource_#this.datasource#")/> --->
|
||||
|
||||
<cfset request.RECORDS_PER_PAGE=500/>
|
||||
<cfset request.APP_VERSION="0.00.000"/>
|
||||
<cfset request.APP_VERSION="0.00.001"/>
|
||||
|
||||
<cflock scope="application" type="readonly" timeout=3>
|
||||
<cfset request.APP_NAME=this.Name/>
|
||||
|
@ -16,17 +16,17 @@
|
||||
</cffunction>
|
||||
|
||||
<m:prepare_detail entity="agreement" key="undefined" pageInfoOut="pageInfo"/><!--- для составного ключа key бесполезен, но инициализировать пустой строкой не получается из-за cfparam name="#ATTRIBUTES.key#" default="-1" в prepare_detail --->
|
||||
<cfparam name="contract_id" type="integer"/>
|
||||
<cfparam name="contract_id"/>
|
||||
<cfquery name="qInitVersion"><!--- *** надо бы только при сохранении, а так возможен конфликт --->
|
||||
select coalesce(max(agreement_version)+1,0) as next_version
|
||||
from agreement
|
||||
where contract_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#contract_id#"/>
|
||||
where contract_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#contract_id#" null=#!isValid('integer', contract_id)#/>
|
||||
</cfquery>
|
||||
|
||||
<d:bean readonly=#!pageInfo.writePermitted()# table="#pageInfo.entity#" datasource="#request.DS#" output="d" status="status">
|
||||
<d:param field="contract_id" type="integer" key/><!--- поле с атрибутом key не участвует в update --->
|
||||
<d:param field="contract_id" type="integer" key forNull=""/><!--- поле с атрибутом key не участвует в update --->
|
||||
<!--- формировать номер версии нам придется самостоятельно --->
|
||||
<d:param field="agreement_version" type="integer" key init=#qInitVersion.next_version#/><!--- поле с атрибутом key не участвует в update --->
|
||||
<d:param field="agreement_version" type="integer" key init=#qInitVersion.next_version# forNull=""/><!--- поле с атрибутом key не участвует в update --->
|
||||
|
||||
<d:param field="agreement" type="varchar" size="255" preprocessor=#cleanInput# init=#qInitVersion.next_version#/>
|
||||
<d:param field="dt_agreement" type="timestamp" format="yyyy-MM-dd" init=#Now()#/>
|
||||
|
@ -107,7 +107,7 @@ select count(*) as cnt from agreement where 1=1
|
||||
|
||||
<c:table query=#qRead# recordsPerPage=#pageInfo.recordsPerPage# nStart=#pageInfo.nStart# titleMap=#titleMap# sortArray=#pageInfo.settings.sort.sortArray# class="worktable wide">
|
||||
<c:column width="1%" sortable="false"><!---*** class="c" не пробрасывается --->
|
||||
<c:th><c:link_add canWrite=#pageInfo.writePermitted()# entity=#pageInfo.entity# fwx=#tr.fwx#/></c:th>
|
||||
<c:th><!--- <a href="agreement.cfm?contract_id=&agreement_version="><img src="img/add.gif"/></a> ---></c:th>
|
||||
<c:td field="f_link_view_edit" class="c"/>
|
||||
</c:column>
|
||||
<c:column width="2%" field="agreement_version"><c:td class="r"/></c:column>
|
||||
@ -122,9 +122,9 @@ select count(*) as cnt from agreement where 1=1
|
||||
<c:column width="1%" sortable="false">
|
||||
<c:td field="f_link_del" class="c"/>
|
||||
</c:column>
|
||||
</c:table>
|
||||
|
||||
</c:table>
|
||||
<cfoutput>#gridFooter#</cfoutput>
|
||||
Создавать сделки (соглашения) нужно из договоров
|
||||
|
||||
</cfif>
|
||||
<layout:page section="footer"/>
|
||||
|
@ -1,7 +1,13 @@
|
||||
/*Ñïåöèôèêàöèè ñ âåðñèîííîñòüþ
|
||||
/*
|
||||
Ñïåöèôèêàöèè ñ âåðñèîííîñòüþ
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
Ðàçâîðà÷èâàåòñÿ â ñõåìå public
|
||||
Ñîçäàòü ïîëüçîâàòåëÿ dbo (âëàäåëåö îáúåêòîâ) è appserver
|
||||
*/
|
||||
|
||||
-- ìîæíî äîáàâèòü áàçîâûå åäèíèöû è ïåðåñ÷åò
|
||||
drop table if exists measure CASCADE;
|
||||
create table measure (
|
||||
@ -177,7 +183,7 @@ create table specification_item_version (
|
||||
,dt_created timestamp NOT NULL default CURRENT_TIMESTAMP -- äàòà çàïèñè
|
||||
,dt_updated timestamp NOT NULL default CURRENT_TIMESTAMP -- äàòà ïîñëåäíåé ìîäèôèêàöèè
|
||||
,CONSTRAINT PK_specification_item_version PRIMARY KEY (specification_item_uid, agreement_version)
|
||||
,CONSTRAINT CK_specification_item_version_dt CHECK NOT(dt_from IS NULL AND dt_to IS NULL)
|
||||
,CONSTRAINT CK_specification_item_version_dt CHECK (NOT(dt_from IS NULL AND dt_to IS NULL))
|
||||
);
|
||||
ALTER TABLE specification_item OWNER TO dbo;
|
||||
-- ALTER TABLE specification_item_version ADD CONSTRAINT CK_specification_item_version_dt CHECK(NOT(dt_from IS NULL AND dt_to IS NULL));
|
||||
@ -439,4 +445,13 @@ insert into acl(obj,role_id,permission) values ('service_price',1,2);
|
||||
insert into acl(obj,role_id,permission) values ('abstract_service_complementary',1,2); */
|
||||
|
||||
|
||||
|
||||
grant usage on schema public to appserver;
|
||||
grant all on all tables in schema public to appserver;
|
||||
grant all on all sequences in schema public to appserver;
|
||||
|
||||
/*
|
||||
select * from specification_item_version siv
|
||||
join specification_item si on (siv.specification_item_uid=si.specification_item_uid)
|
||||
join specification s on (si.specification_id=s.specification_id)
|
||||
join agreement a on (s.contract_id=a.contract_id AND siv.agreement_version=a.agreement_version)
|
||||
*/
|
20
etc/spec.txt
20
etc/spec.txt
@ -1,4 +1,24 @@
|
||||
2025-06-16 10:58:02
|
||||
git remote add origin https://gitea.services.ngcloud.ru/smishchuk/spec.git
|
||||
|
||||
root@dat-n-smishch1 MINGW64 /d/wwwroot/spec (master)
|
||||
$ git remote add origin https://gitea.services.ngcloud.ru/smishchuk/spec.git
|
||||
|
||||
root@dat-n-smishch1 MINGW64 /d/wwwroot/spec (master)
|
||||
$ git push -u origin master
|
||||
remote: Verify
|
||||
fatal: Authentication failed for 'https://gitea.services.ngcloud.ru/smishchuk/spec.git/'
|
||||
|
||||
Сгенерил ключ
|
||||
$ git remote set-url origin gitea@gitea.services.ngcloud.ru:smishchuk/spec.git
|
||||
|
||||
root@dat-n-smishch1 MINGW64 /d/wwwroot/spec (master)
|
||||
$ git remote -v
|
||||
origin gitea@gitea.services.ngcloud.ru:smishchuk/spec.git (fetch)
|
||||
origin gitea@gitea.services.ngcloud.ru:smishchuk/spec.git (push)
|
||||
|
||||
|
||||
|
||||
Локально, чтобы не загаживать окружение, поместим переменные окружения в реестр [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lucee] "Environment"
|
||||
2025-06-14 11:02:46
|
||||
Центральный селект
|
||||
|
@ -57,7 +57,7 @@
|
||||
usePRG="No"<!---*** --->
|
||||
pageInfo=#pageInfo#
|
||||
id=""
|
||||
queryString="#request.thisPage#?specification_item_uid=#specification_item_uid#"
|
||||
queryString="specification_item_uid=#specification_item_uid#"
|
||||
defaultBackUrl="specification.cfm?specification_id=#d.specification_item_id#"
|
||||
status=#pageInfo.status#
|
||||
trackOut="tr"
|
||||
|
@ -64,7 +64,7 @@
|
||||
usePRG="No"<!---*** --->
|
||||
pageInfo=#pageInfo#
|
||||
id=""
|
||||
queryString="#request.thisPage#?specification_item_uid=#d.specification_item_uid#&agreement_version=#d.agreement_version#"
|
||||
queryString="specification_item_uid=#d.specification_item_uid#&agreement_version=#d.agreement_version#"
|
||||
defaultBackUrl="specification_item.cfm?specification_item_uid=#d.specification_item_uid#"
|
||||
status=#pageInfo.status#
|
||||
trackOut="tr"
|
||||
@ -170,7 +170,7 @@
|
||||
<a href="agreement.cfm?contract_id=#qSpecificationItem.contract_id#&#tr.fwx#">
|
||||
<img src="img/add.gif"/>
|
||||
</a>
|
||||
|
||||
ВАЖНО! Если нового соглашения нет, его нужно сначала создать (само не создается)
|
||||
|
||||
</layout:detail_line>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user