소스 검색

合同报错Bug, 项目预估工时设置中增加支持单外部项目限制必填

seyason 8 달 전
부모
커밋
0163eda783

+ 7 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java

@@ -476,8 +476,10 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
             contractLog.setType(1);
             contractLog.setMsg("编辑了合同。");
             contractLogMapper.insert(contractLog);
-            custom.setContractId(contract.getId());
-            contractCustomMapper.updateById(custom);
+            if (user.getCompanyId() == 4215) {
+                custom.setContractId(contract.getId());
+                contractCustomMapper.updateById(custom);
+            }
             httpRespMsg.msg = MessageUtils.message("contract.editSuc");
             return httpRespMsg;
         }catch (NullPointerException e) {
@@ -1126,7 +1128,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
             contractDocumentMapper.updateById(contractDocument);
         }
         //删除定制表
-        contractCustomMapper.deleteById(id);
+        if (user.getCompanyId() == 4215) {
+            contractCustomMapper.deleteById(id);
+        }
         msg.msg = MessageUtils.message("other.deleteScu");
         return msg;
     }

+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1001,6 +1001,27 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                 httpRespMsg.setError("项目人天不能小于已经填报的工时:"+df.format(report.getWorkingTime()/timeType.getAllday())+"人天");
                                 return httpRespMsg;
                             }
+                        } else if (estimateTimeSetting.getProjectManDayFillMode() == 3) {
+                            //外部项目必填
+                            if (oldProject.getFromOutside() == 1) {
+                                if(manDay!=null && manDay > 0){
+                                    if(manDay*timeType.getAllday()<report.getWorkingTime()){
+                                        httpRespMsg.setError("项目人天不能小于已经填报的工时:"+df.format(report.getWorkingTime()/timeType.getAllday())+"人天");
+                                        return httpRespMsg;
+                                    }
+                                } else {
+                                    httpRespMsg.setError("项目人天不能小于已经填报的工时:"+df.format(report.getWorkingTime()/timeType.getAllday())+"人天");
+                                    return httpRespMsg;
+                                }
+                            } else {
+                                //工时系统创建的项目,只检查不能少于已填报
+                                if(manDay!=null && manDay > 0){
+                                    if(manDay*timeType.getAllday()<report.getWorkingTime()){
+                                        httpRespMsg.setError("项目人天不能小于已经填报的工时:"+df.format(report.getWorkingTime()/timeType.getAllday())+"人天");
+                                        return httpRespMsg;
+                                    }
+                                }
+                            }
                         }
                     }
                 }

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -31,7 +31,7 @@
     "budgetReview": "Estimated working hours review",
     "projectFormSettings": "Project Form Settings",
     "userGroupManagement": "User group management",
