소스 검색

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

Lijy 2 년 전
부모
커밋
f8471a6080

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/aop/LimitRequestAspect.java

@@ -2,6 +2,7 @@ package com.management.platform.aop;
 
 import com.management.platform.config.LimitRequest;
 import com.management.platform.util.HttpRespMsg;
+import com.management.platform.util.MessageUtils;
 import net.jodah.expiringmap.ExpirationPolicy;
 import net.jodah.expiringmap.ExpiringMap;
 import org.aspectj.lang.ProceedingJoinPoint;
@@ -43,7 +44,7 @@ public class LimitRequestAspect {
 
         if (uCount >= limitRequest.count()) { // 超过次数,不执行目标方法
             //这里的返回对象类型根据controller方法的返回方式一致
-            httpRespMsg.setError("接口访问次数超过限制,请1分钟后重试");
+            httpRespMsg.setError(MessageUtils.message("request.countLimit"));
             return httpRespMsg;
         } else if (uCount == 0){ // 第一次请求时,设置开始有效时间
             map.put(request.getRemoteAddr(), uCount + 1, ExpirationPolicy.CREATED, limitRequest.time(), TimeUnit.MILLISECONDS);

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuditWorkflowSettingController.java

@@ -10,6 +10,7 @@ import com.management.platform.entity.Department;
 import com.management.platform.entity.Report;
 import com.management.platform.mapper.*;
 import com.management.platform.util.HttpRespMsg;
+import com.management.platform.util.MessageUtils;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.web.bind.annotation.RequestParam;
@@ -61,7 +62,7 @@ public class AuditWorkflowSettingController {
                 if (auditWorkflowTimeSetting.getAuditDeptId() != null) {
                     if (auditDeptIds.contains(auditWorkflowTimeSetting.getAuditDeptId())) {
                         HttpRespMsg msg = new HttpRespMsg();
-                        msg.setError("保存失败: 部门["+auditWorkflowTimeSetting.getAuditDeptName()+"]存在重复");
+                        msg.setError(MessageUtils.message("departmentDuplicate", auditWorkflowTimeSetting.getAuditDeptName()));
                         return msg;
                     } else {
                         auditDeptIds.add(auditWorkflowTimeSetting.getAuditDeptId());

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java

@@ -55,7 +55,7 @@ public class AuthRedirectController {
     UserMapper userMapper;
 
     @RequestMapping("/corpWXAuth")
-    public ModelAndView auth(String code, int state) {
+    public ModelAndView auth(String code, Integer state) {
         Map<String,Object> reqParam = new HashMap<String,Object>(16);
         String userAgent = request.getHeader("User-Agent");
         //获取设备类型

+ 32 - 16
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -3246,9 +3246,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 titles.add("投入阶段");
             }
             if (timeType.getShowFillauditTime() == 1) {
-                titles.add("填写时间");
-                titles.add("审核人");
-                titles.add("审核时间");
+//                titles.add("填写时间");
+//                titles.add("项目审核人");
+//                titles.add("审核时间");
                 titles.add("审核流程");
             }
             titles.add("工作事项");
@@ -3391,6 +3391,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 msg.setError("数据量过大,请分时间段导出");
                 return msg;
             }
+            DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
             DecimalFormat df = new DecimalFormat("#0.0");
             for (Map<String, Object> map : allReportByDate) {
                 HSSFRow row = sheet.createRow(rowNum);
@@ -3457,24 +3458,39 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                     index++;
                 }
                 if (timeType.getShowFillauditTime() == 1) {
-                    row.createCell(index).setCellValue(sdf.format((Date)map.get("time")));
-                    index++;
-                    row.createCell(index).setCellValue((String)map.get("projectAuditorName"));
-                    index++;
-                    if (map.get("projectAuditTime") == null) {
-                        row.createCell(index).setCellValue("");
-                    } else {
-                        row.createCell(index).setCellValue(sdf.format((Date)map.get("projectAuditTime")));
-                    }
-                    index++;
+//                    row.createCell(index).setCellValue(sdf.format((Date)map.get("time")));
+//                    index++;
+//                    row.createCell(index).setCellValue((String)map.get("projectAuditorName"));
+//                    index++;
+//                    if (map.get("projectAuditTime") == null) {
+//                        row.createCell(index).setCellValue("");
+//                    } else {
+//                        row.createCell(index).setCellValue(sdf.format((Date)map.get("projectAuditTime")));
+//                    }
+//                    index++;
                     //审核流程显示
-                    List<ReportLog> auditLogs = reportLogMapper.selectList(new QueryWrapper<ReportLog>().eq("report_ids", (int)map.get("id")));
+                    QueryWrapper<ReportLog> logQueryWrapper = new QueryWrapper<ReportLog>().eq("report_ids", (int)map.get("id"))
+                            .or().likeLeft("report_ids", ","+map.get("id"))
+                            .or().like("report_ids", ","+map.get("id")+",")
+                            .or().likeRight("report_ids", map.get("id")+",");
+                    List<ReportLog> auditLogs = reportLogMapper.selectList(logQueryWrapper);
 
                     if (auditLogs.size() == 0) {
                         row.createCell(index).setCellValue("");
                     } else {
-                        String auditFlow = auditLogs.stream().map(ReportLog::getMsg).collect(Collectors.joining("->"));
-                        row.createCell(index).setCellValue(auditFlow);
+                        StringBuilder sb = new StringBuilder();
+                        boolean isFirst = true;
+                        for (ReportLog audit:auditLogs) {
+                            String time = dtf.format(audit.getOperateDate());
+                            String msg = time+" " + audit.getMsg();
+                            if (!isFirst) {
+                                sb.append("->");
+                            } else {
+                                isFirst = false;
+                            }
+                            sb.append(msg);
+                        }
+                        row.createCell(index).setCellValue(sb.toString());
                     }
 
                     index++;

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages.properties

@@ -4,4 +4,7 @@ user.duplicate=账号重名
 user.inactive=该账户已停用,无法登陆。请联系管理员
 user.accountExpired=账号试用已到期,请联系客服。
 user.noRole=请先联系管理员为您分配角色
-user.pwdError=密码错误
+user.pwdError=密码错误
+# 请求相关
+request.countLimit=接口访问次数超过限制,请1分钟后重试
+department.duplicateError=保存失败: 部门[{0}]存在重复

+ 10 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_en_US.properties

@@ -1 +1,10 @@
-user.notExists=user does not exist
+# 用户相关信息
+user.notExists=user does not exist
+user.duplicate=duplicate account
+user.inactive=该账户已停用,无法登陆。请联系管理员
+user.accountExpired=账号试用已到期,请联系客服。
+user.noRole=请先联系管理员为您分配角色
+user.pwdError=password error
+# 请求相关
+request.countLimit=接口访问次数超过限制,请1分钟后重试
+department.duplicateError=save fail: department [{0}] already exists

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

@@ -43,7 +43,10 @@
             </el-select> -->
 
             <el-select v-model="personnelValue" filterable clearable :placeholder="$t('pleaseselectpersonnel')"  size="small" style="margin-top: 10px;width: 350px" v-if="radio == $t('ren-yuan')" @change="personnel()">
-                <el-option v-for="item in hasReportUserList" :key="item.id" :label="item.name" :value="item.name"></el-option>
+                <el-option v-for="item in hasReportUserList" :key="item.id" :label="item.name" :value="item.name">
+                    <span style="float: left">{{ item.name }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
+                </el-option>
             </el-select>
         </el-col>
         <el-col :span="4">