Skip to content

Commit

Permalink
Version 12.1.10-pre
Browse files Browse the repository at this point in the history
  • Loading branch information
papyrussolution committed Nov 3, 2024
1 parent 77ac5bd commit 862ee05
Show file tree
Hide file tree
Showing 152 changed files with 1,797 additions and 1,174 deletions.
Binary file modified ManWork/LaTex/ppmanual.pdf
Binary file not shown.
59 changes: 40 additions & 19 deletions ManWork/LaTex/ppmanual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
\renewcommand{\CoverPageFooterInfo}{
\parbox[b]{.5\textwidth}{
\tiny �������� ������: \today \\
������ �������: 12.0.8
������ �������: 12.1.10
}
}

Expand Down Expand Up @@ -5278,8 +5278,19 @@
� ���������, ���������� �������� ������� ����.
\ppybrand{} ���������� ��� ����������, �������� ��� ����, ����� ���������� �� ����������� �������� ������
��������������� ����������.

\item[\dlgflag{��������� �����������}]
���� ���� ����������� ��� �������������� � POS-��������� � ��������� ��������������.
���� ����������, �� � �������� ����� ���������� ���������� � ���, ��� ����� �������� �����������.

��� ���� ������� �� ����� ����� ���� ����������� �������� ������� �� ����� ������� (������ � ������������ �����
� ������������ ������ '���������').

\item[\dlgflag{�������������� �������� ����� �����}]
���� ���� ����������, �� ��� ����������� ������� ����� ���� ����� ���� ��������� ����������� ������� �����
��������������� �������� ����� ����� � ���������� � ���� �� ��������� �������� ��������.

\item[\dlgflag{����� ��� � ����� �����������}]
\item[\dlgcombo{����� ��� � ����� �����������}]
����� �� ������ ������� ��� �����, � ������� ����� �������������� ��� � �����
�����������.

Expand Down Expand Up @@ -14025,9 +14036,13 @@
������� ���������� ����� ������� ���� ���������.
\item[\dlgflag{�����}] �������� ������� � ������������� ������ �� ���������.
������� ������������ ��������� �� ������� ����� ������� �����������.
\item[\dlgflag{����� ��������}] �������� ������� ������� �������� ���������
�� ������.
\item[\dlgflag{��������������� ������, � ������� �������� ��������}] � ������� �������� ������� � ������� ����������� � ��������������� ������, � ������� �������� �������� (������, ��� ��������� � ���������� �������� ��������������� ������).
\item[\dlgflag{����� ��������}] �������� ������� ������� �������� ��������� �� ������.
\item[\dlgflag{��������������� ������, � ������� �������� ��������}] � ������� �������� ������� � ������� ����������� � ��������������� ������, � ������� �������� �������� (������, ��� ��������� � ���������� ��������
��������������� ������).
\item[\dlgflag{����� � ����� �����������}] %@v12.1
������� ������� �� �������� ����������������� ����� ��������� � ����� �����������.
\item[\dlgflag{����� � ����� ����������}] %@v12.1
������� ������� �� �������� ����������������� ����� ��������� � ����� ����������.
\end{description}
\end{description}

Expand Down Expand Up @@ -39636,20 +39651,6 @@
����� �� ����, ��� � ���� �������, ����� ��� � ���������� ����, ������� ���� ����� ��
��� � ������� ���� ��������� ���� ����������-�������.

\item[\dlgflag{��������������� ������ � �������� ������}]
���� ���� ����������, �� � �������� ������ ����������� ����� ����� (� ������ 6.8.0) ������ ������� ������
����.
� ����������� ������� ������������� ������������� ���� ����.

\item[\dlgflag{������������ ����������� ������ ��� ��������������� �������}]
����� ������������ �������������� ����� �������������� ��� ������ ����������� ������ � �������� ������,
���� ����������� ��������������� ������.

������������� ��������� ����� ����� ���� ����������� ������� �������� ��������� ��� ���������� �����.

�������������� �������� � ������, ���� � ��������������� ������ ������� ���� ������� ����������� ����� ������
� ����� �������� ����� ������� ������� (� ��������� ������ ��������������, ��� ����������� ������ �� ������).

