Commit 672ce7e8 authored by tianyiming's avatar tianyiming

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 8785b35d a57335ff
......@@ -9,5 +9,7 @@ import java.util.Map;
public interface ViewJgClaimMapper {
String supervisoryCode(String code);
Map<String,String> getDetialByCode(String code);
List<Map<String, Object>> getDetialMapList(String record);
}
......@@ -8,6 +8,10 @@
</select>
<select id="getDetialByCode" resultType="java.util.Map">
SELECT * FROM idx_biz_view_jg_claim WHERE SEQUENCE_NBR=#{code}
</select>
<select id="getDetialMapList" resultType="java.util.Map">
SELECT
......
package com.yeejoin.amos.boot.module.app.biz.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.app.api.common.MobileLoginParam;
import com.yeejoin.amos.boot.module.app.api.dto.TzBaseEnterpriseInfoDto;
......@@ -23,6 +27,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.component.robot.AmosRequestContext;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.PermissionModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -37,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
......@@ -57,6 +63,9 @@ import java.util.stream.Collectors;
public class TzsAppController {
@Autowired
private RedisUtils redisUtils;
@Autowired
TzsAppService appService;
@Autowired
private RegUnitInfoMapper regUnitInfoMapper;
......@@ -86,7 +95,27 @@ public class TzsAppController {
@GetMapping(value = "/equipmentInfo")
@ApiOperation(httpMethod = "GET", value = "小程序获取设备详情", notes = "小程序获取设备详情")
public ResponseModel<Object> getEquipmentInfo(String record) {
return ResponseHelper.buildResponse(appService.getEquipmentInfo(record));
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
CompanyModel companys = reginParams.getUserModel().getCompanys().get(0);
Map<String, String> detial = viewJgClaimMapper.getDetialByCode(record);
Map<String, Object> equipmentInfo;
//判断是否有权限查看全部信息
if (LEVEL.equals(companys.getLevel())) {
//企业
if (detial.get("USE_UNIT_CREDIT_CODE").equals(companys.getCompanyCode())) {
equipmentInfo = appService.getEquipmentInfo(record);
} else {
equipmentInfo = appService.getEquipmentInfoWX(record);
}
} else {
//监管
if (detial.get("ORG_BRANCH_CODE").contains(companys.getOrgCode())) {
equipmentInfo = appService.getEquipmentInfo(record);
} else {
equipmentInfo = appService.getEquipmentInfoWX(record);
}
}
return ResponseHelper.buildResponse(equipmentInfo);
}
/**
......
......@@ -39,6 +39,12 @@
<artifactId>jsoup</artifactId>
<version>1.11.2</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>4.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
......@@ -162,6 +162,12 @@
<artifactId>vastbase-jdbc</artifactId>
<version>2.7v</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>4.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
......
package com.yeejoin.amos.patrol.business.vo;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
@Data
public class PlanTaskVo {
private long id;
@Excel(name = "计划批号", orderNum = "0")
@Excel(name = "计划批号", orderNum = "0", width = 30)
private String batchNo;
@Excel(name = "计划名称", orderNum = "1")
@Excel(name = "计划名称", orderNum = "1", width = 30)
private String planName;
private long planId;
@Excel(name = "巡检路线", orderNum = "2")
@Excel(name = "巡检路线", orderNum = "2", width = 20)
private String routeName;
@Excel(name = "点编号", orderNum = "3")
private String pointNo;
@Excel(name = "点名称", orderNum = "4")
@Excel(name = "点名称", orderNum = "4", width = 30)
private String pointName;
@Excel(name = "开始时间", orderNum = "5")
@Excel(name = "开始时间", orderNum = "5", width = 20)
private String beginTime;
@Excel(name = "结束时间", orderNum = "6")
@Excel(name = "结束时间", orderNum = "6", width = 20)
private String endTime;
@Excel(name = "执行情况", replace = {"尚未巡检_0", "按时完成_1", "超时漏检_2"}, orderNum = "7")
private String status;
@Excel(name = "巡检人员", orderNum = "8")
@Excel(name = "巡检人员", orderNum = "8", width = 20)
private String userName;
private long deptId;
@Excel(name = "巡检部门", orderNum = "9")
@Excel(name = "巡检部门", orderNum = "9", width = 30)
private String deptName;
@Excel(name = "备注说明", orderNum = "10")
private String remark;
......
......@@ -32,10 +32,15 @@ public class QuartzManager {
.withIdentity(jobName, TRIGGER_GROUP_NAME) //给触发器起一个名字和组名
.withSchedule(CronScheduleBuilder.cronSchedule(time))
.build();
sched.scheduleJob(jobDetail, trigger);
if (!sched.isShutdown()) {
sched.start(); // 启动
}
if(!sched.checkExists(jobDetail.getKey())) {
sched.scheduleJob(jobDetail, trigger);
if (!sched.isShutdown()) {
sched.start(); // 启动
}
System.out.println("定时器添加成功=========");
} else {
System.out.println("定时器已存在=========");
}
} catch (Exception e) {
throw new RuntimeException(e);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment