Procházet zdrojové kódy

为财务版增加同步工时功能
修复按周代填时项目列表不是代填人的数据的问题

QuYueTing před 3 dny
rodič
revize
4926c362c7

+ 18 - 0
fhKeeper/formulahousekeeper/management-platform-cp/src/main/java/com/management/platform/service/MainDbProjectService.java

@@ -0,0 +1,18 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.*;
+import com.management.platform.service.impl.MainDbProjectServiceImpl;
+
+import java.util.List;
+
+public interface MainDbProjectService {
+    MainDbProjectServiceImpl.CompanyInfo getCompanyInfo(Integer companyId);
+    List<Project> getMainDbProjectList(Integer companyId);
+    List<Participation> getMainDbProjectParticipations(Integer companyId);
+    List<ProjectAuditor> getMainDbProjectAuditors(Integer companyId);
+    List<Department> getMainDbDepartmentList(Integer companyId);
+    List<User> getMainDbUserList(Integer companyId);
+    List<Report> getMainDbReportList(Integer companyId, String startDate, String endDate);
+    List<ReportLog> getMainDbReportLogList(Integer companyId, String startDate, String endDate);
+    List<ReportLogDetail> getMainDbReportLogDetailList(Integer companyId, String startDate, String endDate);
+}

+ 108 - 0
fhKeeper/formulahousekeeper/management-platform-cp/src/main/java/com/management/platform/service/impl/MainDbProjectServiceImpl.java

@@ -0,0 +1,108 @@
+package com.management.platform.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.management.platform.entity.*;
+import com.management.platform.mapper.*;
+import com.management.platform.service.MainDbProjectService;
+import com.management.platform.service.ProjectService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+@DS("main_db")
+public class MainDbProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements MainDbProjectService {
+
+    @Resource
+    private ProjectMapper projectMapper;
+    @Resource
+    private ParticipationMapper participationMapper;
+    @Resource
+    private ProjectAuditorMapper projectAuditorMapper;
+    @Resource
+    private UserMapper userMapper;
+    @Resource
+    private ReportMapper reportMapper;
+    @Resource
+    private ReportLogMapper reportLogMapper;
+    @Resource
+    private ReportLogDetailMapper reportLogDetailMapper;
+    @Resource
+    private CompanyMapper companyMapper;
+    @Resource
+    private TimeTypeMapper timeTypeMapper;
+    @Resource
+    private SysRoleMapper sysRoleMapper;
+    @Resource
+    private SysRoleModuleMapper sysRoleModuleMapper;
+    @Resource
+    private SysRoleFunctionMapper sysRoleFunctionMapper;
+    @Resource
+    private DepartmentMapper departmentMapper;
+
+
+    @Override
+    public CompanyInfo getCompanyInfo(Integer companyId) {
+        CompanyInfo companyInfo = new CompanyInfo();
+        companyInfo.company = companyMapper.selectById(companyId);
+        companyInfo.timeType = timeTypeMapper.selectById(companyId);
+        companyInfo.sysRole = sysRoleMapper.selectList(new QueryWrapper<SysRole>().eq("company_id", companyId));
+        List<Integer> roleIds = companyInfo.sysRole.stream().map(SysRole::getId).collect(Collectors.toList());
+        companyInfo.sysRoleModule = sysRoleModuleMapper.selectList(new QueryWrapper<SysRoleModule>().in("role_id", roleIds));
+        companyInfo.sysRoleFunction = sysRoleFunctionMapper.selectList(new QueryWrapper<SysRoleFunction>().in("role_id", roleIds));
+        return companyInfo;
+    }
+
+    @Override
+    public List<Project> getMainDbProjectList(Integer companyId) {
+        return projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
+    }
+
+    @Override
+    public List<Participation> getMainDbProjectParticipations(Integer companyId) {
+        return participationMapper.getByCompanyId(companyId);
+    }
+
+    @Override
+    public List<ProjectAuditor> getMainDbProjectAuditors(Integer companyId) {
+        return projectAuditorMapper.getByCompanyId(companyId);
+    }
+
+    @Override
+    public List<Department> getMainDbDepartmentList(Integer companyId) {
+        return departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
+    }
+
+    @Override
+    public List<User> getMainDbUserList(Integer companyId) {
+        return userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
+    }
+
+    @Override
+    public List<Report> getMainDbReportList(Integer companyId, String startDate, String endDate) {
+        return reportMapper.selectList(new QueryWrapper<Report>().eq("company_id", companyId).between("create_date", startDate, endDate));
+    }
+
+    @Override
+    public List<ReportLog> getMainDbReportLogList(Integer companyId, String startDate, String endDate) {
+        return reportLogMapper.selectList(new QueryWrapper<ReportLog>().eq("company_id", companyId).between("create_date", startDate, endDate));
+    }
+
+    @Override
+    public List<ReportLogDetail> getMainDbReportLogDetailList(Integer companyId, String startDate, String endDate) {
+        return reportLogDetailMapper.selectList(new QueryWrapper<ReportLogDetail>().eq("company_id", companyId).between("work_date", startDate, endDate));
+    }
+
+    public static class CompanyInfo {
+        public Company company;
+        public TimeType timeType;
+        public List<SysRole> sysRole;
+        public List<SysRoleModule> sysRoleModule;
+        public List<SysRoleFunction> sysRoleFunction;
+    }
+}

