diff --git a/src/main/java/com/zhgd/xmgl/modules/project/entity/Project.java b/src/main/java/com/zhgd/xmgl/modules/project/entity/Project.java index ea879027e..c5e5cc335 100644 --- a/src/main/java/com/zhgd/xmgl/modules/project/entity/Project.java +++ b/src/main/java/com/zhgd/xmgl/modules/project/entity/Project.java @@ -325,8 +325,8 @@ public class Project implements Serializable { private Integer enableWorkerSafeWatch; @ApiModelProperty(value = "安全履职报警推送时间") private String workerSafeWatchTime; - - + @ApiModelProperty(value = "是否需要项目管理员做AI抓拍初筛") + private Integer aiAlarmNeedManageApprove; /** * runde平台token */ diff --git a/src/main/java/com/zhgd/xmgl/modules/quality/entity/QualityRectifyRecord.java b/src/main/java/com/zhgd/xmgl/modules/quality/entity/QualityRectifyRecord.java index d223ef69f..708071b96 100644 --- a/src/main/java/com/zhgd/xmgl/modules/quality/entity/QualityRectifyRecord.java +++ b/src/main/java/com/zhgd/xmgl/modules/quality/entity/QualityRectifyRecord.java @@ -82,7 +82,7 @@ public class QualityRectifyRecord implements Serializable { */ @Excel(name = "违章人员", width = 15) @ApiModelProperty(value = "违章人员") - private Long violatorId; + private String violatorId; @TableField(exist = false) private String realName; diff --git a/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityRectifyRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityRectifyRecordServiceImpl.java index 357ac99ad..d7a4ab420 100644 --- a/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityRectifyRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/quality/service/impl/QualityRectifyRecordServiceImpl.java @@ -18,7 +18,6 @@ import com.zhgd.redis.lock.redisson.DistributedLock; import com.zhgd.redis.lock.redisson.RedissonDistributedLock; import com.zhgd.xmgl.call.SanjiangDataCall; import com.zhgd.xmgl.constant.Cts; -import com.zhgd.xmgl.modules.basicdata.entity.SystemUser; import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper; import com.zhgd.xmgl.modules.basicdata.service.INoticeService; import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService; @@ -40,7 +39,6 @@ import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper; import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService; import com.zhgd.xmgl.modules.xz.entity.XzDeductScoreRecord; import com.zhgd.xmgl.modules.xz.mapper.XzDeductScoreRecordMapper; -import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityRectifyRecord; import com.zhgd.xmgl.push.config.PushPayloads; import com.zhgd.xmgl.util.TimeUtil; import org.apache.commons.collections.CollectionUtils; @@ -216,34 +214,36 @@ public class QualityRectifyRecordServiceImpl extends ServiceImpl map = new HashMap<>(16); + map.put("id", workerInfo.getId()); + map.put("deductScore", ds); + workerInfoService.updateScoreSendAuth(map); + + + //存记录 + XzDeductScoreRecord vo = new XzDeductScoreRecord(); + vo.setProjectSn(qualityInspectionRecord.getProjectSn()); + vo.setWorkerId(workerInfo.getId()); + vo.setTypeName(item.getContent()); + vo.setDeductScore(-item.getDeductScore()); + vo.setType(3); + vo.setCreateDate(new Date()); + vo.setCurScore(workerInfo.getSafeScore() - item.getDeductScore() >= 0 ? workerInfo.getSafeScore() - item.getDeductScore() : 0); + vo.setDeductReason(StrUtil.format("您在{}发现质量隐患({}-{})扣{}分", DateUtil.format(vo.getCreateDate(), "yyyy年MM月dd日HH:mm:ss"), "质量检査", vo.getTypeName() == null ? "无" : vo.getTypeName(), item.getDeductScore())); + vo.setTypeTableId(qualityInspectionRecord.getId()); + xzDeductScoreRecordMapper.insert(vo); } - - //扣分 - HashMap map = new HashMap<>(16); - map.put("id", workerInfo.getId()); - map.put("deductScore", ds); - workerInfoService.updateScoreSendAuth(map); - - - //存记录 - XzDeductScoreRecord vo = new XzDeductScoreRecord(); - vo.setProjectSn(qualityInspectionRecord.getProjectSn()); - vo.setWorkerId(workerInfo.getId()); - vo.setTypeName(item.getContent()); - vo.setDeductScore(-item.getDeductScore()); - vo.setType(3); - vo.setCreateDate(new Date()); - vo.setCurScore(workerInfo.getSafeScore() - item.getDeductScore() >= 0 ? workerInfo.getSafeScore() - item.getDeductScore() : 0); - vo.setDeductReason(StrUtil.format("您在{}发现质量隐患({}-{})扣{}分", DateUtil.format(vo.getCreateDate(), "yyyy年MM月dd日HH:mm:ss"), "质量检査", vo.getTypeName() == null ? "无" : vo.getTypeName(), item.getDeductScore())); - vo.setTypeTableId(qualityInspectionRecord.getId()); - xzDeductScoreRecordMapper.insert(vo); } diff --git a/src/main/java/com/zhgd/xmgl/modules/video/service/impl/AiAnalyseHardWareAlarmRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/video/service/impl/AiAnalyseHardWareAlarmRecordServiceImpl.java index ff33ea3f1..1a65bdc7c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/video/service/impl/AiAnalyseHardWareAlarmRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/video/service/impl/AiAnalyseHardWareAlarmRecordServiceImpl.java @@ -138,7 +138,8 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl queryAiAnalyseHardWareAlarmPageList(Map map) { @@ -262,6 +263,9 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(UserEnterprise::getUserId, userId); diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/controller/SafetyInspectionStandardBigScreenController.java b/src/main/java/com/zhgd/xmgl/modules/xz/controller/SafetyInspectionStandardBigScreenController.java index 57c4c436f..bd5e179ad 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/controller/SafetyInspectionStandardBigScreenController.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/controller/SafetyInspectionStandardBigScreenController.java @@ -11,8 +11,8 @@ import com.zhgd.xmgl.modules.xz.entity.vo.SafetyTypeScore; import com.zhgd.xmgl.modules.xz.entity.vo.SafetyTypeScoreVo; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerItemRecord; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityDangerTypeRecord; -import com.zhgd.xmgl.modules.xz.security.entity.vo.FiveScore; import com.zhgd.xmgl.modules.xz.security.entity.vo.FiveScoresVo; +import com.zhgd.xmgl.modules.xz.security.entity.vo.TenScore; import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordVo; import com.zhgd.xmgl.modules.xz.security.enums.TenSafetyTypeEnum; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityDangerItemRecordService; @@ -67,58 +67,32 @@ public class SafetyInspectionStandardBigScreenController { SafetyTypeScoreVo thisMonthScoreVo = this.getScores(new MapBuilder().put("projectSn", projectSn).put("month", DateUtil.format(new Date(), "yyyy-MM")).build()).getResult(); SafetyTypeScoreVo lastMonthScoreVo = this.getScores(new MapBuilder().put("projectSn", projectSn).put("month", DateUtil.format(DateUtil.offsetMonth(new Date(), -1), "yyyy-MM")).build()).getResult(); List safetyTypeScores = thisMonthScoreVo.getSafetyTypeScores(); - FiveScore fiveScore = new FiveScore(); - Map> fiveTypeScoreMap = new HashMap<>(16); - //5种:1安全管理、2文明施工、3施工支具【脚手架、模版支架】、4工程器械【物料提升机与施工升降机、塔式起重吊装、施工用具】、5危险作业【基坑工程、高处作业、施工用电】 + TenScore tenScore = new TenScore(); for (SafetyTypeScore safetyTypeScore : safetyTypeScores) { - int fiveType; + BigDecimal score = safetyTypeScore.getScore(); if (Objects.equals(safetyTypeScore.getTenType(), 1)) { - fiveType = 1; + tenScore.setAqgl(score); } else if (Objects.equals(safetyTypeScore.getTenType(), 2)) { - fiveType = 2; - } else if (Objects.equals(safetyTypeScore.getTenType(), 3) - || Objects.equals(safetyTypeScore.getTenType(), 6) - ) { - fiveType = 3; - } else if (Objects.equals(safetyTypeScore.getTenType(), 8) - || Objects.equals(safetyTypeScore.getTenType(), 9) - || Objects.equals(safetyTypeScore.getTenType(), 10) - ) { - fiveType = 4; - } else { - fiveType = 5; - } - List typeScores = fiveTypeScoreMap.get(fiveType); - if (typeScores == null) { - typeScores = new ArrayList<>(); - } - typeScores.add(safetyTypeScore); - fiveTypeScoreMap.putIfAbsent(fiveType, typeScores); - } - for (Map.Entry> entry : fiveTypeScoreMap.entrySet()) { - List list = entry.getValue(); - if (list.size() == 0) { - continue; - } - BigDecimal score = list.stream().map(SafetyTypeScore::getScore).reduce(BigDecimal.ZERO, BigDecimal::add); - switch (entry.getKey()) { - case 1: - fiveScore.setAqgl(score); - break; - case 2: - fiveScore.setWmsg(score); - break; - case 3: - fiveScore.setSgzj(score); - break; - case 4: - fiveScore.setGcqx(score); - break; - default: - fiveScore.setWxzy(score); + tenScore.setWmsg(score); + } else if (Objects.equals(safetyTypeScore.getTenType(), 3)) { + tenScore.setJsj(score); + } else if (Objects.equals(safetyTypeScore.getTenType(), 4)) { + tenScore.setGczy(score); + } else if (Objects.equals(safetyTypeScore.getTenType(), 5)) { + tenScore.setJkgc(score); + } else if (Objects.equals(safetyTypeScore.getTenType(), 6)) { + tenScore.setMbzj(score); + } else if (Objects.equals(safetyTypeScore.getTenType(), 7)) { + tenScore.setSgyd(score); + } else if (Objects.equals(safetyTypeScore.getTenType(), 8)) { + tenScore.setWltsj(score); + } else if (Objects.equals(safetyTypeScore.getTenType(), 9)) { + tenScore.setTsqzj(score); + } else if (Objects.equals(safetyTypeScore.getTenType(), 10)) { + tenScore.setSgjj(score); } } - vo.setThisMonthScores(fiveScore); + vo.setThisMonthScores(tenScore); vo.setMonthScore(thisMonthScoreVo.getScore()); vo.setLastMonthScore(lastMonthScoreVo.getScore()); vo.setDifferScoreRate(vo.getLastMonthScore().compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : vo.getMonthScore().subtract(vo.getLastMonthScore()).divide(vo.getLastMonthScore(), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP)); @@ -208,7 +182,7 @@ public class SafetyInspectionStandardBigScreenController { * @return */ private boolean isNeedGuarantee(String code) { - return !(Objects.equals(code,"13") || Objects.equals(code,"19")); + return !(Objects.equals(code, "13") || Objects.equals(code, "19")); } @ApiOperation(value = "获取分项检查评分表列表", notes = "获取分项检查评分表列表", httpMethod = "POST") diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/controller/XzSupplierQualificationApplyController.java b/src/main/java/com/zhgd/xmgl/modules/xz/controller/XzSupplierQualificationApplyController.java index 6b9725d57..44165dace 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/controller/XzSupplierQualificationApplyController.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/controller/XzSupplierQualificationApplyController.java @@ -1,11 +1,39 @@ package com.zhgd.xmgl.modules.xz.controller; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.execption.OpenAlertException; +import com.zhgd.xmgl.modules.basicdata.entity.SystemUser; +import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService; +import com.zhgd.xmgl.modules.basicdata.service.impl.NoticeServiceImpl; +import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise; +import com.zhgd.xmgl.modules.project.service.impl.ProjectEnterpriseServiceImpl; +import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo; +import com.zhgd.xmgl.modules.worker.entity.EnterpriseQualification; +import com.zhgd.xmgl.modules.worker.entity.ProjectEnterpriseSupplierInfo; +import com.zhgd.xmgl.modules.worker.service.IProjectEnterpriseSupplierInfoService; +import com.zhgd.xmgl.modules.worker.service.impl.EnterpriseInfoServiceImpl; +import com.zhgd.xmgl.modules.worker.service.impl.EnterpriseQualificationServiceImpl; import com.zhgd.xmgl.modules.xz.entity.XzSupplierQualificationApply; +import com.zhgd.xmgl.modules.xz.entity.XzSupplierQualificationRecord; +import com.zhgd.xmgl.modules.xz.entity.XzSupplierRecord; import com.zhgd.xmgl.modules.xz.entity.vo.XzSupplierQualificationApplyDto; import com.zhgd.xmgl.modules.xz.service.IXzSupplierQualificationApplyService; +import com.zhgd.xmgl.modules.xz.service.IXzSupplierQualificationRecordService; +import com.zhgd.xmgl.modules.xz.service.impl.XzSupplierRecordServiceImpl; +import com.zhgd.xmgl.security.JwtTokenProvider; +import com.zhgd.xmgl.util.EmailUtils; +import com.zhgd.xmgl.util.FlowUtil; +import com.zhgd.xmgl.util.MessageUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -14,11 +42,15 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.MapUtils; import org.simpleframework.xml.core.Validate; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; -import java.util.HashMap; -import java.util.List; +import java.util.*; +import java.util.stream.Collectors; /** @@ -33,8 +65,43 @@ import java.util.List; @Slf4j @Api(tags = "星纵-承包商-入场申请相关Api") public class XzSupplierQualificationApplyController { + @Lazy + @Autowired + IProjectEnterpriseSupplierInfoService projectEnterpriseSupplierInfoService; + @Lazy + @Autowired + IXzSupplierQualificationRecordService xzSupplierQualificationRecordService; + @Lazy + @Autowired + XzSupplierRecordServiceImpl xzSupplierRecordService; + @Lazy + @Autowired + NoticeServiceImpl noticeService; + @Lazy + @Autowired + ProjectEnterpriseServiceImpl projectEnterpriseService; + @Lazy + @Autowired + private EnterpriseQualificationServiceImpl enterpriseQualificationService; @Autowired private IXzSupplierQualificationApplyService xzSupplierQualificationApplyService; + @Lazy + @Autowired + private EnterpriseInfoServiceImpl enterpriseInfoService; + @Lazy + @Autowired + private EmailUtils emailUtils; + @Lazy + @Autowired + private ISystemUserService systemUserService; + @Lazy + @Autowired + private AuthenticationManager authenticationManager; + @Lazy + @Autowired + private JwtTokenProvider jwtTokenProvider; + @Value("${supplierResubmitApplicationUrl}") + private String supplierResubmitApplicationUrl; /** * 分页列表查询 @@ -136,6 +203,263 @@ public class XzSupplierQualificationApplyController { return Result.ok(); } + @OperLog(operModul = "承包商-入场申请管理", operType = "编辑", operDesc = "工作流保存承包商-入场申请") + @ApiOperation(value = "工作流保存星纵-承包商-入场申请信息", notes = "工作流保存星纵-承包商-入场申请信息", httpMethod = "POST") + @PostMapping(value = "/flow/saveInfo") + public Result saveInfoFromFlow(@RequestBody Map map) { + String paramStr = JSON.toJSONString(map); + log.info("工作流保存星纵承包商入场申请信息:{}", paramStr); + String instanceId = MapUtils.getString(map, "instanceId"); + String title = "承包商入场申请"; + try { + String enterpriseName = MapUtils.getString(map, "enterpriseName"); + String description = MapUtils.getString(map, "description"); + String enterpriseAddress = MapUtils.getString(map, "enterpriseAddress"); + String enterpriseLegalPerson = MapUtils.getString(map, "enterpriseLegalPerson"); + String legalPersonIdCard = MapUtils.getString(map, "legalPersonIdCard"); + String enterpriseSafeAllow = MapUtils.getString(map, "enterpriseSafeAllow"); + String legalPersonTel = MapUtils.getString(map, "legalPersonTel"); + String socialCode = MapUtils.getString(map, "socialCode"); + String businessNumber = MapUtils.getString(map, "businessNumber"); + String qualificationNumber = MapUtils.getString(map, "qualificationNumber"); + String enterpriseEmail = MapUtils.getString(map, "enterpriseEmail"); + String registeredCapital = MapUtils.getString(map, "registeredCapital"); + String bankname = MapUtils.getString(map, "bankname"); + String bankcardnumber = MapUtils.getString(map, "bankcardnumber"); + String bankcode = MapUtils.getString(map, "bankcode"); + String enterpriseQualificationUrl = FlowUtil.getFileUrlWithHost(map, "enterpriseQualificationUrl"); + String businessLicenseEndDate = MapUtils.getString(map, "businessLicenseEndDate"); + String registerPersonName = MapUtils.getString(map, "registerPersonName"); + String registerPersonPhoneTel = MapUtils.getString(map, "registerPersonPhoneTel"); + String enterpriseSn = MapUtils.getString(map, "enterpriseSn"); + String logo = FlowUtil.getFileUrl(map, "logo"); + String registDate = MapUtils.getString(map, "registDate"); + String businessLicenseUrl = FlowUtil.getFileUrl(map, "businessLicenseUrl"); + String projectDirectorName = MapUtils.getString(map, "projectDirectorName"); + String projectDirectorPhone = MapUtils.getString(map, "projectDirectorPhone"); + String projectSn = MapUtils.getString(map, "projectSn"); + String noticeEmail = MapUtils.getString(map, "noticeEmail"); + String ancestors = MapUtils.getString(map, "ancestors"); + Long enterpriseTypeId = Optional.ofNullable(map.get("enterpriseTypeId")).map(o -> Convert.toLong(((List) o).get(0))).orElse(null); + Long parentEnterpriseId = FlowUtil.getPullDownLong(map, "parentEnterpriseId"); + Integer enterpriseProperty = Optional.ofNullable(map.get("enterpriseProperty")).map(o -> Convert.toInt(((List) o).get(0))).orElse(null); + Integer applyStatus = MapUtils.getInteger(map, "applyStatus"); + String applyContent = Optional.ofNullable(map.get("applyContent")).map(o -> StrUtil.join(",", ((List) o).stream().map(o1 -> JSON.parseObject(o1.toString()).getString("text")).collect(Collectors.toList()))).orElse(null); + String applyUser = Optional.ofNullable(map.get("applyUser")).map(o -> { + List users = systemUserService.list(new LambdaQueryWrapper().in(SystemUser::getUserId, ((List) o).stream().distinct().collect(Collectors.toList()))); + if (CollUtil.isEmpty(users)) { + return ""; + } + return StrUtil.join(",", users.stream().map(SystemUser::getRealName).collect(Collectors.toList())); + }).orElse(""); + +// XzSupplierQualificationApply apply = new XzSupplierQualificationApply(); +// apply.setApplyTime(new Date()); +// apply.setProjectSn(projectSn); +// apply.setReplyTime(new Date()); +// apply.setApplyStatus(applyStatus); +// apply.setApplyUser(applyUser); +// apply.setApplyContent(applyContent); +// apply.setNoticeEmail(noticeEmail); +// xzSupplierQualificationApplyService.add(apply); + String sub = enterpriseName + "(信用代码:" + socialCode + ")"; + + List enterpriseSupplierInfos = Optional.ofNullable(map.get("enterpriseSupplierInfos")).map(o -> ((List) o)).orElse(null); + List qualificationRecords = Optional.ofNullable(map.get("qualificationRecords")).map(o -> ((List) o)).orElse(null); + List enterpriseSupplierInfoList = new ArrayList<>(); + if (CollUtil.isNotEmpty(enterpriseSupplierInfos)) { + for (Object supplierInfo : enterpriseSupplierInfos) { + Map map1 = (Map) supplierInfo; + String projectManage = MapUtils.getString(map1, "field1889813380500"); + String longitude = FlowUtil.getLongitude(map1, "field5527613416017"); + String latitude = FlowUtil.getLongitude(map1, "field5527613416017"); + String projectNumber = MapUtils.getString(map1, "field3597413394967"); + String projectAcreage = MapUtils.getString(map1, "field8382113460000"); + String startWorkDate = MapUtils.getString(map1, "field3279513473516"); + String projectTel = MapUtils.getString(map1, "field3163913488700"); + String layoutImage = FlowUtil.getJSONString(map1, "field7572613509085"); + String constructionMapUrl = FlowUtil.getJSONString(map1, "field7824213496616"); + String cbsName = MapUtils.getString(map1, "field4214913364183"); + String projectBuildArea = MapUtils.getString(map1, "field8585413374585"); + Integer projectType = Optional.ofNullable(map1.get("field5423413438783")).map(o -> Convert.toInt(((List) o).get(0))).orElse(null); + Integer structureType = Optional.ofNullable(map1.get("field7147513453452")).map(o -> Convert.toInt(((List) o).get(0))).orElse(null); + Integer bulidStatus = Optional.ofNullable(map1.get("field9109313465100")).map(o -> Convert.toInt(((List) o).get(0))).orElse(null); + Integer constructionStage = Optional.ofNullable(map1.get("field7511013402167")).map(o -> Convert.toInt(((List) o).get(0))).orElse(null); + Integer cbsProjectType = Optional.ofNullable(map1.get("field6358113386450")).map(o -> Convert.toInt(((List) o).get(0))).orElse(null); + Date completionDate = Optional.ofNullable(map1.get("field5019213481082")).map(o -> DateUtil.parse(o.toString())).orElse(null); + + ProjectEnterpriseSupplierInfo enterpriseSupplierInfo = new ProjectEnterpriseSupplierInfo(); + enterpriseSupplierInfo.setProjectSn(projectSn); + enterpriseSupplierInfo.setProjectManage(projectManage); + enterpriseSupplierInfo.setLongitude(longitude); + enterpriseSupplierInfo.setLatitude(latitude); + enterpriseSupplierInfo.setProjectNumber(projectNumber); + enterpriseSupplierInfo.setProjectAcreage(projectAcreage); + enterpriseSupplierInfo.setStartWorkDate(startWorkDate); + enterpriseSupplierInfo.setProjectTel(projectTel); + enterpriseSupplierInfo.setProjectType(projectType); + enterpriseSupplierInfo.setStructureType(structureType); + enterpriseSupplierInfo.setBulidStatus(bulidStatus); + enterpriseSupplierInfo.setConstructionStage(constructionStage); + enterpriseSupplierInfo.setLayoutImage(layoutImage); + enterpriseSupplierInfo.setConstructionMapUrl(constructionMapUrl); + enterpriseSupplierInfo.setCbsName(cbsName); + enterpriseSupplierInfo.setProjectBuildArea(projectBuildArea); + enterpriseSupplierInfo.setCompletionDate(completionDate); + enterpriseSupplierInfo.setCbsProjectType(cbsProjectType); + enterpriseSupplierInfo.setType(2); +// enterpriseSupplierInfo.setXzSupplierQualificationApplyId(apply.getId()); + enterpriseSupplierInfoList.add(enterpriseSupplierInfo); + } + } + + List qualificationRecordList = new ArrayList<>(); + if (CollUtil.isNotEmpty(qualificationRecords)) { + for (Object qr : qualificationRecords) { + Map map1 = (Map) qr; + String fileName = MapUtils.getString(map1, "field1715913568733"); + String fileNumber = MapUtils.getString(map1, "field1910713590018"); + String fileUrl = FlowUtil.getFileUrl(map1, "field1080013606067"); + String remarks = MapUtils.getString(map1, "field2502513615584"); + String originFileName = FlowUtil.getFileOriginFileName(map1, "field1080013606067"); + Integer qualificationType = Optional.ofNullable(map1.get("field4809313565733")).map(o -> Convert.toInt(((List) o).get(0))).orElse(null); + + XzSupplierQualificationRecord qualificationRecord = new XzSupplierQualificationRecord(); +// qualificationRecord.setXzSupplierQualificationApplyId(apply.getId()); + qualificationRecord.setFileName(fileName); + qualificationRecord.setFileNumber(fileNumber); + qualificationRecord.setFileUrl(fileUrl); + qualificationRecord.setRemarks(remarks); + qualificationRecord.setOriginFileName(originFileName); + qualificationRecord.setQualificationType(qualificationType); + qualificationRecordList.add(qualificationRecord); + } + } + + EnterpriseInfo existEnterpriseInfo = enterpriseInfoService.getOne(new LambdaQueryWrapper().eq(EnterpriseInfo::getSocialCode, socialCode)); + if (existEnterpriseInfo != null) { + List projectEnterpriseList = projectEnterpriseService.list(new LambdaQueryWrapper() + .eq(ProjectEnterprise::getEnterpriseId, existEnterpriseInfo.getId()) + .eq(ProjectEnterprise::getProjectSn, projectSn)); + if (CollUtil.isNotEmpty(projectEnterpriseList)) { + String msg = sub + "已存在"; + noticeService.addProjectLevelNotice(projectSn, title, msg, "1", null); + emailUtils.sendSimpleMail(noticeEmail, sub + "入场审批不通过", msg); + return Result.ok(); + } + } + +// List mustHave = Arrays.asList(1, 2, 3); +// Set set = qualificationRecordList.stream().filter(x -> mustHave.contains(x.getQualificationType())).map(XzSupplierQualificationRecord::getQualificationType).collect(Collectors.toSet()); +// int i = 3; +// if (CollUtil.isEmpty(qualificationRecordList) || set.size() < i) { +// throw new OpenAlertException("资质文件的资质类型的(安全协议、劳务分包合同、施工合同必须都要上传"); +// } + +// List supplierApprovalList = xzSupplierQualificationApplyService.getSupplierApprovalList(projectSn, socialCode); +// long c1 = supplierApprovalList.stream().filter(apply1 -> Objects.equals(apply1.getApplyStatus(), 1)).count(); +// if (c1 > 0) { +// String msg = "该承包商(信用代码:" + socialCode + ")待审核中"; +// noticeService.addProjectLevelNotice(projectSn, "承包商入场审核", msg, "1", null); +// return Result.ok(); +// } +// long c2 = supplierApprovalList.stream().filter(apply1 -> Objects.equals(apply1.getApplyStatus(), 2)).count(); +// if (c2 > 0) { +// String msg = "该承包商(信用代码:" + socialCode + ")已审核通过"; +// noticeService.addProjectLevelNotice(projectSn, "承包商入场审核", msg, "1", null); +// return Result.ok(); +// } + + XzSupplierRecord supplierRecord = new XzSupplierRecord(); + supplierRecord.setEnterpriseName(enterpriseName); + supplierRecord.setDescription(description); + supplierRecord.setEnterpriseAddress(enterpriseAddress); + supplierRecord.setEnterpriseLegalPerson(enterpriseLegalPerson); + supplierRecord.setLegalPersonIdCard(legalPersonIdCard); + supplierRecord.setEnterpriseSafeAllow(enterpriseSafeAllow); + supplierRecord.setEnterpriseProperty(enterpriseProperty); + supplierRecord.setLegalPersonTel(legalPersonTel); + supplierRecord.setSocialCode(socialCode); + supplierRecord.setBusinessNumber(businessNumber); + supplierRecord.setQualificationNumber(qualificationNumber); + supplierRecord.setEnterpriseEmail(enterpriseEmail); + supplierRecord.setRegisteredCapital(registeredCapital); + supplierRecord.setBankname(bankname); + supplierRecord.setBankcardnumber(bankcardnumber); + supplierRecord.setBankcode(bankcode); + supplierRecord.setEnterpriseQualificationUrl(enterpriseQualificationUrl); + supplierRecord.setBusinessLicenseEndDate(businessLicenseEndDate); + supplierRecord.setRegisterPersonName(registerPersonName); + supplierRecord.setRegisterPersonPhoneTel(registerPersonPhoneTel); + supplierRecord.setEnterpriseSn(enterpriseSn); + supplierRecord.setLogo(logo); + supplierRecord.setRegistDate(registDate); + supplierRecord.setBusinessLicenseUrl(businessLicenseUrl); +// supplierRecord.setXzSupplierQualificationApplyId(apply.getId()); + supplierRecord.setEnterpriseTypeId(enterpriseTypeId); + supplierRecord.setProjectDirectorName(projectDirectorName); + supplierRecord.setProjectDirectorPhone(projectDirectorPhone); + supplierRecord.setAncestors(ancestors); + supplierRecord.setType(1); + supplierRecord.setParentEnterpriseId(parentEnterpriseId); + supplierRecord.setSortNum(0); + supplierRecord.setDepartmentType(2); + xzSupplierRecordService.save(supplierRecord); + +// if (CollUtil.isNotEmpty(qualificationRecords)) { +// xzSupplierQualificationRecordService.saveBatch(qualificationRecordList); +// } + + String url = supplierResubmitApplicationUrl + "?token=" + getFlowStartUserToken().getResult() + "&sn=" + projectSn + "&instanceId=" + instanceId; + if (Objects.equals(applyStatus, 2)) { + //通过,添加到正式的数据中 + EnterpriseInfo enterpriseInfo = BeanUtil.copyProperties(supplierRecord, EnterpriseInfo.class); + enterpriseInfo.setProjectSn(projectSn); + try { + enterpriseInfoService.saveEnterpriseInfo(enterpriseInfo); + } catch (OpenAlertException e) { + log.error("工作流保存星纵承包商入场申请信息校验异常:", e); + noticeService.addProjectLevelNotice(projectSn, title, sub + "审核不通过," + e.getMessage(), "1", null); + emailUtils.sendSimpleMail(noticeEmail, sub + "入场审批不通过", + StrUtil.format(e.getMessage() + ",重新提交申请链接(点击链接补充资质):{}", applyContent, url)); + return Result.ok(); + } + if (CollUtil.isNotEmpty(qualificationRecordList)) { + List copyToList = BeanUtil.copyToList(qualificationRecordList, EnterpriseQualification.class); + for (EnterpriseQualification qualification : copyToList) { + qualification.setId(null); + qualification.setEnterpriseId(enterpriseInfo.getId()); + } + enterpriseQualificationService.saveBatch(copyToList); + } + if (CollUtil.isNotEmpty(enterpriseSupplierInfos)) { + enterpriseSupplierInfoList.stream().forEach(projectEnterpriseSupplierInfo -> projectEnterpriseSupplierInfo.setEnterpriseId(enterpriseInfo.getId())); +// projectEnterpriseSupplierInfoService.saveBatch(enterpriseSupplierInfoList); + List copyToList = BeanUtil.copyToList(enterpriseSupplierInfoList, ProjectEnterpriseSupplierInfo.class); + for (ProjectEnterpriseSupplierInfo info : copyToList) { + info.setId(null); + info.setXzSupplierQualificationApplyId(null); + info.setType(2); + info.setEnterpriseId(enterpriseInfo.getId()); + } + projectEnterpriseSupplierInfoService.saveBatch(copyToList); + } + noticeService.addProjectLevelNotice(projectSn, title, sub + "审核通过", "1", null); + emailUtils.sendSimpleMail(noticeEmail, sub + "入场审批通过", sub + "入场审批通过"); + } else if (Objects.equals(applyStatus, 3)) { + //驳回 + String msg = sub + "审核不通过"; + noticeService.addProjectLevelNotice(projectSn, title, msg, "1", null); + emailUtils.sendSimpleMail(noticeEmail, sub + "入场审批不通过", + StrUtil.format(msg + ",审批回复:{}\r\n重新提交申请链接(点击链接补充资质):{}", applyContent, url)); + } + } catch (Exception e) { + log.error("工作流保存星纵承包商入场申请信息异常:", e); +// emailUtils.saveExceptionAndSendFlowEmail(paramStr, e, "工作流保存星纵承包商入场申请信息异常", "/xmgl/xzSupplierQualificationApply/flow/saveInfo", instanceId); + } + return Result.ok(); + } + @OperLog(operModul = "承包商-入场申请管理", operType = "审批通过", operDesc = "审批通过") @ApiOperation(value = "审批通过", notes = "审批通过", httpMethod = "POST") @PostMapping(value = "/pass") @@ -152,5 +476,19 @@ public class XzSupplierQualificationApplyController { return Result.ok(); } + @OperLog(operModul = "承包商-入场申请管理", operType = "查询", operDesc = "工作流发起人的查询token") + @ApiOperation(value = "工作流发起人的查询token", notes = "工作流发起人的查询token", httpMethod = "GET") + @GetMapping(value = "/flow/start/token") + public Result getFlowStartUserToken() { + String account = "工作流发起人勿删"; + SystemUser systemUser = systemUserService.getOne(new LambdaUpdateWrapper().eq(SystemUser::getAccount, account)); + if (systemUser == null) { + throw new OpenAlertException(MessageUtil.get("notFindErr")); + } + authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(systemUser.getAccount(), systemUser.getShowPassword())); + String token = jwtTokenProvider.createToken(systemUser.getAccount(), 60 * 60 * 24); + return Result.success(token); + } + } diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/XzSecurityQualityRectifyRecord.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/XzSecurityQualityRectifyRecord.java index 47c05d57a..0b499988b 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/XzSecurityQualityRectifyRecord.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/XzSecurityQualityRectifyRecord.java @@ -83,7 +83,7 @@ public class XzSecurityQualityRectifyRecord implements Serializable { */ @Excel(name = "违章人员", width = 15) @ApiModelProperty(value = "违章人员") - private Long violatorId; + private String violatorId; @TableField(exist = false) private String realName; diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/FiveScore.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/FiveScore.java deleted file mode 100644 index 8cf30d874..000000000 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/FiveScore.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.zhgd.xmgl.modules.xz.security.entity.vo; - -import lombok.Data; - -import java.math.BigDecimal; - -@Data -public -class FiveScore { - private BigDecimal aqgl; - private BigDecimal wmsg; - private BigDecimal sgzj; - private BigDecimal gcqx; - private BigDecimal wxzy; -} diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/FiveScoresVo.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/FiveScoresVo.java index b496fea40..69e4ce6db 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/FiveScoresVo.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/FiveScoresVo.java @@ -10,5 +10,5 @@ class FiveScoresVo { private BigDecimal monthScore; private BigDecimal lastMonthScore; private BigDecimal differScoreRate; - private FiveScore thisMonthScores; + private TenScore thisMonthScores; } diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/TenScore.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/TenScore.java new file mode 100644 index 000000000..b5713bd78 --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/entity/vo/TenScore.java @@ -0,0 +1,31 @@ +package com.zhgd.xmgl.modules.xz.security.entity.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public +class TenScore { + @ApiModelProperty("安全管理") + private BigDecimal aqgl; + @ApiModelProperty("文明施工") + private BigDecimal wmsg; + @ApiModelProperty("脚手架") + private BigDecimal jsj; + @ApiModelProperty("基坑工程") + private BigDecimal jkgc; + @ApiModelProperty("模板支架") + private BigDecimal mbzj; + @ApiModelProperty("物料提升机") + private BigDecimal wltsj; + @ApiModelProperty("塔式起重机") + private BigDecimal tsqzj; + @ApiModelProperty("高处作业") + private BigDecimal gczy; + @ApiModelProperty("施工用电") + private BigDecimal sgyd; + @ApiModelProperty("施工机具") + private BigDecimal sgjj; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/service/impl/XzSecurityQualityRectifyRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/security/service/impl/XzSecurityQualityRectifyRecordServiceImpl.java index 3c68bbc45..49b668b55 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/service/impl/XzSecurityQualityRectifyRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/service/impl/XzSecurityQualityRectifyRecordServiceImpl.java @@ -17,7 +17,6 @@ import com.gexin.fastjson.JSONObject; import com.zhgd.redis.lock.redisson.DistributedLock; import com.zhgd.xmgl.call.SanjiangDataCall; import com.zhgd.xmgl.constant.Cts; -import com.zhgd.xmgl.modules.basicdata.entity.SystemUser; import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper; import com.zhgd.xmgl.modules.basicdata.service.INoticeService; import com.zhgd.xmgl.modules.basicdata.service.impl.SystemUserServiceImpl; @@ -209,33 +208,35 @@ public class XzSecurityQualityRectifyRecordServiceImpl extends ServiceImpl map = new HashMap<>(16); + map.put("id", workerInfo.getId()); + map.put("deductScore", ds); + workerInfoService.updateScoreSendAuth(map); + + //存记录 + XzDeductScoreRecord vo = new XzDeductScoreRecord(); + vo.setProjectSn(hiddenDangerInspectRecord.getProjectSn()); + vo.setWorkerId(workerInfo.getId()); + vo.setTypeName(item.getContent()); + vo.setDeductScore(-item.getDeductScore()); + vo.setType(1); + vo.setCreateDate(new Date()); + vo.setCurScore(workerInfo.getSafeScore() - item.getDeductScore() >= 0 ? workerInfo.getSafeScore() - item.getDeductScore() : 0); + vo.setDeductReason(StrUtil.format("您在{}发现安全隐患({}-{})扣{}分", DateUtil.format(vo.getCreateDate(), "yyyy年MM月dd日HH:mm:ss"), "安全检査", vo.getTypeName() == null ? "无" : vo.getTypeName(), item.getDeductScore())); + vo.setTypeTableId(hiddenDangerInspectRecord.getId()); + xzDeductScoreRecordMapper.insert(vo); } - - //扣分 - HashMap map = new HashMap<>(16); - map.put("id", workerInfo.getId()); - map.put("deductScore", ds); - workerInfoService.updateScoreSendAuth(map); - - //存记录 - XzDeductScoreRecord vo = new XzDeductScoreRecord(); - vo.setProjectSn(hiddenDangerInspectRecord.getProjectSn()); - vo.setWorkerId(workerInfo.getId()); - vo.setTypeName(item.getContent()); - vo.setDeductScore(-item.getDeductScore()); - vo.setType(1); - vo.setCreateDate(new Date()); - vo.setCurScore(workerInfo.getSafeScore() - item.getDeductScore() >= 0 ? workerInfo.getSafeScore() - item.getDeductScore() : 0); - vo.setDeductReason(StrUtil.format("您在{}发现安全隐患({}-{})扣{}分", DateUtil.format(vo.getCreateDate(), "yyyy年MM月dd日HH:mm:ss"), "安全检査", vo.getTypeName() == null ? "无" : vo.getTypeName(), item.getDeductScore())); - vo.setTypeTableId(hiddenDangerInspectRecord.getId()); - xzDeductScoreRecordMapper.insert(vo); } @Override diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/service/IXzSupplierQualificationApplyService.java b/src/main/java/com/zhgd/xmgl/modules/xz/service/IXzSupplierQualificationApplyService.java index 167431b1b..e72d43817 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/service/IXzSupplierQualificationApplyService.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/service/IXzSupplierQualificationApplyService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.zhgd.xmgl.modules.xz.entity.XzSupplierQualificationApply; import com.zhgd.xmgl.modules.xz.entity.vo.XzSupplierQualificationApplyDto; +import org.apache.ibatis.annotations.Param; import java.util.HashMap; import java.util.List; @@ -72,4 +73,13 @@ public interface IXzSupplierQualificationApplyService extends IService getSupplierApprovalList(String projectSn, String socialCode); + } diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/service/impl/XzSupplierQualificationApplyServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/service/impl/XzSupplierQualificationApplyServiceImpl.java index a10d3ef94..737b6b9d5 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/service/impl/XzSupplierQualificationApplyServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/service/impl/XzSupplierQualificationApplyServiceImpl.java @@ -287,4 +287,9 @@ public class XzSupplierQualificationApplyServiceImpl extends ServiceImpl getSupplierApprovalList(String projectSn, String socialCode) { + return baseMapper.getSupplierApprovalList(projectSn, socialCode); + } + } diff --git a/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java b/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java index b74877e16..68f7b1653 100644 --- a/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java +++ b/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java @@ -80,6 +80,9 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { http.authorizeRequests() //请求路径允许访问 + .antMatchers("/xmgl/constructionEquipmentTool/flow/add").permitAll() + .antMatchers("/xmgl/xzSupplierQualificationApply/flow/start/token").permitAll() + .antMatchers("/xmgl/xzSupplierQualificationApply/flow/saveInfo").permitAll() .antMatchers("/xmgl/pouringOrderLedger/flow/add").permitAll() .antMatchers("/xmgl/qualityCommonProblemRecord/flow/add").permitAll() .antMatchers("/xmgl/liftingOperation/flow/add").permitAll() diff --git a/src/main/java/com/zhgd/xmgl/util/FlowUtil.java b/src/main/java/com/zhgd/xmgl/util/FlowUtil.java new file mode 100644 index 000000000..e73bb9b7d --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/util/FlowUtil.java @@ -0,0 +1,88 @@ +package com.zhgd.xmgl.util; + +import cn.hutool.core.convert.Convert; +import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSON; +import org.apache.commons.collections.MapUtils; + +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +public class FlowUtil { + + + /** + * 获取文件url + * + * @param map + * @param key + * @return + */ + public static String getFileUrl(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> ((Map) ((List) o).get(0)).get("url").toString()).orElse(null); + } + + /** + * 获取文件url完整链接 + * + * @param map + * @param key + * @return + */ + public static String getFileUrlWithHost(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> PathUtil.getServerUrl() + "/image/" + ((Map) ((List) o).get(0)).get("url").toString()).orElse(null); + } + + /** + * 获取文件原来的名称 + * + * @param map + * @param key + * @return + */ + public static String getFileOriginFileName(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> ((Map) ((List) o).get(0)).get("name").toString()).orElse(null); + } + + /** + * 获取下拉Long + * + * @param map + * @param key + * @return + */ + public static Long getPullDownLong(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> Convert.toLong(((List) o).get(0))).orElse(null); + } + + public static Date getDate(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> DateUtil.parse(o.toString())).orElse(null); + } + + public static String getJSONString(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(JSON::toJSONString).orElse(null); + } + + public static List getList(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> ((List) o)).orElse(null); + } + + public static String getString(Map map, String key) { + return MapUtils.getString(map, key); + } + + public static Integer getPullDownInteger(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> Convert.toInt(((List) o).get(0))).orElse(null); + } + + public static String getLongitude(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> JSON.parseObject(o.toString()).getString("lng")).orElse(null); + } + + public static String getLatitude(Map map, String key) { + return Optional.ofNullable(map.get(key)).map(o -> JSON.parseObject(o.toString()).getString("lat")).orElse(null); + } + +} diff --git a/src/main/java/com/zhgd/xmgl/util/PathUtil.java b/src/main/java/com/zhgd/xmgl/util/PathUtil.java index cd774d541..7209289c8 100644 --- a/src/main/java/com/zhgd/xmgl/util/PathUtil.java +++ b/src/main/java/com/zhgd/xmgl/util/PathUtil.java @@ -8,6 +8,7 @@ import org.springframework.stereotype.Component; public class PathUtil { private static String basePath; + private static String serverUrl; /** * 删除多余的斜杠 @@ -18,6 +19,25 @@ public class PathUtil { return path.replaceAll("([^:])(//+)", "$1/"); } + public static String getBasePath() { + return StrUtil.removeSuffix(basePath, "/"); + } + + @Value("${basePath}") + public void setBasePath(String basePath) { + PathUtil.basePath = basePath; + } + + public static String getServerUrl() { + return StrUtil.removeSuffix(serverUrl, "/"); + } + + @Value("${serverUrl}") + public void setServerUrl(String serverUrl) { + PathUtil.serverUrl = serverUrl; + } + + public static void main(String[] args) { System.out.println(reviseSlash("/home//foo/")); System.out.println(reviseSlash("/home/foo/")); @@ -27,12 +47,4 @@ public class PathUtil { System.out.println(reviseSlash("http://192.168.34.221:9111/image//65e5733735f013f4cc322278.jpg")); } - public static String getBasePath() { - return StrUtil.removeSuffix(basePath, "/"); - } - - @Value("${basePath}") - public void setBasePath(String basePath) { - PathUtil.basePath = basePath; - } } diff --git a/src/main/resources/application-gsx-t-dev.properties b/src/main/resources/application-gsx-t-dev.properties index 1ed12256f..a8b4404b5 100644 --- a/src/main/resources/application-gsx-t-dev.properties +++ b/src/main/resources/application-gsx-t-dev.properties @@ -100,3 +100,5 @@ magic-api.resource.location=C:/jxj/prod/backEnd/itbgpImage/data/magic-api upload.image.url.prefix=http://182.90.224.237:51234/image/ #内网的服务图片的url前缀 xingzong.inner.upload.image.url.prefix=http://10.168.2.104:9809/image/ +#承包商重新提交申请链接(点击链接补充资质) +supplierResubmitApplicationUrl=http://192.168.34.175:88/#/workspace/contractorApply diff --git a/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar b/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar index 997c0b23a..8950d2780 100644 Binary files a/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar and b/src/main/resources/lib/wflow-server-1.0-SNAPSHOT.jar differ