\item[\dlgflag{������������ �������� ������� '��� ������' � �������� ������}]
������������������ �����, ����������� ����������� �� �������������� ������ �� �����,
���� � ������ ���������� ���� \dlgflag{��� ������}.
Expand Down Expand Up @@ -39710,6 +39711,26 @@
������� ����������� ��� ������ ���� �� ���������.

���� ���� �� ����������, �� ����� ��� ����� �� ����� ����������� � ���� ������.

\item[\dlgflag{��������������� ������ � �������� ������}]
���� ���� ����������, �� � �������� ������ ����������� ����� ����� (� ������ 6.8.0) ������ ������� ������
����.
� ����������� ������� ������������� ������������� ���� ����.

\item[\dlgflag{������������ ����������� ������ ��� ��������������� �������}]
����� ������������ �������������� ����� �������������� ��� ������ ����������� ������ � �������� ������,
���� ����������� ��������������� ������.

������������� ��������� ����� ����� ���� ����������� ������� �������� ��������� ��� ���������� �����.

�������������� �������� � ������, ���� � ��������������� ������ ������� ���� ������� ����������� ����� ������
� ����� �������� ����� ������� ������� (� ��������� ������ ��������������, ��� ����������� ������ �� ������).

\item[\dlgflag{����������� ������ - ����������������}]
���� ���� ���� ����������, �� ��� ������� ���������� � �������� ������ ��� ������������� ����������������
���������� �������, �� ��������� ����� ���������� ����������� ������.

� ��������� ������ (��� �� ������������� �����) �� ��������� ����������� �������� ������.