+ 88 - 0
fhKeeper/formulahousekeeper/management-platform-cp/src/main/resources/application-prod.yml

@@ -0,0 +1,88 @@
+server:
+  port: 8210
+  tomcat:
+    uri-encoding: utf-8
+    max-http-form-post-size: -1
+    connection-timeout: 18000000s
+spring:
+  servlet:
+    multipart:
+      # 配置上传文件的大小设置
+      # Single file max size  即单个文件大小
+      max-file-size: 100MB
+      max-request-size: 100MB
+  datasource:
+    dynamic:
+      primary: master # 设置默认数据源
+      datasource:
+        master: # 数据源1
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          url: jdbc:mysql://127.0.0.1:7644/man_hour_manager_cp?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
+          username: root
+          password: Ziyu20141026!@@
+        main_db: # 数据源2,数据来源
+          driver-class-name: com.mysql.cj.jdbc.Driver
+          url: jdbc:mysql://127.0.0.1:7644/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
+          username: root
+          password: Ziyu20141026!@@
+    hikari:
+      maximum-pool-size: 60
+      minimum-idle: 10
+      max-lifetime: 180000
+      # 数据库连接超时时间,默认30秒,即30000
+      connection-timeout: 60000
+      connection-test-query: SELECT 1
+    ####全局配置时间返回格式#####
+  jackson:
+    #参数意义:
+    #JsonInclude.Include.ALWAYS       默认
+    #JsonInclude.Include.NON_DEFAULT   属性为默认值不序列化
+    #JsonInclude.Include.NON_EMPTY     属性为 空(””) 或者为 NULL 都不序列化
+    #JsonInclude.Include.NON_NULL      属性为NULL  不序列化
+    default-property-inclusion: ALWAYS
+    time-zone: GMT+8
+    date-format: yyyy-MM-dd HH:mm:ss
+
+##########日志配置
+logging:
+  level:
+    root: info
+    org.mybatis: error
+    java.sql: error
+    org.springframework.web: error
+    #打印sql语句
+    com.management.platform.mapper: error
+  path: /log/
+  file: worktime-cp.log
+##########
+mybatis-plus:
+  #  mapper-locations: classpath:mapper/*/*.xml
+  #  #实体扫描,多个package用逗号或者分号分隔
+  #  typeAliasesPackage: com.hssx.cloudmodel
+  global-config:
+    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+    id-type: 0
+    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+    field-strategy: 2
+    db-column-underline: true
+    refresh-mapper:
+    #################插入和更新非null判断
+    db-config:
+      insert-strategy: not_null
+      update-strategy: not_null
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+######mybstis配置#######
+mybatis:
+  type-aliases-package: com.management.platform.entity
+  mapper-locations: mappers/*Mapper.xml
+#####配置图片上传路径####
+upload:
+  path: /www/staticproject/timesheet-cp/upload/
+configEnv:
+  isDev: false
+  # 是否是私有化部署,企业内部应用
+  isPrivateDeploy: false
+  # 是否是saas生产环境
+  isSaasProd: true

binární
fhKeeper/formulahousekeeper/management-platform-cp/workTime.2025-11-27.log.gz


binární
fhKeeper/formulahousekeeper/management-workshop/workshop_print.2025-11-19.log.gz


binární
fhKeeper/formulahousekeeper/management-workshop/workshop_print.2025-11-20.log.gz


binární
fhKeeper/formulahousekeeper/management-workshop/workshop_print.2025-11-22.log.gz


binární
fhKeeper/formulahousekeeper/management-workshop/workshop_print.2025-11-25.log.gz


+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -625,7 +625,7 @@
                     <!-- 增加项目人天字段 绎维固定字段 -->
                     <el-form-item  v-if="user.timeType.projectManDay == 1 && (user.company.nonProjectSimple == 0 || (user.company.nonProjectSimple == 1 && addForm.isPublic == 0))">
                         <template slot="label"><span v-if="manDaySetting.projectManDayFillMode == 2 || (manDaySetting.projectManDayFillMode == 1 && addForm.fromOutside == 0)" style="padding:5px;color:red;">*</span>{{ $t('xiangMuRenTian') }}</template>
-                        <el-input v-model.number="addForm.manDay" :placeholder="$t('peaseenterthe')" @input="jisuanEstimatedWorkTime(addForm.manDay)"  style="width: 100px"></el-input>
+                        <el-input id="manDay" v-model="addForm.manDay" :placeholder="$t('peaseenterthe')" @input="jisuanEstimatedWorkTime(addForm.manDay)"  style="width: 100px" @keyup.native="restrictNumber('manDay')"></el-input>
                         <span style="margin-left:10px;position:absolute;">{{ $t('renTianYuGuGongShi') }}<el-input size="small" v-model.number="addForm.estimatedWorkTime" :placeholder="$t('peaseenterthe')" @input="jisuanManDay(addForm.estimatedWorkTime)"  style="width: 100px"></el-input>h)</span>
                         <el-tooltip effect="dark" :content="$t('genJuXiTongJiChuSheZhiMeiRiZhengChangGongZuoShiChangJiSuan_1RenTianWeiYiGeMeiRiZhengChangGongZuoShiChang')" placement="top-start" style="margin-left:180px">
                                         <i class="el-icon-question" style="color:#606266"></i>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 54 - 9
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue


+ 21 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -16,7 +16,7 @@
                 </el-form-item>
                 <el-form-item v-if="idx == 3">
                     <el-input placeholder="请输入任务名称" v-model="auditFileTaskName" size="small" style="margin-top: 6px">
-                        <el-button slot="append" icon="el-icon-search" @click="getFilesAwaitingReview()"></el-button>
+                        <el-button slot="append" icon="el-icon-search" @click="refreshFileReviewList()"></el-button>
                     </el-input>
                 </el-form-item>
 
@@ -26,12 +26,11 @@
                     ></el-cascader>
                 </el-form-item>
 
-                <el-form-item :label="$t('lable.department')" v-if="!user.timeType.projectWithDept">
+                <el-form-item :label="$t('lable.department')" v-if="!user.timeType.projectWithDept && idx != 3">
                     <div style="margin-left: 8px">
                         <el-cascader v-if="user.userNameNeedTranslate != 1" v-model="screenDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 125px"
                         :options="departmentList" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable
                         @change="getList()" size="mini"></el-cascader>
-
                         <vueCascader :size="'mini'" :widthStr="'125'" :clearable="true" :subject="departmentList" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
                     </div>
                 </el-form-item>
@@ -1266,12 +1265,28 @@ import { getThemeColor } from '@/utils/commonMethod.js'
             //分页
             handleCurrentChange(val) {
                 this.page = val;
-                this.getList();
+                if (this.idx == 3) {
+                    this.refreshFileReviewList();
+                } else {
+                    this.getList();
+                }
             },
 
             handleSizeChange(val) {
                 this.size = val;
-                this.getList();
+                if (this.idx == 3) {
+                    this.refreshFileReviewList();
+                } else {
+                    this.getList();
+                }
+            },
+
+            refreshFileReviewList() {
+                if (this.documentRadios == '待我审核') {
+                    this.getFilesAwaitingReview();
+                } else if (this.documentRadios == '待他人审核') {
+                    this.getFilesAwaitingReviewTwo();
+                }
             },
 
             //获取项目列表
@@ -1665,7 +1680,7 @@ import { getThemeColor } from '@/utils/commonMethod.js'
                 // console.log(this.searchField)
                 this.page = 1
                 if([3].includes(this.idx)) {
-                    this.getFilesAwaitingReview()
+                    this.refreshFileReviewList()
                 } else {
                     this.getList()
                 }

+ 22 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -150,7 +150,7 @@
                                     <el-link type="primary" v-if="user.manageDeptId != 0" style="margin-right:10px;" :underline="false" @click="showExportTimeDialog">{{$t('textLink.exportingTimeStatistics')}}</el-link>
                                     <el-link type="primary" v-if="user.timeType.pushReportData == 1 && permissions.reportPush" :underline="false" @click="pushWorkTime">{{ $t('tuiSongGongShi') }}</el-link>
                                     <el-link type="primary" v-if="user.timeType.pushReportData == 1 && user.companyId==3092 && permissions.reportPush" :underline="false" @click="pushWorkTimeLogDig=true,getPushWorkLogData()">{{ $t('gongShiTuiSongRiZhi') }}</el-link>
-                                    <el-link type="primary" v-if="user.roleName == $t('role.superAdministrator') && user.companyId==839" :underline="false" @click="reportLogCheckDialog=true">{{ $t('riBaoShenHeXiuGai') }}</el-link>
+                                    <el-link type="primary" v-if="user.roleName == $t('role.superAdministrator') && (user.companyId==839 || user.companyId == 8294)" :underline="false" @click="reportLogCheckDialog=true">{{ $t('riBaoShenHeXiuGai') }}</el-link>
                                     <el-link type="primary" v-if="(user.roleName == $t('role.superAdministrator') || user.roleName == $t('role.systemAdministrator')) && user.companyId==5916" :underline="false" @click="transferWorkingHoursVisable=true">{{ $t('zhuanYIGongShi') }}</el-link>
                                     <!-- <el-button v-if="user.timeType.pushReportData == 1 && permissions.reportPush" style="margin-left:10px;" icon="iconfont firerock-icontuisong" size="mini" @click="pushWorkTime"></el-button> -->
                                 </span>
@@ -1031,7 +1031,7 @@
                      <el-button @click="handleGetPrevWeek()" size="small">&lt;&lt;</el-button>
                      <el-button @click="getCurrentWeek()" size="small">{{$t('time.thisWeek')}}</el-button>
                      <el-button @click="handleGetNextvWeek()" size="small">&gt;&gt;</el-button>
-                     <el-select v-model="selCon" size="small" multiple :placeholder="$t('defaultText.pleaseChoose')" @change="onSelProjectChange()" filterable style="margin-right:50px;float:right;width:50%;" collapse-tags>
+                     <el-select v-if="!isSubstitude" v-model="selCon" size="small" multiple :placeholder="$t('defaultText.pleaseChoose')" @change="onSelProjectChange()" filterable style="margin-right:50px;float:right;width:50%;" collapse-tags>
                         <el-option
                         v-for="item in fillProjectList"
                         :disabled="(item.status!=1 && item.status!=4) || !item.canCancel"
@@ -1042,6 +1042,19 @@
                         <span style="float: right">{{ item.projectName }}</span>
                         </el-option>
                     </el-select>
+                    <el-select v-else v-model="selCon" size="small" multiple :placeholder="$t('defaultText.pleaseChoose')" @change="onSelProjectChange()" filterable style="margin-right:50px;float:right;width:50%;" collapse-tags>
+                        <el-option
+                        v-for="item in subFillProjectList"
+                        :disabled="(item.status!=1 && item.status!=4) || !item.canCancel"
+                        :key="item.id"
+                        :label="item.projectName + '\u3000' + item.projectCode"
+                        :value="item.id">
+                        <span style="float: left; color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
+                        <span style="float: right">{{ item.projectName }}</span>
+                        </el-option>
+                    </el-select>
+                    
+
                     <span style="float:right;margin-right:10px;">{{ $t('defaultText.selectProject') }}</span>
                 </el-form-item>
 
@@ -1111,7 +1124,10 @@
             </el-form>
 
             <span slot="footer" class="dialog-footer" v-if="!isSubstitude || substitudeStep == 2">
-                <span v-if="isSubstitude" style="float:left;color:orange;">{{ $t('zhengZaiWei') }}【{{workForm.userNames}}】{{ $t('daiTian') }}</span>
+                <span v-if="isSubstitude" style="float:left;color:orange;">{{ $t('zhengZaiWei') }}【
+                    <span v-if="user.userNameNeedTranslate != '1'">{{workForm.userNames}}</span>
+                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='workForm.userNames'></TranslationOpenDataText></span>
+                   】{{ $t('daiTian') }}</span>
                 <!-- <el-button @click="zhoAddlast()" style="float:left;" class="el-icon-back">{{$t('defaultText.selectProject')}}</el-button> -->
                 <el-button @click="closeAddWeeklyReport()" :loading="submitingReport">{{$t('btn.cancel')}}</el-button>
                 <el-button @click="submitWeekReport(1)" :loading="submitingReport" >{{$t('btn.temporaryStorage')}}</el-button>
@@ -1466,10 +1482,9 @@
                     ></el-date-picker>
                 </el-form-item>
         </el-form>
-        <el-link type="primary" @click="exportReportLog">{{ $t('daoChuRiBaoShenHeJiLuShuJu') }}</el-link>
-        <br>
-        <el-upload ref="upload"  action="#" :limit="1" :http-request="importReportLog" :show-file-list="false">
-        <el-link type="primary" @click="importReportLog">{{ $t('daoRuRiBaoShenHeJiLuXiuGaiShuJu') }}</el-link></el-upload>
+        <p><el-link type="primary" @click="exportReportLog">{{ $t('daoChuRiBaoShenHeJiLuShuJu') }}</el-link></p>
+        <p><el-upload ref="upload"  action="#" :limit="1" :http-request="importReportLog" :show-file-list="false">
+        <el-link type="primary" @click="importReportLog">{{ $t('daoRuRiBaoShenHeJiLuXiuGaiShuJu') }}</el-link></el-upload></p>
         <span slot="footer" class="dialog-footer">
             <el-button  type="primary" @click="reportLogCheckDialog = false">{{ $t('Shutdown') }}</el-button>
         </span>