changeset 8:4967d1e2b30c

Alert when not mask in batch print mode.
author pyon@macmini
date Fri, 01 Nov 2013 18:44:37 +0900
parents 7ac7d28699af
children b455f2d8aac9
files Changes include/db.h src/bprint.cpp src/db.cpp src/index.cpp src/myframe.cpp
diffstat 6 files changed, 32 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/Changes	Thu Oct 17 19:54:23 2013 +0900
+++ b/Changes	Fri Nov 01 18:44:37 2013 +0900
@@ -1,3 +1,9 @@
+version 03.09
+2013-11-01
+ Fixed bug.
+ Alert when not masked in batch print mode.
+
+----
 version 03.08
 2013-10-17
  Display DB updated day. 
--- a/include/db.h	Thu Oct 17 19:54:23 2013 +0900
+++ b/include/db.h	Fri Nov 01 18:44:37 2013 +0900
@@ -1,5 +1,5 @@
 // Filename   : db.h
-// Last Change: 16-Oct-2013.
+// Last Change: 01-Nov-2013.
 //
 #ifndef __DB_H__
 #define __DB_H__
@@ -23,7 +23,7 @@
 // 合議体から被保険者番号を取得
 wxArrayString GetHhsNoByCcn( wxString ccn, wxString date );
 // インデックスを更新
-void UpdateIndex( wxString datedir, wxString date );
+void UpdateIndex( wxString datadir, wxString date );
 // DBの整合性をチェック
 wxArrayString CheckDBs( void );
 // DBの更新日時を取得
--- a/src/bprint.cpp	Thu Oct 17 19:54:23 2013 +0900
+++ b/src/bprint.cpp	Fri Nov 01 18:44:37 2013 +0900
@@ -1,5 +1,5 @@
 // Filename   : bprint.cpp
-// Last Change: 18-Sep-2013.
+// Last Change: 01-Nov-2013.
 //
 
 #include "bprint.h"
@@ -36,7 +36,7 @@
     m_grid->SetColSize( 0, 100 );
     m_grid->SetColSize( 1, 100 );
     m_grid->SetColSize( 2, 220 );
-    m_grid->SetColSize( 3,  70 );
+    m_grid->SetColSize( 3,  90 );
     m_grid->ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_ALWAYS );
 	
 	// Rows
@@ -158,6 +158,7 @@
                     img_org.SetRGB( m_mask3old, 255, 255, 255 );   // barcode
                 }
                 img_org.SaveFile( tmpjpg );
+                notyet_mask = false;
             }
             else {
                 wxCopyFile( file, tmpjpg, true );
@@ -175,8 +176,14 @@
         hpout.SetHtmlText( html, wxEmptyString, false );
         p.Print( NULL, &hpout, false );
 
-        m_grid->SetCellValue( r, 3, wxT("処理済") );
-        log.Add( path );
+        wxString pst = wxT("処理済");
+        wxString logmsg = path;
+        if ( notyet_mask ) {
+            pst.Append( wxT(" 非マスク") );
+            logmsg.Append( wxT(" not mask") );
+        }
+        m_grid->SetCellValue( r, 3, pst );
+        log.Add( logmsg );
     }
     WriteLog( log );
 }
--- a/src/db.cpp	Thu Oct 17 19:54:23 2013 +0900
+++ b/src/db.cpp	Fri Nov 01 18:44:37 2013 +0900
@@ -1,5 +1,5 @@
 // Filename   : db.cpp
-// Last Change: 16-Oct-2013.
+// Last Change: 01-Nov-2013.
 //
 
 #include "db.h"
@@ -197,7 +197,7 @@
 }
 
 /* インデックスを更新 */
