changeset 51:4e14902379da

first release.
author pyon@macmini
date Fri, 01 May 2020 23:45:22 +0900
parents 638e1ad05cae
children 1c7bf24c63e6
files src/kaigo/horori/alloc/alloc.cpp src/kaigo/horori/merger/src/main.cpp src/kaigo/horori/merger/src/merger.cpp src/kaigo/horori/searcher/include/net.h src/kaigo/horori/searcher/searcher.conf src/kaigo/horori/searcher/server/searcher.go src/kaigo/horori/searcher/src/main.cpp src/kaigo/horori/searcher/src/searcher.cpp
diffstat 8 files changed, 90 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/src/kaigo/horori/alloc/alloc.cpp	Fri Apr 24 22:22:12 2020 +0900
+++ b/src/kaigo/horori/alloc/alloc.cpp	Fri May 01 23:45:22 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : alloc.cpp
-// Last Change: 2020-04-16 木 12:26:33.
+// Last Change: 2020-04-27 月 14:11:08.
 //
 #include <wx/dir.h>
 #include <wx/filefn.h> 
@@ -39,24 +39,24 @@
 	m_staticTextPdf = new wxStaticText(this, wxID_ANY, wxT("PDFファイル"), wxDefaultPosition, wxDefaultSize, 0);
 	fgSizer->Add(m_staticTextPdf, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
 
-	m_filePickerPdf1 = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*.pdf"), wxDefaultPosition, pksz, wxFLP_CHANGE_DIR|wxFLP_FILE_MUST_EXIST|wxFLP_SMALL|wxFLP_USE_TEXTCTRL);
+	m_filePickerPdf1 = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*.pdf"), wxDefaultPosition, pksz, wxFLP_FILE_MUST_EXIST|wxFLP_SMALL|wxFLP_USE_TEXTCTRL);
 	fgSizer->Add(m_filePickerPdf1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
 
 	fgSizer->Add(0, 0, 1, wxEXPAND, 5);
 
-	m_filePickerPdf2 = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*.pdf"), wxDefaultPosition, pksz, wxFLP_CHANGE_DIR|wxFLP_FILE_MUST_EXIST|wxFLP_SMALL|wxFLP_USE_TEXTCTRL);
+	m_filePickerPdf2 = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*.pdf"), wxDefaultPosition, pksz, wxFLP_FILE_MUST_EXIST|wxFLP_SMALL|wxFLP_USE_TEXTCTRL);
 	fgSizer->Add(m_filePickerPdf2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
 
 	m_staticTextTif = new wxStaticText(this, wxID_ANY, wxT("TIFフォルダ"), wxDefaultPosition, wxDefaultSize, 0);
 	fgSizer->Add(m_staticTextTif, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5);
 
-	m_dirPickerTif = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, pksz, wxDIRP_CHANGE_DIR|wxDIRP_DIR_MUST_EXIST|wxDIRP_SMALL|wxDIRP_USE_TEXTCTRL);
+	m_dirPickerTif = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, pksz, wxDIRP_DIR_MUST_EXIST|wxDIRP_SMALL|wxDIRP_USE_TEXTCTRL);
 	fgSizer->Add(m_dirPickerTif, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
 
 	m_staticTextWork = new wxStaticText(this, wxID_ANY, wxT("作業フォルダ"), wxDefaultPosition, wxDefaultSize, 0);
 	fgSizer->Add(m_staticTextWork, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5);
 
-	m_dirPickerWork = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, pksz, wxDIRP_CHANGE_DIR|wxDIRP_DIR_MUST_EXIST|wxDIRP_SMALL|wxDIRP_USE_TEXTCTRL);
+	m_dirPickerWork = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, pksz, wxDIRP_DIR_MUST_EXIST|wxDIRP_SMALL|wxDIRP_USE_TEXTCTRL);
 	fgSizer->Add(m_dirPickerWork, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
 
 	fgSizer->Add(0, 0, 1, wxEXPAND, 5);
--- a/src/kaigo/horori/merger/src/main.cpp	Fri Apr 24 22:22:12 2020 +0900
+++ b/src/kaigo/horori/merger/src/main.cpp	Fri May 01 23:45:22 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : main.cpp
-// Last Change: 2020-03-18 水 11:33:37.
+// Last Change: 2020-04-24 金 17:19:21.
 //
 #include "main.h"
 #include "merger.h"
@@ -22,7 +22,7 @@
     wxImage::AddHandler(new wxJPEGHandler);
     wxImage::AddHandler(new wxTIFFHandler );
 
-	MergeFrame *frame = new MergeFrame(NULL, wxID_ANY, wxT("Merger"), wxDefaultPosition, wxSize(1200, 1000), wxDEFAULT_FRAME_STYLE);
+	MergeFrame *frame = new MergeFrame(NULL, wxID_ANY, wxT("Merger"), wxDefaultPosition, wxSize(1200, 1150), wxDEFAULT_FRAME_STYLE);
 	frame->Show(true);
 	frame->Raise();
 
--- a/src/kaigo/horori/merger/src/merger.cpp	Fri Apr 24 22:22:12 2020 +0900
+++ b/src/kaigo/horori/merger/src/merger.cpp	Fri May 01 23:45:22 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : merger.cpp
-// Last Change: 2020-04-23 木 08:29:19.
+// Last Change: 2020-04-24 金 17:22:19.
 //
 #include <wx/dir.h>
 #include <wx/textfile.h>
@@ -91,7 +91,7 @@
 	m_staticTextMask = new wxStaticText(this, wxID_ANY, wxT("マスク位置"), wxDefaultPosition, wxDefaultSize, 0);
 	gbSizer->Add(m_staticTextMask, wxGBPosition(6, 0), wxGBSpan(3, 1), wxALL|wxALIGN_RIGHT, 5);
 
-	m_dataViewListCtrlParam = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(1000, 140), wxDV_ROW_LINES);
+	m_dataViewListCtrlParam = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(1000, 300), wxDV_ROW_LINES);
 	m_dataViewListColumnNo = m_dataViewListCtrlParam->AppendTextColumn(wxT("No"), wxDATAVIEW_CELL_INERT, 40, static_cast<wxAlignment>(wxALIGN_CENTER), 0);
 	m_dataViewListColumnHno = m_dataViewListCtrlParam->AppendTextColumn(wxT("被保険者番号"), wxDATAVIEW_CELL_INERT, 100, static_cast<wxAlignment>(wxALIGN_CENTER), 0);
 	m_dataViewListColumnName = m_dataViewListCtrlParam->AppendTextColumn(wxT("    氏名"), wxDATAVIEW_CELL_INERT, 120, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE);
