Browse Source

驳回必填功能
赛元考勤增加按姓名获取

QuYueTing 7 months ago
parent
commit
cfc44b8fa9

+ 10 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java

@@ -97,8 +97,16 @@ public class UserCorpwxTimeController {
     public HttpRespMsg getUserCardTime(String userId, String date) {
         HttpRespMsg msg = new HttpRespMsg();
         User user = userMapper.selectById(userId);
-        UserCorpwxTime userCorpwxTime = userCorpwxTimeMapper.selectOne(new QueryWrapper<UserCorpwxTime>().eq("corpwx_userid", user.getCorpwxUserid()).eq("create_date", date));
-        msg.data = userCorpwxTime;
+        if (user.getCorpwxUserid() != null) {
+            UserCorpwxTime userCorpwxTime = userCorpwxTimeMapper.selectOne(new QueryWrapper<UserCorpwxTime>().eq("corpwx_userid", user.getCorpwxUserid()).eq("create_date", date));
+            msg.data = userCorpwxTime;
+        } else {
+            //按姓名匹配
+            List<UserCorpwxTime> userCorpwxTimes = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", user.getCompanyId()).eq("name", user.getName()).eq("create_date", date));
+            if (userCorpwxTimes.size() > 0) {
+                msg.data = userCorpwxTimes.get(0);
+            }
+        }
         return msg;
     }
     @RequestMapping("/getMyDeptMembsData")

+ 8 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2024-09-23
+ * @since 2024-10-21
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -622,6 +622,13 @@ public class TimeType extends Model<TimeType> {
     private Integer verifyCardOvertime;
 
 
+    /**
+     * 驳回日报原因是否必填
+     */
+    @TableField("force_reject_reason")
+    private Integer forceRejectReason;
+
+
     @Override
     protected Serializable pkVal() {
         return this.companyId;

+ 9 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -875,8 +875,15 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 showRefresh = true;
             } else if (timeType.getShowCorpwxCardtime() == 1) {
                 User user = userMapper.selectById(userId);
-                List<UserCorpwxTime> corpwxTimes = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>()
-                        .eq("corpwx_userid", user.getCorpwxUserid()).eq("create_date", date));
+                List<UserCorpwxTime> corpwxTimes = null;
+                if (user.getCorpwxUserid() != null) {
+                    corpwxTimes = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>()
+                            .eq("corpwx_userid", user.getCorpwxUserid()).eq("create_date", date));
+                } else {
+                    //按姓名匹配
+                    corpwxTimes = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().eq("company_id", user.getCompanyId())
+                            .eq("name", user.getName()).eq("create_date", date));
+                }
                 if (corpwxTimes.size() > 0) {
                     UserCorpwxTime time = corpwxTimes.get(0);
                     resultMap.put("time", time);

File diff suppressed because it is too large
+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TimeTypeMapper.xml


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

@@ -205,7 +205,7 @@
                                                         <span v-else>
                                                             <span v-if="item2.isDeptAudit==0">
                                                                 <span v-if="item2.projectAuditState==0">
-                                                                    <!-- 待项目审核人 --> {{user.companyId == 469?(item2.auditorDeptName?('待'+item2.auditorDeptName):"待部门主管"):$t('other.waitForTheProjectReviewer')}}
+                                                                    <!-- 待项目审核人 --> {{user.companyId == 469?(item2.projectAuditorName=='程君健'?('待总经办'):"待部门主管"):$t('other.waitForTheProjectReviewer')}}
                                                                     <span v-if="item2.projectAuditorName != null">(
                                                                         <!-- {{item2.projectAuditorName}} -->
                                                                         <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item2.projectAuditorName, renderIndex: 0 }" />
@@ -213,7 +213,7 @@
                                                                     <!-- 审核 --> {{$t('other.audit')}}
                                                                 </span>
                                                                 <span style="color:#32CD32;" v-else-if="item2.projectAuditState==1">
-                                                                    <!-- 项目审核人 --> {{user.companyId == 469?(item2.auditorDeptName?('待'+item2.auditorDeptName):"待部门主管"):$t('other.projectAuditor')}}
+                                                                    <!-- 项目审核人 --> {{user.companyId == 469?(item2.projectAuditorName=='程君健'?('待总经办'):"待部门主管"):$t('other.projectAuditor')}}
                                                                     <span v-if="item2.projectAuditorName != null">(
                                                                         <!-- {{item2.projectAuditorName}} -->
                                                                         <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item2.projectAuditorName, renderIndex: 0 }" />
@@ -423,7 +423,7 @@
                         <!--针对明夷,批量填报(不含代填)情况下显示考勤时长-->
                         <span v-if="!isSubstitude && isBatch && user.company.companyName === mingyiName">,{{ $t('workAttendance') }}:{{this.workTimeForMinYi}}{{$t('time.hour')}}</span>
                         <el-button type="default" style="margin-left:5px;" size="small" :loading="syncTimeLoading" 
-                        v-if="!isBatch && user.timeType.syncCorpwxTime==1" icon="el-icon-refresh" 
+                        v-if="!isBatch && user.timeType.syncCorpwxTime==1 && !isSubstitude" icon="el-icon-refresh" 
                                 @click="refreshWXCardTime(workForm.createDate)"></el-button>
                         <el-button type="default" style="margin-left:5px;" size="small" :loading="syncTimeLoading" 
                         v-if="isBatch && user.company.companyName === mingyiName" icon="el-icon-refresh" 
@@ -1901,11 +1901,11 @@
         <!--驳回弹出框 -->
         <el-dialog :title="$t('defaultText.pleaseEnterTheReason')"  v-if="denyReasonDialog" :visible.sync="denyReasonDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <div>
-                <el-input type="textarea" v-model="denyForm.reason" rows="2" :placeholder="$t('defaultText.pleaseEnterYourDecision')+(denyForm.i==0?$t('btn.rejected'):$t('btn.undo'))+$t('other.reason')" />
+                <span style="color:red;">*</span><el-input type="textarea" v-model="denyForm.reason" rows="2" :placeholder="$t('defaultText.pleaseEnterYourDecision')+(denyForm.i==0?$t('btn.rejected'):$t('btn.undo'))+$t('other.reason')" />
             </div>
             <div slot="footer" class="dialog-footer">
                 <el-button  @click="denyReasonDialog = false" >{{$t('btn.cancel')}}</el-button>
-                <el-button type="primary" :loading="isDenying" @click="deny()" >{{$t('btn.submit')}}</el-button>
+                <el-button type="primary" :loading="isDenying" @click="deny()" :disabled="user.timeType.forceRejectReason && !denyForm.reason">{{$t('btn.submit')}}</el-button>
             </div>
         </el-dialog>
         <!--  通过弹出框 -->

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

@@ -322,21 +322,21 @@
         </div>        <!--驳回弹出框 -->
         <el-dialog :title="$t('defaultText.pleaseEnterTheReason')"  v-if="denyReasonDialog" :visible.sync="denyReasonDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <div>
-                <el-input type="textarea" v-model="denyForm.reason" rows="2" :placeholder="$t('defaultText.pleaseEnterYourDecision')+(denyForm.i==0?$t('btn.rejected'):$t('btn.undo'))+$t('other.reason')" />
+                <span style="color:red;">*</span><el-input type="textarea" v-model="denyForm.reason" rows="2" :placeholder="$t('defaultText.pleaseEnterYourDecision')+(denyForm.i==0?$t('btn.rejected'):$t('btn.undo'))+$t('other.reason')" />
             </div>
             <div slot="footer" class="dialog-footer">
                 <el-button  @click="denyReasonDialog = false" >{{ $t('btn.cancel') }}</el-button>
-                <el-button type="primary" @click="deny()" >{{ $t('btn.determine') }}</el-button>
+                <el-button type="primary" @click="deny()" :disabled="user.timeType.forceRejectReason && !denyForm.reason">{{ $t('btn.determine') }}</el-button>
             </div>
         </el-dialog>
         <!--批量驳回弹出框 -->
         <el-dialog :title="$t('defaultText.pleaseEnterTheReason')"  v-if="batchDenyDialog" :visible.sync="batchDenyDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <div>
-                <el-input type="textarea" v-model="batchDenyData.reason" rows="2" :placeholder="$t('reasonforyourdecisiontoreject')" />
+                <span style="color:red;">*</span><el-input type="textarea" v-model="batchDenyData.reason" rows="2" :placeholder="$t('reasonforyourdecisiontoreject')" />
             </div>
             <div slot="footer" class="dialog-footer">
                 <el-button  @click="batchDenyDialog = false" >{{ $t('btn.cancel') }}</el-button>
-                <el-button type="primary" @click="batchDenyClick()" :loading="batchDenyLoading">{{ $t('btn.determine') }}</el-button>
+                <el-button type="primary" @click="batchDenyClick()" :loading="batchDenyLoading" :disabled="user.timeType.forceRejectReason && !batchDenyData.reason">{{ $t('btn.determine') }}</el-button>
             </div>
         </el-dialog>
         <!--工具条-->