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.setOtaId(otaBaCxJbxx.getOtaId());
otaBaCxJbxx.setUpdateTime(now); otaBaCxJbxx.setUpdateTime(now);
deleteById(otaBaCxJbxx.getId());
deleteById(otaBaCxJbxxOld.getId());
saveOrUpdate(otaBaCxJbxx); saveOrUpdate(otaBaCxJbxx);
ComparisonUtil cu = new ComparisonUtil(); ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaCxJbxx.getOtaId(), OtaModuleEnum.CX_CXJBXX, otaBaCxJbxxOld, otaBaCxJbxx, sysDictService); 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.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.UUID;
/** /**
* @Description: 升级备案-用户告知内容及方式 * @Description: 升级备案-用户告知内容及方式
@@ -143,6 +144,22 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
return list(); 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 @Override
public OtaBaSjGgnrfs queryByOtaId(String otaId, String otaIdT) { public OtaBaSjGgnrfs queryByOtaId(String otaId, String otaIdT) {
OtaBaSjGgnrfs res = getByOtaId(otaId); OtaBaSjGgnrfs res = getByOtaId(otaId);
@@ -150,26 +167,7 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
res = getByOtaId(otaIdT); res = getByOtaId(otaIdT);
} }
if (ObjectUtils.isEmpty(res)) { if (ObjectUtils.isEmpty(res)) {
res = new OtaBaSjGgnrfs(); res = setDefault(otaId);
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");
} }
return res; return res;
} }
@@ -182,6 +182,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
if (ObjectUtil.isEmpty(res)) { if (ObjectUtil.isEmpty(res)) {
res = getByOtaId(otaIdT); res = getByOtaId(otaIdT);
} }
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("list", res); json.put("list", res);
return json; return json;
@@ -67,14 +67,13 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
public void add(OtaBaSjSjyxpg otaBaSjSjyxpg) { public void add(OtaBaSjSjyxpg otaBaSjSjyxpg) {
Date now = new Date(); Date now = new Date();
if (null != otaBaSjSjyxpg) { if (null != otaBaSjSjyxpg) {
String newYzcl = otaBaSjSjyxpg.getBgfj(); String newYzcl = otaBaSjSjyxpg.getBgfj();
String oldYzcl = ""; String oldYzcl = "";
String newZmcl = otaBaSjSjyxpg.getClfj(); String newZmcl = otaBaSjSjyxpg.getClfj();
String oldZmcl = ""; String oldZmcl = "";
OtaBaSjSjyxpg otaBaSjSjyxpgOld = this.queryByOtaId(otaBaSjSjyxpg.getOtaId(),""); OtaBaSjSjyxpg otaBaSjSjyxpgOld = this.queryByOtaId(otaBaSjSjyxpg.getOtaId(), "");
if (null != otaBaSjSjyxpgOld) { if (null != otaBaSjSjyxpgOld) {
otaBaSjSjyxpg.setId(otaBaSjSjyxpgOld.getId()); otaBaSjSjyxpg.setId(otaBaSjSjyxpgOld.getId());
oldYzcl = otaBaSjSjyxpgOld.getBgfj(); oldYzcl = otaBaSjSjyxpgOld.getBgfj();
@@ -84,13 +83,11 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
} }
otaBaSjSjyxpg.setUpdateTime(now); otaBaSjSjyxpg.setUpdateTime(now);
ComparisonUtil cu = new ComparisonUtil(); ComparisonUtil cu = new ComparisonUtil();
if (ObjectUtils.isEmpty(otaBaSjSjyxpgOld)) {
otaBaSjSjyxpgOld = new OtaBaSjSjyxpg();
}
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), OtaModuleEnum.SJ_SJYXPG, otaBaSjSjyxpgOld, otaBaSjSjyxpg, sysDictService); 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(), newYzcl, oldYzcl, OtaModuleEnum.SJ_SJMBCL, "验证材料", ossFileService));
reList.addAll(cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), newZmcl, oldZmcl, OtaModuleEnum.SJ_SJMBCL, "证明材料", ossFileService)); reList.addAll(cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), newZmcl, oldZmcl, OtaModuleEnum.SJ_SJMBCL, "证明材料", ossFileService));
deleteById(otaBaSjSjyxpg.getId());
saveOrUpdate(otaBaSjSjyxpg); saveOrUpdate(otaBaSjSjyxpg);
otaBaCxTxjlService.saveBatch(reList); otaBaCxTxjlService.saveBatch(reList);
} }
@@ -152,6 +149,24 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
return list(); 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 @Override
public OtaBaSjSjyxpg queryByOtaId(String otaId, String otaIdT) { public OtaBaSjSjyxpg queryByOtaId(String otaId, String otaIdT) {
OtaBaSjSjyxpg res = getByOtaId(otaId); OtaBaSjSjyxpg res = getByOtaId(otaId);
@@ -159,33 +174,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
res = getByOtaId(otaIdT); res = getByOtaId(otaIdT);
} }
if (ObjectUtils.isEmpty(res)) { if (ObjectUtils.isEmpty(res)) {
res = new OtaBaSjSjyxpg(); res = setDefault(otaId);
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);
} }
return res; return res;
} }
@@ -196,13 +196,11 @@ public class ComparisonUtil<T> {
if (!newStr.equals(oldStr)) { if (!newStr.equals(oldStr)) {
Object newVal = field.get(newClazz); Object newVal = field.get(newClazz);
String newTitleStr = "空"; String newTitleStr = "空";
if (ObjectUtils.isNotEmpty(newVal)) { Field tableField = newClazz.getClass().getDeclaredField(tableTitle);
Field tableField = newClazz.getClass().getDeclaredField(tableTitle); tableField.setAccessible(true);
tableField.setAccessible(true); Object newTitleVal = tableField.get(newClazz);
Object newTitleVal = tableField.get(newClazz); if (ObjectUtils.isNotEmpty(newTitleVal)) {
if (ObjectUtils.isNotEmpty(newTitleVal)) { newTitleStr = newTitleVal.toString();
newTitleStr = newTitleVal.toString();
}
} }
String content = newTitleStr + "-" + title + "由'" + oldStr + "'改为'" + newStr + "'"; String content = newTitleStr + "-" + title + "由'" + oldStr + "'改为'" + newStr + "'";
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content)); resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
@@ -241,9 +239,19 @@ public class ComparisonUtil<T> {
res = ""; res = "";
for (int i = 0; i < newValStr.length; i++) { for (int i = 0; i < newValStr.length; i++) {
if (i == newValStr.length - 1) { 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 { } 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", cantTransferToYourself:"Can't transfer to yourself",
theDataYouInitiate:'The data you selected does not meet the process initiation criteria. Please recheck and initiate', 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', 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', 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', 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', notethree:'Provide supporting materials',
+1 -1
View File
@@ -1826,7 +1826,7 @@ module.exports = {
notecsv:'注:支持CSV格式,大小20M以内', notecsv:'注:支持CSV格式,大小20M以内',
theDataYouInitiate:'您所选的数据,均不符合流程发起条件,请重新检查后发起', theDataYouInitiate:'您所选的数据,均不符合流程发起条件,请重新检查后发起',
dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置', dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置',
reasonForReturnOfDesignCompliance:'设计符合性确认退回原因', reasonForReturnOfDesignCompliance:'符合性退回原因',
notetwo:'\n1、提供变更或扩展后的《公告》批次及证明材料;\n2、应提交验证材料,保障产品符合国家法律法规、技术、标准及技术规范等相关要求;\n', notetwo:'\n1、提供变更或扩展后的《公告》批次及证明材料;\n2、应提交验证材料,保障产品符合国家法律法规、技术、标准及技术规范等相关要求;\n',
notethree:'\n提供证明材料\n', notethree:'\n提供证明材料\n',
verifyComplianceConfirmReturnReason:'验证符合性确认退回原因', verifyComplianceConfirmReturnReason:'验证符合性确认退回原因',
@@ -966,8 +966,19 @@
} }
}) })
}, },
generateRandom() { generateRandom(size = 16) {
return Math.random().toString(32) 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() { addconfig() {
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData) let paramsConfigData = Object.keys(this.detailDate.paramsConfigData)
@@ -728,8 +728,8 @@
</a-button> </a-button>
</div> </div>
</div> </div>
<div @click="addconfig" class='addicon' <div @click="addconfig" class='addicon'
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9"> v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
<a-icon type="plus"/> <a-icon type="plus"/>
</div> </div>
<div @click="delconfig(item)" class='delicon' <div @click="delconfig(item)" class='delicon'
@@ -840,15 +840,29 @@
} }
}) })
}, },
generateRandom() { generateRandom(size = 16) {
return Math.random().toString(32)
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() { addconfig() {
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData) let paramsConfigData = Object.keys(this.detailDate.paramsConfigData)
for (let i = 0; i < paramsConfigData.length; i++) { for (let i = 0; i < paramsConfigData.length; i++) {
if (i == paramsConfigData.length - 1) { if (i == paramsConfigData.length - 1) {
let name = paramsConfigData[i] let name = paramsConfigData[i]
let generateRandom = this.generateRandom() let generateRandom = this.generateRandom()
console.log(generateRandom)
this.detailDate.paramsConfigData[generateRandom] = JSON.parse(JSON.stringify(this.detailDate.paramsConfigData[name])) this.detailDate.paramsConfigData[generateRandom] = JSON.parse(JSON.stringify(this.detailDate.paramsConfigData[name]))
this.detailDate.paramsConfigData[generateRandom].forEach(res => { this.detailDate.paramsConfigData[generateRandom].forEach(res => {
if (res.type === 'pull_more') { if (res.type === 'pull_more') {