OTA-车型功能备案,填写记录查询修改。模块信息完善。
This commit is contained in:
+7
@@ -61,8 +61,15 @@ public class OtaBaCxTxjlController extends JeroController<OtaBaCxTxjl, IOtaBaCxT
|
||||
return Result.OK(page);
|
||||
}
|
||||
QueryWrapper<OtaBaCxTxjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxTxjl, req.getParameterMap());
|
||||
if(StringUtils.isNotEmpty(otaBaCxTxjl.getContext())){
|
||||
queryWrapper.and(query -> {
|
||||
query.lambda().like(OtaBaCxTxjl::getContent,otaBaCxTxjl.getContext());
|
||||
query.or().lambda().like(OtaBaCxTxjl::getCreateBy,otaBaCxTxjl.getContext());
|
||||
});
|
||||
}
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<OtaBaCxTxjl> pageList = otaBaCxTxjlService.page(page, queryWrapper);
|
||||
this.otaBaCxTxjlService.disposeData(pageList.getRecords(),otaBaCxTxjl.getCut());
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -84,4 +85,11 @@ public class OtaBaCxTxjl implements Serializable {
|
||||
this.module = module;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
// 内容搜索条件,模糊搜索填写内容、填写人
|
||||
@TableField(exist = false)
|
||||
private String context;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
}
|
||||
|
||||
+31
-14
@@ -1,22 +1,25 @@
|
||||
package com.jero.modules.ota.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
|
||||
public enum OtaModuleEnum {
|
||||
|
||||
CX_CXJBXX("车型基本信息", "1","1"),
|
||||
CX_ZXSJYQ("在线升级要求", "1","1"),
|
||||
CX_AQCS("安全措施", "1","1"),
|
||||
CX_KSJDXTMCYCS("可在线升级的系统名称与参数", "1","1"),
|
||||
CX_KZXSJDJSFZGNMCYCS("可在线升级的驾驶辅助功能名称与参数", "1","1"),
|
||||
CX_JSFZXTJCBACS("驾驶辅助系统基础备案参数", "1","1"),
|
||||
CX_QT("其他", "1","1"),
|
||||
CX_CXJBXX("车型基本信息", "Basic information of vehicle type","5b123b5672f44986a267942530427e15"),
|
||||
CX_ZXSJYQ("在线升级要求", "Online upgrade requirements","645c35027e094dd2a51de40ef5a1d1ae"),
|
||||
CX_AQCS("安全措施", "Safety measure","5fd89d87343f417ea4198187805db601"),
|
||||
CX_KSJDXTMCYCS("可在线升级的系统名称与参数", "Name and parameters of the system that can be upgraded online","06f921687cf44288819fe0b371dd3ba9"),
|
||||
CX_KZXSJDJSFZGNMCYCS("可在线升级的驾驶辅助功能名称与参数", "The name and parameters of the driver assistance feature that can be upgraded online","a0921f99bfb042ab90747c964e60474d"),
|
||||
CX_JSFZXTJCBACS("驾驶辅助系统基础备案参数", "Driver assistance system basic record parameters","0ebcf0ad4ca842c88db4d96297b4a8a3"),
|
||||
CX_QT("其他", "others","17b94237382e444780537bfa9052e432"),
|
||||
|
||||
SJ_SJMBCX("升级目标车型", "1","1"),
|
||||
SJ_SJMBCL("本次升级的目标车辆", "1","1"),
|
||||
SJ_SJYXPG("升级影响评估", "1","1"),
|
||||
SJ_SJXTMCBH("本次升级的系统名称与参数变化", "1","1"),
|
||||
SJ_SJJSMCBH("本次升级的驾驶辅助功能名称与参数变化", "1","1"),
|
||||
SJ_YHGZNRFS("用户告知内容及方式", "1","1"),
|
||||
SJ_QT("其他升级任务信息", "1","1");
|
||||
SJ_SJMBCX("升级目标车型", "Upgrade target model","8ed5e877cfbe446297f56891294e54bb"),
|
||||
SJ_SJMBCL("本次升级的目标车辆", "The target vehicle of this upgrade","67d1366fd2714c03a012c27688a1d906"),
|
||||
SJ_SJYXPG("升级影响评估", "Upgrade impact assessment","05d6cb54a8844b7cbc50967b69ed6ad7"),
|
||||
SJ_SJXTMCBH("本次升级的系统名称与参数变化", "The system name and parameters of the upgrade have changed","f372f891416842b99a3d15851758831c"),
|
||||
SJ_SJJSMCBH("本次升级的驾驶辅助功能名称与参数变化", "The name and parameters of the driver assistance function are changed in this upgrade","503ecaa0076e452f9cb5daa6b4897c2e"),
|
||||
SJ_YHGZNRFS("用户告知内容及方式", "Content and method of user notification","a20fa7f173674627a6b407c9cc6a2bae"),
|
||||
SJ_QT("其他升级任务信息", "Information about other upgrade tasks","e815bfc4c8e04deda0d17358224320b0");
|
||||
|
||||
String name;
|
||||
String nameEN;
|
||||
@@ -51,4 +54,18 @@ public enum OtaModuleEnum {
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getNameByValue(String value,String cut){
|
||||
String result = "";
|
||||
for (OtaModuleEnum otaModuleEnum : OtaModuleEnum.values()) {
|
||||
if(StringUtils.equals(otaModuleEnum.value,value)){
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
result = otaModuleEnum.name;
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
result = otaModuleEnum.nameEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -65,4 +65,11 @@ public interface IOtaBaCxTxjlService extends IService<OtaBaCxTxjl> {
|
||||
List<OtaBaCxTxjl> queryList();
|
||||
|
||||
List<OtaBaCxTxjl> queryByOtaId(String otaId);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<OtaBaCxTxjl> datas, String cut);
|
||||
}
|
||||
|
||||
+10
@@ -6,6 +6,7 @@ import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaCxTxjlMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -129,4 +130,13 @@ public class OtaBaCxTxjlServiceImpl extends ServiceImpl<OtaBaCxTxjlMapper, OtaBa
|
||||
List<OtaBaCxTxjl> res = this.list(queryWrapper);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<OtaBaCxTxjl> datas, String cut) {
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
datas.forEach(data -> {
|
||||
data.setModule(OtaModuleEnum.getNameByValue(data.getModule(),cut));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ public class ComparisonUtil<T> {
|
||||
String oldStr = parseDictText(ote, field, oldClazz, sysDictService);
|
||||
if (!newStr.equals(oldStr)) {
|
||||
String content = "将" + title + "的'" + oldStr + "'改为'" + newStr + "'";
|
||||
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
|
||||
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getValue(), content));
|
||||
}
|
||||
}
|
||||
return resList;
|
||||
|
||||
Reference in New Issue
Block a user