Browse Source

Merge branches 'develop' and 'wanghaicheng' of http://132.232.206.88:3000/lift-manager/lift-server into wanghaicheng

wang-hai-cheng 5 years ago
parent
commit
dbd8b73719
19 changed files with 124 additions and 78 deletions
  1. 4 4
      lift-batch-service/src/main/resources/application-test.yml
  2. 4 4
      lift-batch-service/src/main/resources/application-web.yml
  3. 4 4
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/controller/MaintenanceRecordController.java
  4. 8 10
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenanceRecordService.java
  5. 5 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/controller/ProjectController.java
  6. 25 5
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/service/ProjectService.java
  7. 4 4
      lift-business-service/src/main/resources/application-test.yml
  8. 1 1
      lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml
  9. 4 4
      lift-common/src/main/java/cn.com.ty.lift.common/aliservice/aliyunoss/AliyunOSS.java
  10. 4 4
      lift-enterprise-service/src/main/resources/application-test.yml
  11. 7 6
      lift-push/src/main/java/cn/com/ty/lift/push/app/PushConsumer.java
  12. 4 4
      lift-quan-service/src/main/resources/application-test.yml
  13. 12 2
      lift-system-service/src/main/java/cn/com/ty/lift/system/settings/dao/entity/model/ConfirmCompanyResponse.java
  14. 22 6
      lift-system-service/src/main/java/cn/com/ty/lift/system/settings/service/impl/MaintenanceCompanyServiceImpl.java
  15. 2 4
      lift-system-service/src/main/java/cn/com/ty/lift/system/settings/service/impl/MtCompanyAttestationServiceImpl.java
  16. 4 4
      lift-system-service/src/main/resources/application-test.yml
  17. 4 4
      lift-system-service/src/main/resources/application-web.yml
  18. 5 5
      lift-upload/src/main/java/com/upload/config/AliyunOSS.java
  19. 1 1
      lift-upload/src/main/java/com/upload/controller/UploadController.java

+ 4 - 4
lift-batch-service/src/main/resources/application-test.yml

@@ -21,7 +21,7 @@ spring:
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:
   oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i
+    endpoint: http://oss-cn-hangzhou-internal.aliyuncs.com
+    bucketName: ty-oss-file
+    accessKeyId: LTAI4G1iLTczu8JxM2En57gY
+    accessKeySecret: VHeRj3C2br87Uh447ruHsSTvYSDWeC

+ 4 - 4
lift-batch-service/src/main/resources/application-web.yml

@@ -22,7 +22,7 @@ spring:
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:
   oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i
+    endpoint: http://oss-cn-hangzhou-internal.aliyuncs.com
+    bucketName: ty-oss-file
+    accessKeyId: LTAI4G1iLTczu8JxM2En57gY
+    accessKeySecret: VHeRj3C2br87Uh447ruHsSTvYSDWeC

+ 4 - 4
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/controller/MaintenanceRecordController.java

@@ -8,7 +8,6 @@ import cn.com.ty.lift.business.maintenance.dao.entity.model.request.MtRecordRequ
 import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MtOptionTree;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MtPlanResponse;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MtRecordResponse;
-import cn.com.ty.lift.business.maintenance.dao.mapper.MaintenanceRecordMapper;
 import cn.com.ty.lift.business.maintenance.service.*;
 import cn.com.ty.lift.business.project.dao.entity.ProjectLiftRelevance;
 import cn.com.ty.lift.business.project.service.ProjectLiftRelevanceService;
