Patch level : 12.0

Files correlati     : 

Verificata l'importazione da terminale della produzione per DbService

git-svn-id: svn://10.65.10.50/branches/R_10_00@23550 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2017-01-25 13:52:06 +00:00
parent 435f97510e
commit 27e8c69538
3 changed files with 935 additions and 902 deletions

View File

@ -191,7 +191,7 @@ bool TConf_MRP_application::user_create()
bool TConf_MRP_application::user_destroy() bool TConf_MRP_application::user_destroy()
{ {
return TConfig_application:user_destroy(); return TConfig_application::user_destroy();
} }
int mr0400(int argc, char* argv[]) int mr0400(int argc, char* argv[])

View File

@ -68,6 +68,7 @@ bool TLoadfile_mask::on_field_event(TOperable_field& o, TField_event e, long jol
{ {
xvt_fsys_convert_dir_to_str(&fs.dir, fname.get_buffer(), fname.size()); //converte il nome della directory in una xvt_fsys_convert_dir_to_str(&fs.dir, fname.get_buffer(), fname.size()); //converte il nome della directory in una
fname.add(fs.name); //stringa aggiungendo il path del file fname.add(fs.name); //stringa aggiungendo il path del file
fname.ext("dat");
o.set(fname); //mostra il campo sul video (la funzione set) o.set(fname); //mostra il campo sul video (la funzione set)
} }
@ -216,18 +217,19 @@ bool TRilprod_mask::on_field_event(TOperable_field& o, TField_event e, long joll
{ {
TLoadfile_mask m; TLoadfile_mask m;
TArray warn_perc; TArray warn_perc;
TString_array warning; TString_array warning;
if (m.run() == K_ENTER) if (m.run() == K_ENTER)
{ {
short dlg = F_PERC1; short dlg = F_PERC1;
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
const real perc(m.get(dlg++)); const real perc(m.get(dlg++));
warn_perc.add(perc); warn_perc.add(perc);
const TString & s = m.get(dlg++); const TString & s = m.get(dlg++);
warning.add(s); warning.add(s);
} }
load_prod_file(m.get(F_FILE), m.get_bool(F_SAVE), m.get_bool(F_ONLY_ERRORS), warn_perc, warning); load_prod_file(m.get(F_FILE), m.get_bool(F_SAVE), m.get_bool(F_ONLY_ERRORS), warn_perc, warning);
} }
} }
@ -273,11 +275,13 @@ void TRilprod_mask::print_record(TViswin & v, TTipo_rec t , TProduzione & r)
v.add_line(""); v.add_line("");
if (t == _start) if (t == _start)
v.add_line(TR("Record elaborato - inizio produzione")); else v.add_line(TR("Record elaborato - inizio produzione"));
if (t == _end) else
v.add_line(TR("Record elaborato - fine produzione")); else if (t == _end)
if (t == _rett) v.add_line(TR("Record elaborato - fine produzione"));
v.add_line(TR("Record elaborato - rettifica")); else
if (t == _rett)
v.add_line(TR("Record elaborato - rettifica"));
TString l; TString l;
for (int i = 0; i < nfields; i++) for (int i = 0; i < nfields; i++)
{ {
@ -362,8 +366,8 @@ void TRilprod_mask::load_prod_file(const char* nomefile, bool savefile, bool onl
const int anno = ord.get_int(); const int anno = ord.get_int();
const int ndoc = ord.get_long(); const int ndoc = ord.get_long();
const int nriga = ord.get_int(); const int nriga = ord.get_int();
TDate d; TDate recdate;
TString h; TString rechour;
real qta; real qta;
real scarto; real scarto;
TString operatore; TString operatore;
@ -486,13 +490,13 @@ void TRilprod_mask::load_prod_file(const char* nomefile, bool savefile, bool onl
{ {
if (val.len() == 8) if (val.len() == 8)
val.insert("20", 6); val.insert("20", 6);
d = val; recdate = val;
} }
else else
if (name == "ORA") if (name == "ORA")
{ {
h = val.left(2); rechour = val.left(2);
h << val.mid(3, 2) << val.right(2); rechour << val.mid(3, 2) << val.right(2);
} }
else else
if (name == "QTA") if (name == "QTA")
@ -533,7 +537,7 @@ void TRilprod_mask::load_prod_file(const char* nomefile, bool savefile, bool onl
for (int i = 1; !found && i <= rows; i++) for (int i = 1; !found && i <= rows; i++)
{ {
const TRectype & row = prd.body()[i]; const TRectype & row = prd.body()[i];
found = d == row.get_date("DATAINI") && h == row.get("ORAINI"); found = recdate == row.get_date("DATAINI") && rechour == row.get("ORAINI");
if (row.get("DATAFINE").empty()) if (row.get("DATAFINE").empty())
seq_err = true; seq_err = true;
} }
@ -542,8 +546,8 @@ void TRilprod_mask::load_prod_file(const char* nomefile, bool savefile, bool onl
if (!found) if (!found)
{ {
TRectype & row = prd.body().row(rows + 1, true); TRectype & row = prd.body().row(rows + 1, true);
row.put("DATAINI", d); row.put("DATAINI", recdate);
row.put("ORAINI", h); row.put("ORAINI", rechour);
row.put("OPERATORE", operatore); row.put("OPERATORE", operatore);
} }
if (nuovo) if (nuovo)
@ -561,7 +565,7 @@ void TRilprod_mask::load_prod_file(const char* nomefile, bool savefile, bool onl
for (i = rows; i > 0; i--) for (i = rows; i > 0; i--)
{ {
const TRectype & row = prd.body()[i]; const TRectype & row = prd.body()[i];
found = (d == row.get_date("DATAFINE") && h == row.get("ORAFINE")) || found = (recdate == row.get_date("DATAFINE") && rechour == row.get("ORAFINE")) ||
row.get("DATAFINE").empty(); row.get("DATAFINE").empty();
if (found) if (found)
break; break;
@ -574,8 +578,8 @@ void TRilprod_mask::load_prod_file(const char* nomefile, bool savefile, bool onl
} }
TRectype & row = prd.body()[i]; TRectype & row = prd.body()[i];
row.put("DATAFINE", d); row.put("DATAFINE", recdate);
row.put("ORAFINE", h); row.put("ORAFINE", rechour);
real diff = qta - row.get_real("QTA"); real diff = qta - row.get_real("QTA");
real tot = prd.get_real("QTA") + diff; real tot = prd.get_real("QTA") + diff;

29
src/mr/mr0500a-Denso.ini Normal file
View File

@ -0,0 +1,29 @@
[MAIN]
DECSEP =
FIELDSEP = |
RECORDSEP =
RECORDSIZE =
SKIPLINES = 0
TYPEFIELD = -1
TYPELEN = 0
TYPEPOS = -1
[RECORD]
LENGTH(0) = 1
LENGTH(1) = 20
LENGTH(2) = 20
LENGTH(3) = 5
LENGTH(4) = 15
LENGTH(5) = 1
LENGTH(6) = 5
LENGTH(7) = 8
LENGTH(8) = 8
NAME(0) = TIPO
NAME(1) = ORDINE
NAME(2) = CODART
NAME(3) = LINEA
NAME(4) = QTA
NAME(5) = CHIUSO
NAME(6) = OPERATORE
NAME(7) = DATA
NAME(8) = ORA