diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml index 5526e323..bf45ba6f 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml @@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" psu.remark,psu.face_guid,sd.dept_name com_name,psu.work_type from pro_project_info_subdepts_users psu left join pro_project_info pi on pi.id = psu.project_id - join pro_project_info_subdepts pdept on psu.sub_dept_id=pdept.id + left join pro_project_info_subdepts pdept on psu.sub_dept_id=pdept.id left join sys_dept sd on sd.dept_id = psu.com_id left join sys_dict_data dic1 on psu.`craft_type`=dic1.`dict_value` and dic1.`dict_type`='pro_craft_type' left join sys_dict_data dic2 on psu.`craft_post`=dic2.`dict_value` and dic2.`dict_type`='pro_craft_post' diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/TowerCraneApiController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/TowerCraneApiController.java index 547d73a0..9f5abc4e 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/TowerCraneApiController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/TowerCraneApiController.java @@ -2,7 +2,6 @@ package com.yanzhu.manage.controller.device; import com.alibaba.fastjson2.JSON; import com.yanzhu.common.core.annotation.RateLimiter; -import com.yanzhu.common.core.constant.CacheConstants; import com.yanzhu.common.core.enums.LimitType; import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.text.Convert; @@ -10,7 +9,10 @@ import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.core.web.domain.AjaxResult; import com.yanzhu.common.redis.service.RedisService; import com.yanzhu.device.domain.*; -import com.yanzhu.manage.domain.TowerReqVo; +import com.yanzhu.manage.domain.vo.TowerReqVo; +import com.yanzhu.manage.domain.vo.TyTowerRoundReqVO; +import com.yanzhu.manage.domain.vo.TyTowerRunReqVO; +import com.yanzhu.manage.domain.vo.TyTowerWarningReqVO; import com.yanzhu.manage.enums.HttpStatusEnum; import com.yanzhu.manage.enums.TowerTypeEnums; import com.yanzhu.manage.service.*; @@ -23,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.validation.Valid; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -58,12 +61,16 @@ public class TowerCraneApiController { @Autowired private IDevTowerDataCollideService devTowerDataCollideService; + @Autowired + private IDevTowerDataWarningService devTowerDataWarningService; + @Autowired private IDevTowerProjectConfigService devTowerProjectConfigService; /** * 塔吊监测++ * 限流规则[60秒内最多请求10次,限流策略IP] + * * @param req 请求信息 * @author JiangYuQi * @date 2024-01-13 @@ -72,31 +79,32 @@ public class TowerCraneApiController { @RateLimiter(count = 10, limitType = LimitType.IP) @PostMapping("/v1/push") public AjaxResult pushData(@Validated @RequestBody TowerReqVo req) { - DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER+req.getContent().getDeviceKey()); - if(config==null){ + DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER + req.getContent().getDeviceKey()); + if (config == null) { throw new ServiceException(HttpStatusEnum.DARA_EXCEPTION.getInfo(), HttpStatusEnum.DARA_EXCEPTION.getCode()); } - if(req.getType() == TowerTypeEnums.BASE.getCode()){ - this.pushConfigData(config,req); - }else if(req.getType() == TowerTypeEnums.RUN.getCode()){ - this.pushRunData(config,req); - }else if(req.getType() == TowerTypeEnums.ROUND.getCode()){ - this.pushRoundData(config,req); - }else if(req.getType() == TowerTypeEnums.COLLIDE.getCode()){ - this.pushCollideData(config,req); - }else if(req.getType() == TowerTypeEnums.LIMIT.getCode()){ - this.pushLimitData(config,req); - }else if(req.getType() == TowerTypeEnums.LOCAL.getCode()){ - this.pushLocalData(config,req); + if (req.getType() == TowerTypeEnums.BASE.getCode()) { + this.pushConfigData(config, req); + } else if (req.getType() == TowerTypeEnums.RUN.getCode()) { + this.pushRunData(config, req); + } else if (req.getType() == TowerTypeEnums.ROUND.getCode()) { + this.pushRoundData(config, req); + } else if (req.getType() == TowerTypeEnums.COLLIDE.getCode()) { + this.pushCollideData(config, req); + } else if (req.getType() == TowerTypeEnums.LIMIT.getCode()) { + this.pushLimitData(config, req); + } else if (req.getType() == TowerTypeEnums.LOCAL.getCode()) { + this.pushLocalData(config, req); } return AjaxResult.success(); } /** * 塔机上报基本信息 + * * @param req */ - private void pushConfigData(DevTowerProjectConfig config,TowerReqVo req){ + private void pushConfigData(DevTowerProjectConfig config, TowerReqVo req) { DevTowerProjectConfig devTowerProjectConfig = devTowerProjectConfigService.selectDevTowerProjectConfigById(config.getId()); Map dataContent = req.getContent().getDataContent(); devTowerProjectConfig.setTowerId(Convert.toStr(dataContent.get("towerId"))); @@ -113,9 +121,10 @@ public class TowerCraneApiController { /** * 塔机上报实时数据 + * * @param req */ - private static void pushRunData(DevTowerProjectConfig config,TowerReqVo req){ + private void pushRunData(DevTowerProjectConfig config, TowerReqVo req) { DevTowerDataRun devTowerDataRun = new DevTowerDataRun(); Map dataContent = req.getContent().getDataContent(); devTowerDataRun.setCfgId(config.getId()); @@ -141,33 +150,34 @@ public class TowerCraneApiController { devTowerDataRun.setRangeSensorState(Convert.toStr(dataContent.get("rangeSensorState"))); devTowerDataRun.setHeightSensorState(Convert.toStr(dataContent.get("heightSensorState"))); devTowerDataRun.setBrakingStatus(Convert.toStr(dataContent.get("brakingStatus"))); - if(dataContent.get("warnings")!=null){ - List warnings = (List)dataContent.get("warnings"); + if (dataContent.get("warnings") != null) { + List warnings = (List) dataContent.get("warnings"); devTowerDataRun.setWarnings(String.join(",", warnings)); - for(String warning:warnings){ + for (String warning : warnings) { + pushWarningData(config, warning); Integer alarm = Convert.toInt(warning); - if(alarm>100 && alarm<120){ + if (alarm > 100 && alarm < 120) { devTowerDataRun.setIsAlarm(1L); } } } - System.out.println(devTowerDataRun); - //devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun); + devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun); } public static void main(String[] args) { String str = "{\"type\":111,\"content\":{\"time\":1496263304,\"dataType\":113001,\"deviceKey\":\"jycw6\",\"dataContent\":{\"height\":\"4.1\",\"range\": \"21.9\",\"rotation\": \"171.0\",\"load\": \"0.0\",\"windSpeed\": \"0.0\",\"leanAngleX\":\"0.5\",\"leanAngley\":\"0.0\",\"loadPercent\":\"0\", \"mome ntPercent\":\"0\",\"windSpeedPercent\":\"0\",\"leanAnglePercent\": \"0\", \"warnings\": [\"0\"],\"rate\":\"2\",\"rotationSensorState\":\"1\",\"loadSensorState\": \"1\",\"windSpeedSensorState\": \"1\",\"leanAngleSensorState\":\"1\",\"rangeSensorState\":\"1\",\"heightSensorState\":\"1\",\"bra kingStatus\":\"0\"}}}"; - TowerReqVo req = JSON.parseObject(str,TowerReqVo.class); + TowerReqVo req = JSON.parseObject(str, TowerReqVo.class); System.out.println(req); DevTowerProjectConfig config = new DevTowerProjectConfig(); - pushRunData(config,req); + //pushRunData(config,req); } /** * 塔机上报循环数据 + * * @param req */ - private void pushRoundData(DevTowerProjectConfig config,TowerReqVo req){ + private void pushRoundData(DevTowerProjectConfig config, TowerReqVo req) { DevTowerDataRound devTowerDataRound = new DevTowerDataRound(); Map dataContent = req.getContent().getDataContent(); devTowerDataRound.setCfgId(config.getId()); @@ -199,15 +209,16 @@ public class TowerCraneApiController { devTowerDataRound.setEndLeanAngleX(Convert.toStr(dataContent.get("endLeanAngleX"))); devTowerDataRound.setStartLeanAngleY(Convert.toStr(dataContent.get("startleanAngleY"))); devTowerDataRound.setEndLeanAngleY(Convert.toStr(dataContent.get("endLeanAngleY"))); - if(dataContent.get("warning")!=null){ - List warnings = (List)dataContent.get("warning"); + if (dataContent.get("warning") != null) { + List warnings = (List) dataContent.get("warning"); devTowerDataRound.setWarnings(String.join(",", warnings)); - for(String warning:warnings){ + for (String warning : warnings) { + pushWarningData(config, warning); Integer alarm = Convert.toInt(warning); - if(alarm>6 && alarm<10){ + if (alarm > 6 && alarm < 10) { devTowerDataRound.setIsOverload(1L); } - if(alarm>100 && alarm<120){ + if (alarm > 100 && alarm < 120) { devTowerDataRound.setIsAlarm(1L); } } @@ -215,11 +226,28 @@ public class TowerCraneApiController { devTowerDataRoundService.insertDevTowerDataRound(devTowerDataRound); } + /** + * 保存预警数据 + * + * @param config + * @param warning + */ + private void pushWarningData(DevTowerProjectConfig config, Object warning) { + DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning(); + devTowerDataWarning.setCfgId(config.getId()); + devTowerDataWarning.setProjectId(config.getProjectId()); + devTowerDataWarning.setComId(config.getComId()); + devTowerDataWarning.setDeviceKey(config.getDeviceSn()); + devTowerDataWarning.setWarnType(Convert.toLong(warning)); + devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning); + } + /** * 塔机上报碰撞信息 + * * @param req */ - private void pushCollideData(DevTowerProjectConfig config,TowerReqVo req){ + private void pushCollideData(DevTowerProjectConfig config, TowerReqVo req) { DevTowerDataCollide devTowerDataCollide = new DevTowerDataCollide(); Map dataContent = req.getContent().getLocalDeviceInfo(); devTowerDataCollide.setCfgId(config.getId()); @@ -239,8 +267,8 @@ public class TowerCraneApiController { devTowerDataCollide.setAlarmWarningDistance(Convert.toStr(dataContent.get("alarmWarningDistance"))); devTowerDataCollide.setContourValue(Convert.toStr(dataContent.get("contourValue"))); List devTowerDataCollideDetailList = new ArrayList<>(); - if(StringUtils.isNotEmpty(req.getContent().getCollideTowers())){ - for (Map collideTowers:req.getContent().getCollideTowers()){ + if (StringUtils.isNotEmpty(req.getContent().getCollideTowers())) { + for (Map collideTowers : req.getContent().getCollideTowers()) { DevTowerDataCollideDetail devTowerDataCollideDetail = new DevTowerDataCollideDetail(); devTowerDataCollideDetail.setTowerId(Convert.toStr(collideTowers.get("towerId"))); devTowerDataCollideDetail.setCoordinateX(Convert.toStr(collideTowers.get("coordinateX"))); @@ -263,9 +291,10 @@ public class TowerCraneApiController { /** * 塔机上报限位信息 + * * @param req */ - private void pushLimitData(DevTowerProjectConfig config,TowerReqVo req){ + private void pushLimitData(DevTowerProjectConfig config, TowerReqVo req) { DevTowerDataLimit devTowerDataLimit = new DevTowerDataLimit(); Map dataContent = req.getContent().getDataContent(); devTowerDataLimit.setCfgId(config.getId()); @@ -312,9 +341,10 @@ public class TowerCraneApiController { /** * 塔机上报标定位信息 + * * @param req */ - private void pushLocalData(DevTowerProjectConfig config,TowerReqVo req){ + private void pushLocalData(DevTowerProjectConfig config, TowerReqVo req) { DevTowerDataLocal devTowerDataLocal = new DevTowerDataLocal(); Map dataContent = req.getContent().getDataContent(); devTowerDataLocal.setCfgId(config.getId()); @@ -343,4 +373,175 @@ public class TowerCraneApiController { devTowerDataLocalService.insertDevTowerDataLocal(devTowerDataLocal); } + /** + * 塔吊监测++ + * 限流规则[60秒内最多请求10次,限流策略IP] + * + * @param req 请求信息 + * @author JiangYuQi + * @date 2024-01-13 + */ + @ApiOperation(value = "山东探越-塔吊监测-实时数据") + @RateLimiter(count = 10, limitType = LimitType.IP) + @PostMapping("/v2_ty/run/push") + public AjaxResult tyPushRunData(@RequestBody @Valid TyTowerRunReqVO req) { + log.info("desApi.towerCrane.v2_ty.run.push...{}",req.getEid()); + DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid()); + if (config == null) { + throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode()); + } + DevTowerDataRun devTowerDataRun = new DevTowerDataRun(); + devTowerDataRun.setCfgId(config.getId()); + devTowerDataRun.setProjectId(config.getProjectId()); + devTowerDataRun.setComId(config.getComId()); + devTowerDataRun.setDeviceKey(config.getDeviceSn()); + devTowerDataRun.setHeight(Convert.toStr(req.getHeight())); + devTowerDataRun.setRange(Convert.toStr(req.getAmplitude())); + devTowerDataRun.setRotation(Convert.toStr(req.getRound())); + devTowerDataRun.setLoad(Convert.toStr(req.getWeight())); + devTowerDataRun.setWindSpeed(Convert.toStr(req.getWind_speed())); + devTowerDataRun.setLeanAngleX(Convert.toStr(req.getAngle_x())); + devTowerDataRun.setLeanAngleY(Convert.toStr(req.getAngle_y())); + devTowerDataRun.setMomentPercent(Convert.toStr(req.getMoment_percent())); + devTowerDataRun.setRate(Convert.toStr(req.getOverride())); + devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun); + return AjaxResult.success(); + } + + /** + * 塔吊监测++ + * 限流规则[60秒内最多请求10次,限流策略IP] + * + * @param req 请求信息 + * @author JiangYuQi + * @date 2024-01-13 + */ + @ApiOperation(value = "山东探越-塔吊监测-循环数据") + @RateLimiter(count = 10, limitType = LimitType.IP) + @PostMapping("/v2_ty/round/push") + public AjaxResult tyPushRoundData(@RequestBody @Valid TyTowerRoundReqVO req) { + log.info("desApi.towerCrane.v2_ty.round.push...{}",req.getEid()); + DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid()); + if (config == null) { + throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode()); + } + DevTowerDataRound devTowerDataRound = new DevTowerDataRound(); + devTowerDataRound.setCfgId(config.getId()); + devTowerDataRound.setProjectId(config.getProjectId()); + devTowerDataRound.setComId(config.getComId()); + devTowerDataRound.setDeviceKey(config.getDeviceSn()); + devTowerDataRound.setWorkStartTime(Convert.toStr(req.getStart_time())); + devTowerDataRound.setWorkEndTime(Convert.toStr(req.getEnd_time())); + devTowerDataRound.setMinHeight(Convert.toStr(req.getStart_height())); + devTowerDataRound.setMaxHeight(Convert.toStr(req.getEnd_height())); + devTowerDataRound.setMinRange(Convert.toStr(req.getStart_range())); + devTowerDataRound.setMaxRange(Convert.toStr(req.getEnd_range())); + devTowerDataRound.setStartHeight(Convert.toStr(req.getStart_height())); + devTowerDataRound.setEndHeight(Convert.toStr(req.getEnd_height())); + devTowerDataRound.setStartRange(Convert.toStr(req.getStart_range())); + devTowerDataRound.setEndRange(Convert.toStr(req.getEnd_range())); + devTowerDataRound.setStartRotation(Convert.toStr(req.getStart_rotation_angle())); + devTowerDataRound.setEndRotation(Convert.toStr(req.getEnd_rotation_angle())); + devTowerDataRound.setMaxLoad(Convert.toStr(req.getWeight())); + devTowerDataRound.setMaxMomentPercent(Convert.toStr(req.getMoment_percent())); + devTowerDataRoundService.insertDevTowerDataRound(devTowerDataRound); + return AjaxResult.success(); + } + + /** + * 塔吊监测++ + * 限流规则[60秒内最多请求10次,限流策略IP] + * + * @param req 请求信息 + * @author JiangYuQi + * @date 2024-01-13 + */ + @ApiOperation(value = "山东探越-塔吊监测-预警数据") + @RateLimiter(count = 10, limitType = LimitType.IP) + @PostMapping("/v2_ty/warning/push") + public AjaxResult tyPushWarningData(@RequestBody @Valid TyTowerWarningReqVO req) { + log.info("desApi.towerCrane.v2_ty.warning.push...{}",req.getEid()); + DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid()); + if (config == null) { + throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode()); + } + DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning(); + devTowerDataWarning.setCfgId(config.getId()); + devTowerDataWarning.setProjectId(config.getProjectId()); + devTowerDataWarning.setComId(config.getComId()); + devTowerDataWarning.setDeviceKey(config.getDeviceSn()); + devTowerDataWarning.setWarnType(Convert.toLong(req.getAlarm_type())); + devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning); + return AjaxResult.success(); + } + + /** + * 转换预警类型 + * + * @param warningType + * @return + */ + private String convertTyTowerWarningType(String warningType) { + String warningTypeEs; + switch (warningType) { + case "1": + warningTypeEs = "1"; + break; + case "2": + warningTypeEs = "101"; + break; + case "3": + warningTypeEs = "4"; + break; + case "4": + warningTypeEs = "103"; + break; + case "5": + warningTypeEs = "3"; + break; + case "6": + warningTypeEs = "102"; + break; + case "7": + warningTypeEs = "7"; + break; + case "8": + warningTypeEs = "106"; + break; + case "9": + warningTypeEs = "10"; + break; + case "10": + warningTypeEs = "107"; + break; + case "11": + warningTypeEs = "13"; + break; + case "12": + warningTypeEs = "108"; + break; + case "13": + warningTypeEs = "5"; + break; + case "14": + warningTypeEs = "104"; + break; + case "15": + warningTypeEs = "6"; + break; + case "16": + warningTypeEs = "105"; + break; + case "17": + warningTypeEs = "14"; + break; + case "18": + warningTypeEs = "109"; + break; + default: + warningTypeEs = "0"; + break; + } + return warningTypeEs; + } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java index f14f2dbb..089e01d2 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java @@ -11,6 +11,7 @@ import com.yanzhu.manage.service.*; import com.yanzhu.security.utils.DictUtils; import com.yanzhu.system.api.domain.SysUser; import com.yanzhu.system.api.model.LoginUser; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -22,6 +23,7 @@ import java.util.Objects; * @author JiangYuQi * @date 2024-08-25 */ +@Slf4j @RestController @RequestMapping("/wxApi") public class WxController extends BaseController { @@ -107,7 +109,9 @@ public class WxController extends BaseController { public AjaxResult findProSubDeptsUserInfo(@PathVariable("proId") Long proId) { LoginUser loginUser = SecurityUtils.getLoginUser(); + log.info("findProSubDeptsUserInfo...findProSubDeptsUserInfo...{}...{}", proId, loginUser.getUserid()); if(SecurityUtils.isAdmin(loginUser.getUserid()) || SecurityUtils.isGSAdmin()){ + log.info("findProSubDeptsUserInfo...1"); ProProjectInfo projectInfo = proProjectInfoService.selectProProjectInfoById(proId); ProProjectInfoSubdeptsUsers adminUser = new ProProjectInfoSubdeptsUsers(); adminUser.setId(0L); @@ -122,6 +126,7 @@ public class WxController extends BaseController { adminUser.setUserName(loginUser.getSysUser().getNickName()); return success(adminUser); }else{ + log.info("findProSubDeptsUserInfo...2"); return success(proProjectInfoSubdeptsUsersService.findProSubDeptsUserInfo(proId, loginUser.getUserid())); } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/TowerReqVo.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TowerReqVo.java similarity index 83% rename from yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/TowerReqVo.java rename to yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TowerReqVo.java index a1735d67..efccde4c 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/TowerReqVo.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TowerReqVo.java @@ -1,5 +1,6 @@ -package com.yanzhu.manage.domain; +package com.yanzhu.manage.domain.vo; +import com.yanzhu.manage.domain.TowerContentReqVo; import lombok.Data; import javax.validation.constraints.NotNull; diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerRoundReqVO.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerRoundReqVO.java new file mode 100644 index 00000000..4eb49c6b --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerRoundReqVO.java @@ -0,0 +1,37 @@ +package com.yanzhu.manage.domain.vo; + +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * 山东探越塔机请求-循环数据 + */ +@Data +public class TyTowerRoundReqVO { + + /** 设备ID */ + @NotNull + private Integer eid; + /** 开始高度 */ + private Float start_height; + /** 开始幅度 */ + private Float start_range; + /** 开始回转角度 */ + private Float start_rotation_angle; + /** 结束高度 */ + private Float end_height; + /** 结束幅度 */ + private Float end_range; + /** 结束回转角度 */ + private Float end_rotation_angle; + /** 重量 */ + private Float weight; + /** 力矩百分比 */ + private Float moment_percent; + /** 开始时间 */ + private String start_time; + /** 结束时间 */ + private String end_time; + +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerRunReqVO.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerRunReqVO.java new file mode 100644 index 00000000..4c0ba21e --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerRunReqVO.java @@ -0,0 +1,36 @@ +package com.yanzhu.manage.domain.vo; + +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * 山东探越塔机请求-实时数据 + */ +@Data +public class TyTowerRunReqVO { + + /** 设备ID */ + @NotNull + private Integer eid; + /** 高度(米) */ + private Float height; + /** 重量(kg) */ + private Float weight; + /** 回转(°) */ + private Float round; + /** 幅度(°) */ + private Float amplitude; + /** 风速(米/秒) */ + private Float wind_speed; + /** 力矩 */ + private Float moment; + /** 力矩百分比(%) */ + private Float moment_percent; + /** 倍率(正整数) */ + private Integer override; + /** 倾角X(°) */ + private Float angle_x; + /** 倾角Y(°) */ + private Float angle_y; +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerWarningReqVO.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerWarningReqVO.java new file mode 100644 index 00000000..56ea1f90 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/vo/TyTowerWarningReqVO.java @@ -0,0 +1,39 @@ +package com.yanzhu.manage.domain.vo; + +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * 山东探越塔机请求-报警数据 + */ +@Data +public class TyTowerWarningReqVO { + + /** 设备ID */ + @NotNull + private Integer eid; + /** 高度 */ + private Float height; + /** 重量 */ + private Float weight; + /** 回转 */ + private Float round; + /** 幅度 */ + private Float amplitude; + /** 风速 */ + private Float wind_speed; + /** 力矩 */ + private Float moment; + /** 力矩百分比 */ + private Float moment_percent; + /** 倍率 */ + private Integer override; + /** 倾角X */ + private Float angle_x; + /** 倾角Y */ + private Float angle_y; + /** 报警type,报警内容由报警编号决定 */ + private Integer alarm_type; + +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevTowerDataRoundServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevTowerDataRoundServiceImpl.java index 049b9109..1471412a 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevTowerDataRoundServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevTowerDataRoundServiceImpl.java @@ -53,7 +53,6 @@ public class DevTowerDataRoundServiceImpl implements IDevTowerDataRoundService @Override public int insertDevTowerDataRound(DevTowerDataRound devTowerDataRound) { - //devTowerDataRound.setCreateBy(SecurityUtils.getUsername()); devTowerDataRound.setCreateTime(DateUtils.getNowDate()); return devTowerDataRoundMapper.insertDevTowerDataRound(devTowerDataRound); } @@ -67,7 +66,6 @@ public class DevTowerDataRoundServiceImpl implements IDevTowerDataRoundService @Override public int updateDevTowerDataRound(DevTowerDataRound devTowerDataRound) { - //devTowerDataRound.setUpdateBy(SecurityUtils.getUsername()); devTowerDataRound.setUpdateTime(DateUtils.getNowDate()); return devTowerDataRoundMapper.updateDevTowerDataRound(devTowerDataRound); } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProPlanScheduleServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProPlanScheduleServiceImpl.java index ee663abe..56fe641a 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProPlanScheduleServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProPlanScheduleServiceImpl.java @@ -186,89 +186,49 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService * @param plan */ private void RecursionEditStartDate(ProPlan plan){ - if(plan.getStartDate()!=null){ - int res = proPlanMapper.updateProPlan(plan); - if(res>0){ - ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId()); - if(entity!=null){ - List belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId()); - int Finished = 0; - try { - if(belows.size()>0){ - for(ProPlan item:belows){ - Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F); - if(sNode>0){ - if(sNode==100){ - Finished += Convert.toFloat(item.getTaskDuation(),0.0F); - }else{ - Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100)); - } + int res = proPlanMapper.updateProPlan(plan); + if(res>0){ + ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId()); + if(entity!=null){ + if(entity.getStartDate()==null){ + entity.setStartDate(plan.getStartDate()); + } + List belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId()); + Float Finished = 0.0F; + int totalTaskDuation = 0; + try { + if(belows.size()>0){ + for(ProPlan item:belows){ + totalTaskDuation += item.getTaskDuation(); + Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F); + if(sNode>0){ + if(sNode>=100){ + Finished += Convert.toFloat(item.getTaskDuation(),0.0F); + }else{ + Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100)); } } } - }catch (Exception e){ - e.printStackTrace(); } - if(Finished==0){ - entity.setScheduleNode("0"); - }else{ - Double _cn = Convert.toDouble(Finished/entity.getTaskDuation())*100; - if(_cn>100){ - entity.setScheduleNode("100"); - }else{ - entity.setScheduleNode(String.format("%.2f", _cn)); - } - } - // 更新总进度 - if(entity.getTaskOutlineLevel()==1){ - proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode()); - } - System.out.println("RecursionEditStartDate.entity.getScheduleNode()..."+entity.getScheduleNode()); - entity.setStartDate(plan.getStartDate()); - RecursionEditStartDate(entity); + }catch (Exception e){ + e.printStackTrace(); } - } - }else{ - int res = proPlanMapper.updateProPlanStartDate(plan); - if(res>0){ - ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId()); - if(entity!=null){ - List belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId()); - Float Finished = 0.0F; - try { - if(belows.size()>0){ - for(ProPlan item:belows){ - Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F); - if(sNode>0){ - if(sNode==100){ - Finished += Convert.toFloat(item.getTaskDuation(),0.0F); - }else{ - Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100)); - } - } - } - } - }catch (Exception e){ - e.printStackTrace(); - } - if(Finished==0){ - entity.setScheduleNode("0"); + if(Finished==0){ + entity.setScheduleNode("0"); + }else{ + Double _cn = Convert.toDouble(Finished/totalTaskDuation)*100; + if(_cn>=100){ + entity.setScheduleNode("100"); }else{ - Double _cn = Convert.toDouble(Finished/entity.getTaskDuation())*100; - if(_cn>100){ - entity.setScheduleNode("100"); - }else{ - entity.setScheduleNode(String.format("%.2f", _cn)); - } + entity.setScheduleNode(String.format("%.2f", _cn)); } - // 更新总进度 - if(entity.getTaskOutlineLevel()==1){ - proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode()); - } - System.out.println("RecursionEditStartDate.entity.getScheduleNode()..."+entity.getScheduleNode()); - entity.setStartDate(plan.getStartDate()); - RecursionEditStartDate(entity); } + // 更新总进度 + if(entity.getTaskOutlineLevel()==1L){ + proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode()); + } + System.out.println("RecursionEditStartDate.entity.getScheduleNode()..."+entity.getScheduleNode()); + RecursionEditStartDate(entity); } } } @@ -278,93 +238,53 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService * @param plan */ private void RecursionEditFinishDate(ProPlan plan){ - if(plan.getFinishDate()!=null){ - int res = proPlanMapper.updateProPlan(plan); - if(res>0){ - ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId()); - if(entity!=null){ + int res = proPlanMapper.updateProPlan(plan); + if(res>0){ + ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId()); + if(entity!=null){ + if(plan.getFinishDate()!=null){ + entity.setFinishDate(plan.getFinishDate()); entity.setUpdateTime(plan.getUpdateTime()); if(entity.getStartDate()==null){ entity.setStartDate(entity.getUpdateTime()); } - List belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId()); - Float Finished = 0.0F; - try { - if(belows.size()>0){ - for(ProPlan item:belows){ - Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F); - if(sNode>0){ - if(sNode==100){ - Finished += Convert.toFloat(item.getTaskDuation(),0.0F); - }else{ - Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100)); - } + } + List belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId()); + Float Finished = 0.0F; + int totalTaskDuation = 0; + try { + if(belows.size()>0){ + for(ProPlan item:belows){ + totalTaskDuation += item.getTaskDuation(); + Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F); + if(sNode>0){ + if(sNode>=100){ + Finished += Convert.toFloat(item.getTaskDuation(),0.0F); + }else{ + Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100)); } } } - }catch (Exception e){ - e.printStackTrace(); } - if(Finished==0){ - entity.setScheduleNode("0"); - }else{ - Double _cn = Convert.toDouble(Finished/entity.getTaskDuation())*100; - if(_cn>100){ - entity.setScheduleNode("100"); - }else{ - entity.setScheduleNode(String.format("%.2f", _cn)); - } - } - // 更新总进度 - if(entity.getTaskOutlineLevel()==1L){ - proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode()); - } - System.out.println("RecursionEditFinishDate.entity.getScheduleNode()..."+entity.getScheduleNode()); - entity.setFinishDate(plan.getFinishDate()); - RecursionEditFinishDate(entity); + }catch (Exception e){ + e.printStackTrace(); } - } - }else{ - int res = proPlanMapper.updateProPlanFinishDate(plan); - if(res>0){ - ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId()); - if(entity!=null){ - List belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId()); - Float Finished = 0.0F; - try { - if(belows.size()>0){ - for(ProPlan item:belows){ - Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F); - if(sNode>0){ - if(sNode==100){ - Finished += Convert.toFloat(item.getTaskDuation(),0.0F); - }else{ - Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100)); - } - } - } - } - }catch (Exception e){ - e.printStackTrace(); - } - if(Finished==0){ - entity.setScheduleNode("0"); + if(Finished==0){ + entity.setScheduleNode("0"); + }else{ + Double _cn = Convert.toDouble(Finished/totalTaskDuation)*100; + if(_cn>=100){ + entity.setScheduleNode("100"); }else{ - Double _cn = Convert.toDouble(Finished/entity.getTaskDuation())*100; - if(_cn>100){ - entity.setScheduleNode("100"); - }else{ - entity.setScheduleNode(String.format("%.2f", _cn)); - } + entity.setScheduleNode(String.format("%.2f", _cn)); } - // 更新总进度 - if(entity.getTaskOutlineLevel()==1L){ - proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode()); - } - System.out.println("RecursionEditFinishDate.entity.getScheduleNode()..."+entity.getScheduleNode()); - entity.setFinishDate(plan.getFinishDate()); - RecursionEditFinishDate(entity); } + // 更新总进度 + if(entity.getTaskOutlineLevel()==1L){ + proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode()); + } + System.out.println("RecursionEditFinishDate.entity.getScheduleNode()..."+entity.getScheduleNode()); + RecursionEditFinishDate(entity); } } } diff --git a/yanzhu-ui-app/miniprogram/api/project.js b/yanzhu-ui-app/miniprogram/api/project.js index 18dfd876..3dd33591 100644 --- a/yanzhu-ui-app/miniprogram/api/project.js +++ b/yanzhu-ui-app/miniprogram/api/project.js @@ -321,4 +321,20 @@ export function submitPlanSchedule(data) { method: 'post', data: data }) -} \ No newline at end of file +} + +// 视频监控管理 +export function proVideoList(query) { + return request({ + url: '/manage/videoMonitor/list', + method: 'get', + params: query + }) +} + +export function getYsToken(id){ + return request({ + url: '/manage/videoMonitor/getYsToken/' + id, + method: 'get' + }) + } \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/app.js b/yanzhu-ui-app/miniprogram/app.js index d9f57c3a..4d8582ab 100644 --- a/yanzhu-ui-app/miniprogram/app.js +++ b/yanzhu-ui-app/miniprogram/app.js @@ -61,7 +61,7 @@ App({ // this.toast("请使用手机号码登录"); // }, 1000); wx.redirectTo({ - url: '/pages/login/index', + url: '/pages/login/login', }); } } diff --git a/yanzhu-ui-app/miniprogram/app.json b/yanzhu-ui-app/miniprogram/app.json index 26b6600f..ace2ab8c 100644 --- a/yanzhu-ui-app/miniprogram/app.json +++ b/yanzhu-ui-app/miniprogram/app.json @@ -1,38 +1,49 @@ { "pages": [ "pages/login/login", - "pages/project_qr/index", - "pages/project_list/index", - "pages/project_info/index", - "pages/project_more/index", - "pages/project_safety/index", - "pages/project_quality/index", - "pages/sign_mags/index", - "pages/project_flowable/approveTask/index", - "pages/project_flowable/detailTask/index", - "pages/project_flowable/subDepts/index", - "pages/project_flowable/subDeptsUsers/index", - "pages/project_problemmodify/list/index", - "pages/project_problemmodify/info/index", - "pages/project_problemmodify/modify/index", - "pages/project_problemmodify/check/index", - "pages/project_problemmodify/add/index", - "pages/project_problemmodify/draft/index", - "pages/project_subdepts/list/index", - "pages/project_subdepts/add/index", - "pages/project_subdepts/info/index", - "pages/project_subgroups/list/index", - "pages/project_subgroups/add/index", - "pages/project_subgroups/info/index", - "pages/project_subusers/list/index", - "pages/project_subusers/add/index", - "pages/project_subusers/info/index", - "pages/project_magusers/list/index", - "pages/project_magusers/add/index", - "pages/project_magusers/info/index", - "pages/project_schedule/list/index", - "pages/project_schedule/add/index", - "pages/project_schedule/info/index" + "pages/project_qr/index" + ], + "subpackages": [ + { + "root": "pageage", + "name": "pageage", + "pages": [ + "project_flowable/approveTask/index", + "project_flowable/detailTask/index", + "project_flowable/subDepts/index", + "project_flowable/subDeptsUsers/index", + "project_video/list/index", + "project_video/info/index", + "project_list/index", + "project_info/index", + "project_more/index", + "project_safety/index", + "project_quality/index", + "sign_mags/index", + "project_problemmodify/list/index", + "project_problemmodify/info/index", + "project_problemmodify/modify/index", + "project_problemmodify/check/index", + "project_problemmodify/add/index", + "project_problemmodify/draft/index", + "project_subdepts/list/index", + "project_subdepts/add/index", + "project_subdepts/info/index", + "project_subgroups/list/index", + "project_subgroups/add/index", + "project_subgroups/info/index", + "project_subusers/list/index", + "project_subusers/add/index", + "project_subusers/info/index", + "project_magusers/list/index", + "project_magusers/add/index", + "project_magusers/info/index", + "project_schedule/list/index", + "project_schedule/add/index", + "project_schedule/info/index" + ], + "independent": false + } ], "usingComponents": { "van-row": "@vant/weapp/row", @@ -84,6 +95,12 @@ "curve-echarts": "pages/components/curve-echarts/index", "user-infos": "pages/components/user-infos/index" }, + "plugins": { + "ezplayer": { + "version": "1.0.9", + "provider": "wxf2b3a0262975d8c2" + } + }, "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#191d28", diff --git a/yanzhu-ui-app/miniprogram/components/select-group-plan/index.wxml b/yanzhu-ui-app/miniprogram/components/select-group-plan/index.wxml index fd64f45a..7438e0f2 100644 --- a/yanzhu-ui-app/miniprogram/components/select-group-plan/index.wxml +++ b/yanzhu-ui-app/miniprogram/components/select-group-plan/index.wxml @@ -7,7 +7,7 @@ - + diff --git a/yanzhu-ui-app/miniprogram/images/biyan.png b/yanzhu-ui-app/miniprogram/images/biyan.png deleted file mode 100644 index ce424972..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/biyan.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/bottom.png b/yanzhu-ui-app/miniprogram/images/bottom.png deleted file mode 100644 index 4fbe5f46..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/bottom.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/choice.png b/yanzhu-ui-app/miniprogram/images/choice.png deleted file mode 100644 index a21d6646..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/choice.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/early.png b/yanzhu-ui-app/miniprogram/images/early.png deleted file mode 100644 index ca7aca0c..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/early.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/fanhui.png b/yanzhu-ui-app/miniprogram/images/fanhui.png deleted file mode 100644 index aa8bdaa3..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/fanhui.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_1.png b/yanzhu-ui-app/miniprogram/images/img_1.png deleted file mode 100644 index 6bf5dc50..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_1.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_10.png b/yanzhu-ui-app/miniprogram/images/img_10.png deleted file mode 100644 index 8298f45a..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_10.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_11.png b/yanzhu-ui-app/miniprogram/images/img_11.png deleted file mode 100644 index 1cc4db5a..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_11.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_12.png b/yanzhu-ui-app/miniprogram/images/img_12.png deleted file mode 100644 index adca3507..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_12.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_2.png b/yanzhu-ui-app/miniprogram/images/img_2.png deleted file mode 100644 index d7598e52..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_2.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_3.png b/yanzhu-ui-app/miniprogram/images/img_3.png deleted file mode 100644 index adbaadc5..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_3.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_4.png b/yanzhu-ui-app/miniprogram/images/img_4.png deleted file mode 100644 index 0e34b20e..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_4.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_5.png b/yanzhu-ui-app/miniprogram/images/img_5.png deleted file mode 100644 index 635aa8d6..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_5.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_6.png b/yanzhu-ui-app/miniprogram/images/img_6.png deleted file mode 100644 index c67e2e77..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_6.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_7.png b/yanzhu-ui-app/miniprogram/images/img_7.png deleted file mode 100644 index 6c247af3..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_7.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_8.png b/yanzhu-ui-app/miniprogram/images/img_8.png deleted file mode 100644 index 1025c198..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_8.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/img_9.png b/yanzhu-ui-app/miniprogram/images/img_9.png deleted file mode 100644 index c5bbf838..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/img_9.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/loding.gif b/yanzhu-ui-app/miniprogram/images/loding.gif deleted file mode 100644 index d9bb3c55..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/loding.gif and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/lw_1.png b/yanzhu-ui-app/miniprogram/images/lw_1.png deleted file mode 100644 index 5a54cbdc..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/lw_1.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/lw_2.png b/yanzhu-ui-app/miniprogram/images/lw_2.png deleted file mode 100644 index 52388b10..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/lw_2.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/lw_3.png b/yanzhu-ui-app/miniprogram/images/lw_3.png deleted file mode 100644 index d73d1c31..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/lw_3.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/lw_4.png b/yanzhu-ui-app/miniprogram/images/lw_4.png deleted file mode 100644 index a177e21c..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/lw_4.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/lw_5.png b/yanzhu-ui-app/miniprogram/images/lw_5.png deleted file mode 100644 index 3e9545e4..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/lw_5.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/lw_6.png b/yanzhu-ui-app/miniprogram/images/lw_6.png deleted file mode 100644 index aa68320c..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/lw_6.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/lw_7.png b/yanzhu-ui-app/miniprogram/images/lw_7.png deleted file mode 100644 index b06c5261..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/lw_7.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/lw_8.png b/yanzhu-ui-app/miniprogram/images/lw_8.png deleted file mode 100644 index 1927a100..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/lw_8.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_1.png b/yanzhu-ui-app/miniprogram/images/s_1.png deleted file mode 100644 index 4475e32c..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_1.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_10.png b/yanzhu-ui-app/miniprogram/images/s_10.png deleted file mode 100644 index a5720ae0..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_10.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_11.png b/yanzhu-ui-app/miniprogram/images/s_11.png deleted file mode 100644 index 31523ab3..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_11.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_12.png b/yanzhu-ui-app/miniprogram/images/s_12.png deleted file mode 100644 index 83a890b5..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_12.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_13.png b/yanzhu-ui-app/miniprogram/images/s_13.png deleted file mode 100644 index df8d7441..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_13.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_14.png b/yanzhu-ui-app/miniprogram/images/s_14.png deleted file mode 100644 index 36e170b4..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_14.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_15.png b/yanzhu-ui-app/miniprogram/images/s_15.png deleted file mode 100644 index 9cfa9793..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_15.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_16.png b/yanzhu-ui-app/miniprogram/images/s_16.png deleted file mode 100644 index d044e624..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_16.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_17.png b/yanzhu-ui-app/miniprogram/images/s_17.png deleted file mode 100644 index 192f1c04..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_17.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_18.png b/yanzhu-ui-app/miniprogram/images/s_18.png deleted file mode 100644 index 4c8abeb7..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_18.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_2.png b/yanzhu-ui-app/miniprogram/images/s_2.png deleted file mode 100644 index 3717e33e..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_2.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_3.png b/yanzhu-ui-app/miniprogram/images/s_3.png deleted file mode 100644 index cf16c0b1..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_3.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_4.png b/yanzhu-ui-app/miniprogram/images/s_4.png deleted file mode 100644 index 222a809e..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_4.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_5.png b/yanzhu-ui-app/miniprogram/images/s_5.png deleted file mode 100644 index fab5f4fd..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_5.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_6.png b/yanzhu-ui-app/miniprogram/images/s_6.png deleted file mode 100644 index a8bced08..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_6.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_7.png b/yanzhu-ui-app/miniprogram/images/s_7.png deleted file mode 100644 index f391ae41..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_7.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_8.png b/yanzhu-ui-app/miniprogram/images/s_8.png deleted file mode 100644 index a86d30cc..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_8.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/s_9.png b/yanzhu-ui-app/miniprogram/images/s_9.png deleted file mode 100644 index fc2acbaa..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/s_9.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/set.png b/yanzhu-ui-app/miniprogram/images/set.png deleted file mode 100644 index a505b6f0..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/set.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/images/sliding_up.png b/yanzhu-ui-app/miniprogram/images/sliding_up.png deleted file mode 100644 index 5ba6954d..00000000 Binary files a/yanzhu-ui-app/miniprogram/images/sliding_up.png and /dev/null differ diff --git a/yanzhu-ui-app/miniprogram/pages/components/user-infos/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/user-infos/index.wxml index be5b3243..bb3f58be 100644 --- a/yanzhu-ui-app/miniprogram/pages/components/user-infos/index.wxml +++ b/yanzhu-ui-app/miniprogram/pages/components/user-infos/index.wxml @@ -28,21 +28,21 @@ - + 授权消息通知 - + 修改密码 - + 退出登录 @@ -60,7 +60,7 @@ 旧密码 - + @@ -68,7 +68,7 @@ 新密码 - + @@ -76,7 +76,7 @@ 确认密码 - + diff --git a/yanzhu-ui-app/miniprogram/pages/login/login.js b/yanzhu-ui-app/miniprogram/pages/login/login.js index c3cf8cfc..45185e6d 100644 --- a/yanzhu-ui-app/miniprogram/pages/login/login.js +++ b/yanzhu-ui-app/miniprogram/pages/login/login.js @@ -187,14 +187,14 @@ Page({ setUserInfo(userInfo); //单项目直接进入项目页面 wx.redirectTo({ - url: '../project_info/index', + url: '../../pageage/project_info/index', }) } }); }else{ //多项目进入项目切换页面 wx.redirectTo({ - url: '../project_list/index', + url: '../../pageage/project_list/index', }) } }else{ diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.js b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.js deleted file mode 100644 index c246b4cf..00000000 --- a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.js +++ /dev/null @@ -1,468 +0,0 @@ -import config from '../../../config' -import { - reject, - complete, - returnTask, - returnList, - readDeployNotes, - findCommentByProcInsId -} from '../../../api/flowable' -import { - editApproveStatus, - findProSubDeptsInfoById, - findProSubDeptsUserInfoById -} from '../../../api/project' -import { - getToken -} from '../../../utils/auth' -const app = getApp() -Page({ - /** - * 页面的初始数据 - */ - data: { - options: {}, - active: 0, - stepList: [], - rejectNode: false, - activeName: "", - flowRecordList: [], - subDeptData: { - subDeptInfos: {} - }, - subDeptUserData: { - userInfos: {}, - }, - comment: "", - targetKey: "", - targetKeyList: [], - imgBaseUrl: config.baseImgUrl - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - this.setData({ - options: options - }) - this.findFlowNodes(); - this.findApplyDataInfo(); - this.findCommentByProcInsId(); - this.initTargetKeyList(); - }, - - //查询工作流节点 - findFlowNodes() { - readDeployNotes(this.data.options.deployId).then(res => { - let list = [{ - text: '开始' - }]; - let index = this.data.active; - res.data.forEach((item, idx) => { - if (this.data.options.taskName == item.name) { - index = idx + 1; - } - list.push({ - text: item.name.substr(0,5), - desc: '' - }); - }); - list.push({ - text: '结束' - }); - this.setData({ - active: index, - stepList: list - }) - }); - }, - - //查询审批日志 - findCommentByProcInsId() { - findCommentByProcInsId({ - procInsId: this.data.options.procInsId - }).then(res => { - this.setData({ - flowRecordList: res.data - }) - let list = []; - res.data.forEach((item, idx) => { - if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) { - this.setData({ - rejectNode: true - }) - } - if (item.deleteReason) { - item.deleteReason = this.getDeleteReason(item.deleteReason); - } - if (item.duration) { - item.duration = app.getDurationDate(item.duration); - } - list.push(item); - }) - this.setData({ - flowRecordList: list - }) - }); - }, - - //查询审批表单参数 - findApplyDataInfo() { - findProSubDeptsUserInfoById(this.data.options.businessKey).then(res => { - if (res.data.eduFilePath) { - let files = res.data.eduFilePath.split('/'); - res.data.eduFileName = files[files.length - 1]; - } - if(res.data.userInfos){ - res.data.userInfos = JSON.parse(res.data.userInfos); - } - this.setData({ - subDeptUserData: res.data - }) - //查询单位信息 - this.getSubDeptInfo(res.data.subDeptId); - }) - }, - - //查询审批表单参数 - getSubDeptInfo(subDeptId) { - findProSubDeptsInfoById(subDeptId).then(res => { - res.data.subDeptInfos = JSON.parse(res.data.subDeptInfos); - this.setData({ - subDeptData: res.data - }) - }) - }, - - - //初始化退回节点 - initTargetKeyList() { - returnList({ - taskId: this.data.options.taskId - }).then(res => { - if (res.data && res.data.length > 0) { - let list = []; - res.data.forEach(item => { - list.push({ - id: item.id, - text: item.name - }) - }) - this.setData({ - targetKey: list[0].id, - targetKeyList: list - }) - } - }); - }, - - //退回 - onBack() { - let { - options, - comment - } = this.data; - //数据效验 - if (!options.taskId) { - app.toast("数据异常,请刷新页面重试!") - return; - } - if (!comment) { - app.toast("请填写审批意见!") - return false; - } - let that = this; - //弹出确认 - wx.showModal({ - title: '提示', - content: '是否确认审批驳回?', - success: function (sm) { - if (sm.confirm) { - that.submitBackTask(); - } - } - }) - }, - - /** - * 提交退回任务 - */ - submitBackTask() { - let { - options, - comment, - targetKeyList - } = this.data; - returnTask({ - taskId: options.taskId, - targetKey: targetKeyList[0].id, - comment - }).then(res => { - if (res.code == 200) { - editApproveStatus(this.data.options.businessKey); - app.toast("驳回申请成功!") - setTimeout(() => { - this.returnToPage(); - }, 500) - } - }); - }, - - //通过 - onPass() { - let { - options, - comment - } = this.data; - //数据效验 - if (!options.taskId) { - app.toast("数据异常,请刷新页面重试!") - return; - } - if (comment == "") { - app.toast("请填写审批意见!") - return; - } - let that = this; - //弹出确认 - wx.showModal({ - title: '提示', - content: '是否确认审批通过?', - success: function (sm) { - if (sm.confirm) { - that.submitPassTask(); - } - } - }) - }, - - /** - * 提交审核结果 - */ - submitPassTask() { - let { - options, - procInsId, - comment - } = this.data; - complete({ - taskId: options.taskId, - instanceId: procInsId, - comment - }).then(res => { - if (res.code == 200) { - app.toast("申请审批通过成功!") - setTimeout(() => { - this.returnToPage(); - }, 500) - } - }); - }, - - //驳回 - onReject() { - let { - taskId, - procInsId, - comment - } = this.data; - //数据效验 - if (!taskId || !procInsId) { - app.toast("数据异常,请刷新页面重试!") - return; - } - if (comment == "") { - app.toast("请填写审批意见!") - return; - } - let that = this; - //弹出确认 - wx.showModal({ - title: '提示', - content: '是否确认审批驳回?', - success: function (sm) { - if (sm.confirm) { - that.submitRejectTask(); - } - } - }) - }, - - /** - * 提交流程驳回 - */ - submitRejectTask() { - let { - taskId, - procInsId, - comment - } = this.data; - reject({ - taskId, - instanceId: procInsId, - comment - }).then(res => { - if (res.code == 200) { - app.toast("驳回申请流程成功!") - setTimeout(() => { - this.returnToPage(); - }, 500) - } - }); - }, - - //申请说明 - commentInput: function (options) { - this.data.comment = options.detail.value; - }, - - // 手风琴 - onChange(event) { - this.setData({ - activeName: event.detail, - }); - }, - - /** - * 获取驳回节点 - * @param {*} val - */ - getDeleteReason(val) { - val = val.replace("Change activity to ", ""); - let flowRecordList = this.data.flowRecordList; - for (let i = 0; i < flowRecordList.length; i++) { - if (flowRecordList[i].taskDefKey == val) { - return "驳回至" + flowRecordList[i].taskName; - } - } - }, - - //终止原因 - commentblur: function (options) { - this.data.comment = options.detail.value; - }, - - //展示图片 - showImg: function (e) { - let paths = e.target.dataset.set; - let path = []; - paths.split(',').forEach(url => { - path.push(config.baseImgUrl + url); - }); - wx.previewImage({ - urls: path, - current: path[0] - }) - }, - - /** - * 下载并打开文档 - * @param {*} e - */ - downFile: function (e) { - let path = this.data.subDeptUserData.eduFilePath; - wx.downloadFile({ - // 示例 url,并非真实存在 - url: config.baseUrl + '/file/download?fileName=' + path, - header: { - 'Authorization': 'Bearer ' + getToken() - }, - success: function (res) { - const filePath = res.tempFilePath - let fpt = path.split("."); - wx.openDocument({ - filePath: filePath, - fileType: fpt[fpt.length - 1], - success: function (res) { - console.log('打开文档成功') - }, - fail: function (res) { - console.log(res) - } - }) - } - }) - }, - - //选择退回节点 - onSelectTargetKey(e) { - this.setData({ - targetKey: e.detail.id, - backName: e.detail.name - }) - }, - - /** - * 返回页面 - */ - returnToPage: function () { - if (wx.getStorageSync('nav-types') == "depts") { - wx.redirectTo({ - url: '../subDepts/index', - }) - } else if (wx.getStorageSync('nav-types') == "users") { - wx.redirectTo({ - url: '../subDeptsUsers/index', - }) - } - }, - - /** - * 修改申请 - */ - onEditApply: function () { - wx.redirectTo({ - url: `../editTask/index?deployId=${this.data.options.deployId}&procInsId=${this.data.options.procInsId}&nickName=${this.data.options.nickName}&deptName=${this.data.options.deptName}&procDefName=${this.data.options.procDefName}&taskId=${this.data.options.taskId}&taskName=${this.data.options.taskName}&category=${this.data.options.category}&projectName=${this.data.options.projectName}&businessKey=${this.data.options.businessKey}&businessKeyParName=${this.data.options.businessKeyParName}&businessDeptId=${this.data.options.businessDeptId}&startUserId=${this.data.options.startUserId}`, - }) - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.json b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.json deleted file mode 100644 index 4cd33ca1..00000000 --- a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "usingComponents": { - "van-collapse": "@vant/weapp/collapse", - "van-collapse-item": "@vant/weapp/collapse-item", - "van-steps": "@vant/weapp/steps/index" - }, - "navigationStyle":"custom" -} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxml b/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxml deleted file mode 100644 index 7b5179fd..00000000 --- a/yanzhu-ui-app/miniprogram/pages/project_flowable/approveTask/index.wxml +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - - 返回 - - - - 流程申请详情 - - - - - - - - - - - - - - - - {{(flowRecordList.length-index) < 10 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}} - {{item.taskName}} - {{item.commentResult}} - {{item.commentResult}} - {{item.commentResult}} - {{item.commentResult}} - {{item.commentResult}} - - - - - - 办理用户:{{item.assigneeName}} - - - 办理单位:{{item.deptName}} - - - 候选办理:{{item.candidate}} - - - 驳回节点:{{item.deleteReason}} - - - 接收时间:{{item.startTime}} - - - 处理时间:{{item.endTime}} - - - 处理耗时:{{item.duration}} - - - 处理意见:{{item.message}} - - - - - - - - - - {{subDeptData.projectName}} - - - - - - 单位类型 - {{subDeptData.subDeptTypeName}} - - - - - 单位名称 - {{subDeptData.subDeptName}} - - - - - 信用代码 - {{subDeptData.subDeptCode}} - - - - - 营业执照 - - - - - - - - - - - - 法人姓名 - {{subDeptData.subDeptInfos.legalPerson}} - - - - - 法人身份证 - {{subDeptData.subDeptInfos.legalPersonCard}} - - - - - 法人证件 - - - - - - - - - - - - - 进入场地时间 - {{subDeptData.useDates}} - - - - - 计划开工时间 - {{subDeptData.startWorkDates}} - - - - - 计划完工时间 - {{subDeptData.endWorkDates}} - - - - - 合同约定范围 - {{subDeptData.contractInfos}} - - - - - - 委托代理人 - 人员姓名 - - {{subDeptUserData.userName}} - - - - - - 代理人身份证 - 身份证号码 - - {{subDeptUserData.cardCode}} - - - - - - 工种岗位 - - {{subDeptUserData.craftPostName}} - - - - - - 工种班组 - - {{subDeptUserData.subDeptGroupName}} - - - - - 民族 - {{subDeptUserData.userInfos.nation}} - - - - - 籍贯 - {{subDeptUserData.userInfos.nativePlace}} - - - - - 详细地址 - {{subDeptUserData.userInfos.address}} - - - - - - 代理人证件 - 人员证件照 - - - - - - - - - - - - - - 花名册近照 - - - - - - - - - - - - 单位委托书 - - - - - - - - - - - - 联系电话 - {{subDeptUserData.userPhone}} - - - - - 紧急联系人 - {{subDeptUserData.userInfos.emergencyContact}} - - - - - 紧急联系电话 - {{subDeptUserData.userInfos.contactPhone}} - - - - - 开户行名称 - {{subDeptUserData.userInfos.bankName}} - - - - - 开户行网点 - {{subDeptUserData.userInfos.bankOffice}} - - - - - 工资银行卡号 - {{subDeptUserData.userInfos.bankCardNo}} - - - - 高血压、心脏病等基础身体健康问题 - - - - - - - - 严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆 - - - - - - - - - 安全承诺书 - - - 点击查看安全承诺书 - - - - - - - - - - 审批意见 - -