@@ -25,9 +24,11 @@ import com.google.common.base.Splitter;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
-import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -56,7 +57,6 @@ public class MaintenanceRecordController {
     private MaintenanceOptionService maintenanceOptionService;
     private ProjectLiftRelevanceService projectLiftRelevanceService;
     private EvaluationService evaluationService;
-    private MaintenanceRecordMapper maintenanceRecordMapper;
 
     /**
      * 根据条件分页查询维保-日常保养

+ 8 - 10
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenanceRecordService.java

@@ -44,7 +44,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.base.Splitter;
-import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -89,7 +88,6 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
     private ProjectLiftRelevanceService projectLiftRelevanceService;
     private MaintenanceOptionMapper maintenanceOptionMapper;
     private MaintenancePlanMapper maintenancePlanMapper;
-    private Gson gson;
     MaintenanceOptionService maintenanceOptionService;
 
     @Autowired
@@ -260,10 +258,10 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
         //若保养时间在计划时间之前,则需要修改维保计划
         //boolean compareResult = request.getCurrentTime().isBefore(plan.getPlanDate());
         //if (compareResult) {
-            boolean modifyPlan = modifyPlan(request);
-            if (!modifyPlan) {
-                return RestResponse.fail(MessageUtils.get("msg.modify.fail"));
-            }
+        boolean modifyPlan = modifyPlan(request);
+        if (!modifyPlan) {
+            return RestResponse.fail(MessageUtils.get("msg.modify.fail"));
+        }
         //}
         Optional<Lift> lift = liftService.getOne(null, liftId);
         if (lift.isPresent()) {
@@ -914,10 +912,9 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
                 String useCompanyCode = mtRecordResponse.getUseCompanyCode();
                 projectName = StrUtil.isNotEmpty(projectName) ? projectName.replace(illegalChars, "-") : "[项目]";
                 registrationCode = StrUtil.isNotEmpty(registrationCode) ? registrationCode.replace(illegalChars, "-") : "[电梯注册代码]";
-                useCompanyCode = useCompanyCode != null ? useCompanyCode : "";
+                useCompanyCode = useCompanyCode != null ? useCompanyCode : "未设置梯号";
                 //保养单及图片文件夹 dir/i.ProjectName-RegistrationCode/
-                String imgDir = StrUtil.format("{}{}{}.{}-{}--", dir, File.separator, (i + 1), projectName, registrationCode);
-                imgDir += useCompanyCode + File.separator;
+                String imgDir = StrUtil.format("{}{}.{}-{}", dir + File.separator, useCompanyCode, projectName, registrationCode + File.separator);
                 //生成维保图片
                 List<MtRecordImg> mtRecordImgs = mtRecordResponse.getMtRecordImgs();
                 List<MtRecordImg> imgs = mtRecordImgs.stream().filter(img -> mtRecordResponse.getId().equals(img.getMtRecordId())).collect(Collectors.toList());
@@ -941,7 +938,8 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
             log.info("生成zipFile路径: {}", zip);
             ZipUtil.zip(dir, zip);
             //上传文件到阿里云,并返回路径给前端
-            return AliyunOSS.me().putObject("maintenance/export/zip/" + generateCode + ".zip", readInputStream(new FileInputStream(new File(zip))));
+            String url = AliyunOSS.me().putObject("maintenance/export/zip/" + generateCode + ".zip", readInputStream(new FileInputStream(new File(zip))));
+            return url.replace("-internal", "");
         } catch (Exception e) {
             log.error("生成保养文件失败", e);
             throw Validate.validateException("生成保养文件失败");

+ 5 - 2
lift-business-service/src/main/java/cn/com/ty/lift/business/project/controller/ProjectController.java

@@ -155,6 +155,9 @@ public class ProjectController {
     public RestResponse add(@Val @RequestBody ProjectRequest request) {
         Validator.valid(request.getProject(), "mtCompanyId", "ppCompanyId", "ppContactId", "projectName",
                 "address", "num", "startDate", "endDate", "regionId", "projectUsage");
+        if (request.getProject().getEndDate().isBefore(request.getProject().getStartDate())) {
+            return RestResponse.fail("项目结束时间不能在开始时间之前");
+        }
         return projectService.add(request);
     }
 
@@ -178,8 +181,8 @@ public class ProjectController {
      */
     @PostMapping("remove")
     @Validation(fields = {"id"})
-    public RestResponse remove(@Val @RequestBody ProjectRequest request){
-        return projectService.remove(request.getId(),request.getMtCompanyId());
+    public RestResponse remove(@Val @RequestBody ProjectRequest request) {
+        return projectService.remove(request.getId(), request.getMtCompanyId());
     }
 
     /**

+ 25 - 5
lift-business-service/src/main/java/cn/com/ty/lift/business/project/service/ProjectService.java

@@ -15,7 +15,6 @@ import cn.com.ty.lift.business.project.dao.entity.model.response.ProjectUserResp
 import cn.com.ty.lift.business.project.dao.mapper.ProjectMapper;
 import cn.com.ty.lift.business.push.service.PushUserService;
 import cn.com.ty.lift.common.base.ExportRequest;
-import cn.com.ty.lift.common.constants.CommonEnum;
 import cn.com.ty.lift.common.constants.CommonEnum.ProjectStatus;
 import cn.com.ty.lift.common.constants.WebSocketConstants;
 import cn.com.ty.lift.common.model.PushMessage;
@@ -48,6 +47,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.temporal.ChronoUnit;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -325,13 +325,32 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
         //按当前日期时间戳自动生成项目编号
         String projectCode = DateUtils.generateCode();
         project.setProjectCode("XM" + projectCode);
+        this.setProjectStatus(project);
+        return save(project);
+    }
+
+    /**
+     * 根据项目开始结束时间,设置项目状态
+     *
+     * @param project 项目信息
+     */
+    private void setProjectStatus(Project project) {
         LocalDate now = LocalDate.now();
         LocalDate startDate = project.getStartDate();
         LocalDate endDate = project.getEndDate();
-        if (startDate.isEqual(now) || startDate.isBefore(now) && endDate.isAfter(now)) {
+        LocalDate tomorrow = now.plus(1, ChronoUnit.DAYS);
+        //如果项目开始时间在今天之后,项目状态设置成未开始
+        if (startDate.isAfter(now)) {
+            project.setProjectStatus("1");
+        }
+        //如果项目开始时间在明天之前,项目状态设置成服务中
+        if (startDate.isBefore(tomorrow)) {
             project.setProjectStatus("2");
         }
-        return save(project);
+        //如果项目结束时间在今天之前,项目状态设置成逾期
+        if (endDate.isAfter(now)) {
+            project.setProjectStatus("3");
+        }
     }
 
     /**
@@ -430,6 +449,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
         Optional<Project> oldProject = getOne(project.getId());
         if (!oldProject.isPresent())
             return RestResponse.fail(MessageUtils.get("msg.project.not.exist"));
+        this.setProjectStatus(project);
         boolean result = updateById(project);
         if (!result)
             return RestResponse.fail(MessageUtils.get("msg.modify.fail"));
@@ -451,7 +471,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
         return baseMapper.exportList(ids);
     }
 
-    public List<Map<String,String>> exportLiftList(List<String> ids){
+    public List<Map<String, String>> exportLiftList(List<String> ids) {
         return baseMapper.exportLiftList(ids);
     }
 
@@ -465,7 +485,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
         List<String> ids = request.getIds();
         List<Map<String, String>> projectList = exportList(ids);
         List<Map<String, String>> liftList = exportLiftList(ids);
-        ExcelWriter writer = new ExcelWriter(true,"项目");
+        ExcelWriter writer = new ExcelWriter(true, "项目");
         //设置列别名
         projectHeadsMap.forEach(writer::addHeaderAlias);
         response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");

+ 4 - 4
lift-business-service/src/main/resources/application-test.yml

@@ -44,7 +44,7 @@ spring:
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:
   oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i
+    endpoint: http://oss-cn-hangzhou-internal.aliyuncs.com
+    bucketName: ty-oss-file
+    accessKeyId: LTAI4G1iLTczu8JxM2En57gY
+    accessKeySecret: VHeRj3C2br87Uh447ruHsSTvYSDWeC

+ 1 - 1
lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml

@@ -98,7 +98,7 @@
 			AND p.id = #{request.projectId,jdbcType=BIGINT}
 		</if>
 		<if test="request.workerId!=null and request.workerId > 0">
-			AND mp.worker_id = #{request.workerId,jdbcType=BIGINT}
+			AND plr.worker_id = #{request.workerId,jdbcType=BIGINT}
 		</if>
 		<if test="request.regionId!=null and request.regionId > 0">
 			AND p.region_id = #{request.regionId,jdbcType=BIGINT}

+ 4 - 4
lift-common/src/main/java/cn.com.ty.lift.common/aliservice/aliyunoss/AliyunOSS.java

@@ -24,12 +24,12 @@ import java.util.Objects;
 public class AliyunOSS {
 
     // Endpoint以杭州为例,其它Region请按实际情况填写。
-    private String endpoint        = "http://oss-cn-beijing.aliyuncs.com";
+    private String endpoint        = "http://oss-cn-hangzhou-internal.aliyuncs.com";
     // 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录 https://ram.console.aliyun.com 创建RAM账号。
-    private String accessKeyId     = "LTAI4FkSqFZa6LH9HqAsVott";
-    private String accessKeySecret = "w7GXuh5tf1hduQuZ2AzT3a4q14BI1i";
+    private String accessKeyId     = "LTAI4G1iLTczu8JxM2En57gY";
+    private String accessKeySecret = "VHeRj3C2br87Uh447ruHsSTvYSDWeC";
     //存储空间名
-    private String bucketName      = "temp15827479607";
+    private String bucketName      = "ty-oss-file";
 
     //OSSClient实例
     private OSS ossClient;

+ 4 - 4
lift-enterprise-service/src/main/resources/application-test.yml

@@ -43,7 +43,7 @@ spring:
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:
   oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i
+    endpoint: http://oss-cn-hangzhou-internal.aliyuncs.com
+    bucketName: ty-oss-file
+    accessKeyId: LTAI4G1iLTczu8JxM2En57gY
+    accessKeySecret: VHeRj3C2br87Uh447ruHsSTvYSDWeC

+ 7 - 6
lift-push/src/main/java/cn/com/ty/lift/push/app/PushConsumer.java

@@ -4,10 +4,8 @@ import cn.com.ty.lift.common.model.PushMessage;
 import cn.com.ty.lift.common.model.TimeMessage;
 import cn.com.ty.lift.common.utils.ValuePool;
 import cn.com.ty.lift.push.message.service.TimeMessageService;
-import cn.com.ty.lift.push.message.service.UserAccountService;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.jms.annotation.JmsListener;
 import org.springframework.jms.core.JmsMessagingTemplate;
 import org.springframework.messaging.support.GenericMessage;
@@ -15,6 +13,7 @@ import org.springframework.stereotype.Component;
 
 import java.time.LocalDateTime;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -27,12 +26,10 @@ import java.util.List;
 @Component
 @AllArgsConstructor
 public class PushConsumer {
-
+    private static List<String> titles =
+            new ArrayList<>(Arrays.asList("公司公告", "团队消息", "年检消息", "保养消息", "急修消息", "提醒", "工作消息"));
     private XingePush xingePush;
     private JmsMessagingTemplate jmsMessagingTemplate;
-    private TimeMessageService TimeMessageService;
-    private RedisTemplate redisTemplate;
-    private final UserAccountService userAccountService;
     private final TimeMessageService timeMessageService;
 
     private class Processor {
@@ -129,6 +126,9 @@ public class PushConsumer {
     private void saveMessage(PushMessage pushMessage) {
         List<TimeMessage> timeMessages = new ArrayList<>();
         pushMessage.getUsers().forEach((k, v) -> {
+            if (!titles.contains(pushMessage.getTitle())) {
+                return;
+            }
             TimeMessage timeMessage = new TimeMessage();
             timeMessage.setUserId(k);
             timeMessage.setContent(pushMessage.getContent());
@@ -143,6 +143,7 @@ public class PushConsumer {
                 case "急修消息":
                     timeMessage.setType(3);
                     break;
+                case "年检消息":
                 case "提醒":
                 case "工作消息":
                     timeMessage.setType(4);

+ 4 - 4
lift-quan-service/src/main/resources/application-test.yml

@@ -21,7 +21,7 @@ spring:
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:
   oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i
+    endpoint: http://oss-cn-hangzhou-internal.aliyuncs.com
+    bucketName: ty-oss-file
+    accessKeyId: LTAI4G1iLTczu8JxM2En57gY
+    accessKeySecret: VHeRj3C2br87Uh447ruHsSTvYSDWeC

+ 12 - 2
lift-system-service/src/main/java/cn/com/ty/lift/system/settings/dao/entity/model/ConfirmCompanyResponse.java

@@ -13,6 +13,15 @@ import java.time.LocalDateTime;
  */
 @Data
 public class ConfirmCompanyResponse {
+    /**
+     * 公司id
+     */
+    private Long CompanyId;
+
+    /**
+     * 是否vip
+     */
+    private Integer vipFlag;
     /**
      * 公司名称
      */
@@ -76,9 +85,10 @@ public class ConfirmCompanyResponse {
      */
     private LocalDateTime lastActiveTime;
 
-    public ConfirmCompanyResponse(){}
+    public ConfirmCompanyResponse() {
+    }
 
-    public ConfirmCompanyResponse(MaintenanceCompany maintenanceCompany){
+    public ConfirmCompanyResponse(MaintenanceCompany maintenanceCompany) {
         this.companyName = maintenanceCompany.getName();
         this.limitedNum = maintenanceCompany.getLimitedNum();
         this.teamNum = Long.valueOf(maintenanceCompany.getUserNum());

+ 22 - 6
lift-system-service/src/main/java/cn/com/ty/lift/system/settings/service/impl/MaintenanceCompanyServiceImpl.java

@@ -317,12 +317,16 @@ public class MaintenanceCompanyServiceImpl extends ServiceImpl<MaintenanceCompan
             Map<Long, Long> mtCompanyIdToEmergencyRecordNum = mtCompanyIdToNum(
                     commonDataMapper.getMtCompanyIdToEmergencyRecord(new MaintenanceCompanyRequest(companyIdList)));
 
-            //获取公司合同开始和结束日期
-            HashMap<Long, LocalDate> contractStartDate = new HashMap<>();
-            HashMap<Long, LocalDate> contractEndDate = new HashMap<>();
+            //获取公司合同开始和结束日期,是否vip,限制台量
+            Map<Long, LocalDate> contractStartDate = new HashMap<>();
+            Map<Long, LocalDate> contractEndDate = new HashMap<>();
+            Map<Long, Integer> vipFlags = new HashMap<>();
+            Map<Long, Integer> limitedNums = new HashMap<>();
             for (MaintenanceCompany maintenanceCompany : maintenanceCompanyList) {
                 contractStartDate.put(maintenanceCompany.getId(), maintenanceCompany.getContractStartDate());
                 contractEndDate.put(maintenanceCompany.getId(), maintenanceCompany.getContractEndDate());
+                vipFlags.put(maintenanceCompany.getId(), maintenanceCompany.getVipFlag());
+                limitedNums.put(maintenanceCompany.getId(), maintenanceCompany.getLimitedNum());
             }
 
             //循环设置认证公司信息
@@ -330,7 +334,7 @@ public class MaintenanceCompanyServiceImpl extends ServiceImpl<MaintenanceCompan
                 //设置认证企业信息
                 setConfirmCompany(confirmCompanyResponseList, companyIdToDealTime, mtCompanyIdToProjectNum,
                         companyIdToLiftData, mtCompanyIdToMtRecordNum, mtCompanyIdToEmergencyRecordNum,
-                        companyToActiveTime, maintenanceCompany, contractStartDate, contractEndDate);
+                        companyToActiveTime, maintenanceCompany, contractStartDate, contractEndDate, vipFlags, limitedNums);
             }
         }
     }
@@ -351,9 +355,13 @@ public class MaintenanceCompanyServiceImpl extends ServiceImpl<MaintenanceCompan
                                    Map<Long, Long> mtCompanyIdToEmergencyRecordNum,
                                    Map<Long, LocalDateTime> companyToActiveTime,
                                    MaintenanceCompany maintenanceCompany,
-                                   HashMap<Long, LocalDate> contractStartDate,
-                                   HashMap<Long, LocalDate> contractEndDate) {
+                                   Map<Long, LocalDate> contractStartDate,
+                                   Map<Long, LocalDate> contractEndDate,
+                                   Map<Long, Integer> vipFlags,
+                                   Map<Long, Integer> limitedNums) {
         ConfirmCompanyResponse confirmCompanyResponse = new ConfirmCompanyResponse(maintenanceCompany);
+        //设置公司id
+        confirmCompanyResponse.setCompanyId(maintenanceCompany.getId());
         //设置认证时间
         if (companyIdToDealTime.size() > 0) {
             confirmCompanyResponse.setConfirmTime(companyIdToDealTime.get(maintenanceCompany.getId()));
@@ -383,6 +391,14 @@ public class MaintenanceCompanyServiceImpl extends ServiceImpl<MaintenanceCompan
         if (contractEndDate != null && contractEndDate.size() > 0) {
             confirmCompanyResponse.setContractEndDate(contractEndDate.get(maintenanceCompany.getId()));
         }
+        //设置企业是否是Vip
+        if (vipFlags != null && vipFlags.size() > 0) {
+            confirmCompanyResponse.setVipFlag(vipFlags.get(maintenanceCompany.getId()));
+        }
+        //设置企业限制台量
+        if (limitedNums != null && limitedNums.size() > 0) {
+            confirmCompanyResponse.setLimitedNum(limitedNums.get(maintenanceCompany.getId()));
+        }
         confirmCompanyResponseList.add(confirmCompanyResponse);
     }
 

+ 2 - 4
lift-system-service/src/main/java/cn/com/ty/lift/system/settings/service/impl/MtCompanyAttestationServiceImpl.java

@@ -268,15 +268,13 @@ public class MtCompanyAttestationServiceImpl extends ServiceImpl<MtCompanyAttest
     public Map<Long, LocalDateTime> getMtCompanyIdToDealTime(List<Long> companyIdList) {
         //获取公司认证信息
         List<MtCompanyAttestation> mtCompanyAttestationList = list(new QueryWrapper<MtCompanyAttestation>()
-                .select("deal_time")
+                .select("mt_company_id", "deal_time")
                 .in("mt_company_id", companyIdList)
         );
         //将信息封装为 mtCompanyId(公司id) -> dealTime(处理时间)
         Map<Long, LocalDateTime> companyIdToDealTime = new HashMap<>();
         if (mtCompanyAttestationList != null && mtCompanyAttestationList.size() > 0) {
-            mtCompanyAttestationList.forEach(mtCompanyAttestation -> {
-                companyIdToDealTime.put(mtCompanyAttestation.getMtCompanyId(), mtCompanyAttestation.getDealTime());
-            });
+            mtCompanyAttestationList.forEach(mtCompanyAttestation -> companyIdToDealTime.put(mtCompanyAttestation.getMtCompanyId(), mtCompanyAttestation.getDealTime()));
         }
         return companyIdToDealTime;
     }

+ 4 - 4
lift-system-service/src/main/resources/application-test.yml

@@ -21,7 +21,7 @@ spring:
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:
   oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i
+    endpoint: http://oss-cn-hangzhou-internal.aliyuncs.com
+    bucketName: ty-oss-file
+    accessKeyId: LTAI4G1iLTczu8JxM2En57gY
+    accessKeySecret: VHeRj3C2br87Uh447ruHsSTvYSDWeC

+ 4 - 4
lift-system-service/src/main/resources/application-web.yml

@@ -21,7 +21,7 @@ spring:
 #aliyun OSS服务配置信息,加载到SystemConfiguration
 aliyun:
   oss:
-    endpoint: http://oss-cn-beijing.aliyuncs.com
-    bucketName: temp15827479607
-    accessKeyId: LTAI4FkSqFZa6LH9HqAsVott
-    accessKeySecret: w7GXuh5tf1hduQuZ2AzT3a4q14BI1i
+    endpoint: http://oss-cn-hangzhou-internal.aliyuncs.com
+    bucketName: ty-oss-file
+    accessKeyId: LTAI4G1iLTczu8JxM2En57gY
+    accessKeySecret: VHeRj3C2br87Uh447ruHsSTvYSDWeC

+ 5 - 5
lift-upload/src/main/java/com/upload/config/AliyunOSS.java

@@ -21,12 +21,12 @@ import java.util.Objects;
 public class AliyunOSS {
 
     // Endpoint以杭州为例,其它Region请按实际情况填写。
-    private String endpoint = "http://oss-cn-beijing.aliyuncs.com";
+    private String endpoint = "http://oss-cn-hangzhou-internal.aliyuncs.com";
     // 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录 https://ram.console.aliyun.com 创建RAM账号。
-    private String accessKeyId = "LTAI4FkSqFZa6LH9HqAsVott";
-    private String accessKeySecret = "w7GXuh5tf1hduQuZ2AzT3a4q14BI1i";
+    private String accessKeyId = "LTAI4G1iLTczu8JxM2En57gY";
+    private String accessKeySecret = "VHeRj3C2br87Uh447ruHsSTvYSDWeC";
     //存储空间名
-    private String bucketName = "temp15827479607";
+    private String bucketName = "ty-oss-file";
 
     //OSSClient实例
     private OSS ossClient;
@@ -40,7 +40,7 @@ public class AliyunOSS {
                 String url = getObjectUrl(bucketName, entry.getKey());
                 log.info("upload file complete, file URL: {}", url);
                 Validate.notNull(url, ValuePool.UPLOAD_FAIL);
-                urls.add(url);
+                urls.add(url.replace("-internal", ""));
             }
             return RestResponse.success(urls);
         } catch (Exception e) {

+ 1 - 1
lift-upload/src/main/java/com/upload/controller/UploadController.java

@@ -74,7 +74,7 @@ public class UploadController {
             new Thread(futureTask).start();
             if (!futureTask.isDone())
                 log.info("task has not finished!");
-            String url = futureTask.get();
+            String url = futureTask.get().replace("-internal", "");
             log.info("upload file complete, file URL: {}", url);
             return RestResponse.success(url);
         } catch (Exception e) {