seyason %!s(int64=5) %!d(string=hai) anos
pai
achega
78e3990ad6

BIN=BIN
fhKeeper/formulahousekeeper/management-platform/opencv/opencv-420.jar


+ 3 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ScreenshotServiceImpl.java

@@ -57,7 +57,7 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
     @Value(value = "${upload.path}")
     private String path;
     @Value(value = "${picrecongnize.path}")
-    private static String picrecongnizeFolder;
+    private String picrecongnizeFolder;
 
     @Value("classpath:novel_words.data")
     private org.springframework.core.io.Resource novelWords;
@@ -511,10 +511,8 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
     }
 
     //判断是否是浏览器
-    private static String isBrowser(File pic) throws Exception {
-        if (picrecongnizeFolder == null) {
-            picrecongnizeFolder = "C:\\picrecongnize";
-        }
+    private String isBrowser(File pic) throws Exception {
+        System.out.println("picrecongnizeFolder=="+picrecongnizeFolder);
         File folder = new File(picrecongnizeFolder);
         if (!folder.exists()) {
             throw new Exception("没有设置图片上传的浏览器比对模板库");

+ 6 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application-prod.yml

@@ -13,9 +13,9 @@ spring:
       max-request-size: 10000MB
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://118.190.47.230:3306/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    url: jdbc:mysql://47.100.37.243:7644/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
     username: root
-    password: p011430seya1026
+    password: Hssx2018.!
     hikari:
       maximum-pool-size: 10
       minimum-idle: 3
@@ -53,7 +53,7 @@ logging:
     org.springframework.web: trace
     #打印sql语句
     com.management.platform.mapper: debug
-  path: E:/
+  path: /log/
 ##########
 mybatis-plus:
   #  mapper-locations: classpath:mapper/*/*.xml
@@ -79,7 +79,8 @@ mybatis:
   mapper-locations: mappers/*Mapper.xml
 #####配置图片上传路径####
 upload:
-  path: E:/staticproject/timesheet/upload/
-
+  path: /www/staticproject/timesheet/upload/
+picrecongnize:
+  path: /www/webapps/worktime/picrecongnize/
 
 

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ScreenshotMapper.xml

@@ -30,7 +30,7 @@
         GROUP BY uid
         ) AS b
         ON a.uid = b.uid AND a.indate = b.max_indate
-        LEFT JOIN USER AS c
+        LEFT JOIN user AS c
         ON a.uid = c.id
         WHERE 1=1
         <if test="companyId != null and companyId != ''">

BIN=BIN
fhKeeper/formulahousekeeper/mywork/favicon.ico


+ 4 - 4
fhKeeper/formulahousekeeper/mywork/home.cpp

@@ -31,8 +31,8 @@ Home::Home(QWidget *parent) :
     connect(myTimer,&QTimer::timeout,[this](){
             captureScreen();
     });
-    myTimer->start(10000);
-
+    myTimer->start(60000);
+    setWindowTitle(tr("智能工时管家"));
     //set ui data
     webWidget = new QWebEngineView(this);
     QNetworkProxyFactory::setUseSystemConfiguration(false);
@@ -50,7 +50,7 @@ Home::Home(QWidget *parent) :
   qs->beginGroup("user");
   QString id = qs->value("id").toString();
   qDebug() << "id=="<<id<<", phone="<<qs->value("name").toString();
-  QString str = "http://118.190.47.230:9092/#/desktop/" + id;
+  QString str = "http://47.100.37.243:9092/#/desktop/" + id;
   loadNavigate(str);
 
 
@@ -244,7 +244,7 @@ void Home::closeEvent ( QCloseEvent * e )
 {
     if( QMessageBox::question(this,
                              tr("退出"),
-                             tr("您确定要退出吗?"),
+                             tr("退出软件将无法统计到您的工时,影响绩效,您确定要退出吗?"),
                               QMessageBox::Yes, QMessageBox::No )
                    == QMessageBox::Yes){
         e->accept();//不会将事件传递给组件的父组件

+ 1 - 1
fhKeeper/formulahousekeeper/mywork/httpapi.h

@@ -7,7 +7,7 @@
 #include <QJsonObject>
 #include "baseapi.h"
 //const QString SERVER_URL = QString("http://127.0.0.1:10010");
-const QString SERVER_URL = QString("http://118.190.47.230:10010");
+const QString SERVER_URL = QString("http://47.100.37.243:10010");
 class HttpAPI: public BaseAPI
 {
 public:

+ 17 - 5
fhKeeper/formulahousekeeper/mywork/mainwindow.cpp

@@ -29,29 +29,41 @@ MainWindow::MainWindow(QWidget *parent)
 }
 void MainWindow::login_in(void){//登陆
     //设置url
-    QString username = ui->account->text();
+//    QString username ="15895914665";
+    QString phone =ui->account->text();
+//    QString pwd = "000000";
     QString pwd = ui->pwd->text();
-    QString url = "/user/loginEmployee?username="+username+"&password="+pwd;//fae4b325e52c
+    QString url = "/user/loginEmployee?username="+phone+"&password="+pwd;//fae4b325e52c
+    qDebug() << "url==="<<url;
     HttpAPI *api = new HttpAPI();
     static MainWindow* myWin = this;
+    //先存上手机号密码
+    m_setting->beginGroup("user");
+    m_setting->setValue("phone", phone);
+    m_setting->setValue("pwd", pwd);
+    m_setting->endGroup();
+
     api->getRequest(url, [&](bool success, QJsonObject json){
         if (success)
         {
            //do something
             qDebug()<<"request success==";
-            if (json.value("code").toString() == "ok") {
+            if (json.value("code").toString().compare("ok") == 0)
+            {
+                if(myWin)
                 myWin->close();
                 QJsonObject obj = json.value("data").toObject();
                 m_setting->beginGroup("user");
                 m_setting->setValue("id", obj.value("id"));
                 m_setting->setValue("name", obj.value("name"));
                 m_setting->setValue("phone", obj.value("phone"));
-                m_setting->setValue("pwd", pwd);
                 m_setting->endGroup();
                 //enter home page
                 home = new Home();
                 home->show();
-            } else {
+            }
+            else
+            {
                 QMessageBox msg3(QMessageBox::Information,windowTitle(),json.value("msg").toString(),QMessageBox::Ok,this);
                 msg3.exec();
             }

+ 28 - 2
fhKeeper/formulahousekeeper/mywork/mainwindow.ui

@@ -50,7 +50,7 @@
      </rect>
     </property>
     <property name="text">
-     <string>15900000000</string>
+     <string/>
     </property>
    </widget>
    <widget class="QLineEdit" name="pwd">
@@ -63,12 +63,38 @@
      </rect>
     </property>
     <property name="text">
-     <string>000000</string>
+     <string/>
     </property>
     <property name="echoMode">
      <enum>QLineEdit::Password</enum>
     </property>
    </widget>
+   <widget class="QLabel" name="label_2">
+    <property name="geometry">
+     <rect>
+      <x>230</x>
+      <y>200</y>
+      <width>51</width>
+      <height>61</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>账号</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_3">
+    <property name="geometry">
+     <rect>
+      <x>230</x>
+      <y>290</y>
+      <width>51</width>
+      <height>61</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>密码</string>
+    </property>
+   </widget>
   </widget>
   <widget class="QMenuBar" name="menubar">
    <property name="geometry">

BIN=BIN
fhKeeper/formulahousekeeper/mywork/myicon.ico


+ 1 - 1
fhKeeper/formulahousekeeper/mywork/mywork.pro

@@ -37,4 +37,4 @@ FORMS += \
 qnx: target.path = /tmp/$${TARGET}/bin
 else: unix:!android: target.path = /opt/$${TARGET}/bin
 !isEmpty(target.path): INSTALLS += target
-RC_ICONS = myicon.ico
+RC_ICONS = favicon.ico

+ 46 - 0
fhKeeper/formulahousekeeper/mywork/setup.iss

@@ -0,0 +1,46 @@
+; 脚本由 Inno Setup 脚本向导 生成!
+; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
+
+#define MyAppName "WorkTime"
+#define MyAppVersion "1.5"
+#define MyAppPublisher "南京火石闪信网络科技有限公司"
+#define MyAppExeName "mywork.exe"
+
+[Setup]
+; 注: AppId的值为单独标识该应用程序。
+; 不要为其他安装程序使用相同的AppId值。
+; (若要生成新的 GUID,可在菜单中点击 "工具|生成 GUID"。)
+AppId={{A4BC18D4-0FDF-46D3-B15C-D6F0247D37BE}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+;AppVerName={#MyAppName} {#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+DefaultDirName={autopf}\{#MyAppName}
+DisableProgramGroupPage=yes
+; 以下行取消注释,以在非管理安装模式下运行(仅为当前用户安装)。
+;PrivilegesRequired=lowest
+OutputDir=C:\Users\seya\Desktop
+OutputBaseFilename=智能工时管家
+SetupIconFile=C:\gitproject\manHourHousekeeper\fhKeeper\formulahousekeeper\mywork\favicon.ico
+Compression=lzma
+SolidCompression=yes
+WizardStyle=modern
+
+[Languages]
+Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
+
+[Files]
+Source: "C:\Users\seya\Desktop\SmartTimeClient\mywork.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Users\seya\Desktop\SmartTimeClient\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
+; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
+
+[Icons]
+Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
+Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
+
+[Run]
+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
+