@@ -119,7 +119,7 @@
 	m_buttonWrite->SetBackgroundColour(wxColour(255, 160, 120));
 	gbSizer->Add(m_buttonWrite, wxGBPosition(6, 2), wxGBSpan(1, 1), wxALL, 5);
 
-	gbSizer->Add(0, 60, wxGBPosition(7, 2), wxGBSpan(1, 1), wxEXPAND, 5);
+	gbSizer->Add(0, 210, wxGBPosition(7, 2), wxGBSpan(1, 1), wxEXPAND, 5);
 
 	m_buttonPrint = new wxButton(this, wxID_ANY, wxT("印刷"), wxDefaultPosition, wxSize(100, -1), 0);
 	m_buttonPrint->SetBackgroundColour(wxColour(255, 205, 255));
--- a/src/kaigo/horori/searcher/include/net.h	Fri Apr 24 22:22:12 2020 +0900
+++ b/src/kaigo/horori/searcher/include/net.h	Fri May 01 23:45:22 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : net.h
-// Last Change: 2020-04-21  13:44:57.
+// Last Change: 2020-05-01  08:47:39.
 //
 #pragma once
 
--- a/src/kaigo/horori/searcher/searcher.conf	Fri Apr 24 22:22:12 2020 +0900
+++ b/src/kaigo/horori/searcher/searcher.conf	Fri May 01 23:45:22 2020 +0900
@@ -1,10 +1,11 @@
-[Server]
-addr=192.168.21.163
+[Server]
+;addr=192.168.21.163
+addr=192.168.21.155
 port=3910
 
 [BatchPrint]
 file=C:\\Users\\nintei\\Desktop\\test\\資料提供対象者.csv
