Satisfaction.cpp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. // Satisfaction.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "Satisfaction.h"
  6. #include "MyMdi.H"
  7. #include "SelBrunDevice.h"
  8. #include "SatisfactionSurvey.h"
  9. #include "SatisfactionCfg.h"
  10. #ifdef _DEBUG
  11. #define new DEBUG_NEW
  12. #undef THIS_FILE
  13. static char THIS_FILE[] = __FILE__;
  14. #endif
  15. SatisfactionSurvey* g_Surveydlg = NULL;
  16. IMPLEMENT_DYNCREATE(Satisfaction, MyFormView)
  17. Satisfaction::Satisfaction() : MyFormView(Satisfaction::IDD)
  18. , m_nCurSelIdx(-1)
  19. , m_strStartTimer(_T(""))
  20. , m_strEndTimer(_T(""))
  21. , m_nShowType(0)
  22. {
  23. memset(m_szColName, 0, sizeof(TCHAR)*64);
  24. }
  25. Satisfaction::~Satisfaction()
  26. {
  27. if(g_Surveydlg)
  28. g_Surveydlg->SendMessage(WM_CLOSE);
  29. g_Surveydlg = NULL;
  30. }
  31. void Satisfaction::DoDataExchange(CDataExchange* pDX)
  32. {
  33. MyFormView::DoDataExchange(pDX);
  34. DDX_Control(pDX, IDC_LIST2, m_List1);
  35. }
  36. BEGIN_MESSAGE_MAP(Satisfaction, MyFormView)
  37. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  38. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  39. ON_NOTIFY(NM_CLICK, IDC_LIST2, OnClickList2)
  40. ON_BN_CLICKED(IDC_OpenSurvey_Btn, OnOpenSurveyBtn)
  41. ON_BN_CLICKED(IDC_OrderToday_Btn, OnOrderTodayBtn)
  42. ON_BN_CLICKED(IDC_Configuration_Btn, OnConfigurationBtn)
  43. ON_BN_CLICKED(IDC_TodayPhotograph_Btn, OnTodayPhotographBtn)
  44. ON_BN_CLICKED(IDC_ChoosePhotos_Btn, OnChoosePhotosBtn)
  45. ON_BN_CLICKED(IDC_LookSample_Btn, OnLookSampleBtn)
  46. ON_BN_CLICKED(IDC_CollectToday_Btn, OnCollectTodayBtn)
  47. ON_BN_CLICKED(IDC_WeddingToday_Btn, OnWeddingTodayBtn)
  48. ON_BN_CLICKED(IDC_SetSurveyItem_Btn, OnSetSurveyCfg)
  49. END_MESSAGE_MAP()
  50. #ifdef _DEBUG
  51. void Satisfaction::AssertValid() const
  52. {
  53. MyFormView::AssertValid();
  54. }
  55. void Satisfaction::Dump(CDumpContext& dc) const
  56. {
  57. MyFormView::Dump(dc);
  58. }
  59. #endif
  60. void Satisfaction::OnInitialUpdate()
  61. {
  62. MyFormView::OnInitialUpdate();
  63. CMyMdi Mdi;
  64. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  65. if(IsHasRights2new(19)==0)
  66. GetDlgItem(IDC_SetSurveyItem_Btn)->EnableWindow(0);
  67. CRect rc2;
  68. GetWindowRect(rc2);
  69. ::MoveWindow(m_hWnd, g_rc.left, g_rc.top, g_rc.Width(), g_rc.Height(), TRUE);
  70. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
  71. #ifdef CHILD_VERSION
  72. // 16 column
  73. m_List1.SetHeadings("订单号,120;家长姓名,120;宝宝姓名,120;手机,120;固定电话,120;订单日期,120;门市,120;满意度,120;拨打情况,120;回访日期,120;通话时长,120;回访人员,120;备注,120");
  74. #else
  75. // 16 column
  76. m_List1.SetHeadings("订单号,120;男宾姓名,120;女宾姓名,120;男宾电话,120;女宾电话,120;订单日期,120;门市,120;满意度,120;拨打情况,120;回访日期,120;通话时长,120;回访人员,120;备注,120");
  77. #endif
  78. m_List1.LoadColumnInfo(250);
  79. ScreenToClient(rc2);
  80. rc2.bottom += 200;
  81. GetDlgItem(IDC_BUTclose)->GetWindowRect(rc2);
  82. GetData();
  83. }
  84. //------------------------------------------------
  85. /*
  86. 函数名: FillGrid
  87. 描述: 填表
  88. 参数:
  89. const int nTimeType 按时间类型显示数据
  90. 返回值:
  91. */
  92. //------------------------------------------------
  93. void Satisfaction::FillGrid(const int nTimeType)
  94. {
  95. //获取时间
  96. CTime startTime, endTime;
  97. ((CDateTimeCtrl*)GetDlgItem(IDC_Date_Start))->GetTime(startTime);
  98. ((CDateTimeCtrl*)GetDlgItem(IDC_Date_End))->GetTime(endTime);
  99. m_List1.DeleteAllItems2();
  100. int nCount = 0;
  101. int nSize = m_List1array.GetSize();
  102. m_List1.m_arLabels.SetSize(nSize, 1);
  103. int i=0;
  104. for(i=0; i<m_List1array.GetSize(); i++)
  105. {
  106. CString strtmp = _T(""); //时间日期
  107. int nY(0), nM(0), nD(0);
  108. int nObjIdx = 0; //对象索引
  109. switch(nTimeType)
  110. {
  111. case 0:
  112. case 1:
  113. case 6:
  114. strtmp = m_List1array.ElementAt(i).ElementAt(5); //订单
  115. nObjIdx = 25; //接单
  116. break;
  117. case 2:
  118. strtmp = m_List1array.ElementAt(i).ElementAt(6);
  119. nObjIdx = 15; //摄影
  120. break;
  121. case 3:
  122. strtmp = m_List1array.ElementAt(i).ElementAt(8);
  123. nObjIdx = 19; //选片
  124. break;
  125. case 4:
  126. strtmp = m_List1array.ElementAt(i).ElementAt(10);
  127. nObjIdx = 29; //看样/看设计
  128. break;
  129. case 5:
  130. strtmp = m_List1array.ElementAt(i).ElementAt(11);
  131. nObjIdx = 17; //化妆
  132. break;
  133. }
  134. if(strtmp == _T(""))
  135. continue;
  136. nY = _ttoi(strtmp.Mid(0,4));
  137. nM = _ttoi(strtmp.Mid(5,2));
  138. nD = _ttoi(strtmp.Mid(8,2));
  139. if(nY <= 0 || (nM <= 0 || nM > 12) || (nD > 31 || nD <=0))
  140. continue;
  141. CString strDinDanTime = _T("");
  142. CTime tm(nY, nM, nD, 0, 0, 0);
  143. /*
  144. if(tm >= startTime && tm <= endTime)
  145. {
  146. */
  147. CString strOrderNum = m_List1array.ElementAt(i).ElementAt(0);
  148. m_List1.m_arLabels.ElementAt(nCount).Add(strOrderNum); //订单号
  149. m_List1.m_arLabels.ElementAt(nCount).Add(m_List1array.ElementAt(i).ElementAt(1)); //家长姓名/男宾姓名
  150. m_List1.m_arLabels.ElementAt(nCount).Add(m_List1array.ElementAt(i).ElementAt(2)); //宝宝姓名/女宾姓名
  151. m_List1.m_arLabels.ElementAt(nCount).Add(m_List1array.ElementAt(i).ElementAt(3)); //手机/男宾电话
  152. m_List1.m_arLabels.ElementAt(nCount).Add(m_List1array.ElementAt(i).ElementAt(4)); //固定电话/女宾电话
  153. strtmp = m_List1array.ElementAt(nCount).ElementAt(0);
  154. nY = atoi(strtmp.Mid(0,4));
  155. nM = atoi(strtmp.Mid(4,2));
  156. nD = atoi(strtmp.Mid(6,2));
  157. strDinDanTime.Format(_T("%04d-%02d-%02d"), nY, nM, nD);
  158. m_List1.m_arLabels.ElementAt(nCount).Add(strDinDanTime); //订单时间
  159. CString strObjName = m_List1array.ElementAt(i).ElementAt(nObjIdx);
  160. m_List1.m_arLabels.ElementAt(nCount).Add(strObjName); //访问对象
  161. //获取满意度
  162. CString strScore = _T("");
  163. GetScoreAndSurveyObj(strObjName, strOrderNum, strScore);
  164. m_List1.m_arLabels.ElementAt(nCount).Add(strScore); //满意度
  165. m_List1.m_arLabels.ElementAt(nCount).Add(_T("")); //拨打情况
  166. m_List1.m_arLabels.ElementAt(nCount).Add(_T("")); //回访日期
  167. m_List1.m_arLabels.ElementAt(nCount).Add(_T("")); //通话时长
  168. CString strCS = _T("");
  169. for(int j=0; j<m_AllSurveyLogArr.GetSize(); j++)
  170. {
  171. CString strOrder = m_AllSurveyLogArr.ElementAt(j).ElementAt(5);
  172. if(strOrder == strOrderNum)
  173. {
  174. strCS = m_AllSurveyLogArr.ElementAt(j).ElementAt(11);
  175. break;
  176. }
  177. }
  178. m_List1.m_arLabels.ElementAt(nCount).Add(strCS); //回访人员
  179. m_List1.m_arLabels.ElementAt(nCount).Add(_T("")); //备注
  180. ++nCount;
  181. /*
  182. }
  183. */
  184. }
  185. if(nCount != 0)
  186. {
  187. m_List1.m_LabelCount = nCount;
  188. m_List1.SetItemCountEx(nCount);
  189. }
  190. }
  191. void Satisfaction::OnBUTclose() // 关闭按钮;
  192. {
  193. GetParent()->SendMessage(WM_CLOSE);
  194. }
  195. BOOL Satisfaction::PreTranslateMessage(MSG* pMsg)
  196. {
  197. try
  198. {
  199. if (pMsg->message == WM_KEYDOWN)
  200. {
  201. switch (pMsg->wParam)
  202. {
  203. case VK_RETURN:
  204. OnButton1();
  205. return 1;
  206. case 0x43: // copy
  207. if ((GetKeyState(VK_CONTROL) & 0x80))
  208. {
  209. GetFocus()->SendMessage(WM_COPY);
  210. return TRUE;
  211. }
  212. break;
  213. case 0x56: //Ctrl + V:
  214. if ((GetKeyState(VK_CONTROL) & 0x80))
  215. {
  216. GetFocus()->SendMessage(WM_PASTE);
  217. return TRUE;
  218. }
  219. break;
  220. case 0x58: // cut
  221. if ((GetKeyState(VK_CONTROL) & 0x80))
  222. {
  223. GetFocus()->SendMessage(WM_CUT);
  224. return TRUE;
  225. }
  226. break;
  227. case 0x5A: //undo
  228. case 0x59: //redo
  229. if ((GetKeyState(VK_CONTROL) & 0x80))
  230. {
  231. GetFocus()->SendMessage(WM_UNDO);
  232. return TRUE;
  233. }
  234. break;
  235. }
  236. }
  237. }
  238. catch (...)
  239. {
  240. }
  241. return MyFormView::PreTranslateMessage(pMsg);
  242. }
  243. void Satisfaction::OnButton1() // 查询按钮;
  244. {
  245. CTime startTime, endTime;
  246. ((CDateTimeCtrl*)GetDlgItem(IDC_Date_Start))->GetTime(startTime);
  247. ((CDateTimeCtrl*)GetDlgItem(IDC_Date_End))->GetTime(endTime);
  248. CString strStartCT(_T("")), strEndCT(_T(""));
  249. strStartCT = startTime.Format(_T("%Y%m%d"));
  250. strEndCT = endTime.Format(_T("%Y%m%d"));
  251. CString filter = _T("");
  252. m_List1array.RemoveAll();
  253. #ifdef LKAY_VERSION
  254. filter = _T("dindan@(dindantype<>'意向客户' or dindantype is null) and id between '") + strStartCT + _T("-000' and '") + strEndCT + _T("-999'");
  255. #else
  256. //filter = _T("dindan@id between '") + strStartCT + _T("-000' and '") + strEndCT + _T("-999'");
  257. filter.Format(_T("dindan@between '%s' and '%s'"), startTime.Format("%Y-%m-%d"), endTime.Format("%Y-%m-%d"));
  258. #endif
  259. g_sendhead.bsql = 0;
  260. g_sendhead.code[0] = 234; //获取dindan信息和对应的满意度记录
  261. g_sendhead.tabcount = 1;
  262. g_pMainWnd->ProcessChatMessageRequest2(filter);
  263. if (g_bSendOK == 0)
  264. return;
  265. DataToArray(&m_List1array);
  266. m_AllSurveyLogArr.RemoveAll();
  267. //获取所有记录
  268. g_sendhead.bsql = 0;
  269. g_sendhead.code[0] = 234;
  270. g_sendhead.tabcount = 1;
  271. CString strfilter = _T("GetAllSurveyData@") + strStartCT + _T("@") + strEndCT;
  272. g_pMainWnd->ProcessChatMessageRequest2(strfilter);
  273. if(g_bSendOK == 0)
  274. return;
  275. DataToArray(&m_AllSurveyLogArr);
  276. switch ( m_nShowType )
  277. {
  278. case 0:
  279. OnOrderTodayBtn();
  280. break;
  281. case 1:
  282. OnConfigurationBtn();
  283. break;
  284. case 2:
  285. OnTodayPhotographBtn();
  286. break;
  287. case 3:
  288. OnChoosePhotosBtn();
  289. break;
  290. case 4:
  291. OnLookSampleBtn();
  292. break;
  293. case 5:
  294. OnCollectTodayBtn();
  295. break;
  296. case 6:
  297. OnWeddingTodayBtn();
  298. break;
  299. default:
  300. break;
  301. }
  302. }
  303. void Satisfaction::GetData()
  304. {
  305. m_ScoreTypeArr.RemoveAll();
  306. //获取分数类型
  307. g_sendhead.bsql = 0;
  308. g_sendhead.code[0] = 234;
  309. g_sendhead.tabcount = 1;
  310. CString strfilter = _T("GetScoreType@");
  311. g_pMainWnd->ProcessChatMessageRequest2(strfilter);
  312. if(g_bSendOK == 0)
  313. return;
  314. DataToArray(&m_ScoreTypeArr);
  315. m_kindArr.RemoveAll();
  316. //获取服务类别
  317. g_sendhead.bsql = 0;
  318. g_sendhead.code[0] = 234;
  319. g_sendhead.tabcount = 1;
  320. strfilter = _T("SvrKind@");
  321. g_pMainWnd->ProcessChatMessageRequest2(strfilter);
  322. if(g_bSendOK == 0)
  323. return;
  324. DataToArray(&m_kindArr);
  325. m_cfgArr.RemoveAll();
  326. //获取配置信息
  327. g_sendhead.bsql = 0;
  328. g_sendhead.code[0] = 234;
  329. g_sendhead.tabcount = 1;
  330. strfilter = _T("SatisfactionCfg@");
  331. g_pMainWnd->ProcessChatMessageRequest2(strfilter);
  332. if (g_bSendOK == 0)
  333. return;
  334. DataToArray(&m_cfgArr);
  335. FillGrid(0);
  336. }
  337. void Satisfaction::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  338. {
  339. LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
  340. // TODO: 在此添加控件通知处理程序代码
  341. NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
  342. if(pNMListView->iItem != -1)
  343. {
  344. //单击行列pNMListView->iItem, pNMListView->iSubItem
  345. m_nCurSelIdx = pNMListView->iItem;
  346. }
  347. *pResult = 0;
  348. }
  349. //打开调查项
  350. void Satisfaction::OnOpenSurveyBtn() // 打开调查项;
  351. {
  352. if(m_nCurSelIdx == -1)
  353. {
  354. MessageBox(_T("请选择订单!"));
  355. return;
  356. }
  357. CTime startTime, endTime;
  358. ((CDateTimeCtrl*)GetDlgItem(IDC_Date_Start))->GetTime(startTime);
  359. ((CDateTimeCtrl*)GetDlgItem(IDC_Date_End))->GetTime(endTime);
  360. CString strStartCT(_T("")), strEndCT(_T(""));
  361. strStartCT = startTime.Format(_T("%Y%m%d"));
  362. strEndCT = endTime.Format(_T("%Y%m%d"));
  363. int i = 0;
  364. CString strOrderNum = m_List1.GetItemText(m_nCurSelIdx, 0);
  365. CStringArray* pCurrDinDan = NULL;
  366. for(i=0; i<m_List1array.GetSize(); i++)
  367. {
  368. if(m_List1array.ElementAt(i).ElementAt(0) == strOrderNum)
  369. pCurrDinDan = &m_List1array.ElementAt(i);
  370. }
  371. if(pCurrDinDan == NULL)
  372. {
  373. MessageBox(_T("请选择订单!"));
  374. return;
  375. }
  376. if(g_Surveydlg)
  377. {
  378. g_Surveydlg->SendMessage(WM_CLOSE);
  379. g_Surveydlg = NULL;
  380. }
  381. //进入调查界面
  382. SatisfactionSurvey dlg;
  383. g_Surveydlg = &dlg;
  384. dlg.m_strOrderNum = strOrderNum; //订单号
  385. dlg.m_pCurrDindan = pCurrDinDan; //当前选择的订单
  386. dlg.m_pkindArr = &m_kindArr; //所有类型
  387. dlg.m_pCfgArr = &m_cfgArr; //相对应的调查配置表
  388. dlg.DoModal();
  389. //调查结束后需更新所有记录
  390. //获取所有记录
  391. m_AllSurveyLogArr.RemoveAll();
  392. g_sendhead.bsql = 0;
  393. g_sendhead.code[0] = 234;
  394. g_sendhead.tabcount = 1;
  395. CString strfilter = _T("GetAllSurveyData@") + strStartCT + _T("@") + strEndCT;
  396. g_pMainWnd->ProcessChatMessageRequest2(strfilter);
  397. if(g_bSendOK == 0)
  398. return;
  399. DataToArray(&m_AllSurveyLogArr);
  400. //更新显示数据
  401. FillGrid(m_nShowType);
  402. m_nCurSelIdx = -1;
  403. g_Surveydlg = NULL;
  404. GetData();
  405. OnButton1();
  406. FillGrid(m_nShowType);
  407. }
  408. //订单
  409. void Satisfaction::OnOrderTodayBtn() // 订单;
  410. {
  411. ChangeColName(_T("接单"));
  412. m_nShowType = 0;
  413. FillGrid(m_nShowType);
  414. }
  415. //接单
  416. void Satisfaction::OnConfigurationBtn() // 形设;
  417. {
  418. ChangeColName(_T("接单"));
  419. m_nShowType = 1;
  420. FillGrid(m_nShowType);
  421. }
  422. //拍照
  423. void Satisfaction::OnTodayPhotographBtn() // 拍照;
  424. {
  425. ChangeColName(_T("摄影"));
  426. m_nShowType = 2;
  427. FillGrid(m_nShowType);
  428. }
  429. //选片
  430. void Satisfaction::OnChoosePhotosBtn() // 选片;
  431. {
  432. ChangeColName(_T("选片"));
  433. m_nShowType = 3;
  434. FillGrid(m_nShowType);
  435. }
  436. //看样
  437. void Satisfaction::OnLookSampleBtn() // 看样;
  438. {
  439. ChangeColName(_T("看样"));
  440. m_nShowType = 4;
  441. FillGrid(m_nShowType);
  442. }
  443. //化妆
  444. void Satisfaction::OnCollectTodayBtn() // 化妆;
  445. {
  446. ChangeColName(_T("化妆"));
  447. m_nShowType = 5;
  448. FillGrid(m_nShowType);
  449. }
  450. //婚庆
  451. void Satisfaction::OnWeddingTodayBtn() // 婚庆;
  452. {
  453. ChangeColName(_T("接单"));
  454. m_nShowType = 6;
  455. FillGrid(m_nShowType);
  456. }
  457. void Satisfaction::ChangeColName(LPSTR lpName)
  458. {
  459. LVCOLUMN lov;
  460. lov.mask = LVCF_TEXT; //取字符掩码
  461. lov.pszText = m_szColName;
  462. lov.cchTextMax = MAX_PATH;
  463. m_List1.GetColumn(6, &lov);
  464. memset(m_szColName, 0, sizeof(TCHAR)*64);
  465. #if defined(VC80) || defined(VC70) || defined(VC60)
  466. _tcscpy(m_szColName, lpName);
  467. #else
  468. _tcscpy_s(m_szColName, 64, lpName);
  469. #endif
  470. m_List1.SetColumn(6, &lov);
  471. }
  472. //------------------------------------------------------
  473. /*
  474. 函数名: GetScore
  475. 描述: 获取评分
  476. 参数:
  477. CString& strScore 返回评分
  478. 返回值:
  479. */
  480. //------------------------------------------------------
  481. void Satisfaction::GetScoreAndSurveyObj(const CString& strObj, const CString& strOrderNum, CString& strScore) // 获取评分;
  482. {
  483. int nSegment = 0; //一条记录的总分
  484. int i(0), j(0);
  485. int nStatisticsNum = 0; //统计数量
  486. int nScore = 0;
  487. for(j=0; j<m_AllSurveyLogArr.GetSize(); j++)
  488. {
  489. if(m_AllSurveyLogArr.ElementAt(j).ElementAt(5) == strOrderNum && strObj == m_AllSurveyLogArr.ElementAt(j).ElementAt(4))
  490. {
  491. CString strKindName = m_AllSurveyLogArr.ElementAt(j).ElementAt(2);
  492. for(i=0; i<m_cfgArr.GetSize(); i++)
  493. {
  494. if(m_cfgArr.ElementAt(i).ElementAt(2) == strKindName)
  495. {
  496. //获取一条记录的总分
  497. nSegment = _ttoi(m_cfgArr.ElementAt(i).ElementAt(3));
  498. break;
  499. }
  500. }
  501. }
  502. if(nSegment != 0)
  503. break;
  504. }
  505. if(nSegment == 0)
  506. return;
  507. for(j=0; j<m_AllSurveyLogArr.GetSize(); j++)
  508. {
  509. if(m_AllSurveyLogArr.ElementAt(j).ElementAt(5) == strOrderNum && strObj == m_AllSurveyLogArr.ElementAt(j).ElementAt(4))
  510. {
  511. //统计满意度
  512. nScore += _ttoi(m_AllSurveyLogArr.ElementAt(j).ElementAt(6));
  513. ++nStatisticsNum;
  514. }
  515. }
  516. if(nStatisticsNum == 0)
  517. return;
  518. int nMaxScore = nSegment*nStatisticsNum; //总分
  519. int nAve = nMaxScore/5; //
  520. if(nScore <= nAve)
  521. strScore = _T("非常不满意");
  522. else if(nScore > nAve && nScore <= nAve*2)
  523. strScore = _T("不满意");
  524. else if(nScore > nAve*2 && nScore <= nAve*3)
  525. strScore = _T("一般");
  526. else if(nScore > nAve*3 && nScore <= nAve*4)
  527. strScore = _T("满意");
  528. else if(nScore > nAve*4 && nScore <= nAve*5)
  529. strScore = _T("非常满意");
  530. }
  531. void Satisfaction::OnSetSurveyCfg()
  532. {
  533. SatisfactionCfg dlg;
  534. dlg.DoModal();
  535. }