\item[\dlgbutton{����������}]
������, ����������� ������ �������������� ���������� ������������, �������� ��������� ����.
Expand Down
Binary file modified ManWork/Pict/PNG/dlg-cfg-equip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ManWork/Pict/PNG/dlg-goodstype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class CmdROrderPrereqActivity extends SLib.SlActivity {
private void RefreshCurrentDocStatus()
{
if(CPM.TabList != null) {
ViewPager2 view_pager = (ViewPager2) findViewById(R.id.VIEWPAGER_ORDERPREREQ);
ViewPager2 view_pager = (ViewPager2)findViewById(R.id.VIEWPAGER_ORDERPREREQ);
if(view_pager != null) {
int tidx = view_pager.getCurrentItem();
CommonPrereqModule.TabEntry tab_entry = CPM.TabList.get(tidx);
Expand All @@ -66,9 +66,18 @@ private void RefreshCurrentDocStatus()
}
}
}
private void CleaningProc() // @v12.1.10
{
if(StopHangedCliDebtPending()) {
NotifyTabContentChanged(CommonPrereqModule.Tab.tabClients, R.id.orderPrereqClientsListView);
}
}
private class RefreshTimerTask extends TimerTask {
@Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { RefreshCurrentDocStatus(); }}); }
}
private class CleaningTimerTask extends TimerTask { // @v12.1.10
@Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { CleaningProc(); }}); }
}
public CmdROrderPrereqActivity()
{
CPM = new CommonPrereqModule(this);
Expand Down Expand Up @@ -687,8 +696,10 @@ public Object HandleEvent(int ev, Object srcObj, Object subj)
StyloQDatabase.SecStoragePacket cmdl_pack = db.GetForeignSvcCommandList(CPM.SvcIdent);
StyloQCommand.List cmd_list = cmdl_pack.GetCommandList();
CmdQueryDebt = cmd_list.GetItemWithParticularBaseId(StyloQCommand.sqbcDebtList);
if(CmdQueryDebt != null)
if(CmdQueryDebt != null) {
DbtL = app_ctx.LoadDebtList(CPM.SvcIdent);
ScheduleRTmr(new CleaningTimerTask(), 30000, 30000); // @v12.1.10
}
}
CPM.RestoreRecentDraftDocumentAsCurrent(); // @v11.4.0
CPM.MakeCurrentDocList();
Expand Down Expand Up @@ -1079,7 +1090,11 @@ else if(SLib.IsRecyclerListAdapter(srcObj)) {
if(v_debt_text != null) {
String text;
int shaperc = 0;
if(de != null) {
if(IsCliDebtPending(cur_cli_id) > 0) { // @v12.1.10
shaperc = R.drawable.ic_stopwatch;
text = "";
}
else if(de != null) {
final boolean is_expired = de.IsExpired(CmdQueryDebt);
if(de.Debt > 0) {
shaperc = is_expired ? R.drawable.shape_debtvalue_undef : R.drawable.shape_debtvalue_positive;
Expand Down Expand Up @@ -1602,7 +1617,10 @@ else if(ev_subj.ItemView.getId() == R.id.CTL_ORDERPREREQ_CLI_DEBT) {
js_query.put("cmd", cmd_text);
js_query.put("time", System.currentTimeMillis());
js_query.put("arid", cur_cli_id);
StartCliDebtPending(cur_cli_id); // @v12.1.10
app_ctx.RunSvcCommand(CPM.SvcIdent, CmdQueryDebt, js_query, force_query, this);
// @todo Здесь достаточно обновить только одну позицию списка, а не весь список!
NotifyTabContentChanged(CommonPrereqModule.Tab.tabClients, R.id.orderPrereqClientsListView); // @v12.1.10
} catch(StyloQException | JSONException exn) {
;
}
Expand Down Expand Up @@ -2081,21 +2099,23 @@ else if(srcObj instanceof CommonPrereqModule.RegistryFiltDialog) {
StyloQApp app_ctx = GetAppCtx();
if(ir.OriginalCmdItem != null) {
if(ir.OriginalCmdItem.BaseCmdId == StyloQCommand.sqbcDebtList) {
if(ir.ResultTag == StyloQApp.SvcQueryResult.SUCCESS) {
if(ir.InfoReply != null && ir.InfoReply instanceof SecretTagPool) {
JSONObject js_reply = ((SecretTagPool)ir.InfoReply).GetJsonObject(SecretTagPool.tagRawData);
BusinessEntity.ArDebtList ard_list = new BusinessEntity.ArDebtList();
if(ard_list.FromJson(js_reply)) {
if(DbtL.Include(ard_list) >= 0) {
app_ctx.StoreDebtList(CPM.SvcIdent, DbtL);
// @todo Здесь достаточно обновить только одну позицию списка, а не весь список!
NotifyTabContentChanged(CommonPrereqModule.Tab.tabClients, R.id.orderPrereqClientsListView);
}
if(ir.ResultTag == StyloQApp.SvcQueryResult.SUCCESS && ir.InfoReply != null && ir.InfoReply instanceof SecretTagPool) {
JSONObject js_reply = ((SecretTagPool)ir.InfoReply).GetJsonObject(SecretTagPool.tagRawData);
BusinessEntity.ArDebtList ard_list = new BusinessEntity.ArDebtList();
if(ard_list.FromJson(js_reply)) {
StopCliDebtPending(ard_list.ArID); // @v12.1.10
if(DbtL.Include(ard_list) >= 0) {
app_ctx.StoreDebtList(CPM.SvcIdent, DbtL);
}
// @todo Здесь достаточно обновить только одну позицию списка, а не весь список!
NotifyTabContentChanged(CommonPrereqModule.Tab.tabClients, R.id.orderPrereqClientsListView);
}
}
else {
// @todo
// @v12.1.10 {
StopCliDebtPending(-1);
NotifyTabContentChanged(CommonPrereqModule.Tab.tabClients, R.id.orderPrereqClientsListView);
// } @v12.1.10
}
}
else if(ir.OriginalCmdItem.Name.equalsIgnoreCase("PostDocument")) {
Expand Down Expand Up @@ -2199,4 +2219,115 @@ else if(original_intent.hasExtra(Intents.Scan.MISSING_CAMERA_PERMISSION)) {
}
}
});
//
//
// @v12.1.10 {
private static class Pending_CliDebt {
Pending_CliDebt(int cliID)
{
CliID = cliID;
TimeStart = System.currentTimeMillis();
}
int CliID;
long TimeStart;
}
private static Object Pending_CliDebt_Mutex;
private static void InitPending_CliDebt_Mutex()
{
if(Pending_CliDebt_Mutex == null)
Pending_CliDebt_Mutex = new Object();
}
private static ArrayList <Pending_CliDebt> Pending_CliDebt_List;
private static int SearchPending_CliDebt_Entry(int cliID)
{
int result = -1;
if(Pending_CliDebt_List != null && cliID > 0) {
for(int i = 0; result < 0 && i < Pending_CliDebt_List.size(); i++) {
Pending_CliDebt pi = Pending_CliDebt_List.get(i);
if(pi != null && pi.CliID == cliID) {
result = i;
}
}
}
return result;
}
//
// Returns:
// 0 - ни один элемент списка клиентов не находится в состоянии ожидания долгов.
// -1 - хотя бы один элемент списка клиентов находится в состоянии ожидания.
// >0 - элемент списка клиентов cliID находится в состоянии ожидания значений долгов.
// Конкретное возвращенное значение равно количеству миллисекунд, прошедших с запуска.
// Значение 1 скорее всего означает, что время ожидания вычислить не удалось.
//
private static int IsCliDebtPending(int cliID)
{
int result = 0;
InitPending_CliDebt_Mutex();
synchronized(Pending_CliDebt_Mutex) {
if(Pending_CliDebt_List == null || Pending_CliDebt_List.size() == 0) {
result = 0;
}
else if(cliID > 0) {
int idx = SearchPending_CliDebt_Entry(cliID);
if(idx >= 0)
result = 1;
else
result = -1;
}
else
result = -1;
}
return result;
}
private static void StartCliDebtPending(int cliID)
{
if(cliID > 0) {
InitPending_CliDebt_Mutex();
synchronized(Pending_CliDebt_Mutex) {
int idx = SearchPending_CliDebt_Entry(cliID);
if(idx < 0) {
if(Pending_CliDebt_List == null)
Pending_CliDebt_List = new ArrayList<Pending_CliDebt>();
Pending_CliDebt_List.add(new Pending_CliDebt(cliID));
}
}
}
}
private static void StopCliDebtPending(int cliID)
{
if(cliID > 0) {
InitPending_CliDebt_Mutex();
synchronized(Pending_CliDebt_Mutex) {
if(cliID == -1) {
Pending_CliDebt_List.clear();
}
else if(cliID > 0) {
int idx = SearchPending_CliDebt_Entry(cliID);
if(idx >= 0)
Pending_CliDebt_List.remove(idx);
}
}
}
}
private static boolean StopHangedCliDebtPending()
{
boolean result = false;
InitPending_CliDebt_Mutex();
synchronized(Pending_CliDebt_Mutex) {
if(Pending_CliDebt_List != null) {
final long now_time_ms = System.currentTimeMillis();
int i = Pending_CliDebt_List.size();
if(i > 0) do {
i--;
Pending_CliDebt pi = Pending_CliDebt_List.get(i);
if(pi == null || (now_time_ms - pi.TimeStart) >= 60000) {
Pending_CliDebt_List.remove(i);
result = true;
}
} while(i > 0);
}
}
return result;
}
// } @v12.1.10
}
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ public static class RegistryFilt {
Flags = 0;
PredefPeriod = SLib.PREDEFPRD_NONE;
}
boolean IsEmpty() { return ((Period == null || Period.IsZero()) && Flags == 0); }
boolean IsEmpty() { return (SLib.DateRange.IsZero(Period) && Flags == 0); }
public JSONObject ToJsonObj()
{
JSONObject result = null;
if(!IsEmpty()) {
try {
result = new JSONObject();
if(Period != null && !Period.IsZero()) {
if(!SLib.DateRange.IsZero(Period)) {
String period_text = Period.Format();
if(SLib.GetLen(period_text) > 0) {
result.put("period", period_text);
Expand Down Expand Up @@ -2103,7 +2103,7 @@ public void MakeCurrentDocList()
if(local_doc.FromJsonObj(js_doc)) {
final SLib.LDATE dt = local_doc.GetNominalDate();
// @v11.7.0 if(Rf != null && !Rf.Period.IsZero()) {
if(Cs != null && Cs.Rf != null && !Cs.Rf.Period.IsZero()) {
if(Cs != null && Cs.Rf != null && !SLib.DateRange.IsZero(Cs.Rf.Period)) { // @v12.1.10 (&& Cs.Rf.Period != null)
if(!Cs.Rf.Period.CheckDate(dt))
do_skip = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ JSONObject ToJsonObj()
if(H.DueTime != null)
result.put("duetm", SLib.datetimefmt(H.DueTime, SLib.DATF_ISO8601|SLib.DATF_CENTURY, 0));
// @v11.6.2 {
if(H.CreationGeoLoc != null && !H.CreationGeoLoc.IsZero() && H.CreationGeoLoc.IsValid()) {
if(!SLib.GeoPosLL.IsZero(H.CreationGeoLoc) && H.CreationGeoLoc.IsValid()) {
result.put("cr_lat", H.CreationGeoLoc.Lat);
result.put("cr_lon", H.CreationGeoLoc.Lon);
}
Expand Down Expand Up @@ -1452,7 +1452,7 @@ boolean FromJsonObj(JSONObject jsObj)
// @v11.6.2 {
{
SLib.GeoPosLL cr_geoloc = new SLib.GeoPosLL(jsObj.optDouble("cr_lat", 0.0), jsObj.optDouble("cr_lon", 0.0));
if(cr_geoloc != null && cr_geoloc.IsValid() && !cr_geoloc.IsZero())
if(!SLib.GeoPosLL.IsZero(cr_geoloc) && cr_geoloc.IsValid())
H.CreationGeoLoc = cr_geoloc;
}
// } @v11.6.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4109,6 +4109,10 @@ public static boolean ArEq(final DateRange a1, final DateRange a2)
{
return (a1 != null) ? (a2 != null && LDATE.ArEq(a1.Low, a2.Low) && LDATE.ArEq(a1.Upp, a2.Upp)) : (a2 == null);
}
public static boolean IsZero(DateRange range)
{
return (range == null || range.IsZero());
}
DateRange()
{
Low = new LDATE();
Expand Down Expand Up @@ -6233,6 +6237,7 @@ public static boolean ArEq(final GeoPosLL a1, final GeoPosLL a2)
{
return (a1 != null) ? (a2 != null && a1.Lat == a2.Lat && a1.Lon == a2.Lon) : (a2 == null);
}
public static boolean IsZero(GeoPosLL a) { return (a == null || a.IsZero()); }
GeoPosLL()
{
Lat = 0.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ public static class Item {
//
double GetGeoDistanceRestriction()
{
return (MaxDistM > 0.0 && GeoLocDistTo != null && !GeoLocDistTo.IsZero() && GeoLocDistTo.IsValid()) ? MaxDistM : 0.0;
return (MaxDistM > 0.0 && !SLib.GeoPosLL.IsZero(GeoLocDistTo) && GeoLocDistTo.IsValid()) ? MaxDistM : 0.0;
}
boolean CanEvaluateDistance(final SLib.GeoPosLL currentGeoLoc)
{
return (GeoLocDistTo != null && !GeoLocDistTo.IsZero() && GeoLocDistTo.IsValid() &&
currentGeoLoc != null && !currentGeoLoc.IsZero() && currentGeoLoc.IsValid());
return (!SLib.GeoPosLL.IsZero(GeoLocDistTo) && GeoLocDistTo.IsValid() && !SLib.GeoPosLL.IsZero(currentGeoLoc) && currentGeoLoc.IsValid());
}
double GetGeoDistance(final SLib.GeoPosLL currentGeoLoc)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
android:id="@+id/CTL_ORDERPREREQ_CLI_DEBT"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="32dp"
android:minWidth="24dp"
android:minHeight="24dp"
android:textAlignment="center"
android:background="@drawable/shape_viewframe"
/>
Expand Down
Binary file modified Src/Build/versel.dll
Binary file not shown.
Loading

0 comments on commit 862ee05

Please sign in to comment.