-    "deviceManagement": "deviceManagement"
+    "deviceManagement": "Device Management"
   },
   "role": {
     "ordinaryEmployees": "Ordinary employees",
@@ -1850,7 +1850,8 @@
   "genJuXiTongJiChuSheZhiMeiRiZhengChangGongZuoShiChangJiSuan_1RenTianWeiYiGeMeiRiZhengChangGongZuoShiChang": "According to the basic system settings, the daily normal working hours are calculated, and 1 person day is a daily normal working hour",
   "gongShiLeiXing": "Work hour type",
   "gongShiXiTongChuangJianDeXiangMuBiTian": "Items created by the working hours system must be filled in",
-  "gongShiXiTongHeWaiBuTongBuDeXiangMuDuBiTian": "Both the work hour system and external synchronization projects are mandatory",
+  "gongShiXiTongHeWaiBuTongBuDeXiangMuDuBiTian": "Both the work hour system and external synchronized projects are mandatory",
+  "waibutongbuXiangMuBiTian": "External synchronized projects are mandatory",
   "gongZuoNeiRong": "job content",
   "gongZuoZhiZe": "operating duty",
   "guanBiChengGong": "Closed successfully",

+ 5 - 4
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -224,7 +224,7 @@
     "schedule": "进度",
     "task": "任务",
     "WorkOvertime": "加班",
-    "matters": "事项",
+    "matters": "工作内容",
     "projectDuration": "项目时长",
     "evaluation": "评价",
     "noReportYet": "暂无报告",
@@ -238,9 +238,9 @@
     "projectDescription": "项目描述",
     "milestone": "里程碑",
     "specificContentAndResults": "具体内容与结果",
-    "workMatters": "工作事项",
+    "workMatters": "工作内容",
     "tianspecificContentAndResults": "填写具体内容与结果",
-    "tianworkMatters": "填写工作事项",
+    "tianworkMatters": "填写工作内容",
     "AddWorkTime": "添加工时",
     "addMore": "添加更多",
     "to": "至",
@@ -1855,6 +1855,7 @@
   "feiBiTian": "非必填",
   "gongShiXiTongChuangJianDeXiangMuBiTian": "工时系统创建的项目必填",
   "gongShiXiTongHeWaiBuTongBuDeXiangMuDuBiTian": "工时系统和外部同步的项目都必填",
+  "waibutongbuXiangMuBiTian": "外部同步的项目都必填",
   "xiangMuGongShiShengYuTiXingBaiFenBi": "项目工时剩余提醒百分比",
   "xiangMuGongShiBuZuShi": "项目工时不足时",
   "jinZhiTianBao": "禁止填报",
@@ -2035,7 +2036,7 @@
   "daoChuFangShi": "导出方式",
   "wanZhengDaoChu": "完整导出",
   "jingJianDaoChu": "精简导出",
-  "jingJianRiBaoBuHanGongZuoShiXiangHeShenPiXinXiShuJuLiangGengXiaoDaoChuGengKuai": "精简日报不含工作事项和审批信息,数据量更小导出更快。",
+  "jingJianRiBaoBuHanGongZuoShiXiangHeShenPiXinXiShuJuLiangGengXiaoDaoChuGengKuai": "精简日报不含工作内容和审批信息,数据量更小导出更快。",
   "daoChuRiBaoShenHeJiLuShuJu": "导出日报审核记录数据",
   "daoRuRiBaoShenHeJiLuXiuGaiShuJu": "导入日报审核记录修改数据",
   "yiBoHuiLouTian": "已驳回/漏填",

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

@@ -1100,6 +1100,7 @@
                         <el-option :label="$t('feiBiTian')" :value="0"></el-option>
                         <el-option :label="$t('gongShiXiTongChuangJianDeXiangMuBiTian')" :value="1"></el-option>
                         <el-option :label="$t('gongShiXiTongHeWaiBuTongBuDeXiangMuDuBiTian')" :value="2"></el-option>
+                        <el-option :label="$t('waibutongbuXiangMuBiTian')" :value="3"></el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item :label="$t('xiangMuGongShiShengYuTiXingBaiFenBi')"  >

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

@@ -135,7 +135,7 @@
                                 </span>
                                 <span style="float:right;">
                                     <el-link type="primary" v-if="user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,0)">{{$t('textLink.fillInTheWork')}}</el-link>
-                                    <el-link v-if="reportTimeType.type != 0 && user.companyId != yuzhongCompId && user.timeType.enableNewWeeklyfill != 1 && user.companyId != 3092 && user.timeType.enableNewWeeklyfill != 2" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">{{$t('textLink.fillInAWeek')}}</el-link>
+                                    <el-link v-if="reportTimeType.type != 0 && user.companyId != yuzhongCompId && user.companyId != 469 && user.timeType.enableNewWeeklyfill != 1 && user.companyId != 3092 && user.timeType.enableNewWeeklyfill != 2" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">{{$t('textLink.fillInAWeek')}}</el-link>
                                     <el-link v-if="user.timeType.enableNewWeeklyfill == 1" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">{{ $t('textLink.fillInAWeek') }}</el-link>
                                     <!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报123</el-link> -->
                                     <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;weekIndex++,fillWeekDialogVisiCustomTwo=true" v-if="user.timeType.enableNewWeeklyfill==2">按周填报</el-link>
@@ -143,7 +143,7 @@
                                     <!-- 苏州景昱,按周填报的模式进行代填日报 -->
                                     <el-link type="primary" v-if="user.companyId == 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReportss();">{{$t('textLink.helpToFillIn')}}</el-link>
                                     
-                                    <el-link type="primary" v-if="permissions.reportBatch && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">{{$t('textLink.batchFillIn')}}</el-link>
+                                    <el-link type="primary" v-if="permissions.reportBatch && user.timeType.enableNewWeeklyfill != 1 && user.companyId != 469" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">{{$t('textLink.batchFillIn')}}</el-link>
                                     <el-link type="primary" v-if="user.companyId != yuzhongCompId && (permissions.importReport || user.manageDeptId != 0)" style="margin-right:10px;" :underline="false" @click="imports()">{{$t('textLink.workHoursImport')}}</el-link>
                                     <el-link type="primary" style="margin-right:10px;" :underline="false" @click="showExportDialog" v-if="permissions.reportExport">{{$t('textLink.exportWork')}}</el-link>
                                     <!--部门负责人给个导出工时的功能 -->

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

@@ -84,7 +84,7 @@
             <el-table :data="list" ref="multipleTable" v-if="showTable" :height="reviewTableHeight" :key="reviewTableHeightKey" highlight-current-row v-loading="listLoading" style="width: 100%;"
                 @selection-change="handleSelectionChange" :default-expand-all="defaultExpandAllFlg" @expand-change="expandChange">
                 <el-table-column type="selection" width="55"></el-table-column>
-                <el-table-column type="expand" :label="''">
+                <el-table-column type="expand" :label="''" v-if="user.companyId != 469">
                     <template slot="header">
                         <i :class="defaultExpandAllFlg ? 'el-icon-arrow-down' : 'el-icon-arrow-right'" style="cursor: pointer;" @click="defaultExpandAllFlgCli()"></i>
                     </template>