-zoom=99
+zoom=100
 
 [Mask]
 mask1=1080x180+240+190
@@ -13,5 +14,7 @@
 
 [Misc]
 workdir=C:\\Users\\nintei\\Desktop\\nst\\work
-uphhscsv=C:\\Users\\nintei\\Desktop\\test\\サーチャー用だ!.csv
+uphhscsv=C:\\Users\\nintei\\Desktop\\test\\サーチャー用だ!.txt
+geometory=1600x1150+0+0
+;geometory=1600x900+0+0
 
--- a/src/kaigo/horori/searcher/server/searcher.go	Fri Apr 24 22:22:12 2020 +0900
+++ b/src/kaigo/horori/searcher/server/searcher.go	Fri May 01 23:45:22 2020 +0900
@@ -1,5 +1,5 @@
  /*
-  Last Change: 2020-04-23 木 14:43:54.
+  Last Change: 2020-05-01 金 10:46:51.
  */
 
 package main
@@ -20,6 +20,7 @@
 	"sort"
 	"strconv"
 	"strings"
+	"time"
 )
 
 type hhs struct {
@@ -56,6 +57,7 @@
     hhash map[string]hhs
 	iymdhash map[string]string
 	iyhash map[string]string
+	logfile string
 )
 
 func init() {
@@ -63,6 +65,7 @@
 	hhsdb = "hhsdb.csv"
 	indexdb = "index.csv"
 	pwdb = "passwd"
+	logfile = "searcher.log"
 }
 
 func main() {
@@ -169,6 +172,15 @@
 	return nil
 }
 