-void UpdateIndex( wxString datedir, wxString date )
+void UpdateIndex( wxString datadir, wxString date )
 {
     wxString gszFile = wxGetCwd() + wxFILE_SEP_PATH + wxT("db") + wxFILE_SEP_PATH + wxT("ccn.db");
     wxSQLite3Database ccndb;
@@ -209,7 +209,7 @@
     stmt.Finalize();
 
     wxString ccndir;
-    wxDir dated( datedir );
+    wxDir dated( datadir );
     if ( !dated.IsOpened() ) {
         return;
     }
@@ -223,7 +223,7 @@
 
     while ( cont ) {
 
-        wxDir ccnd( datedir + wxFILE_SEP_PATH + ccndir );
+        wxDir ccnd( datadir + wxFILE_SEP_PATH + ccndir );
         if ( !ccnd.IsOpened() ) return;
         wxString hhsdir;
         bool c = ccnd.GetFirst( &hhsdir, wxEmptyString, wxDIR_DIRS );
@@ -231,7 +231,7 @@
         while ( c ) {
             if ( ! reSinsei.Matches( hhsdir ) ) {
 
-                wxString path = datedir + wxFILE_SEP_PATH + ccndir + wxFILE_SEP_PATH + hhsdir;
+                wxString path = datadir + wxFILE_SEP_PATH + ccndir + wxFILE_SEP_PATH + hhsdir;
 
                 stmt = ccndb.PrepareStatement( "INSERT INTO path VALUES( ?, ?, ?, datetime( 'now', 'localtime' ) );" );
                 stmt.Bind( 1, hhsdir );
--- a/src/index.cpp	Thu Oct 17 19:54:23 2013 +0900
+++ b/src/index.cpp	Fri Nov 01 18:44:37 2013 +0900
@@ -1,5 +1,5 @@
 // Filename   : index.cpp
-// Last Change: 16-Oct-2013.
+// Last Change: 01-Nov-2013.
 //
 
 #include "index.h"
@@ -91,13 +91,13 @@
 
 
     wxString date = dt.Format( wxT("%Y%m%d") );
-    wxString datedir = m_rootdir + wxFILE_SEP_PATH + year + wxFILE_SEP_PATH + date;
-    if ( !wxDir::Exists( datedir ) ) {
-        wxMessageBox( wxT("フォルダが存在しません.") + datedir );
+    wxString datadir = m_rootdir + wxFILE_SEP_PATH + year + wxFILE_SEP_PATH + date;
+    if ( !wxDir::Exists( datadir ) ) {
+        wxMessageBox( wxT("フォルダが存在しません.") + datadir );
         return;
     }
 
-    UpdateIndex( datedir, date );
+    UpdateIndex( datadir, date );
 
     UpdateList();
     wxMessageBox( wxT("インデックス作成が終了しました.") );
--- a/src/myframe.cpp	Thu Oct 17 19:54:23 2013 +0900
+++ b/src/myframe.cpp	Fri Nov 01 18:44:37 2013 +0900
@@ -1,5 +1,5 @@
 // Filename   : myframe.cpp
-// Last Change: 17-Oct-2013.
+// Last Change: 01-Nov-2013.
 //
 #include "main.h"
 #include "db.h"
@@ -403,7 +403,7 @@
 /* 一括印刷モード */
 void MyFrame::OnBPrintMode( wxCommandEvent& WXUNUSED(event) )
 {
-    FrameBatchPrint* bp = new FrameBatchPrint( this, wxID_ANY, wxT("一括印刷"), wxDefaultPosition, wxSize( 680, 600 ), wxCAPTION|wxFRAME_NO_TASKBAR );
+    FrameBatchPrint* bp = new FrameBatchPrint( this, wxID_ANY, wxT("一括印刷"), wxDefaultPosition, wxSize( 700, 600 ), wxCAPTION|wxFRAME_NO_TASKBAR );
     bp->SetMask1( m_mask1 );
     bp->SetMask2( m_mask2 );
     bp->SetMask3( m_mask3 );
@@ -421,8 +421,8 @@
     config->Read( wxT("rootdir"), &rootdir );
 
     IndexDialog* index = new IndexDialog( this, wxID_ANY, wxT("インデックス作成"), wxDefaultPosition, wxSize( 700, 600 ), wxDEFAULT_DIALOG_STYLE|wxSTAY_ON_TOP );
+    index->SetRootdir( rootdir );
     index->ShowModal();
-    index->SetRootdir( rootdir );
 }
 /* マークシートパラメータ設定ダイアログ */
 void MyFrame::OnMarkParam( wxCommandEvent& WXUNUSED(event) )