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

This commit is contained in:
zyx.net
2023-03-30 16:24:44 +08:00
9 changed files with 92 additions and 69 deletions
@@ -84,6 +84,8 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
}
otaBaCxJbxx.setOtaId(otaBaCxJbxx.getOtaId());
otaBaCxJbxx.setUpdateTime(now);
deleteById(otaBaCxJbxx.getId());
deleteById(otaBaCxJbxxOld.getId());
saveOrUpdate(otaBaCxJbxx);
ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaCxJbxx.getOtaId(), OtaModuleEnum.CX_CXJBXX, otaBaCxJbxxOld, otaBaCxJbxx, sysDictService);
@@ -28,6 +28,7 @@ import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
/**
* @Description: 升级备案-用户告知内容及方式
@@ -143,6 +144,22 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
return list();
}
public OtaBaSjGgnrfs setDefault(String otaId) {
OtaBaSjGgnrfs res = new OtaBaSjGgnrfs();
Date now = new Date();
res.setSjky("车辆解闭锁功能可用,但不可驾驶");
res.setSjbkygn("除解闭锁均不可用");
res.setSjsfcg(1);
res.setGzbg(1);
res.setGzscnr(1);
res.setGzyhfs("1,3");
res.setCreateTime(now);
res.setUpdateTime(now);
res.setOtaId(otaId);
res.setId(UUID.randomUUID().toString().replace("-", ""));
return res;
}
@Override
public OtaBaSjGgnrfs queryByOtaId(String otaId, String otaIdT) {
OtaBaSjGgnrfs res = getByOtaId(otaId);
@@ -150,26 +167,7 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
res = getByOtaId(otaIdT);
}
if (ObjectUtils.isEmpty(res)) {
res = new OtaBaSjGgnrfs();
res.setOtaId(otaId);
}
if (StringUtils.isEmpty(res.getSjky())) {
res.setSjky("车辆解闭锁功能可用,但不可驾驶");
}
if (StringUtils.isEmpty(res.getSjbkygn())) {
res.setSjbkygn("除解闭锁均不可用");
}
if (null == res.getSjsfcg()) {
res.setSjsfcg(1);
}
if (null == res.getGzbg()) {
res.setGzbg(1);
}
if (null == res.getGzscnr()) {
res.setGzscnr(1);
}
if (StringUtils.isEmpty(res.getGzyhfs())) {
res.setGzyhfs("1,3");
res = setDefault(otaId);
}
return res;
}
@@ -182,6 +182,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
if (ObjectUtil.isEmpty(res)) {
res = getByOtaId(otaIdT);
}
JSONObject json = new JSONObject();
json.put("list", res);
return json;
@@ -67,14 +67,13 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
public void add(OtaBaSjSjyxpg otaBaSjSjyxpg) {
Date now = new Date();
if (null != otaBaSjSjyxpg) {
String newYzcl = otaBaSjSjyxpg.getBgfj();
String oldYzcl = "";
String newZmcl = otaBaSjSjyxpg.getClfj();
String oldZmcl = "";
OtaBaSjSjyxpg otaBaSjSjyxpgOld = this.queryByOtaId(otaBaSjSjyxpg.getOtaId(),"");
OtaBaSjSjyxpg otaBaSjSjyxpgOld = this.queryByOtaId(otaBaSjSjyxpg.getOtaId(), "");
if (null != otaBaSjSjyxpgOld) {
otaBaSjSjyxpg.setId(otaBaSjSjyxpgOld.getId());
oldYzcl = otaBaSjSjyxpgOld.getBgfj();
@@ -84,13 +83,11 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
}
otaBaSjSjyxpg.setUpdateTime(now);
ComparisonUtil cu = new ComparisonUtil();
if (ObjectUtils.isEmpty(otaBaSjSjyxpgOld)) {
otaBaSjSjyxpgOld = new OtaBaSjSjyxpg();
}
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), OtaModuleEnum.SJ_SJYXPG, otaBaSjSjyxpgOld, otaBaSjSjyxpg, sysDictService);
reList.addAll(cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), newYzcl, oldYzcl, OtaModuleEnum.SJ_SJMBCL, "验证材料", ossFileService));
reList.addAll(cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), newZmcl, oldZmcl, OtaModuleEnum.SJ_SJMBCL, "证明材料", ossFileService));
deleteById(otaBaSjSjyxpg.getId());
saveOrUpdate(otaBaSjSjyxpg);
otaBaCxTxjlService.saveBatch(reList);
}
@@ -152,6 +149,24 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
return list();
}
public OtaBaSjSjyxpg setDefault(String otaId) {
Date now = new Date();
OtaBaSjSjyxpg res = new OtaBaSjSjyxpg();
res.setOtaId(otaId);
res.setFhgd(2);
res.setZdjsxg(1);
res.setZxsj(2);
res.setAqjz("2");
res.setSfyxaq(2);
res.setYhqr(1);
res.setSjbcs("3,4");
res.setAqkkx(1);
res.setCreateTime(now);
res.setUpdateTime(now);
return res;
}
@Override
public OtaBaSjSjyxpg queryByOtaId(String otaId, String otaIdT) {
OtaBaSjSjyxpg res = getByOtaId(otaId);
@@ -159,33 +174,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
res = getByOtaId(otaIdT);
}
if (ObjectUtils.isEmpty(res)) {
res = new OtaBaSjSjyxpg();
res.setOtaId(otaId);
}
if (null == res.getFhgd()) {
res.setFhgd(2);
}
if (null == res.getZdjsxg()) {
res.setZdjsxg(1);
}
if (null == res.getZxsj()) {
res.setZxsj(2);
}
if (StringUtils.isEmpty(res.getAqjz())) {
res.setAqjz("2");
}
if (null == res.getSfyxaq()) {
res.setSfyxaq(2);
}
if (null == res.getYhqr()) {
res.setYhqr(1);
}
if (StringUtils.isEmpty(res.getSjbcs())) {
res.setSjbcs("3,4");
}
if (null == res.getAqkkx()) {
res.setAqkkx(1);
res = setDefault(otaId);
}
return res;
}
@@ -196,13 +196,11 @@ public class ComparisonUtil<T> {
if (!newStr.equals(oldStr)) {
Object newVal = field.get(newClazz);
String newTitleStr = "";
if (ObjectUtils.isNotEmpty(newVal)) {
Field tableField = newClazz.getClass().getDeclaredField(tableTitle);
tableField.setAccessible(true);
Object newTitleVal = tableField.get(newClazz);
if (ObjectUtils.isNotEmpty(newTitleVal)) {
newTitleStr = newTitleVal.toString();
}
Field tableField = newClazz.getClass().getDeclaredField(tableTitle);
tableField.setAccessible(true);
Object newTitleVal = tableField.get(newClazz);
if (ObjectUtils.isNotEmpty(newTitleVal)) {
newTitleStr = newTitleVal.toString();
}
String content = newTitleStr + "-" + title + "由'" + oldStr + "'改为'" + newStr + "'";
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
@@ -241,9 +239,19 @@ public class ComparisonUtil<T> {
res = "";
for (int i = 0; i < newValStr.length; i++) {
if (i == newValStr.length - 1) {
res += sysDictService.queryDictTextByKey(ote.getType(), newValStr[i]);
String s = sysDictService.queryDictTextByKey(ote.getType(), newValStr[i]);
if (StringUtils.isNotEmpty(s)) {
res += s;
} else {
res += "";
}
} else {
res += sysDictService.queryDictTextByKey(ote.getType(), newValStr[i]) + ",";
String s = sysDictService.queryDictTextByKey(ote.getType(), newValStr[i]);
if (StringUtils.isNotEmpty(s)) {
res += s + ",";
} else {
res += "空,";
}
}
}
}
+1 -1
View File
@@ -1723,7 +1723,7 @@ module.exports = {
cantTransferToYourself:"Can't transfer to yourself",
theDataYouInitiate:'The data you selected does not meet the process initiation criteria. Please recheck and initiate',
dataWithProcessReleasedCannotBeReset:'Data with a process status of list to be released cannot be reset',
reasonForReturnOfDesignCompliance:'Reason for return of design compliance',
reasonForReturnOfDesignCompliance:'Reason for compliance return',
noteone:'Note: CSV format is supported. The value is within 20M and the number is 1 to 10',
notetwo:'\n1. Provide the modified or expanded batch of "Announcement" and supporting materials;\n2. Verification materials shall be submitted to ensure that products meet the relevant requirements of national laws and regulations, technologies, standards and technical specifications;\n',
notethree:'Provide supporting materials',
+1 -1
View File
@@ -1826,7 +1826,7 @@ module.exports = {
notecsv:':支持CSV格式大小20M以内',
theDataYouInitiate:'您所选的数据均不符合流程发起条件请重新检查后发起',
dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置',
reasonForReturnOfDesignCompliance:'设计符合性确认退回原因',
reasonForReturnOfDesignCompliance:'符合性退回原因',
notetwo:'\n1提供变更或扩展后的公告批次及证明材料;\n2应提交验证材料保障产品符合国家法律法规技术标准及技术规范等相关要求;\n',
notethree:'\n提供证明材料\n',
verifyComplianceConfirmReturnReason:'验证符合性确认退回原因',
@@ -966,8 +966,19 @@
}
})
},
generateRandom() {
return Math.random().toString(32)
generateRandom(size = 16) {
let urlAlphabet =
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
let id = ''
// A compact alternative for `for (var i = 0; i < step; i++)`.
let i = size
while (i--) {
// `| 0` is more compact and faster than `Math.floor()`.
id += urlAlphabet[(Math.random() * 64) | 0]
}
return id
// return Math.random().toString(32)
},
addconfig() {
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData)
@@ -728,8 +728,8 @@
</a-button>
</div>
</div>
<div @click="addconfig" class='addicon'
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
<div @click="addconfig" class='addicon'
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
<a-icon type="plus"/>
</div>
<div @click="delconfig(item)" class='delicon'
@@ -840,15 +840,29 @@
}
})
},
generateRandom() {
return Math.random().toString(32)
generateRandom(size = 16) {
let urlAlphabet =
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
let id = ''
// A compact alternative for `for (var i = 0; i < step; i++)`.
let i = size
while (i--) {
// `| 0` is more compact and faster than `Math.floor()`.
id += urlAlphabet[(Math.random() * 64) | 0]
}
return id
// return Math.random().toString(32)
},
addconfig() {
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData)
for (let i = 0; i < paramsConfigData.length; i++) {
if (i == paramsConfigData.length - 1) {
let name = paramsConfigData[i]
let generateRandom = this.generateRandom()
console.log(generateRandom)
this.detailDate.paramsConfigData[generateRandom] = JSON.parse(JSON.stringify(this.detailDate.paramsConfigData[name]))
this.detailDate.paramsConfigData[generateRandom].forEach(res => {
if (res.type === 'pull_more') {