+func write_errlog(no int, msg string) {
+	log := filepath.Join(server_root, logfile)
+	t := time.Now().Format("2006-01-02 15:04")
+	msg = fmt.Sprintf("%s [%02d] %s\n", t, no, msg)
+	f, _ := os.OpenFile(log, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
+	f.Write([]byte(msg))
+	f.Close()
+}
+
 /** HTTP HANDLERS **/
 /* Get /h/0800012345 -> name:addr:20200101#20210701#... */
 func hhs_handler(w http.ResponseWriter, r *http.Request) {
@@ -230,6 +242,7 @@
 
 	f, err := os.Open(file)
 	if err != nil {
+		write_errlog(1, "cannot open " + file)
 		http.NotFound(w, r)
 		return
 	}
@@ -275,13 +288,14 @@
 /* POST /u/ */
 func uphhsdb_handler(w http.ResponseWriter, r *http.Request) {
 	if r.Method != http.MethodPost {
+		write_errlog(10, "not post method")
 		http.NotFound(w, r)
 		return
 	}
 
-	file := filepath.Join(server_root, hhsdb)
-	f, err := os.Create(file)
+	f, err := os.Create(hhsdb)
 	if err != nil {
+		write_errlog(11, "cannot create " + hhsdb)
 		http.NotFound(w, r)
 		return
 	}
@@ -290,6 +304,7 @@
     b, err := ioutil.ReadAll(r.Body)
     r.Body.Close()
 	if err != nil {
+		write_errlog(12, "cannot read req-body")
 		http.NotFound(w, r)
 		return
 	}
@@ -297,12 +312,14 @@
 	br := bytes.NewReader(b)
     zr, err := gzip.NewReader(br)
 	if err != nil {
+		write_errlog(13, "gzip-reader error")
 		http.NotFound(w, r)
         return
 	}
 	n, err := io.Copy(f, zr)
 
 	if err := zr.Close(); err != nil {
+		write_errlog(14, "gzip-reader error")
 		http.NotFound(w, r)
         return
 	}
@@ -315,6 +332,7 @@
 /* POST /ui/20200401/0800012345.tgz */
 func upimage_handler(w http.ResponseWriter, r *http.Request) {
 	if r.Method != http.MethodPost {
+		write_errlog(20, "not post method")
 		http.NotFound(w, r)
 		return
 	}
@@ -332,6 +350,7 @@
 	file := filepath.Join(server_root, "images", ymd, tgz)
 	f, err := os.Create(file)
 	if err != nil {
+		write_errlog(21, "cannot create " + file)
 		http.NotFound(w, r)
 		return
 	}
@@ -339,6 +358,7 @@
 
 	n, err := io.Copy(f, r.Body)
 	if err != nil {
+		write_errlog(22, "cannot copy req-body")
 		http.NotFound(w, r)
 		return
 	}
@@ -410,6 +430,7 @@
 func pw_handler(w http.ResponseWriter, r *http.Request) {
     b, err := ioutil.ReadFile(pwdb)
 	if err != nil {
+		write_errlog(30, "cannot read passwd-file")
 		http.NotFound(w, r)
 		return
 	}
--- a/src/kaigo/horori/searcher/src/main.cpp	Fri Apr 24 22:22:12 2020 +0900
+++ b/src/kaigo/horori/searcher/src/main.cpp	Fri May 01 23:45:22 2020 +0900
@@ -1,7 +1,10 @@
 // Filename   : main.cpp
-// Last Change: 2020-04-23 木 13:59:08.
+// Last Change: 2020-04-27 月 17:22:49.
 //
+#include <wx/fileconf.h>
+
 #include "main.h"
+#include "utils.h"
 #include "searcher.h"
 
 IMPLEMENT_APP(MyApp)
@@ -21,7 +24,15 @@
 
     wxImage::AddHandler(new wxTIFFHandler);
 
-	SearchFrame *frame = new SearchFrame(NULL, wxID_ANY, wxT("Searcher"), wxDefaultPosition, wxSize(1200, 1000), wxDEFAULT_FRAME_STYLE);
+    wxString conf_file = wxGetCwd() + wxFILE_SEP_PATH + wxT("searcher.conf");
+    wxFileConfig* conf = new wxFileConfig(wxT("MyApp"), wxT("T.Mutoh"), conf_file, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
+	wxString buf;
+    conf->SetPath(wxT("/Misc"));
+    conf->Read(wxT("geometory"), &buf);
+	wxRect r = Geo2Rect(buf);
+	delete conf;
+
+	SearchFrame *frame = new SearchFrame(NULL, wxID_ANY, wxT("Searcher"), wxDefaultPosition, wxSize(r.GetWidth(), r.GetHeight()), wxDEFAULT_FRAME_STYLE);
 	frame->Show(true);
 	frame->Raise();
 
--- a/src/kaigo/horori/searcher/src/searcher.cpp	Fri Apr 24 22:22:12 2020 +0900
+++ b/src/kaigo/horori/searcher/src/searcher.cpp	Fri May 01 23:45:22 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : searcher.cpp
-// Last Change: 2020-04-24 金 15:08:22.
+// Last Change: 2020-05-01 金 14:27:53.
 //
 #include <wx/msgdlg.h>
 #include <wx/dir.h>
@@ -153,7 +153,8 @@
 }
 
 /** SearcherFrame **/
-SearchFrame::SearchFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : wxFrame(parent, id, title, pos, size, style)
+SearchFrame::SearchFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
+	: wxFrame(parent, id, title, pos, size, style)
 {
 	CreateControls();
 	InitializeControlsValue();
@@ -558,6 +559,7 @@
 	input.ReadAll(&buf, cust);
     input.Close();
 
+	buf.Replace(wxT("\""), wxEmptyString, true);
 	output.Write(buf);
 	output.Close();
 
@@ -737,11 +739,11 @@
 				wxString html;
 				html = wxT("<html><body>\n");
 				for (int i = 0; i < 5; i++) {
-					if (m_dataViewListCtrlBatch->GetToggleValue(r, 4) && i < 3) continue;
+					if (m_dataViewListCtrlBatch->GetToggleValue(r, 4) && i > 2) continue;
 					html += wxT("<img src=\"") + wxString::Format(wxT("%s/%d"), m_workdir, i + 1) + imgsz + wxT("/>");
 					html += wxT("<div align=right><font size=-2><u>") + hno + wxT("</u></font></div>");
-					if (i == 2 && m_checkBoxBoth->IsChecked()) {
-						html += wxT("<img src=\"./image/space.tif \"") + imgsz + wxT("/>");
+					if (m_checkBoxBoth->IsChecked() && i == 2) {
+						html += wxT("<div>        </div><img src=\"./image/space.tif\"") + imgsz + wxT("/>");
 					}
 				}
 				html += wxT("</body></html>\n");
@@ -774,15 +776,22 @@
 			wxString html;
 			html = wxT("<html><body>\n");
 
+			wxString footer;
+			footer += wxT("<div align=right><font size=-2><u>") + m_searchCtrl->GetValue();
+			footer += wxT( "@" ) + m_usergroup + wxT( "#" ) + nowstr + wxT("</u></font></div>");
+
 			wxMessageDialog dlg(this, wxT("5枚すべて印刷しますか?"), wxT("Question"), wxYES_NO);
 			if (dlg.ShowModal() == wxID_YES) {
 				if (m_checkBoxMask->IsChecked()) MaskImage1();
 				for (int i = 0; i < 5; i++) {
 					html += wxT("<img src=\"") + wxString::Format(wxT("%s/%d"), m_workdir, i + 1) + imgsz + wxT("/>");
-					html += wxT("<div align=right><font size=-2><u>") + m_searchCtrl->GetValue();
-					html += wxT( "@" ) + m_usergroup + wxT( "#" ) + nowstr + wxT("</u></font></div>");
-					if (i == 2 && m_checkBoxBoth->IsChecked()) {
-						html += wxT("<img src=\"./image/space.tif\"") + imgsz + wxT("/>");
+					if (!m_checkBoxBoth->IsChecked()) {
+						html += footer;
+					} else {
+						if (i == 0 || i == 2 || i == 3) html += footer;
+					}
+					if (m_checkBoxBoth->IsChecked() && i == 2) {
+						html += wxT("<div>        </div><img src=\"./image/space.tif\"") + imgsz + wxT("/>");
 					}
 				}
 			}
@@ -790,7 +799,7 @@
 				int i = m_notebook->GetSelection();
 				if (i == 0 && m_checkBoxMask->IsChecked()) MaskImage1();
 				html += wxT("<img src=\"") + wxString::Format(wxT("%s/%d"), m_workdir, i + 1) + imgsz + wxT("/>");
-				html += wxT("<div align=right><font size=-2><u>") + m_searchCtrl->GetValue() + wxT("</u></font></div>");
+				html += footer;
 			}
 			html += wxT("</body></html>\n");
 
@@ -838,7 +847,11 @@
 
 	wxMessageBox(wxString::Format(wxT("%s lonin..."), m_user));
 	m_textCtrlPasswd->SetValue(wxT("ora ora ora ora !"));
-	this->SetTitle(wxString::Format(wxT("Searcher - %s(%s) logined"), m_user, m_usergroup));
+
+	wxString sv;
+	if (m_usergroup.StartsWith(wxT("star")))
+		sv = wxT("...") + m_addr + wxT(":") + m_port;
+	this->SetTitle(wxString::Format(wxT("Searcher - %s(%s) logined"), m_user, m_usergroup) + sv);
 	m_searchCtrl->SetFocus();
 }
 
@@ -855,11 +868,14 @@
 	this->SetSizeHints(wxDefaultSize, wxDefaultSize);
 	this->SetBackgroundColour(wxColour(217, 217, 217));
 
+	int w, h;
+	this->GetSize(&w, &h);
+
 	wxGridBagSizer* gbSizer = new wxGridBagSizer(0, 0);
 	gbSizer->SetFlexibleDirection(wxBOTH);
 	gbSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
 
-	m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(900, 940), wxNB_FIXEDWIDTH|wxNB_TOP);
+	m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(1300, h - 40), wxNB_FIXEDWIDTH|wxNB_TOP);
 
 	m_scrolledWindow1 = new wxScrolledWindow(m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL);
 	m_scrolledWindow1->SetScrollRate(5, 5);
@@ -892,12 +908,12 @@
 	m_buttonRead = new wxButton(m_panelBatch, wxID_ANY, wxT("読込み"), wxDefaultPosition, wxDefaultSize, 0);
 	gbSizerBatch->Add(m_buttonRead, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
 
-	m_dataViewListCtrlBatch = new wxDataViewListCtrl(m_panelBatch, wxID_ANY, wxDefaultPosition, wxSize(700, 800), wxDV_MULTIPLE|wxDV_ROW_LINES);
+	m_dataViewListCtrlBatch = new wxDataViewListCtrl(m_panelBatch, wxID_ANY, wxDefaultPosition, wxSize(700, h - 120), wxDV_MULTIPLE|wxDV_ROW_LINES);
 	m_dataViewListColumnBPNo     = m_dataViewListCtrlBatch->AppendTextColumn(wxT("No"),           wxDATAVIEW_CELL_INERT,  40, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE|wxDATAVIEW_COL_SORTABLE);
 	m_dataViewListColumnBPHno    = m_dataViewListCtrlBatch->AppendTextColumn(wxT("被保険者番号"), wxDATAVIEW_CELL_INERT, 100, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
 	m_dataViewListColumnBPName   = m_dataViewListCtrlBatch->AppendTextColumn(wxT("  氏名"),       wxDATAVIEW_CELL_INERT, 120, static_cast<wxAlignment>(wxALIGN_LEFT),   wxDATAVIEW_COL_RESIZABLE);
 	m_dataViewListColumnBPDate   = m_dataViewListCtrlBatch->AppendTextColumn(wxT("日付"),         wxDATAVIEW_CELL_INERT,  90, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE|wxDATAVIEW_COL_SORTABLE);
-	m_dataViewListColumnOnlyIk   = m_dataViewListCtrlBatch->AppendToggleColumn(wxT("意見書のみ"), wxDATAVIEW_CELL_INERT,  80, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE|wxDATAVIEW_COL_SORTABLE);
+	m_dataViewListColumnOnlyIk   = m_dataViewListCtrlBatch->AppendToggleColumn(wxT("調査のみ"),   wxDATAVIEW_CELL_INERT,  70, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE|wxDATAVIEW_COL_SORTABLE);
 	m_dataViewListColumnProgress = m_dataViewListCtrlBatch->AppendProgressColumn(wxT("状態"),     wxDATAVIEW_CELL_INERT, 100, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
 	m_dataViewListColumnDummy    = m_dataViewListCtrlBatch->AppendTextColumn(wxEmptyString,       wxDATAVIEW_CELL_INERT,  80, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
 	m_dataViewListCtrlBatch->SetAlternateRowColour(wxColour(230, 230, 255)) ;
@@ -938,13 +954,13 @@
 	m_staticTextDB = new wxStaticText(m_panelMainte, wxID_ANY, wxT("DB"), wxDefaultPosition, wxDefaultSize, 0);
 	fgSizerIdx->Add(m_staticTextDB, 0, wxALL, 5);
 
-	wxString m_choiceIdxYearChoices[] = {wxEmptyString, wxT("2020"), wxT("2021"), wxT("2022"), wxT("2023"), wxT("2024"), wxT("2026"), wxT("2027"), wxT("2028"), wxT("2029"), wxT("2030"), wxT("2031"), wxT("2032"), wxT("2033"), wxT("2034")};
+	wxString m_choiceIdxYearChoices[] = {wxEmptyString, wxT("2018"), wxT("2019"), wxT("2020"), wxT("2021"), wxT("2022"), wxT("2023"), wxT("2024"), wxT("2026"), wxT("2027"), wxT("2028"), wxT("2029"), wxT("2030"), wxT("2031"), wxT("2032"), wxT("2033"), wxT("2034")};
 	int m_choiceIdxYearNChoices = sizeof(m_choiceIdxYearChoices) / sizeof(wxString);
 	m_choiceIdxYear = new wxChoice(m_panelMainte, wxID_ANY, wxDefaultPosition, wxSize(100, -1), m_choiceIdxYearNChoices, m_choiceIdxYearChoices, 0);
 	m_choiceIdxYear->SetSelection(0);
 	fgSizerIdx->Add(m_choiceIdxYear, 0, wxALL, 5);
 
-	m_dataViewListCtrlIdxDate = new wxDataViewListCtrl(m_panelMainte, wxID_ANY, wxDefaultPosition, wxSize(130, 330), wxDV_SINGLE|wxDV_ROW_LINES);
+	m_dataViewListCtrlIdxDate = new wxDataViewListCtrl(m_panelMainte, wxID_ANY, wxDefaultPosition, wxSize(150, 330), wxDV_SINGLE|wxDV_ROW_LINES);
 	m_dataViewListColumnIdxDateNo = m_dataViewListCtrlIdxDate->AppendTextColumn(wxT("No"),   wxDATAVIEW_CELL_INERT, 40, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
 	m_dataViewListColumnIdxDate   = m_dataViewListCtrlIdxDate->AppendTextColumn(wxT("日付"), wxDATAVIEW_CELL_INERT, 80, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
 	m_dataViewListCtrlIdxDate->SetAlternateRowColour(wxColour(230, 230, 255)) ;
@@ -967,13 +983,13 @@
 	m_choiceDrv->SetSelection(0);
 	fgSizerIdx->Add(m_choiceDrv, 0, wxALL, 5);
 
-	wxString m_choiceDrvYearChoices[] = {wxEmptyString, wxT("2020"), wxT("2021"), wxT("2022"), wxT("2023"), wxT("2024"), wxT("2026"), wxT("2027"), wxT("2028"), wxT("2029"), wxT("2030"), wxT("2031"), wxT("2032"), wxT("2033"), wxT("2034")};
+	wxString m_choiceDrvYearChoices[] = {wxEmptyString, wxT("2018"), wxT("2019"), wxT("2020"), wxT("2021"), wxT("2022"), wxT("2023"), wxT("2024"), wxT("2026"), wxT("2027"), wxT("2028"), wxT("2029"), wxT("2030"), wxT("2031"), wxT("2032"), wxT("2033"), wxT("2034")};
 	int m_choiceDrvYearNChoices = sizeof(m_choiceDrvYearChoices) / sizeof(wxString);
 	m_choiceDrvYear = new wxChoice(m_panelMainte, wxID_ANY, wxDefaultPosition, wxSize(100, -1), m_choiceDrvYearNChoices, m_choiceDrvYearChoices, 0);
 	m_choiceDrvYear->SetSelection(0);
 	fgSizerIdx->Add(m_choiceDrvYear, 0, wxALL, 5);
 
-	m_dataViewListCtrlDrvDate = new wxDataViewListCtrl(m_panelMainte, wxID_ANY, wxDefaultPosition, wxSize(130, 330), wxDV_SINGLE|wxDV_ROW_LINES);
+	m_dataViewListCtrlDrvDate = new wxDataViewListCtrl(m_panelMainte, wxID_ANY, wxDefaultPosition, wxSize(150, 330), wxDV_SINGLE|wxDV_ROW_LINES);
 	m_dataViewListColumnDrvDateNo = m_dataViewListCtrlDrvDate->AppendTextColumn(wxT("No"),   wxDATAVIEW_CELL_INERT, 40, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
 	m_dataViewListColumnDrvDate   = m_dataViewListCtrlDrvDate->AppendTextColumn(wxT("日付"), wxDATAVIEW_CELL_INERT, 80, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
 	m_dataViewListCtrlDrvDate->SetAlternateRowColour(wxColour(230, 230, 255)) ;
@@ -1009,7 +1025,7 @@
 	m_staticTextHhsDB = new wxStaticText(m_panelMainte, wxID_ANY, wxT("被保険者CSV"), wxDefaultPosition, wxDefaultSize, 0);
 	gbSizerDB->Add(m_staticTextHhsDB, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
 
-	m_filePickerHhsDB = new wxFilePickerCtrl(m_panelMainte, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*.csv"), wxDefaultPosition, wxSize(200,-1), wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_SMALL|wxFLP_USE_TEXTCTRL);
+	m_filePickerHhsDB = new wxFilePickerCtrl(m_panelMainte, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("CSV and TXT files (*.csv;*.txt)|*.csv;*.txt"), wxDefaultPosition, wxSize(200,-1), wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_SMALL|wxFLP_USE_TEXTCTRL);
 	gbSizerDB->Add(m_filePickerHhsDB, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
 
 	m_buttonRegHhs = new wxButton(m_panelMainte, wxID_ANY, wxT("アップロード"), wxDefaultPosition, wxDefaultSize, 0);