Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+1
-1
@@ -88,7 +88,7 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
|
||||
cpxh = cpxh.replace("%", "\\%");
|
||||
queryWrapper.like(OtaBaSjList::getCpxh, cpxh);
|
||||
}
|
||||
|
||||
queryWrapper.orderByDesc(OtaBaSjList::getCreateTime);
|
||||
IPage<OtaBaSjList> pageList = otaBaSjListService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
+1
@@ -69,6 +69,7 @@ public class OtaBaSjGgnrfs implements Serializable {
|
||||
/**升级目的*/
|
||||
@Excel(name = "升级目的", width = 15)
|
||||
@ApiModelProperty(value = "升级目的")
|
||||
@Dict(dicCode = "uipgrade_purpose")
|
||||
private java.lang.String sjmd;
|
||||
|
||||
/**由于软件升级活动而导致的车辆功能的任何变化*/
|
||||
|
||||
+5
-1
@@ -273,7 +273,11 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
break;
|
||||
} else {
|
||||
mssc.setOtaId(otaId);
|
||||
mssc.setGnmc(ImportFileUtil.getCellValue(cell, wb));
|
||||
String gnmc = ImportFileUtil.getCellValue(cell, wb);
|
||||
if (StringUtils.isEmpty(gnmc)) {
|
||||
continue;
|
||||
}
|
||||
mssc.setGnmc(gnmc);
|
||||
cell = row.getCell(1);
|
||||
mssc.setPzqk(ImportFileUtil.getCellValueYesOrNo(cell, wb));
|
||||
cell = row.getCell(2);
|
||||
|
||||
+5
-1
@@ -339,7 +339,11 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
break;
|
||||
} else {
|
||||
mssc.setOtaId(otaId);
|
||||
mssc.setXtlb(ImportFileUtil.getCellValue(cell, wb));
|
||||
String xtlb = ImportFileUtil.getCellValue(cell, wb);
|
||||
if (StringUtils.isEmpty(xtlb)) {
|
||||
continue;
|
||||
}
|
||||
mssc.setXtlb(xtlb);
|
||||
cell = row.getCell(1);
|
||||
mssc.setSfksj(ImportFileUtil.getCellValueYesOrNo(cell, wb));
|
||||
cell = row.getCell(2);
|
||||
|
||||
+33
-5
@@ -6,14 +6,17 @@ import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
import com.jero.modules.ota.entity.OtaBaSjGgnrfs;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjyxpg;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjGgnrfsMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjGgnrfsService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjSjyxpgService;
|
||||
import com.jero.modules.ota.utils.ComparisonUtil;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -24,6 +27,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description: 升级备案-用户告知内容及方式
|
||||
@@ -49,6 +53,10 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaSjSjyxpgService otaBaSjSjyxpgService;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -168,18 +176,38 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
|
||||
@Override
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
File attFile = null;
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.isDirectory() && f.getName().equals("用户告知内容及方式")) {
|
||||
attFile = f;
|
||||
}
|
||||
// else if (f.getName().equals("用户告知内容及方式.xlsx")) {
|
||||
// upFile = f;
|
||||
// }
|
||||
}
|
||||
if (null == upFile || null == attFile) {
|
||||
if (null == attFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaSjGgnrfs fs = parseFile(attFile, otaId, cut);
|
||||
add(fs);
|
||||
}
|
||||
|
||||
private OtaBaSjGgnrfs parseFile(File attFile, String otaId, String cut) throws Exception {
|
||||
OtaBaSjGgnrfs fs = new OtaBaSjGgnrfs();
|
||||
fs.setOtaId(otaId);
|
||||
OtaBaSjSjyxpg pg = otaBaSjSjyxpgService.queryByOtaId(otaId, "");
|
||||
if (StringUtils.isNotEmpty(pg.getSjmd())) {
|
||||
fs.setSjmd(pg.getSjmd());
|
||||
}
|
||||
StringBuilder attStr1 = new StringBuilder();
|
||||
File[] attFiles1 = attFile.listFiles();
|
||||
for (int i = 0; i < attFiles1.length; i++) {
|
||||
if (!attFiles1[i].isDirectory() && (attFiles1[i].getName().contains(".doc") || attFiles1[i].getName().contains(".docx") || attFiles1[i].getName().contains(".pdf"))) {
|
||||
if (i >= attFiles1.length - 1) {
|
||||
attStr1.append(ImportFileUtil.uploadFiles(attFiles1[i], ossFileService));
|
||||
} else {
|
||||
attStr1.append(ImportFileUtil.uploadFiles(attFiles1[i], ossFileService)).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
fs.setXgwj(attStr1.toString());
|
||||
return fs;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -188,7 +188,7 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
|
||||
public OtaBaSjSjmbcx parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("车型基本信息.xlsx")) {
|
||||
if (f.getName().equals("升级目标车型.xlsx")) {
|
||||
upFile = f;
|
||||
}
|
||||
}
|
||||
|
||||
+48
-3
@@ -183,7 +183,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
return sjyxpg;
|
||||
}
|
||||
|
||||
private OtaBaSjSjyxpg parseFile(File upFile, String cut) throws Exception {
|
||||
private OtaBaSjSjyxpg parseFile(File upFile, File attFile1, File attFile2, String cut) throws Exception {
|
||||
OtaBaSjSjyxpg sjyxpg = new OtaBaSjSjyxpg();
|
||||
InputStream is = new FileInputStream(upFile);
|
||||
XWPFDocument doc = new XWPFDocument(is);
|
||||
@@ -201,21 +201,66 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
}
|
||||
sjyxpg.setSjmd(sb.toString());
|
||||
}
|
||||
StringBuilder attStr1 = new StringBuilder();
|
||||
File[] attFiles1 = attFile1.listFiles();
|
||||
for (int i = 0; i < attFiles1.length; i++) {
|
||||
if (!attFiles1[i].isDirectory() && (attFiles1[i].getName().contains(".doc") || attFiles1[i].getName().contains(".docx") || attFiles1[i].getName().contains(".pdf"))) {
|
||||
if (i >= attFiles1.length - 1) {
|
||||
attStr1.append(ImportFileUtil.uploadFiles(attFiles1[i], ossFileService));
|
||||
} else {
|
||||
attStr1.append(ImportFileUtil.uploadFiles(attFiles1[i], ossFileService)).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
sjyxpg.setBgfj(attStr1.toString());
|
||||
StringBuilder attStr2 = new StringBuilder();
|
||||
File[] attFiles2 = attFile2.listFiles();
|
||||
for (int i = 0; i < attFiles2.length; i++) {
|
||||
if (!attFiles2[i].isDirectory() && (attFiles2[i].getName().contains(".doc") || attFiles2[i].getName().contains(".docx") || attFiles2[i].getName().contains(".pdf"))) {
|
||||
if (i >= attFiles2.length - 1) {
|
||||
attStr2.append(ImportFileUtil.uploadFiles(attFiles2[i], ossFileService));
|
||||
} else {
|
||||
attStr2.append(ImportFileUtil.uploadFiles(attFiles2[i], ossFileService)).append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
sjyxpg.setClfj(attStr2.toString());
|
||||
return sjyxpg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaSjSjyxpg parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
File upFile = null;
|
||||
File attFile = null;
|
||||
File attFile1 = null;
|
||||
File attFile2 = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("升级影响评估.docx")) {
|
||||
upFile = f;
|
||||
}
|
||||
if (f.isDirectory() && f.getName().equals("升级影响评估")) {
|
||||
attFile = f;
|
||||
}
|
||||
}
|
||||
if (null == upFile) {
|
||||
|
||||
if (null == upFile || null == attFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaSjSjyxpg sjyxpg = parseFile(upFile, cut);
|
||||
|
||||
for (File f : attFile.listFiles()) {
|
||||
if (f.isDirectory() && f.getName().equals("测试报告")) {
|
||||
attFile1 = f;
|
||||
}
|
||||
if (f.isDirectory() && f.getName().equals("硬件版本号附件")) {
|
||||
attFile2 = f;
|
||||
}
|
||||
}
|
||||
if (null == attFile1 || null == attFile2) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
|
||||
|
||||
OtaBaSjSjyxpg sjyxpg = parseFile(upFile, attFile1, attFile2, cut);
|
||||
sjyxpg.setOtaId(otaId);
|
||||
add(sjyxpg);
|
||||
return sjyxpg;
|
||||
|
||||
+9
@@ -294,6 +294,15 @@ public class ImportFileUtil {
|
||||
return res;
|
||||
}
|
||||
|
||||
public static String uploadFiles(File attFile, IOSSFileService ossFileService) throws Exception {
|
||||
String res = "";
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(attFile), "", null, null);
|
||||
if (ObjectUtils.isNotEmpty(ossFile)) {
|
||||
res = ossFile.getId();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static String uploadFiles(File attFile, String[] strs, IOSSFileService ossFileService) throws Exception {
|
||||
String res = "";
|
||||
for (int i = 0; i < strs.length; i++) {
|
||||
|
||||
+9
-9
@@ -87,9 +87,9 @@ export default {
|
||||
return {
|
||||
dataSource: [
|
||||
{
|
||||
sjqbgcs:'不涉及',
|
||||
sjhbgcs:'不涉及',
|
||||
sjsjkzq:'ADC ADAS主控制器'
|
||||
// sjqbgcs:'不涉及',
|
||||
// sjhbgcs:'不涉及',
|
||||
// sjsjkzq:'ADC ADAS主控制器'
|
||||
}
|
||||
],
|
||||
fileList:'',
|
||||
@@ -222,9 +222,9 @@ export default {
|
||||
}
|
||||
getAction('/ota/otaBaSjSjfzbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
this.dataSource =res.result.list == null ? [ {
|
||||
sjqbgcs:'不涉及',
|
||||
sjhbgcs:'不涉及',
|
||||
sjsjkzq:'ADC ADAS主控制器'
|
||||
// sjqbgcs:'不涉及',
|
||||
// sjhbgcs:'不涉及',
|
||||
// sjsjkzq:'ADC ADAS主控制器'
|
||||
}] : res.result.list
|
||||
this.fileList = res.result.fj
|
||||
})
|
||||
@@ -283,9 +283,9 @@ export default {
|
||||
},
|
||||
addlineAtBot(){
|
||||
let obj= {
|
||||
sjqbgcs:'不涉及',
|
||||
sjhbgcs:'不涉及',
|
||||
sjsjkzq:'ADC ADAS主控制器'
|
||||
// sjqbgcs:'不涉及',
|
||||
// sjhbgcs:'不涉及',
|
||||
// sjsjkzq:'ADC ADAS主控制器'
|
||||
}
|
||||
this.dataSource.push(obj)
|
||||
},
|
||||
|
||||
+8
-8
@@ -89,10 +89,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dataSource: [
|
||||
{
|
||||
sjqbgcs:'不涉及',
|
||||
sjhbgcs:'不涉及'
|
||||
}
|
||||
// {
|
||||
// sjqbgcs:'不涉及',
|
||||
// sjhbgcs:'不涉及'
|
||||
// }
|
||||
],
|
||||
loading: false,
|
||||
disable:false,
|
||||
@@ -288,8 +288,8 @@ export default {
|
||||
}
|
||||
getAction('/ota/otaBaSjSjxtbh/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
this.dataSource =res.result.list == null ? [ {
|
||||
sjqbgcs:'不涉及',
|
||||
sjhbgcs:'不涉及'
|
||||
// sjqbgcs:'不涉及',
|
||||
// sjhbgcs:'不涉及'
|
||||
}] : res.result.list
|
||||
})
|
||||
},
|
||||
@@ -323,8 +323,8 @@ export default {
|
||||
},
|
||||
addlineAtBot(){
|
||||
let obj= {
|
||||
sjqbgcs:'不涉及',
|
||||
sjhbgcs:'不涉及'
|
||||
// sjqbgcs:'不涉及',
|
||||
// sjhbgcs:'不涉及'
|
||||
}
|
||||
this.dataSource.push(obj)
|
||||
},
|
||||
|
||||
+8
-16
@@ -320,14 +320,6 @@ export default {
|
||||
],
|
||||
form:{
|
||||
sjmd:'',
|
||||
fhgd:1,
|
||||
zdjsxg:2,
|
||||
sfyxaq:2,
|
||||
yhqr:1,
|
||||
aqkkx:1,
|
||||
zxsj:2,
|
||||
aqjz:'2',
|
||||
sjbcs:'3,4'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -385,14 +377,14 @@ this.$forceUpdate()
|
||||
if(res.code==200){
|
||||
this.form=res.result==null ? {
|
||||
sjmd:'',
|
||||
fhgd:1,
|
||||
zdjsxg:2,
|
||||
sfyxaq:2,
|
||||
yhqr:1,
|
||||
aqkkx:1,
|
||||
zxsj:2,
|
||||
aqjz:'2',
|
||||
sjbcs:'3,4'
|
||||
// fhgd:1,
|
||||
// zdjsxg:2,
|
||||
// sfyxaq:2,
|
||||
// yhqr:1,
|
||||
// aqkkx:1,
|
||||
// zxsj:2,
|
||||
// aqjz:'2',
|
||||
// sjbcs:'3,4'
|
||||
} : res.result
|
||||
}
|
||||
})
|
||||
|
||||
+3
-2
@@ -168,7 +168,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
confirmLoading: false,
|
||||
disabled: false,
|
||||
form:{
|
||||
qymc:'安徽江淮汽车集团股份有限公司'
|
||||
qymc:''
|
||||
},
|
||||
url: {
|
||||
exportData: '/ota/otaBaSjSjmbcx/exportData',
|
||||
@@ -215,7 +215,8 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
this.form.bapc=undefined
|
||||
this.form.dllx1=undefined
|
||||
this.form.dllx2=undefined
|
||||
this.form.qymc='安徽江淮汽车集团股份有限公司'
|
||||
// this.form.qymc='安徽江淮汽车集团股份有限公司'
|
||||
this.form.qymc=''
|
||||
}else{
|
||||
this.form=res.result
|
||||
if(res.result.dllx1==null){
|
||||
|
||||
+21
-10
@@ -20,12 +20,20 @@
|
||||
<span class="title-text-text" :title="$t('pgradepurpose')">{{$t('pgradepurpose')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="sjmd">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
:max-length="500"
|
||||
:title='formInline.sjmd'
|
||||
v-model='formInline.sjmd'
|
||||
:placeholder="$t('pleaseEnter')"></a-input>
|
||||
<!-- <a-input class="box-input"-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- :max-length="500"-->
|
||||
<!-- :title='formInline.sjmd'-->
|
||||
<!-- v-model='formInline.sjmd'-->
|
||||
<!-- :placeholder="$t('pleaseEnter')"></a-input>-->
|
||||
<j-multi-select-tag class="box-input"
|
||||
v-model="formInline.sjmd"
|
||||
@change="update"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
:dictCode="'uipgrade_purpose'"
|
||||
:triggerChange="false"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -204,8 +212,8 @@ export default {
|
||||
confirmLoading: false,
|
||||
disabled: false,
|
||||
formInline:{
|
||||
sjky:'车辆解闭锁功能可用,但不可驾驶',
|
||||
sjbkygn:'除解闭锁均不可用'
|
||||
// sjky:'车辆解闭锁功能可用,但不可驾驶',
|
||||
// sjbkygn:'除解闭锁均不可用'
|
||||
},
|
||||
url: {
|
||||
exportData: '/ota/otaBaSjGgnrfs/exportData',
|
||||
@@ -259,8 +267,8 @@ export default {
|
||||
if(res.code == 200){
|
||||
|
||||
this.formInline= res.result ==null ? {
|
||||
sjky:'车辆解闭锁功能可用,但不可驾驶',
|
||||
sjbkygn:'除解闭锁均不可用'
|
||||
// sjky:'车辆解闭锁功能可用,但不可驾驶',
|
||||
// sjbkygn:'除解闭锁均不可用'
|
||||
} :res.result
|
||||
this.formInline.id=res.result.id
|
||||
this.$forceUpdate()
|
||||
@@ -292,6 +300,9 @@ export default {
|
||||
dateChange(item) {
|
||||
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
||||
},
|
||||
update(){
|
||||
this.$forceUpdate()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user