Merge remote-tracking branch 'origin/fix_20230911_UAT' into fix_20230911_UAT
This commit is contained in:
@@ -1343,7 +1343,7 @@ ALTER TABLE `problem_management`
|
||||
ADD COLUMN `project_type` varchar(255) NULL COMMENT '相关项目类型' AFTER `problem_priority`;
|
||||
|
||||
|
||||
-- 市场法规清单历史表 2023-10-30 未同步数据库
|
||||
-- 市场法规清单历史表 2023-10-30 已同步生产环境
|
||||
CREATE TABLE `dummy_inventory_info_history` (
|
||||
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
@@ -1391,6 +1391,22 @@ CREATE TABLE `dummy_inventory_info_history` (
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- OTA升级活动是否提供用户确认 2023-11-11 已同步数据库
|
||||
INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1665537106720296962', 'OTA-升级影响评估-升级确认', 'O_T_A_-_sheng1_ji2_ying3_xiang3_ping2_gu1_-_sheng1_ji2_que4_ren4', NULL, '0', 'admin', '2023-06-05 09:52:45', 'song.gao2.o', '2023-08-31 09:57:28', NULL, NULL, '1', '0', '1', '4');
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`, `stat_node`) VALUES ('1665537773488803842', '1665537106720296962', '车辆信息娱乐系统', 'd546d06291b14f248a9d551bbc308317', NULL, '1', '1', 'admin', '2023-06-05 09:55:24', NULL, NULL, '1', NULL, NULL, '0', 'Vehicle infotainment system', NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`, `stat_node`) VALUES ('1665537835442868226', '1665537106720296962', '车辆仪表盘', '4b0e60e866a442e7a1198787ac0c432c', NULL, '2', '1', 'admin', '2023-06-05 09:55:39', NULL, NULL, '1', NULL, NULL, '0', 'Vehicle dashboard', NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`, `stat_node`) VALUES ('1665537903860355073', '1665537106720296962', '移动应用程序', '225b9b71bc594c42847ad209af7266ab', NULL, '3', '1', 'admin', '2023-06-05 09:55:55', NULL, NULL, '1', NULL, NULL, '0', 'Mobile application', NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`, `stat_node`) VALUES ('1665537980683227138', '1665537106720296962', '电子邮件', 'bebb284fe5814eb48a9d39ff369f8447', NULL, '4', '1', 'admin', '2023-06-05 09:56:13', NULL, NULL, '1', NULL, NULL, '0', 'E-mail', NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`, `stat_node`) VALUES ('1665538039910993922', '1665537106720296962', '合同协议', '2502a124b6c44dd391afff9759ec4e25', NULL, '5', '1', 'admin', '2023-06-05 09:56:28', NULL, NULL, '1', NULL, NULL, '0', 'Contract agreement', NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`, `stat_node`) VALUES ('1665538110215917569', '1665537106720296962', '短信', 'ce0225b4ecd146e4a8d88068fb05aa78', NULL, '6', '1', 'admin', '2023-06-05 09:56:44', NULL, NULL, '1', NULL, NULL, '0', 'Short message', NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `en_name`, `stat_node`) VALUES ('1665538157657690114', '1665537106720296962', '其他', '344a3320beba45afb3718c59b7a7144a', NULL, '7', '1', 'admin', '2023-06-05 09:56:56', NULL, NULL, '1', NULL, NULL, '0', 'others', NULL);
|
||||
|
||||
ALTER TABLE `ota_ba_sj_sjyxpg`
|
||||
ADD COLUMN `yhqr_xlk` varchar(50) NULL COMMENT '升级活动是否提供用户确认选项-下拉框' AFTER `yhqr`,
|
||||
ADD COLUMN `yhqr_qt` varchar(1000) NULL COMMENT '升级活动是否提供用户确认选项-其他文本' AFTER `yhqr_xlk`;
|
||||
ADD COLUMN `yhqr_no` varchar(1000) NULL COMMENT '升级活动是否提供用户确认选项-否文本' AFTER `yhqr_qt`;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+383
@@ -0,0 +1,383 @@
|
||||
package com.jero.modules.home.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.MD5Util;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.ota.entity.OtaManageReceiveNsdp;
|
||||
import com.jero.modules.ota.service.IOtaManageApplyEOService;
|
||||
import com.jero.modules.system.entity.SysPermission;
|
||||
import com.jero.modules.system.enums.SysPermissionEnum;
|
||||
import com.jero.modules.system.mapper.TodoCenterMapper;
|
||||
import com.jero.modules.system.service.ISysPermissionService;
|
||||
import com.jero.modules.system.util.PermissionDataUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单权限表 为了做待办中心消息提醒放过来的
|
||||
* </p>
|
||||
*
|
||||
* @Author scott
|
||||
* @since 2018-12-21
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/phone/home/permission")
|
||||
public class PhoneHomePermissionController {
|
||||
|
||||
@Autowired
|
||||
private ISysPermissionService sysPermissionService;
|
||||
|
||||
@Autowired
|
||||
private TodoCenterMapper todoCenterMapper;
|
||||
|
||||
@Autowired
|
||||
private IOtaManageApplyEOService otaManageApplyEOService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询用户拥有的菜单权限和按钮权限
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getUserPermissionByToken", method = RequestMethod.GET)
|
||||
public Result<?> getUserPermissionByToken(String cut) {
|
||||
Result<JSONObject> result = new Result<JSONObject>();
|
||||
try {
|
||||
//直接获取当前用户不适用前端token
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (oConvertUtils.isEmpty(loginUser)) {
|
||||
return Result.error("请登录系统!");
|
||||
}
|
||||
List<SysPermission> metaList = sysPermissionService.queryByUser(loginUser.getUsername());
|
||||
//添加首页路由
|
||||
//update-begin-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存
|
||||
if (!PermissionDataUtil.hasIndexPage(metaList)) {
|
||||
SysPermission indexMenu = sysPermissionService.list(new LambdaQueryWrapper<SysPermission>().eq(SysPermission::getName, "首页")).get(0);
|
||||
metaList.add(0, indexMenu);
|
||||
}
|
||||
//update-end-author:taoyan date:20200211 for: TASK #3368 【路由缓存】首页的缓存设置有问题,需要根据后台的路由配置来实现是否缓存
|
||||
JSONObject json = new JSONObject();
|
||||
JSONArray menujsonArray = new JSONArray();
|
||||
this.getPermissionJsonArray(menujsonArray, metaList, null, cut);
|
||||
JSONArray authjsonArray = new JSONArray();
|
||||
this.getAuthJsonArray(authjsonArray, metaList);
|
||||
//查询所有的权限
|
||||
LambdaQueryWrapper<SysPermission> query = new LambdaQueryWrapper<SysPermission>();
|
||||
query.eq(SysPermission::getDelFlag, CommonConstant.DEL_FLAG_0);
|
||||
query.eq(SysPermission::getMenuType, CommonConstant.MENU_TYPE_2);
|
||||
//query.eq(SysPermission::getStatus, "1");
|
||||
List<SysPermission> allAuthList = sysPermissionService.list(query);
|
||||
JSONArray allauthjsonArray = new JSONArray();
|
||||
this.getAllAuthJsonArray(allauthjsonArray, allAuthList);
|
||||
//路由菜单
|
||||
json.put("menu", menujsonArray);
|
||||
//按钮权限(用户拥有的权限集合)
|
||||
json.put("auth", authjsonArray);
|
||||
//全部权限配置集合(按钮权限,访问权限)
|
||||
json.put("allAuth", allauthjsonArray);
|
||||
result.setResult(json);
|
||||
result.success("查询成功");
|
||||
} catch (Exception e) {
|
||||
result.error500("查询失败:" + e.getMessage());
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单JSON数组
|
||||
*
|
||||
* @param jsonArray
|
||||
* @param metaList
|
||||
* @param parentJson
|
||||
*/
|
||||
private void getPermissionJsonArray(JSONArray jsonArray, List<SysPermission> metaList, JSONObject parentJson, String cut) {
|
||||
for (SysPermission permission : metaList) {
|
||||
if (permission.getMenuType() == null) {
|
||||
continue;
|
||||
}
|
||||
String tempPid = permission.getParentId();
|
||||
JSONObject json = getPermissionJsonObject(permission, cut);
|
||||
if (json == null) {
|
||||
continue;
|
||||
}
|
||||
if (parentJson == null && oConvertUtils.isEmpty(tempPid)) {
|
||||
jsonArray.add(json);
|
||||
if (!permission.isLeaf()) {
|
||||
getPermissionJsonArray(jsonArray, metaList, json, cut);
|
||||
}
|
||||
} else if (parentJson != null && oConvertUtils.isNotEmpty(tempPid) && tempPid.equals(parentJson.getString("id"))) {
|
||||
// 类型( 0:一级菜单 1:子菜单 2:按钮 )
|
||||
if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2)) {
|
||||
JSONObject metaJson = parentJson.getJSONObject("meta");
|
||||
if (metaJson.containsKey("permissionList")) {
|
||||
metaJson.getJSONArray("permissionList").add(json);
|
||||
} else {
|
||||
JSONArray permissionList = new JSONArray();
|
||||
permissionList.add(json);
|
||||
metaJson.put("permissionList", permissionList);
|
||||
}
|
||||
// 类型( 0:一级菜单 1:子菜单 2:按钮 )
|
||||
} else if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_1) || permission.getMenuType().equals(CommonConstant.MENU_TYPE_0)) {
|
||||
if (parentJson.containsKey("children")) {
|
||||
parentJson.getJSONArray("children").add(json);
|
||||
} else {
|
||||
JSONArray children = new JSONArray();
|
||||
children.add(json);
|
||||
parentJson.put("children", children);
|
||||
}
|
||||
|
||||
if (!permission.isLeaf()) {
|
||||
getPermissionJsonArray(jsonArray, metaList, json, cut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取权限JSON数组
|
||||
*
|
||||
* @param jsonArray
|
||||
* @param metaList
|
||||
*/
|
||||
private void getAuthJsonArray(JSONArray jsonArray, List<SysPermission> metaList) {
|
||||
for (SysPermission permission : metaList) {
|
||||
if (permission.getMenuType() == null) {
|
||||
continue;
|
||||
}
|
||||
JSONObject json = null;
|
||||
if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2) && CommonConstant.STATUS_1.equals(permission.getStatus())) {
|
||||
json = new JSONObject();
|
||||
json.put("action", permission.getPerms());
|
||||
json.put("type", permission.getPermsType());
|
||||
json.put("describe", permission.getName());
|
||||
jsonArray.add(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取权限JSON数组
|
||||
*
|
||||
* @param jsonArray
|
||||
* @param allList
|
||||
*/
|
||||
private void getAllAuthJsonArray(JSONArray jsonArray, List<SysPermission> allList) {
|
||||
JSONObject json = null;
|
||||
for (SysPermission permission : allList) {
|
||||
json = new JSONObject();
|
||||
json.put("action", permission.getPerms());
|
||||
json.put("status", permission.getStatus());
|
||||
//1显示2禁用
|
||||
json.put("type", permission.getPermsType());
|
||||
json.put("describe", permission.getName());
|
||||
jsonArray.add(json);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据菜单配置生成路由json
|
||||
*
|
||||
* @param permission
|
||||
* @return
|
||||
*/
|
||||
private JSONObject getPermissionJsonObject(SysPermission permission, String cut) {
|
||||
JSONObject json = new JSONObject();
|
||||
// 类型(0:一级菜单 1:子菜单 2:按钮)
|
||||
if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2)) {
|
||||
//json.put("action", permission.getPerms());
|
||||
//json.put("type", permission.getPermsType());
|
||||
//json.put("describe", permission.getName());
|
||||
return null;
|
||||
} else if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_0) || permission.getMenuType().equals(CommonConstant.MENU_TYPE_1)) {
|
||||
json.put("id", permission.getId());
|
||||
if (permission.isRoute()) {
|
||||
json.put("route", "1");// 表示生成路由
|
||||
} else {
|
||||
json.put("route", "0");// 表示不生成路由
|
||||
}
|
||||
|
||||
if (isWWWHttpUrl(permission.getUrl())) {
|
||||
json.put("path", MD5Util.MD5Encode(permission.getUrl(), "utf-8"));
|
||||
} else {
|
||||
json.put("path", permission.getUrl());
|
||||
}
|
||||
|
||||
// 重要规则:路由name (通过URL生成路由name,路由name供前端开发,页面跳转使用)
|
||||
if (oConvertUtils.isNotEmpty(permission.getComponentName())) {
|
||||
json.put("name", permission.getComponentName());
|
||||
} else {
|
||||
json.put("name", urlToRouteName(permission.getUrl()));
|
||||
}
|
||||
|
||||
// 是否隐藏路由,默认都是显示的
|
||||
if (permission.isHidden()) {
|
||||
json.put("hidden", true);
|
||||
}
|
||||
// 聚合路由
|
||||
if (permission.isAlwaysShow()) {
|
||||
json.put("alwaysShow", true);
|
||||
}
|
||||
json.put("component", permission.getComponent());
|
||||
JSONObject meta = new JSONObject();
|
||||
// 由用户设置是否缓存页面 用布尔值
|
||||
if (permission.isKeepAlive()) {
|
||||
meta.put("keepAlive", true);
|
||||
} else {
|
||||
meta.put("keepAlive", false);
|
||||
}
|
||||
|
||||
/*update_begin author:wuxianquan date:20190908 for:往菜单信息里添加外链菜单打开方式 */
|
||||
//外链菜单打开方式
|
||||
if (permission.isInternalOrExternal()) {
|
||||
meta.put("internalOrExternal", true);
|
||||
} else {
|
||||
meta.put("internalOrExternal", false);
|
||||
}
|
||||
/* update_end author:wuxianquan date:20190908 for: 往菜单信息里添加外链菜单打开方式*/
|
||||
|
||||
if (CutEnum.EN.getValue().equals(cut)) {
|
||||
meta.put("title", permission.getMenuEn());
|
||||
} else {
|
||||
meta.put("title", permission.getName());
|
||||
}
|
||||
|
||||
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
String component = permission.getComponent();
|
||||
if (oConvertUtils.isNotEmpty(permission.getComponentName()) || oConvertUtils.isNotEmpty(component)) {
|
||||
meta.put("componentName", oConvertUtils.getString(permission.getComponentName(), component.substring(component.lastIndexOf("/") + 1)));
|
||||
}
|
||||
//update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
|
||||
if (oConvertUtils.isEmpty(permission.getParentId())) {
|
||||
// 一级菜单跳转地址
|
||||
json.put("redirect", permission.getRedirect());
|
||||
if (oConvertUtils.isNotEmpty(permission.getIcon())) {
|
||||
meta.put("icon", permission.getIcon());
|
||||
}
|
||||
} else {
|
||||
if (oConvertUtils.isNotEmpty(permission.getIcon())) {
|
||||
meta.put("icon", permission.getIcon());
|
||||
}
|
||||
}
|
||||
if (isWWWHttpUrl(permission.getUrl())) {
|
||||
meta.put("url", permission.getUrl());
|
||||
}
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("currentUserId", currentUser.getId());
|
||||
|
||||
List<String> flowTypeList = new ArrayList<>();
|
||||
//项目法规任务
|
||||
if (StringUtils.equals(permission.getId(), SysPermissionEnum.PROJECT_REGULATION_TASKS.getId())) {
|
||||
flowTypeList.add("1");
|
||||
flowTypeList.add("2");
|
||||
flowTypeList.add("3");
|
||||
flowTypeList.add("4");
|
||||
flowTypeList.add("10");
|
||||
flowTypeList.add("21");
|
||||
params.put("flowTypeList", flowTypeList);
|
||||
//存在待办任务标识,true为有
|
||||
boolean existTaskFlag = false;
|
||||
int result = todoCenterMapper.todoCenterTaskCount(params);
|
||||
if (result > 0) {
|
||||
existTaskFlag = true;
|
||||
}
|
||||
//查询当前登录用户是否有项目法规任务
|
||||
meta.put("existTask", existTaskFlag);
|
||||
}
|
||||
//法规评估任务
|
||||
if (StringUtils.equals(permission.getId(), SysPermissionEnum.REGULATORY_ASSESSMENT_TASKS.getId())) {
|
||||
flowTypeList.add("5");
|
||||
flowTypeList.add("6");
|
||||
params.put("flowTypeList", flowTypeList);
|
||||
int result = todoCenterMapper.todoCenterTaskCount(params);
|
||||
boolean existTaskFlag = false;
|
||||
if (result > 0) {
|
||||
existTaskFlag = true;
|
||||
}
|
||||
meta.put("existTask", existTaskFlag);
|
||||
}
|
||||
//项目参数任务
|
||||
if (StringUtils.equals(permission.getId(), SysPermissionEnum.PROJECT_PARAMETER_TASKS.getId())) {
|
||||
boolean existTaskFlag = false;
|
||||
existTaskFlag = sysPermissionService.judgeToDo();
|
||||
meta.put("existTask", existTaskFlag);
|
||||
}
|
||||
//OTA任务
|
||||
if (StringUtils.equals(permission.getId(), SysPermissionEnum.OTA_TASKS.getId())) {
|
||||
boolean existTaskFlag = false;
|
||||
List<OtaManageReceiveNsdp> otaList = otaManageApplyEOService.getOtaTodoList(new OtaManageReceiveNsdp());
|
||||
if(!otaList.isEmpty()){
|
||||
existTaskFlag = true;
|
||||
}
|
||||
meta.put("existTask", existTaskFlag);
|
||||
}
|
||||
|
||||
json.put("meta", meta);
|
||||
}
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否外网URL 例如: http://localhost:8080/jero-boot/swagger-ui.html#/ 支持特殊格式: {{
|
||||
* window._CONFIG['domianURL'] }}/druid/ {{ JS代码片段 }},前台解析会自动执行JS代码片段
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean isWWWHttpUrl(String url) {
|
||||
if (url != null && (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("{{"))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过URL生成路由name(去掉URL前缀斜杠,替换内容中的斜杠‘/’为-) 举例: URL = /isystem/role RouteName =
|
||||
* isystem-role
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String urlToRouteName(String url) {
|
||||
if (oConvertUtils.isNotEmpty(url)) {
|
||||
if (url.startsWith("/")) {
|
||||
url = url.substring(1);
|
||||
}
|
||||
url = url.replace("/", "-");
|
||||
|
||||
// 特殊标记
|
||||
url = url.replace(":", "@");
|
||||
return url;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+16
@@ -126,6 +126,22 @@ public class OtaBaSjSjyxpg implements Serializable {
|
||||
@ApiModelProperty(value = "升级活动是否提供用户确认选项")
|
||||
private java.lang.Integer yhqr;
|
||||
|
||||
/**升级活动是否提供用户确认选项-下拉框*/
|
||||
@Excel(name = "升级活动是否提供用户确认选项-下拉框", width = 15)
|
||||
@ApiModelProperty(value = "升级活动是否提供用户确认选项-下拉框")
|
||||
@Dict(dicCode = "_sheng1_ji2_ying3_xiang3_ping2_gu1_-_sheng1_ji2_que4_ren4")
|
||||
private java.lang.String yhqrXlk;
|
||||
|
||||
/**升级活动是否提供用户确认选项-其他文本*/
|
||||
@Excel(name = "升级活动是否提供用户确认选项-其他文本", width = 15)
|
||||
@ApiModelProperty(value = "升级活动是否提供用户确认选项-其他文本")
|
||||
private java.lang.String yhqrQt;
|
||||
|
||||
/**升级活动是否提供用户确认选项-否文本*/
|
||||
@Excel(name = "升级活动是否提供用户确认选项-否文本", width = 15)
|
||||
@ApiModelProperty(value = "升级活动是否提供用户确认选项-否文本")
|
||||
private java.lang.String yhqrNo;
|
||||
|
||||
/**升级包测试*/
|
||||
@Excel(name = "升级包测试", width = 15)
|
||||
@ApiModelProperty(value = "升级包测试")
|
||||
|
||||
+1
-1
@@ -179,7 +179,7 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
||||
otaBaCxList.setSpzq(String.valueOf(daysDifference));
|
||||
}
|
||||
otaBaCxList.setBz(bz);
|
||||
this.deleteById(otaBaCxList.getId());
|
||||
// this.deleteById(otaBaCxList.getId());
|
||||
this.saveOrUpdate(otaBaCxList);
|
||||
//添加历史记录数据
|
||||
OtaBaCxLsjl lsjl = new OtaBaCxLsjl();
|
||||
|
||||
+1
-1
@@ -182,7 +182,7 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
otaBaSjList.setSpzq(String.valueOf(daysDifference));
|
||||
}
|
||||
otaBaSjList.setBz(bz);
|
||||
this.deleteById(otaBaSjList.getId());
|
||||
// this.deleteById(otaBaSjList.getId());
|
||||
this.saveOrUpdate(otaBaSjList);
|
||||
//添加历史记录数据
|
||||
OtaBaSjLsjl lsjl = new OtaBaSjLsjl();
|
||||
|
||||
+5
-1
@@ -86,7 +86,11 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
|
||||
otaBaSjSjmbcx.setCreateTime(now);
|
||||
} else {
|
||||
otaBaSjSjmbcxOld = this.getByOtaId(otaBaSjSjmbcx.getOtaId());
|
||||
otaBaSjSjmbcx.setId(otaBaSjSjmbcxOld.getId());
|
||||
if(ObjectUtils.isEmpty(otaBaSjSjmbcxOld)){
|
||||
otaBaSjSjmbcx.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
}else{
|
||||
otaBaSjSjmbcx.setId(otaBaSjSjmbcxOld.getId());
|
||||
}
|
||||
otaBaSjList = otaBaSjListService.queryById(otaBaSjSjmbcx.getOtaId());
|
||||
otaBaSjList.updateData(otaBaSjSjmbcx);
|
||||
otaBaSjListService.editById(otaBaSjList);
|
||||
|
||||
+16
-1
@@ -350,7 +350,22 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getSfyxaq()));
|
||||
row = s.getRow(9);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getYhqr()));
|
||||
//选是有下拉框,下拉框选其他有文本;选否有文本
|
||||
Integer yhqr = pg.getYhqr();
|
||||
if (null == yhqr) {
|
||||
yhqr = 2;
|
||||
}
|
||||
String yhqrStr = ImportFileUtil.getCellValueYesOrNoInt(pg.getYhqr());
|
||||
if (1 == yhqr) {
|
||||
String yhqrXlk = ComparisonUtil.queryDictTextByKey("_sheng1_ji2_ying3_xiang3_ping2_gu1_-_sheng1_ji2_que4_ren4", pg.getYhqrXlk(), sysDictService);
|
||||
yhqrStr += " - " + yhqrXlk;
|
||||
if ("其他".equals(yhqrXlk)) {
|
||||
yhqrStr += " - " + pg.getYhqrQt();
|
||||
}
|
||||
} else if (2 == yhqr) {
|
||||
yhqrStr += " - " + pg.getYhqrNo();
|
||||
}
|
||||
cell.setCellValue(yhqrStr);
|
||||
row = s.getRow(10);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("package_test", pg.getSjbcs(), sysDictService));
|
||||
|
||||
@@ -632,6 +632,12 @@
|
||||
delete item.options
|
||||
//update-end-author:taoyan date:20200819 for:【开源问题】 高级查询 下拉框作为并且选项很多多多 LOWCOD-779
|
||||
}
|
||||
if (Array.isArray(item.tree)) {
|
||||
// 如果有字典属性,就不需要保存 options 了
|
||||
//update-begin-author:taoyan date:20200819 for:【开源问题】 高级查询 下拉框作为并且选项很多多多 LOWCOD-779
|
||||
delete item.tree
|
||||
//update-end-author:taoyan date:20200819 for:【开源问题】 高级查询 下拉框作为并且选项很多多多 LOWCOD-779
|
||||
}
|
||||
}
|
||||
}
|
||||
return array
|
||||
|
||||
+11
-11
@@ -139,30 +139,30 @@
|
||||
<td :height="qrheight" style='position: relative'>
|
||||
<div>
|
||||
<a-radio-group class='box-input-qr' @change='qrchange' v-model="form.yhqr">
|
||||
<a-radio :value="'1'"> {{ $t('yes') }} </a-radio>
|
||||
<a-radio :value="'2'"> {{ $t('not') }} </a-radio>
|
||||
<a-radio :value="1"> {{ $t('yes') }} </a-radio>
|
||||
<a-radio :value="2"> {{ $t('not') }} </a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div v-if='flagqr'>
|
||||
<j-dict-select-tag class="box-input2"
|
||||
v-model="form.flagqr"
|
||||
v-model="form.yhqrXlk"
|
||||
:disabled="disable"
|
||||
dictCode="O_T_A_-_sheng1_ji2_ying3_xiang3_ping2_gu1_-_sheng1_ji2_que4_ren4"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
@input="handleInput(form.flagqr)"
|
||||
@input="handleInput(form.yhqrXlk)"
|
||||
:triggerChange="false"/>
|
||||
</div>
|
||||
<div v-if='flagqrqt'>
|
||||
<a-input class="box-input-qr2"
|
||||
v-model="form.qttext"
|
||||
:title="form.qttext ? form.qttext : $t('PleaseEnter')"
|
||||
v-model="form.yhqrQt"
|
||||
:title="form.yhqrQt ? form.yhqrQt : $t('PleaseEnter')"
|
||||
:placeholder="$t('PleaseEnter')"></a-input>
|
||||
</div>
|
||||
<div v-if='flagly'>
|
||||
<a-input class="box-input2"
|
||||
v-model="form.ly"
|
||||
:title="form.ly ? form.ly : $t('PleaseEnter')+ $t('reason')"
|
||||
v-model="form.yhqrNo"
|
||||
:title="form.yhqrNo ? form.yhqrNo : $t('PleaseEnter')+ $t('reason')"
|
||||
:placeholder="$t('PleaseEnter')+ $t('reason')"></a-input>
|
||||
</div>
|
||||
</td>
|
||||
@@ -434,11 +434,11 @@ this.$forceUpdate()
|
||||
this.flagly = true
|
||||
this.qrheight = '100px'
|
||||
}
|
||||
if(this.form.yhqr == '1' && this.form.flagqr == '344a3320beba45afb3718c59b7a7144a'){
|
||||
if(this.form.yhqr == '1' && this.form.yhqrXlk == '344a3320beba45afb3718c59b7a7144a'){
|
||||
this.qrheight = '150px'
|
||||
this.flagqrqt = true
|
||||
this.flagly = false
|
||||
}else if(this.form.yhqr == '1' && this.form.flagqr != '344a3320beba45afb3718c59b7a7144a'){
|
||||
}else if(this.form.yhqr == '1' && this.form.yhqrXlk != '344a3320beba45afb3718c59b7a7144a'){
|
||||
this.flagqr = true
|
||||
this.flagqrqt = false
|
||||
this.flagly = false
|
||||
@@ -489,7 +489,7 @@ this.$forceUpdate()
|
||||
this.qrheight = '100px'
|
||||
this.flagqr = true
|
||||
this.flagly = false
|
||||
if(this.form.flagqr == '344a3320beba45afb3718c59b7a7144a'){
|
||||
if(this.form.yhqrXlk == '344a3320beba45afb3718c59b7a7144a'){
|
||||
this.qrheight = '150px'
|
||||
this.flagqrqt = true
|
||||
}
|
||||
|
||||
+15
-1
@@ -257,7 +257,21 @@ export default {
|
||||
|
||||
if (res.result.dllx1 == null || res.result.dllx1 == "") {
|
||||
this.form.dllx1 = undefined
|
||||
|
||||
}else{
|
||||
let list = []
|
||||
getAction('sys/dict/getDictItems/vehicle_dynamic_type1', { }).then((res) => {
|
||||
if (res.success) {
|
||||
res.result.forEach((item,index) => {
|
||||
let w = item.value
|
||||
let a = w.indexOf("-")
|
||||
let l = w.substring(0,a)
|
||||
if(this.form.dllx1 == l){
|
||||
list.push(item)
|
||||
}
|
||||
})
|
||||
this.projectNameList2 = list
|
||||
}
|
||||
})
|
||||
}
|
||||
if (res.result.dllx2 == null || res.result.dllx2 == "") {
|
||||
this.form.dllx2 = undefined
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<!-- <a-icon type="qrcode"/>-->
|
||||
<!-- {{ $t('globalReplacement') }}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="operator-text"-->
|
||||
<!-- v-if="textTitle === $t('listOfRegulations')"-->
|
||||
<!-- v-has="'projectComment:list'"-->
|
||||
<!-- @click="commentClick">-->
|
||||
<!-- <a-icon type="message"/>-->
|
||||
<!-- {{$t('comment')}}-->
|
||||
<!-- </div>-->
|
||||
<div class="operator-text"
|
||||
v-if="textTitle === $t('listOfRegulations')"
|
||||
v-has="'projectComment:list'"
|
||||
@click="commentClick">
|
||||
<a-icon type="message"/>
|
||||
{{$t('comment')}}
|
||||
</div>
|
||||
<div class="operator-text"
|
||||
v-if="textTitle === $t('listOfRegulations')"
|
||||
v-has="'projectComment:list'"
|
||||
|
||||
@@ -78,7 +78,15 @@
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('category')">
|
||||
<span>{{ $t('category') }}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('category')"
|
||||
v-model="queryParam.category"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px; " class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
@@ -648,11 +656,11 @@
|
||||
'Component report not submitted': 'TrackedColor'
|
||||
},
|
||||
fieldList: [
|
||||
{
|
||||
type: 'string',
|
||||
value: 'category',
|
||||
text: this.$t('category')
|
||||
},
|
||||
// {
|
||||
// type: 'string',
|
||||
// value: 'category',
|
||||
// text: this.$t('category')
|
||||
// },
|
||||
{
|
||||
type: 'string',
|
||||
value: 'configItem',
|
||||
|
||||
@@ -1403,17 +1403,17 @@
|
||||
value: 'attestationRank',
|
||||
text: this.$t('certificationLevel'),
|
||||
dictCode: 'attestation_rank'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
}
|
||||
// {
|
||||
// type: 'deliverables',
|
||||
// value: 'designDeliverableType',
|
||||
// text: this.$t('designaconformancedeliverabletype'),
|
||||
// },
|
||||
// {
|
||||
// type: 'deliverables',
|
||||
// value: 'verifyDeliverableType',
|
||||
// text: this.$t('verifytheconformancedeliverabletype'),
|
||||
// },
|
||||
},
|
||||
{
|
||||
type: 'deliverables',
|
||||
value: 'designDeliverableType',
|
||||
text: this.$t('designaconformancedeliverabletype'),
|
||||
},
|
||||
{
|
||||
type: 'deliverables',
|
||||
value: 'verifyDeliverableType',
|
||||
text: this.$t('verifytheconformancedeliverabletype'),
|
||||
},
|
||||
// {
|
||||
// type: 'Personnel',
|
||||
// value: 'designDutyId',
|
||||
|
||||
Reference in New Issue
Block a user