Merge branch 'dev_2nd_LCYH' of http://git.hzwlsoft.com/laws-nio/laws-weilai into dev_2nd_LCYH

This commit is contained in:
yuekuo
2023-03-29 10:15:37 +08:00
60 changed files with 2968 additions and 1362 deletions
@@ -659,6 +659,7 @@ public class SysPermissionController {
flowTypeList.add("3");
flowTypeList.add("4");
flowTypeList.add("10");
flowTypeList.add("21");
params.put("flowTypeList",flowTypeList);
//存在待办任务标识,true为有
boolean existTaskFlag = false;
@@ -63,22 +63,22 @@ public class AuthDummyInventoryInfoEO implements Serializable {
private java.lang.String sysOrgCode;
/**类别*/
@Excel(name = "类别", width = 15)
@Excel(name = "*类别", width = 15)
@ApiModelProperty(value = "类别")
private java.lang.String category;
/**检验项目*/
@Excel(name = "检验项目", width = 15)
@Excel(name = "*检验项目", width = 15)
@ApiModelProperty(value = "检验项目")
private java.lang.String inspectionItem;
/**配置项*/
@Excel(name = "配置项", width = 15)
@Excel(name = "*配置项", width = 15)
@ApiModelProperty(value = "配置项")
private java.lang.String configItem;
/**WVTA ID*/
@Excel(name = "WVTA ID", width = 15)
@Excel(name = "*WVTA ID", width = 15)
@ApiModelProperty(value = "WVTA ID")
private java.lang.String wvtaId;
@@ -107,7 +107,7 @@ public class AuthDummyInventoryInfoEO implements Serializable {
@ApiModelProperty(value = "交付物类型")
private String deliverableType;
@TableField(exist = false)
@Excel(name = "交付物类型", width = 15)
@Excel(name = "*交付物类型", width = 15)
// 交付物类型名称
private String deliverableTypeName;
// 交付物类型名称-英文
@@ -60,22 +60,22 @@ public class AuthDummyInventoryInfoEOEn implements Serializable {
private String sysOrgCode;
/**类别*/
@Excel(name = "Category", width = 15)
@Excel(name = "*Category", width = 15)
@ApiModelProperty(value = "类别")
private String category;
/**检验项目*/
@Excel(name = "Inspection Items", width = 15)
@Excel(name = "*Inspection Items", width = 15)
@ApiModelProperty(value = "检验项目")
private String inspectionItem;
/**配置项*/
@Excel(name = "Configuration Item", width = 15)
@Excel(name = "*Configuration Item", width = 15)
@ApiModelProperty(value = "配置项")
private String configItem;
/**WVTA ID*/
@Excel(name = "WVTA ID", width = 15)
@Excel(name = "*WVTA ID", width = 15)
@ApiModelProperty(value = "WVTA ID")
private String wvtaId;
@@ -104,7 +104,7 @@ public class AuthDummyInventoryInfoEOEn implements Serializable {
@ApiModelProperty(value = "交付物类型")
private String deliverableType;
@TableField(exist = false)
@Excel(name = "Deliverable Type", width = 15)
@Excel(name = "*Deliverable Type", width = 15)
// 交付物类型名称
private String deliverableTypeName;
// 交付物类型名称-英文
@@ -859,18 +859,18 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
try {
String title = "";
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
title = "类别,检验项目,配置项,WVTA ID," +
"*编号,*责任领域,交付物类型,";
title = "*类别,*检验项目,*配置项,*WVTA ID," +
"*编号,*责任领域,*交付物类型,";
}else{
title = "Category,Inspection Items,Configuration Item,WVTA ID," +
"*Number,*Responsible Field,Deliverable Type,";
title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID," +
"*Number,*Responsible Field,*Deliverable Type,";
}
List<String> list = Arrays.asList(title.split(","));
int index = 0;
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
index = list.indexOf("交付物类型") + 1;
index = list.indexOf("*交付物类型") + 1;
}else{
index = list.indexOf("Deliverable Type") + 1;
index = list.indexOf("*Deliverable Type") + 1;
}
//创建临时文件夹
@@ -897,18 +897,16 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
explain = "填写说明\n" +
"1.导入数据从第三行开始\n" +
"2.所有带*号的字段必须填写\n"+
"3.交付物类型,字段是单选属性,必须和系统中的对应字段选项相匹配\n" +
"4.编号,责任领域,字段是多选属性,必须和系统中的对应字段选项相匹配,填写多个时采用英文或中文逗号分割\n" +
"5.类别,WVTA ID,检验项目,配置项填写文本内容\n" +
"6.交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx";
"3.交付物类型,责任领域字段是单选属性,必须和系统中的对应字段选项相匹配\n" +
"4.编号,类别,检验项目,配置项,WVTA ID,填写文本内容\n" +
"5.交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx" ;
}else{
explain = "Filling explanation\n" +
"1.Import data starts at the fourth line\n" +
"1.Import data starts at the third line\n" +
"2.All fields marked with * must be filled in\n"+
"3.Deliverable Type,Fields are radio attributes that must match the corresponding field option in the system\n" +
"4.Number,Responsible Field, field is a multi-select attribute and must match the corresponding field in the system. If multiple fields are filled in, separate them by commas (,)\n" +
"5.Category,WVTA ID,Inspection Items,Configuration ItemFill in the text\n" +
"6.Deliverable template,When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. If b. diocx is stored under the AAA standard number, enter AAA/B.docx";
"3.Deliverable Type,Responsible,Fields are radio attributes that must match the corresponding field option in the system\n" +
"4.Number,Category,Inspection Items,Configuration Item,WVTA ID,Fill in the text\n" +
"5.Deliverable template,When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. If b. diocx is stored under the AAA standard number, enter AAA/B.docx";
}
@@ -926,7 +924,7 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
}
}
}else{
short height = (short) (7 * 252);
short height = (short) (6 * 252);
row.setHeight((short) height);
Cell cell = row.createCell(0);
cell.setCellStyle(cellStyleTemp);
@@ -17,6 +17,7 @@ import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -187,4 +188,30 @@ public class OtaBaSjGgnrfsController extends JeroController<OtaBaSjGgnrfs, IOtaB
return super.importExcel(request, response, OtaBaSjGgnrfs.class);
}
@ApiOperation(value = "升级备案-用户告知内容及方式-模板下载")
@GetMapping(value = "/exportTemplate")
// @RequiresPermissions("otaBaCx:exportTemplate")
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
this.otaBaSjGgnrfsService.exportTemplate(response, request);
}
@ApiOperation(value = "升级备案-用户告知内容及方式-数据导入")
@PostMapping(value = "/importData")
// @RequiresPermissions("otaBaCx:importData")
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
@RequestParam(value = "cut", required = false) String cut,
@RequestParam(value = "otaId", required = false) String otaId) throws Exception {
try {
String[] params = otaId.split("\\?");
otaId = params[0].equals("null") ? "" : params[0];
cut = params[1].replace("cut=", "");
this.otaBaSjGgnrfsService.importData(file, otaId, cut);
} catch (Exception e) {
e.printStackTrace();
return Result.error(e.getMessage());
}
return Result.OK();
}
}
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaCxAqcs;
import com.jero.modules.ota.entity.OtaBaSjJssj;
import com.jero.modules.ota.service.IOtaBaSjJssjService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -144,6 +145,20 @@ public class OtaBaSjJssjController extends JeroController<OtaBaSjJssj, IOtaBaSjJ
return Result.OK(otaBaSjJssj);
}
/**
* 通过otaId查询
*
* @param otaId
* @return
*/
@AutoLog(value = "升级备案-结束升级-通过otaId查询")
@ApiOperation(value = "升级备案-结束升级-通过otaId查询", notes = "升级备案-结束升级-通过otaId查询")
@GetMapping(value = "/queryByOtaId")
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId) {
OtaBaSjJssj otaBaSjJssj = otaBaSjJssjService.queryByOtaId(otaId);
return Result.OK(otaBaSjJssj);
}
/**
* 导出excel
*
@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
@@ -26,163 +27,195 @@ import java.util.List;
/**
* @Description: 升级备案-升级活动备案列表
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
@Api(tags="升级备案-升级活动备案列表")
@Api(tags = "升级备案-升级活动备案列表")
@RestController
@RequestMapping("/ota/otaBaSjList")
@Slf4j
public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjListService> {
@Autowired
private IOtaBaSjListService otaBaSjListService;
/**
* 分页列表查询
*
* @param otaBaSjList
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-分页列表查询")
@ApiOperation(value="升级备案-升级活动备案列表-分页列表查询", notes="升级备案-升级活动备案列表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(OtaBaSjList otaBaSjList,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<OtaBaSjList> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjList, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<OtaBaSjList> page = new Page<OtaBaSjList>(pageNo, pageSize);
IPage<OtaBaSjList> pageList = otaBaSjListService.page(page, queryWrapper);
return Result.OK(pageList);
}
@Autowired
private IOtaBaSjListService otaBaSjListService;
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-列表查询")
@ApiOperation(value="升级备案-升级活动备案列表-列表查询", notes="升级备案-升级活动备案列表-列表查询")
@GetMapping(value = "/list")
public Result<List<OtaBaSjList>> queryList() {
* 分页列表查询
*
* @param otaBaSjList
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-分页列表查询")
@ApiOperation(value = "升级备案-升级活动备案列表-分页列表查询", notes = "升级备案-升级活动备案列表-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(OtaBaSjList otaBaSjList,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<OtaBaSjList> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjList, req.getParameterMap());
queryWrapper.orderByDesc("create_time");
Page<OtaBaSjList> page = new Page<OtaBaSjList>(pageNo, pageSize);
IPage<OtaBaSjList> pageList = otaBaSjListService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-列表查询")
@ApiOperation(value = "升级备案-升级活动备案列表-列表查询", notes = "升级备案-升级活动备案列表-列表查询")
@GetMapping(value = "/list")
public Result<List<OtaBaSjList>> queryList() {
List<OtaBaSjList> list = otaBaSjListService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param otaBaSjList
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-添加")
@ApiOperation(value="升级备案-升级活动备案列表-添加", notes="升级备案-升级活动备案列表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody OtaBaSjList otaBaSjList) {
otaBaSjListService.add(otaBaSjList);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param otaBaSjList
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-编辑")
@ApiOperation(value="升级备案-升级活动备案列表-编辑", notes="升级备案-升级活动备案列表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody OtaBaSjList otaBaSjList) {
otaBaSjListService.editById(otaBaSjList);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-通过id删除")
@ApiOperation(value="升级备案-升级活动备案列表-通过id删除", notes="升级备案-升级活动备案列表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
otaBaSjListService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-批量删除")
@ApiOperation(value="升级备案-升级活动备案列表-批量删除", notes="升级备案-升级活动备案列表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.otaBaSjListService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-通过id查询")
@ApiOperation(value="升级备案-升级活动备案列表-通过id查询", notes="升级备案-升级活动备案列表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
OtaBaSjList otaBaSjList = otaBaSjListService.queryById(id);
if(otaBaSjList==null) {
return Result.error("未找到对应数据");
}
return Result.OK(otaBaSjList);
}
}
/**
* 导出excel
*
* @param request
* @param otaBaSjList
*/
* 添加
*
* @param otaBaSjList
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-添加")
@ApiOperation(value = "升级备案-升级活动备案列表-添加", notes = "升级备案-升级活动备案列表-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody OtaBaSjList otaBaSjList) {
otaBaSjListService.add(otaBaSjList);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param otaBaSjList
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-编辑")
@ApiOperation(value = "升级备案-升级活动备案列表-编辑", notes = "升级备案-升级活动备案列表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody OtaBaSjList otaBaSjList) {
otaBaSjListService.editById(otaBaSjList);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-通过id删除")
@ApiOperation(value = "升级备案-升级活动备案列表-通过id删除", notes = "升级备案-升级活动备案列表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
otaBaSjListService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-批量删除")
@ApiOperation(value = "升级备案-升级活动备案列表-批量删除", notes = "升级备案-升级活动备案列表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.otaBaSjListService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级活动备案列表-通过id查询")
@ApiOperation(value = "升级备案-升级活动备案列表-通过id查询", notes = "升级备案-升级活动备案列表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
OtaBaSjList otaBaSjList = otaBaSjListService.queryById(id);
if (otaBaSjList == null) {
return Result.error("未找到对应数据");
}
return Result.OK(otaBaSjList);
}
/**
* 导出excel
*
* @param request
* @param otaBaSjList
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjList otaBaSjList) {
return super.exportXls(request, otaBaSjList, OtaBaSjList.class, "升级备案-升级活动备案列表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, OtaBaSjList.class);
}
/**
* 备案维护
*
*/
@AutoLog(value = "升级备案-备案维护")
@ApiOperation(value = "升级备案-备案维护", notes = "升级备案-备案维护")
@PostMapping(value = "/batchRecord")
public Result<?> batchRecord(@RequestParam(name = "ids", required = true) String ids,
@RequestParam(name = "bazt", required = true) String bazt,
@RequestParam(name = "batjsj", required = true) String batjsj,
@RequestParam(name = "bz", required = true) String bz,
@RequestParam(name = "cut") String cut) {
otaBaSjListService.batchRecord(ids, bazt, batjsj, bz, cut);
return Result.OK("备案维护成功!");
}
/**
* 备案维护
*/
@AutoLog(value = "升级备案-备案维护")
@ApiOperation(value = "升级备案-备案维护", notes = "升级备案-备案维护")
@PostMapping(value = "/batchRecord")
public Result<?> batchRecord(@RequestParam(name = "ids", required = true) String ids,
@RequestParam(name = "bazt", required = true) String bazt,
@RequestParam(name = "batjsj", required = true) String batjsj,
@RequestParam(name = "bz", required = true) String bz,
@RequestParam(name = "cut") String cut) {
otaBaSjListService.batchRecord(ids, bazt, batjsj, bz, cut);
return Result.OK("备案维护成功!");
}
@ApiOperation(value = "升级备案-模板下载")
@GetMapping(value = "/exportTemplate")
// @RequiresPermissions("otaBaCx:exportTemplate")
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
this.otaBaSjListService.exportTemplate(response, request);
}
@ApiOperation(value = "升级备案-数据导入")
@PostMapping(value = "/importData")
// @RequiresPermissions("otaBaCx:importData")
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
@RequestParam(value = "cut", required = false) String cut) throws Exception {
try {
this.otaBaSjListService.importData(file, cut);
} catch (Exception e) {
e.printStackTrace();
return Result.error(e.getMessage());
}
return Result.OK("导入成功");
}
@ApiOperation(value = "升级备案-数据导出")
@GetMapping(value = "/exportData")
// @RequiresPermissions("otaBaCx:exportTemplate")
public void exportData(@RequestParam(value = "otaId", required = false) String otaId, HttpServletResponse response, HttpServletRequest request) {
try {
this.otaBaSjListService.exportData(otaId, response, request);
} catch (Exception e) {
e.printStackTrace();
}
}
}
@@ -18,6 +18,7 @@ import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -185,4 +186,30 @@ public class OtaBaSjSjfzbhController extends JeroController<OtaBaSjSjfzbh, IOtaB
return super.importExcel(request, response, OtaBaSjSjfzbh.class);
}
@ApiOperation(value = "升级备案-本次升级的驾驶辅助功能与参数变化-模板下载")
@GetMapping(value = "/exportTemplate")
// @RequiresPermissions("otaBaCx:exportTemplate")
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
this.otaBaSjSjfzbhService.exportTemplate(response, request);
}
@ApiOperation(value = "升级备案-本次升级的驾驶辅助功能与参数变化-数据导入")
@PostMapping(value = "/importData")
// @RequiresPermissions("otaBaCx:importData")
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
@RequestParam(value = "cut", required = false) String cut,
@RequestParam(value = "otaId", required = false) String otaId) throws Exception {
try {
String[] params = otaId.split("\\?");
otaId = params[0].equals("null") ? "" : params[0];
cut = params[1].replace("cut=", "");
this.otaBaSjSjfzbhService.importData(file, otaId, cut);
} catch (Exception e) {
e.printStackTrace();
return Result.error(e.getMessage());
}
return Result.OK();
}
}
@@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaCxJbxx;
@@ -17,167 +18,193 @@ import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
/**
/**
* @Description: 升级备案-升级目标车辆
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
@Api(tags="升级备案-升级目标车辆")
@Api(tags = "升级备案-升级目标车辆")
@RestController
@RequestMapping("/ota/otaBaSjSjmbcl")
@Slf4j
public class OtaBaSjSjmbclController extends JeroController<OtaBaSjSjmbcl, IOtaBaSjSjmbclService> {
@Autowired
private IOtaBaSjSjmbclService otaBaSjSjmbclService;
/**
* 分页列表查询
*
* @param otaBaSjSjmbcl
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-分页列表查询")
@ApiOperation(value="升级备案-升级目标车辆-分页列表查询", notes="升级备案-升级目标车辆-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(OtaBaSjSjmbcl otaBaSjSjmbcl,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<OtaBaSjSjmbcl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjmbcl, req.getParameterMap());
Page<OtaBaSjSjmbcl> page = new Page<OtaBaSjSjmbcl>(pageNo, pageSize);
IPage<OtaBaSjSjmbcl> pageList = otaBaSjSjmbclService.page(page, queryWrapper);
return Result.OK(pageList);
}
@Autowired
private IOtaBaSjSjmbclService otaBaSjSjmbclService;
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-列表查询")
@ApiOperation(value="升级备案-升级目标车辆-列表查询", notes="升级备案-升级目标车辆-列表查询")
@GetMapping(value = "/list")
public Result<List<OtaBaSjSjmbcl>> queryList() {
* 分页列表查询
*
* @param otaBaSjSjmbcl
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-分页列表查询")
@ApiOperation(value = "升级备案-升级目标车辆-分页列表查询", notes = "升级备案-升级目标车辆-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(OtaBaSjSjmbcl otaBaSjSjmbcl,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<OtaBaSjSjmbcl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjmbcl, req.getParameterMap());
Page<OtaBaSjSjmbcl> page = new Page<OtaBaSjSjmbcl>(pageNo, pageSize);
IPage<OtaBaSjSjmbcl> pageList = otaBaSjSjmbclService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-列表查询")
@ApiOperation(value = "升级备案-升级目标车辆-列表查询", notes = "升级备案-升级目标车辆-列表查询")
@GetMapping(value = "/list")
public Result<List<OtaBaSjSjmbcl>> queryList() {
List<OtaBaSjSjmbcl> list = otaBaSjSjmbclService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param otaBaSjSjmbcl
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-添加")
@ApiOperation(value="升级备案-升级目标车辆-添加", notes="升级备案-升级目标车辆-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody OtaBaSjSjmbcl otaBaSjSjmbcl) {
otaBaSjSjmbclService.add(otaBaSjSjmbcl);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param otaBaSjSjmbcl
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-编辑")
@ApiOperation(value="升级备案-升级目标车辆-编辑", notes="升级备案-升级目标车辆-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody OtaBaSjSjmbcl otaBaSjSjmbcl) {
otaBaSjSjmbclService.editById(otaBaSjSjmbcl);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-通过id删除")
@ApiOperation(value="升级备案-升级目标车辆-通过id删除", notes="升级备案-升级目标车辆-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
otaBaSjSjmbclService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-批量删除")
@ApiOperation(value="升级备案-升级目标车辆-批量删除", notes="升级备案-升级目标车辆-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.otaBaSjSjmbclService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-通过id查询")
@ApiOperation(value="升级备案-升级目标车辆-通过id查询", notes="升级备案-升级目标车辆-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
OtaBaSjSjmbcl otaBaSjSjmbcl = otaBaSjSjmbclService.queryById(id);
if(otaBaSjSjmbcl==null) {
return Result.error("未找到对应数据");
}
return Result.OK(otaBaSjSjmbcl);
}
/**
* 通过OtaId查询
*/
@AutoLog(value = "升级备案-升级目标车辆-通过otaId查询")
@ApiOperation(value = "升级备案-升级目标车辆-通过otaId查询", notes = "升级备案-升级目标车辆-通过otaId查询")
@GetMapping(value = "/queryByOtaId")
public Result<?> queryByOtaId(@RequestParam(name = "otaId") String otaId,
@RequestParam(name = "otaIdT") String otaIdT) {
OtaBaSjSjmbcl otaBaSjSjmbcl = otaBaSjSjmbclService.queryByOtaId(otaId, otaIdT);
return Result.OK(otaBaSjSjmbcl);
}
}
/**
* 导出excel
*
* @param request
* @param otaBaSjSjmbcl
*/
* 添加
*
* @param otaBaSjSjmbcl
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-添加")
@ApiOperation(value = "升级备案-升级目标车辆-添加", notes = "升级备案-升级目标车辆-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody OtaBaSjSjmbcl otaBaSjSjmbcl) {
otaBaSjSjmbclService.add(otaBaSjSjmbcl);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param otaBaSjSjmbcl
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-编辑")
@ApiOperation(value = "升级备案-升级目标车辆-编辑", notes = "升级备案-升级目标车辆-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody OtaBaSjSjmbcl otaBaSjSjmbcl) {
otaBaSjSjmbclService.editById(otaBaSjSjmbcl);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-通过id删除")
@ApiOperation(value = "升级备案-升级目标车辆-通过id删除", notes = "升级备案-升级目标车辆-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
otaBaSjSjmbclService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-批量删除")
@ApiOperation(value = "升级备案-升级目标车辆-批量删除", notes = "升级备案-升级目标车辆-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.otaBaSjSjmbclService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级目标车辆-通过id查询")
@ApiOperation(value = "升级备案-升级目标车辆-通过id查询", notes = "升级备案-升级目标车辆-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
OtaBaSjSjmbcl otaBaSjSjmbcl = otaBaSjSjmbclService.queryById(id);
if (otaBaSjSjmbcl == null) {
return Result.error("未找到对应数据");
}
return Result.OK(otaBaSjSjmbcl);
}
/**
* 通过OtaId查询
*/
@AutoLog(value = "升级备案-升级目标车辆-通过otaId查询")
@ApiOperation(value = "升级备案-升级目标车辆-通过otaId查询", notes = "升级备案-升级目标车辆-通过otaId查询")
@GetMapping(value = "/queryByOtaId")
public Result<?> queryByOtaId(@RequestParam(name = "otaId") String otaId,
@RequestParam(name = "otaIdT") String otaIdT) {
OtaBaSjSjmbcl otaBaSjSjmbcl = otaBaSjSjmbclService.queryByOtaId(otaId, otaIdT);
return Result.OK(otaBaSjSjmbcl);
}
/**
* 导出excel
*
* @param request
* @param otaBaSjSjmbcl
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjSjmbcl otaBaSjSjmbcl) {
return super.exportXls(request, otaBaSjSjmbcl, OtaBaSjSjmbcl.class, "升级备案-升级目标车辆");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, OtaBaSjSjmbcl.class);
}
@ApiOperation(value = "升级备案-升级目标车辆-模板下载")
@GetMapping(value = "/exportTemplate")
// @RequiresPermissions("otaBaCx:exportTemplate")
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
this.otaBaSjSjmbclService.exportTemplate(response, request);
}
@ApiOperation(value = "升级备案-升级目标车辆-数据导入")
@PostMapping(value = "/importData")
// @RequiresPermissions("otaBaCx:importData")
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
@RequestParam(value = "cut", required = false) String cut,
@RequestParam(value = "otaId", required = false) String otaId) throws Exception {
OtaBaSjSjmbcl res;
try {
String[] params = otaId.split("\\?");
otaId = params[0].equals("null") ? "" : params[0];
cut = params[1].replace("cut=", "");
res = this.otaBaSjSjmbclService.importData(file, otaId, cut);
} catch (Exception e) {
e.printStackTrace();
return Result.error(e.getMessage());
}
return Result.OK(res);
}
}
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaCxJbxx;
import com.jero.modules.ota.entity.OtaBaSjSjmbcl;
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
import com.jero.modules.ota.service.IOtaBaSjSjmbcxService;
@@ -17,6 +18,7 @@ import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -180,4 +182,31 @@ public class OtaBaSjSjmbcxController extends JeroController<OtaBaSjSjmbcx, IOtaB
return super.importExcel(request, response, OtaBaSjSjmbcx.class);
}
@ApiOperation(value = "升级备案-升级目标车型-模板下载")
@GetMapping(value = "/exportTemplate")
// @RequiresPermissions("otaBaCx:exportTemplate")
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
this.otaBaSjSjmbcxService.exportTemplate(response, request);
}
@ApiOperation(value = "升级备案-升级目标车型-数据导入")
@PostMapping(value = "/importData")
// @RequiresPermissions("otaBaCx:importData")
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
@RequestParam(value = "cut", required = false) String cut,
@RequestParam(value = "otaId", required = false) String otaId) throws Exception {
OtaBaSjSjmbcx res;
try {
String[] params = otaId.split("\\?");
otaId = params[0].equals("null") ? "" : params[0];
cut = params[1].replace("cut=", "");
res = this.otaBaSjSjmbcxService.importData(file, otaId, cut);
} catch (Exception e) {
e.printStackTrace();
return Result.error(e.getMessage());
}
return Result.OK(res);
}
}
@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaCxJbxx;
import com.jero.modules.ota.entity.OtaBaSjSjxtbh;
import com.jero.modules.ota.service.IOtaBaSjSjxtbhService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -18,6 +19,7 @@ import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -76,8 +78,6 @@ public class OtaBaSjSjxtbhController extends JeroController<OtaBaSjSjxtbh, IOtaB
/**
* 添加
*
* @param otaBaSjSjxtbh
* @return
*/
@AutoLog(value = "升级备案-本次升级的系统名称与参数变化-添加")
@ApiOperation(value = "升级备案-本次升级的系统名称与参数变化-添加", notes = "升级备案-本次升级的系统名称与参数变化-添加")
@@ -188,4 +188,30 @@ public class OtaBaSjSjxtbhController extends JeroController<OtaBaSjSjxtbh, IOtaB
return super.importExcel(request, response, OtaBaSjSjxtbh.class);
}
@ApiOperation(value = "升级备案-本次升级的系统名称与参数变化-模板下载")
@GetMapping(value = "/exportTemplate")
// @RequiresPermissions("otaBaCx:exportTemplate")
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
this.otaBaSjSjxtbhService.exportTemplate(response, request);
}
@ApiOperation(value = "升级备案-本次升级的系统名称与参数变化-数据导入")
@PostMapping(value = "/importData")
// @RequiresPermissions("otaBaCx:importData")
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
@RequestParam(value = "cut", required = false) String cut,
@RequestParam(value = "otaId", required = false) String otaId) throws Exception {
try {
String[] params = otaId.split("\\?");
otaId = params[0].equals("null") ? "" : params[0];
cut = params[1].replace("cut=", "");
this.otaBaSjSjxtbhService.importData(file, otaId, cut);
} catch (Exception e) {
e.printStackTrace();
return Result.error(e.getMessage());
}
return Result.OK();
}
}
@@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jero.common.api.vo.Result;
import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.ota.entity.OtaBaCxAqcs;
@@ -17,173 +18,200 @@ import com.jero.common.system.base.controller.JeroController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.jero.common.aspect.annotation.AutoLog;
/**
/**
* @Description: 升级备案-升级影响评估
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
@Api(tags="升级备案-升级影响评估")
@Api(tags = "升级备案-升级影响评估")
@RestController
@RequestMapping("/ota/otaBaSjSjyxpg")
@Slf4j
public class OtaBaSjSjyxpgController extends JeroController<OtaBaSjSjyxpg, IOtaBaSjSjyxpgService> {
@Autowired
private IOtaBaSjSjyxpgService otaBaSjSjyxpgService;
/**
* 分页列表查询
*
* @param otaBaSjSjyxpg
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-分页列表查询")
@ApiOperation(value="升级备案-升级影响评估-分页列表查询", notes="升级备案-升级影响评估-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(OtaBaSjSjyxpg otaBaSjSjyxpg,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<OtaBaSjSjyxpg> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjyxpg, req.getParameterMap());
Page<OtaBaSjSjyxpg> page = new Page<OtaBaSjSjyxpg>(pageNo, pageSize);
IPage<OtaBaSjSjyxpg> pageList = otaBaSjSjyxpgService.page(page, queryWrapper);
return Result.OK(pageList);
}
@Autowired
private IOtaBaSjSjyxpgService otaBaSjSjyxpgService;
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-列表查询")
@ApiOperation(value="升级备案-升级影响评估-列表查询", notes="升级备案-升级影响评估-列表查询")
@GetMapping(value = "/list")
public Result<List<OtaBaSjSjyxpg>> queryList() {
* 分页列表查询
*
* @param otaBaSjSjyxpg
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-分页列表查询")
@ApiOperation(value = "升级备案-升级影响评估-分页列表查询", notes = "升级备案-升级影响评估-分页列表查询")
@GetMapping(value = "/page")
public Result<?> queryPageList(OtaBaSjSjyxpg otaBaSjSjyxpg,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<OtaBaSjSjyxpg> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjyxpg, req.getParameterMap());
Page<OtaBaSjSjyxpg> page = new Page<OtaBaSjSjyxpg>(pageNo, pageSize);
IPage<OtaBaSjSjyxpg> pageList = otaBaSjSjyxpgService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 列表查询
*
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-列表查询")
@ApiOperation(value = "升级备案-升级影响评估-列表查询", notes = "升级备案-升级影响评估-列表查询")
@GetMapping(value = "/list")
public Result<List<OtaBaSjSjyxpg>> queryList() {
List<OtaBaSjSjyxpg> list = otaBaSjSjyxpgService.queryList();
return Result.OK(list);
}
/**
* 添加
*
* @param otaBaSjSjyxpg
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-添加")
@ApiOperation(value="升级备案-升级影响评估-添加", notes="升级备案-升级影响评估-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody OtaBaSjSjyxpg otaBaSjSjyxpg) {
otaBaSjSjyxpgService.add(otaBaSjSjyxpg);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param otaBaSjSjyxpg
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-编辑")
@ApiOperation(value="升级备案-升级影响评估-编辑", notes="升级备案-升级影响评估-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody OtaBaSjSjyxpg otaBaSjSjyxpg) {
otaBaSjSjyxpgService.editById(otaBaSjSjyxpg);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-通过id删除")
@ApiOperation(value="升级备案-升级影响评估-通过id删除", notes="升级备案-升级影响评估-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
otaBaSjSjyxpgService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-批量删除")
@ApiOperation(value="升级备案-升级影响评估-批量删除", notes="升级备案-升级影响评估-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.otaBaSjSjyxpgService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-通过id查询")
@ApiOperation(value="升级备案-升级影响评估-通过id查询", notes="升级备案-升级影响评估-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
OtaBaSjSjyxpg otaBaSjSjyxpg = otaBaSjSjyxpgService.queryById(id);
if(otaBaSjSjyxpg==null) {
return Result.error("未找到对应数据");
}
return Result.OK(otaBaSjSjyxpg);
}
/**
* 通过otaId查询
*
* @param otaId
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-通过otaId查询")
@ApiOperation(value = "升级备案-升级影响评估-通过otaId查询", notes = "升级备案-升级影响评估-通过otaId查询")
@GetMapping(value = "/queryByOtaId")
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId,
@RequestParam(name = "otaIdT", required = true) String otaIdT) {
OtaBaSjSjyxpg otaBaSjSjyxpg = otaBaSjSjyxpgService.queryByOtaId(otaId, otaIdT);
if (otaBaSjSjyxpg == null) {
return Result.error("未找到对应数据");
}
return Result.OK(otaBaSjSjyxpg);
}
}
/**
* 导出excel
*
* @param request
* @param otaBaSjSjyxpg
*/
* 添加
*
* @param otaBaSjSjyxpg
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-添加")
@ApiOperation(value = "升级备案-升级影响评估-添加", notes = "升级备案-升级影响评估-添加")
@PostMapping(value = "/add")
public Result<?> add(@Validated @RequestBody OtaBaSjSjyxpg otaBaSjSjyxpg) {
otaBaSjSjyxpgService.add(otaBaSjSjyxpg);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param otaBaSjSjyxpg
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-编辑")
@ApiOperation(value = "升级备案-升级影响评估-编辑", notes = "升级备案-升级影响评估-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody OtaBaSjSjyxpg otaBaSjSjyxpg) {
otaBaSjSjyxpgService.editById(otaBaSjSjyxpg);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-通过id删除")
@ApiOperation(value = "升级备案-升级影响评估-通过id删除", notes = "升级备案-升级影响评估-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
otaBaSjSjyxpgService.deleteById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-批量删除")
@ApiOperation(value = "升级备案-升级影响评估-批量删除", notes = "升级备案-升级影响评估-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.otaBaSjSjyxpgService.deleteByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-通过id查询")
@ApiOperation(value = "升级备案-升级影响评估-通过id查询", notes = "升级备案-升级影响评估-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
OtaBaSjSjyxpg otaBaSjSjyxpg = otaBaSjSjyxpgService.queryById(id);
if (otaBaSjSjyxpg == null) {
return Result.error("未找到对应数据");
}
return Result.OK(otaBaSjSjyxpg);
}
/**
* 通过otaId查询
*
* @param otaId
* @return
*/
@AutoLog(value = "升级备案-升级影响评估-通过otaId查询")
@ApiOperation(value = "升级备案-升级影响评估-通过otaId查询", notes = "升级备案-升级影响评估-通过otaId查询")
@GetMapping(value = "/queryByOtaId")
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId,
@RequestParam(name = "otaIdT", required = true) String otaIdT) {
OtaBaSjSjyxpg otaBaSjSjyxpg = otaBaSjSjyxpgService.queryByOtaId(otaId, otaIdT);
if (otaBaSjSjyxpg == null) {
return Result.error("未找到对应数据");
}
return Result.OK(otaBaSjSjyxpg);
}
/**
* 导出excel
*
* @param request
* @param otaBaSjSjyxpg
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, OtaBaSjSjyxpg otaBaSjSjyxpg) {
return super.exportXls(request, otaBaSjSjyxpg, OtaBaSjSjyxpg.class, "升级备案-升级影响评估");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, OtaBaSjSjyxpg.class);
}
@ApiOperation(value = "车型备案-安全措施-模板下载")
@GetMapping(value = "/exportTemplate")
// @RequiresPermissions("otaBaCx:exportTemplate")
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
this.otaBaSjSjyxpgService.exportTemplate(response, request);
}
@ApiOperation(value = "车型备案-安全措施-数据导入")
@PostMapping(value = "/importData")
// @RequiresPermissions("otaBaCx:importData")
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
@RequestParam(value = "cut", required = false) String cut,
@RequestParam(value = "otaId", required = false) String otaId) throws Exception {
OtaBaSjSjyxpg res;
try {
String[] params = otaId.split("\\?");
otaId = params[0].equals("null") ? "" : params[0];
cut = params[1].replace("cut=", "");
res = this.otaBaSjSjyxpgService.importData(file, params[0], cut);
} catch (Exception e) {
e.printStackTrace();
return Result.error(e.getMessage());
}
return Result.OK(res);
}
}
@@ -84,6 +84,7 @@ public class OtaBaCxJbxx implements Serializable {
/**产品类别*/
@Excel(name = "产品类别", width = 15)
@ApiModelProperty(value = "产品类别")
@Dict(dicCode = "product_category")
private java.lang.String cplb;
/**公告批次*/
@@ -66,9 +66,9 @@ public class OtaBaCxQt implements Serializable {
@ApiModelProperty(value = "otaId")
private java.lang.String otaId;
/**升级包保护措施*/
@Excel(name = "升级包保护措施", width = 15)
@ApiModelProperty(value = "升级包保护措施")
/**软件版本(集)识别与存储*/
@Excel(name = "软件版本(集)识别与存储", width = 15)
@ApiModelProperty(value = "软件版本(集)识别与存储")
private java.lang.String sjbbhcs;
}
@@ -1,94 +1,120 @@
package com.jero.modules.ota.entity;
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;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.List;
/**
* @Description: 升级备案-结束升级
* @Author: jero-boot
* @Date: 2023-03-28
* @Date: 2023-03-28
* @Version: V1.0
*/
@Data
@TableName("ota_ba_sj_jssj")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ota_ba_sj_jssj对象", description="升级备案-结束升级")
@ApiModel(value = "ota_ba_sj_jssj对象", description = "升级备案-结束升级")
public class OtaBaSjJssj implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
/**
* 所属部门
*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**otaId*/
@Excel(name = "otaId", width = 15)
/**
* otaId
*/
@Excel(name = "otaId", width = 15)
@ApiModelProperty(value = "otaId")
private String otaid;
private String otaId;
/**实施的升级是否和备案一致*/
@Excel(name = "实施的升级是否和备案一致", width = 15)
/**
* 实施的升级是否和备案一致
*/
@Excel(name = "实施的升级是否和备案一致", width = 15)
@ApiModelProperty(value = "实施的升级是否和备案一致")
private Integer sfyz;
/**完成升级的车辆数*/
@Excel(name = "完成升级的车辆数", width = 15)
/**
* 完成升级的车辆数
*/
@Excel(name = "完成升级的车辆数", width = 15)
@ApiModelProperty(value = "完成升级的车辆数")
private String wccls;
/**VIN码清单*/
@Excel(name = "VIN码清单", width = 15)
/**
* VIN码清单
*/
@Excel(name = "VIN码清单", width = 15)
@ApiModelProperty(value = "VIN码清单")
private String csv;
/**故障处置措施和应急响应实施记录*/
@Excel(name = "故障处置措施和应急响应实施记录", width = 15)
/**
* 故障处置措施和应急响应实施记录
*/
@Excel(name = "故障处置措施和应急响应实施记录", width = 15)
@ApiModelProperty(value = "故障处置措施和应急响应实施记录")
private String ssjl;
/**故障处置措施和应急响应实施记录附件*/
@Excel(name = "故障处置措施和应急响应实施记录附件", width = 15)
/**
* 故障处置措施和应急响应实施记录附件
*/
@Excel(name = "故障处置措施和应急响应实施记录附件", width = 15)
@ApiModelProperty(value = "故障处置措施和应急响应实施记录附件")
private String ssjlfj;
@TableField(exist = false)
private List<OtaBaSjJssjyy> list;
}
@@ -64,7 +64,7 @@ public class OtaBaSjJssjyy implements Serializable {
/**otaId*/
@Excel(name = "otaId", width = 15)
@ApiModelProperty(value = "otaId")
private String otaid;
private String otaId;
/**未完成原因*/
@Excel(name = "未完成原因", width = 15)
@@ -5,7 +5,7 @@ public enum OtaModuleEnum {
CX_CXJBXX("车型基本信息", "1","1"),
CX_ZXSJYQ("在线升级要求", "1","1"),
CX_AQCS("安全措施", "1","1"),
CX_KSJDXTMCYCS("可升级的系统名称与参数", "1","1"),
CX_KSJDXTMCYCS("在线升级的系统名称与参数", "1","1"),
CX_KZXSJDJSFZGNMCYCS("可在线升级的驾驶辅助功能名称与参数", "1","1"),
CX_JSFZXTJCBACS("驾驶辅助系统基础备案参数", "1","1"),
CX_QT("其他", "1","1"),
@@ -16,7 +16,7 @@ public enum OtaTitleEnum {
CXMB("cxmb", "车型模板", "0"),
QYMC("qymc", "企业名称", "0"),
DJBH("djbh", "产品登记编号", "0"),
CPLB("cplb", "产品类别", "0"),
CPLB("cplb", "产品类别", "product_category"),
DLLX1("dllx1", "车辆动力类型", "0"),
DLLX2("dllx2", "车辆动力类型", "0"),
TXZD("txzd", "通信终端", "communication_terminal"),
@@ -65,83 +65,83 @@ public enum OtaTitleEnum {
CSYZSJ("csyzsj", "初始软件包的完整性验证数据", "0"),
FJ("fj", "附件", "0"),
WLAQYQ_PZ("jgldPz", "激光雷达配置", "2"),
WLAQYQ_SL("jgldSl", "激光雷达数量", "0"),
WLAQYQ_BZWZ("jgldBzwz", "激光雷达布置位置", "0"),
WLAQYQ_GGXH("jgldGgxh", "激光雷达规格型号", "0"),
WLAQYQ_SCQY("jgldScqy", "激光雷达生产企业", "0"),
HMBLD_PZ("hmbldPz", "毫米波雷达配置", "2"),
HMBLD_SL("hmbldSl", "毫米波雷达数量", "0"),
HMBLD_BZWZ("hmbldBzwz", "毫米波雷达布置位置", "0"),
HMBLD_GGXH("hmbldGgxh", "毫米波雷达规格型号", "0"),
HMBLD_SCQY("hmbldScqy", "毫米波雷达生产企业", "0"),
CSBLD_PZ("csbldPz", "超声波雷达配置", "2"),
CSBLD_SL("csbldSl", "超声波雷达数量", "0"),
CSBLD_BZWZ("csbldBzwz", "超声波雷达布置位置", "0"),
CSBLD_GGXH("csbldGgxh", "超声波雷达规格型号", "0"),
CSBLD_SCQY("csbldScqy", "超声波雷达生产企业", "0"),
SXTHS_PZ("sxthsPz", "摄像头倒车影像/(环视)配置", "2"),
SXTHS_SL("sxthsSl", "摄像头倒车影像/(环视)数量", "0"),
SXTHS_BZWZ("sxthsBzwz", "摄像头倒车影像/(环视)布置位置", "0"),
SXTHS_GGXH("sxthsGgxh", "摄像头倒车影像/(环视)规格型号", "0"),
SXTHS_SCQY("sxthsScqy", "摄像头倒车影像/(环视)生产企业", "0"),
SXTDSD_PZ("sxtdsdPz", "摄像头单双多目配置", "2"),
SXTDSD_SL("sxtdsdSl", "摄像头单双多目数量", "0"),
SXTDSD_BZWZ("sxtdsdBzwz", "摄像头双多目布置位置", "0"),
SXTDSD_GGXH("sxtdsdGgxh", "摄像头单双多目规格型号", "0"),
SXTDSD_SCQY("sxtdsdScqy", "摄像头单双多目生产企业", "0"),
JSYJK_PZ("jsyjkPz", "驾驶员监控摄像头配置", "2"),
JSYJK_SL("jsyjkSl", "驾驶员监控摄像头数量", "0"),
JSYJK_BZWZ("jsyjkBzwz", "驾驶员监控摄像头布置位置", "0"),
JSYJK_GGXH("jsyjkGgxh", "驾驶员监控摄像头规格型号", "0"),
JSYJK_SCQY("jsyjkScqy", "驾驶员监控摄像头生产企业", "0"),
JSYHW_PZ("jsyhwPz", "驾驶员监控红外传感器配置", "2"),
JSYHW_SL("jsyhwSl", "驾驶员监控红外传感器数量", "0"),
JSYHW_BZWZ("jsyhwBzwz", "驾驶员监控红外传感器布置位置", "0"),
JSYHW_GGXH("jsyhwGgxh", "驾驶员监控红外传感器规格型号", "0"),
JSYHW_SCQY("jsyhwScqy", "驾驶员监控红外传感器生产企业", "0"),
CZWXDW_PZ("czwxdwPz", "车载卫星定位设备配置", "2"),
CZWXDW_GGXH("czwxdwGgxh", "车载卫星定位设备规格型号", "0"),
CZWXDW_SCQY("czwxdwScqy", "车载卫星定位设备生产企业", "0"),
GXDH_PZ("gxdhPz", "惯性导航系统配置", "2"),
GXDH_GGXH("gxdhGgxh", "惯性导航系统规格型号", "0"),
GXDH_SCQY("gxdhScqy", "惯性导航系统生产企业", "0"),
LSJ_PZ("lsjPz", "轮速计配置", "2"),
LSJ_GGXH("lsjGgxh", "轮速计规格型号", "0"),
LSJ_SCQY("lsjScqy", "轮速计生产企业", "0"),
GJDDT_PZ("gjddtPz", "高精度地图配置", "2"),
GJDDT_GGXH("gjddtGgxh", "高精度地图规格型号", "0"),
GJDDT_SCQY("gjddtScqy", "高精度地图生产企业", "0"),
DZWL_PZ("dzwlPz", "电子围栏配置", "2"),
DZWL_DXXGCS("dzwlDxxgcs", "电子围栏", "0"),
CZTX_PZ("cztxPz", "车载通信系统配置", "2"),
CZTX_XTMC("cztx_xtmc", "车载通信系统系统名称", "0"),
CZTX_GGXH("cztxGgxh", "车载通信系统规格型号", "0"),
CZTX_SCQY("cztxScqy", "车载通信系统生产企业", "0"),
CZTX_BBH("cztxBbh", "车载通信系统版本号", "0"),
CZTX_KFQY("cztx_kfqy", "车载通信系统软件开发企业", "0"),
JSFZCZJ_PZ("jsfzczjPz", "驾驶辅助功能操纵件配置", "2"),
JSFZCZJ_MC("jsfzczjMc", "驾驶辅助功能操纵件名称", "0"),
JSFZCZJ_YJXH("jsfzczjYjxh", "驾驶辅助功能操纵件硬件规格型号", "0"),
JSFZCZJ_SCQY("jsfzczjScqy", "驾驶辅助功能操纵件生产企业", "0"),
JSFZZSQ_PZ("jsfzzsqPz", "驾驶辅助功能指示器配置", "2"),
JSFZZSQ_MC("jsfzzsqMc", "驾驶辅助功能指示器名称", "0"),
JSFZZSQ_YJXH("jsfzzsqYjxh", "驾驶辅助功能指示器硬件规格型号", "0"),
JSFZZSQ_SCQY("jsfzzsqScqy", "驾驶辅助功能指示器生产企业", "0"),
FXPTSTS_PZ("fxptstsPz", "方向盘脱手提示器配置", "2"),
FXPTSTS_MC("fxptstsMc", "方向盘脱手提示器名称", "0"),
FXPTSTS_YJXH("fxptstsYjxh", "方向盘脱手提示器硬件规格型号", "0"),
FXPTSTS_SCQY("fxptstsScqy", "方向盘脱手提示器生产企业", "0"),
JSYZYLTS_PZ("jsyzyltsPz", "驾驶员注意力提醒指示器配置", "2"),
JSYZYLTS_MC("jsyzyltsMc", "驾驶员注意力提醒指示器名称", "0"),
JSYZYLTS_YJXH("jsyzyltsYjxh", "驾驶员注意力提醒指示器硬件规格型号", "0"),
JSYZYLTS_SCQY("jsyzyltsScqy", "驾驶员注意力提醒指示器生产企业", "0"),
DSSAD_PZ("dssadPz", "自动驾驶数据记录系统配置", "2"),
DSSAD_GGXH("dssadGgxh", "自动驾驶数据记录系统规格型号", "0"),
DSSAD_SCQY("dssadScqy", "自动驾驶数据记录系统生产企业", "0"),
EDR_PZ("edrPz", "事件数据记录系统配置", "2"),
EDR_GGXH("edrGgxh", "事件数据记录系统规格型号", "0"),
EDR_SCQY("edrScqy", "事件数据记录系统生产企业", "0"),
WLAQYQ_PZ("jgldPz", "激光雷达-配置", "2"),
WLAQYQ_SL("jgldSl", "激光雷达-数量", "0"),
WLAQYQ_BZWZ("jgldBzwz", "激光雷达-布置位置", "0"),
WLAQYQ_GGXH("jgldGgxh", "激光雷达-规格型号", "0"),
WLAQYQ_SCQY("jgldScqy", "激光雷达-生产企业", "0"),
HMBLD_PZ("hmbldPz", "毫米波雷达-配置", "2"),
HMBLD_SL("hmbldSl", "毫米波雷达-数量", "0"),
HMBLD_BZWZ("hmbldBzwz", "毫米波雷达-布置位置", "0"),
HMBLD_GGXH("hmbldGgxh", "毫米波雷达-规格型号", "0"),
HMBLD_SCQY("hmbldScqy", "毫米波雷达-生产企业", "0"),
CSBLD_PZ("csbldPz", "超声波雷达-配置", "2"),
CSBLD_SL("csbldSl", "超声波雷达-数量", "0"),
CSBLD_BZWZ("csbldBzwz", "超声波雷达-布置位置", "0"),
CSBLD_GGXH("csbldGgxh", "超声波雷达-规格型号", "0"),
CSBLD_SCQY("csbldScqy", "超声波雷达-生产企业", "0"),
SXTHS_PZ("sxthsPz", "摄像头-倒车影像/360(环视)-配置", "2"),
SXTHS_SL("sxthsSl", "摄像头-倒车影像/360(环视)-数量", "0"),
SXTHS_BZWZ("sxthsBzwz", "摄像头-倒车影像/360(环视)-布置位置", "0"),
SXTHS_GGXH("sxthsGgxh", "摄像头-倒车影像/360(环视)-规格型号", "0"),
SXTHS_SCQY("sxthsScqy", "摄像头-倒车影像/360(环视)-生产企业", "0"),
SXTDSD_PZ("sxtdsdPz", "摄像头-单目/双目/多目-配置", "2"),
SXTDSD_SL("sxtdsdSl", "摄像头-单目双目多目-数量", "0"),
SXTDSD_BZWZ("sxtdsdBzwz", "摄像头-单目双多目-布置位置", "0"),
SXTDSD_GGXH("sxtdsdGgxh", "摄像头-单目/双目/多目-规格型号", "0"),
SXTDSD_SCQY("sxtdsdScqy", "摄像头-单目/双目/多目-生产企业", "0"),
JSYJK_PZ("jsyjkPz", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-配置", "2"),
JSYJK_SL("jsyjkSl", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-数量", "0"),
JSYJK_BZWZ("jsyjkBzwz", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-布置位置", "0"),
JSYJK_GGXH("jsyjkGgxh", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-规格型号", "0"),
JSYJK_SCQY("jsyjkScqy", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-生产企业", "0"),
JSYHW_PZ("jsyhwPz", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-配置", "2"),
JSYHW_SL("jsyhwSl", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-数量", "0"),
JSYHW_BZWZ("jsyhwBzwz", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-布置位置", "0"),
JSYHW_GGXH("jsyhwGgxh", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-规格型号", "0"),
JSYHW_SCQY("jsyhwScqy", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-生产企业", "0"),
CZWXDW_PZ("czwxdwPz", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK-配置", "2"),
CZWXDW_GGXH("czwxdwGgxh", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK-规格型号", "0"),
CZWXDW_SCQY("czwxdwScqy", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK-生产企业", "0"),
GXDH_PZ("gxdhPz", "定位及导航系统-惯性导航系统-配置", "2"),
GXDH_GGXH("gxdhGgxh", "定位及导航系统-惯性导航系统-规格型号", "0"),
GXDH_SCQY("gxdhScqy", "定位及导航系统-惯性导航系统-生产企业", "0"),
LSJ_PZ("lsjPz", "定位及导航系统-轮速计-配置", "2"),
LSJ_GGXH("lsjGgxh", "定位及导航系统-轮速计-规格型号", "0"),
LSJ_SCQY("lsjScqy", "定位及导航系统-轮速计-生产企业", "0"),
GJDDT_PZ("gjddtPz", "定位及导航系统-高精度地图-配置", "2"),
GJDDT_GGXH("gjddtGgxh", "定位及导航系统-高精度地图-规格型号", "0"),
GJDDT_SCQY("gjddtScqy", "定位及导航系统-高精度地图-生产企业", "0"),
DZWL_PZ("dzwlPz", "定位及导航系统-电子围栏-配置", "2"),
DZWL_DXXGCS("dzwlDxxgcs", "定位及导航系统-电子围栏-定性描述相关场所", "0"),
CZTX_PZ("cztxPz", "车载通信系统-配置", "2"),
CZTX_XTMC("cztxXtmc", "车载通信系统-系统名称", "0"),
CZTX_GGXH("cztxGgxh", "车载通信系统-规格型号", "0"),
CZTX_SCQY("cztxScqy", "车载通信系统-生产企业", "0"),
CZTX_BBH("cztxBbh", "车载通信系统-版本号", "0"),
CZTX_KFQY("cztxKfqy", "车载通信系统-软件开发企业", "0"),
JSFZCZJ_PZ("jsfzczjPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-配置", "2"),
JSFZCZJ_MC("jsfzczjMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-名称", "0"),
JSFZCZJ_YJXH("jsfzczjYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-硬件规格型号", "0"),
JSFZCZJ_SCQY("jsfzczjScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-生产企业", "0"),
JSFZZSQ_PZ("jsfzzsqPz", "驾驶辅助系统操纵件、指示器及信号装置- 驾驶辅助功能指示器/信号装置-配置", "2"),
JSFZZSQ_MC("jsfzzsqMc", "驾驶辅助系统操纵件、指示器及信号装置- 驾驶辅助功能指示器/信号装置-名称", "0"),
JSFZZSQ_YJXH("jsfzzsqYjxh", "驾驶辅助系统操纵件、指示器及信号装置- 驾驶辅助功能指示器/信号装置-硬件规格型号", "0"),
JSFZZSQ_SCQY("jsfzzsqScqy", "驾驶辅助系统操纵件、指示器及信号装置- 驾驶辅助功能指示器/信号装置-生产企业", "0"),
FXPTSTS_PZ("fxptstsPz", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-配置", "2"),
FXPTSTS_MC("fxptstsMc", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-名称", "0"),
FXPTSTS_YJXH("fxptstsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-硬件规格型号", "0"),
FXPTSTS_SCQY("fxptstsScqy", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-生产企业", "0"),
JSYZYLTS_PZ("jsyzyltsPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-配置", "2"),
JSYZYLTS_MC("jsyzyltsMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-名称", "0"),
JSYZYLTS_YJXH("jsyzyltsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-硬件规格型号", "0"),
JSYZYLTS_SCQY("jsyzyltsScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-生产企业", "0"),
DSSAD_PZ("dssadPz", "自动驾驶数据记录系统(DSSAD)-系统配置", "2"),
DSSAD_GGXH("dssadGgxh", "自动驾驶数据记录系统(DSSAD)-规格型号", "0"),
DSSAD_SCQY("dssadScqy", "自动驾驶数据记录系统(DSSAD)-生产企业", "0"),
EDR_PZ("edrPz", "事件数据记录系统(EDR)-配置", "2"),
EDR_GGXH("edrGgxh", "事件数据记录系统(EDR)-规格型号", "0"),
EDR_SCQY("edrScqy", "事件数据记录系统(EDR)-生产企业", "0"),
BJMC("bjmc", "部件名称", "0"),
YJGGXH("yjggxh", "硬件规格型号", "0"),
@@ -149,7 +149,9 @@ public enum OtaTitleEnum {
RJBB("rjbb", "软件版本", "0"),
BZWZ("bzwz", "布置位置", "0"),
SJBBHCS("sjbbhcs", "升级包保护措施", "0"),
SJBBHCS("sjbbhcs", "软件版本(集)识别与存储", "0"),
BABH("babh", "备案编号", "0"),
BAPC("bapc", "备案批次", "0"),
ZSL("zsl", "总数量", "0"),
@@ -2,6 +2,11 @@ package com.jero.modules.ota.service;
import com.jero.modules.ota.entity.OtaBaSjGgnrfs;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;
/**
@@ -60,4 +65,11 @@ public interface IOtaBaSjGgnrfsService extends IService<OtaBaSjGgnrfs> {
List<OtaBaSjGgnrfs> queryList();
OtaBaSjGgnrfs queryByOtaId(String otaId, String otaIdT);
}
void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception;
void importData(MultipartFile file, String otaId, String cut) throws Exception;
void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception;
void exportData(File file, String otaId, String cut) throws Exception;}
@@ -58,4 +58,6 @@ public interface IOtaBaSjJssjService extends IService<OtaBaSjJssj> {
* @return
*/
List<OtaBaSjJssj> queryList();
OtaBaSjJssj queryByOtaId(String otaId);
}
@@ -2,60 +2,65 @@ package com.jero.modules.ota.service;
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 升级备案-结束升级原因
* @Author: jero-boot
* @Date: 2023-03-28
* @Date: 2023-03-28
* @Version: V1.0
*/
public interface IOtaBaSjJssjyyService extends IService<OtaBaSjJssjyy> {
/**
* 保存
*
* @param otaBaSjJssjyy
* @return
*/
/**
* 保存
*
* @param otaBaSjJssjyy
* @return
*/
void add(OtaBaSjJssjyy otaBaSjJssjyy);
/**
* 更新
*
* @param otaBaSjJssjyy
* @return
*/
/**
* 更新
*
* @param otaBaSjJssjyy
* @return
*/
void editById(OtaBaSjJssjyy otaBaSjJssjyy);
/**
* 通过id删除
*
* @param id
* @return
*/
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByOtaId(String otaId);
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
/**
* 通过id查询
*
* @param id
* @return
*/
OtaBaSjJssjyy queryById(String id);
/**
* 列表查询
*
* @return
*/
* 列表查询
*
* @return
*/
List<OtaBaSjJssjyy> queryList();
List<OtaBaSjJssjyy> queryByOtaId(String otaId);
}
@@ -2,67 +2,75 @@ package com.jero.modules.ota.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.modules.ota.entity.OtaBaSjList;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* @Description: 升级备案-升级活动备案列表
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
public interface IOtaBaSjListService extends IService<OtaBaSjList> {
/**
* 保存
*
* @param otaBaSjList
* @return
*/
/**
* 保存
*
* @param otaBaSjList
* @return
*/
void add(OtaBaSjList otaBaSjList);
/**
* 更新
*
* @param otaBaSjList
* @return
*/
/**
* 更新
*
* @param otaBaSjList
* @return
*/
void editById(OtaBaSjList otaBaSjList);
/**
* 通过id删除
*
* @param id
* @return
*/
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
/**
* 通过id查询
*
* @param id
* @return
*/
OtaBaSjList queryById(String id);
/**
* 列表查询
*
* @return
*/
* 列表查询
*
* @return
*/
List<OtaBaSjList> queryList();
/**
* 备案维护
*
*/
/**
* 备案维护
*/
void batchRecord(String ids, String bazt, String batjsj, String bz, String cut);
void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception;
void importData(MultipartFile file, String cut) throws Exception;
void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception;
}
@@ -3,62 +3,75 @@ package com.jero.modules.ota.service;
import com.alibaba.fastjson.JSONObject;
import com.jero.modules.ota.entity.OtaBaSjSjfzbh;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;
/**
* @Description: 升级备案-本次升级的驾驶辅助功能与参数变化
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
public interface IOtaBaSjSjfzbhService extends IService<OtaBaSjSjfzbh> {
/**
* 保存
*
* @param otaBaSjSjfzbh
* @return
*/
/**
* 保存
*
* @param otaBaSjSjfzbh
* @return
*/
void add(JSONObject json);
/**
* 更新
*
* @param otaBaSjSjfzbh
* @return
*/
/**
* 更新
*
* @param otaBaSjSjfzbh
* @return
*/
void editById(OtaBaSjSjfzbh otaBaSjSjfzbh);
/**
* 通过id删除
*
* @param id
* @return
*/
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
/**
* 通过id查询
*
* @param id
* @return
*/
OtaBaSjSjfzbh queryById(String id);
/**
* 列表查询
*
* @return
*/
* 列表查询
*
* @return
*/
List<OtaBaSjSjfzbh> queryList();
JSONObject queryByOtaId(String otaId, String otaIdT);
void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception;
void importData(MultipartFile file, String otaId, String cut) throws Exception;
void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception;
void exportData(File file, String otaId, String cut) throws Exception;
}
@@ -1,63 +1,77 @@
package com.jero.modules.ota.service;
import com.jero.modules.ota.entity.OtaBaCxJbxx;
import com.jero.modules.ota.entity.OtaBaSjSjmbcl;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;
/**
* @Description: 升级备案-升级目标车辆
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
public interface IOtaBaSjSjmbclService extends IService<OtaBaSjSjmbcl> {
/**
* 保存
*
* @param otaBaSjSjmbcl
* @return
*/
/**
* 保存
*
* @param otaBaSjSjmbcl
* @return
*/
void add(OtaBaSjSjmbcl otaBaSjSjmbcl);
/**
* 更新
*
* @param otaBaSjSjmbcl
* @return
*/
/**
* 更新
*
* @param otaBaSjSjmbcl
* @return
*/
void editById(OtaBaSjSjmbcl otaBaSjSjmbcl);
/**
* 通过id删除
*
* @param id
* @return
*/
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
/**
* 通过id查询
*
* @param id
* @return
*/
OtaBaSjSjmbcl queryById(String id);
/**
* 列表查询
*
* @return
*/
* 列表查询
*
* @return
*/
List<OtaBaSjSjmbcl> queryList();
OtaBaSjSjmbcl queryByOtaId(String otaId, String otaIdT);
void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception;
OtaBaSjSjmbcl parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception;
OtaBaSjSjmbcl importData(MultipartFile file, String otaId, String cut) throws Exception;
void exportData(File file, String otaId, String cut) throws Exception;
}
@@ -1,63 +1,78 @@
package com.jero.modules.ota.service;
import com.jero.modules.ota.entity.OtaBaCxJbxx;
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;
/**
* @Description: 升级备案-升级目标车型
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
public interface IOtaBaSjSjmbcxService extends IService<OtaBaSjSjmbcx> {
/**
* 保存
*
* @param otaBaSjSjmbcx
* @return
*/
OtaBaSjSjmbcx add(OtaBaSjSjmbcx otaBaSjSjmbcx);
/**
* 保存
*
* @param otaBaSjSjmbcx
* @return
*/
OtaBaSjSjmbcx add(OtaBaSjSjmbcx otaBaSjSjmbcx);
/**
* 更新
*
* @param otaBaSjSjmbcx
* @return
*/
/**
* 更新
*
* @param otaBaSjSjmbcx
* @return
*/
void editById(OtaBaSjSjmbcx otaBaSjSjmbcx);
/**
* 通过id删除
*
* @param id
* @return
*/
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
/**
* 通过id查询
*
* @param id
* @return
*/
OtaBaSjSjmbcx queryById(String id);
/**
* 列表查询
*
* @return
*/
* 列表查询
*
* @return
*/
List<OtaBaSjSjmbcx> queryList();
OtaBaSjSjmbcx queryByOtaId(String otaId, String otaIdT);
void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception;
OtaBaSjSjmbcx importData(MultipartFile file, String otaId, String cut) throws Exception;
OtaBaSjSjmbcx parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception;
void exportData(File file, String otaId, String cut) throws Exception;
}
@@ -1,62 +1,75 @@
package com.jero.modules.ota.service;
import com.alibaba.fastjson.JSONObject;
import com.jero.modules.ota.entity.OtaBaCxJbxx;
import com.jero.modules.ota.entity.OtaBaSjSjxtbh;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;
/**
* @Description: 升级备案-本次升级的系统名称与参数变化
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
public interface IOtaBaSjSjxtbhService extends IService<OtaBaSjSjxtbh> {
/**
* 保存
*
*/
/**
* 保存
*/
void add(JSONObject json);
/**
* 更新
*
* @param otaBaSjSjxtbh
* @return
*/
/**
* 更新
*
* @param otaBaSjSjxtbh
* @return
*/
void editById(OtaBaSjSjxtbh otaBaSjSjxtbh);
/**
* 通过id删除
*
* @param id
* @return
*/
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
/**
* 通过id查询
*
* @param id
* @return
*/
OtaBaSjSjxtbh queryById(String id);
/**
* 列表查询
*
* @return
*/
* 列表查询
*
* @return
*/
List<OtaBaSjSjxtbh> queryList();
JSONObject queryByOtaId(String otaId, String otaIdT);
JSONObject queryByOtaId(String otaId, String otaIdT);
void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception;
void importData(MultipartFile file, String otaId, String cut) throws Exception;
void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception;
void exportData(File file, String otaId, String cut) throws Exception;
}
@@ -1,63 +1,77 @@
package com.jero.modules.ota.service;
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
import com.jero.modules.ota.entity.OtaBaSjSjyxpg;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;
/**
* @Description: 升级备案-升级影响评估
* @Author: jero-boot
* @Date: 2023-03-17
* @Date: 2023-03-17
* @Version: V1.0
*/
public interface IOtaBaSjSjyxpgService extends IService<OtaBaSjSjyxpg> {
/**
* 保存
*
* @param otaBaSjSjyxpg
* @return
*/
/**
* 保存
*
* @param otaBaSjSjyxpg
* @return
*/
void add(OtaBaSjSjyxpg otaBaSjSjyxpg);
/**
* 更新
*
* @param otaBaSjSjyxpg
* @return
*/
/**
* 更新
*
* @param otaBaSjSjyxpg
* @return
*/
void editById(OtaBaSjSjyxpg otaBaSjSjyxpg);
/**
* 通过id删除
*
* @param id
* @return
*/
/**
* 通过id删除
*
* @param id
* @return
*/
void deleteById(String id);
/**
* 批量删除
*
* @param ids
* @return
*/
/**
* 批量删除
*
* @param ids
* @return
*/
void deleteByIds(List<String> ids);
/**
* 通过id查询
*
* @param id
* @return
*/
/**
* 通过id查询
*
* @param id
* @return
*/
OtaBaSjSjyxpg queryById(String id);
/**
* 列表查询
*
* @return
*/
* 列表查询
*
* @return
*/
List<OtaBaSjSjyxpg> queryList();
OtaBaSjSjyxpg queryByOtaId(String otaId, String otaIdT);
void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception;
OtaBaSjSjyxpg importData(MultipartFile file, String otaId, String cut) throws Exception;
OtaBaSjSjyxpg parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception;
void exportData(File file, String otaId, String cut) throws Exception;
}
@@ -117,6 +117,14 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
removeById(id);
}
public void deleteByOtaId(String otaId) {
if (StringUtils.isNotEmpty(otaId)) {
LambdaQueryWrapper<OtaBaCxAqcs> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaCxAqcs::getOtaId, otaId);
remove(queryWrapper);
}
}
/**
* 批量删除
*
@@ -163,7 +171,7 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
}
private OtaBaCxAqcs getByOtaId(String otaId) {
if(StringUtils.isEmpty(otaId)){
if (StringUtils.isEmpty(otaId)) {
return null;
}
LambdaQueryWrapper<OtaBaCxAqcs> queryWrapper = new LambdaQueryWrapper<>();
@@ -77,10 +77,12 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
otaBaCxJbxx.setCreateTime(now);
} else {
otaBaCxJbxxOld = this.getByOtaId(otaBaCxJbxx.getOtaId());
otaBaCxJbxx.setId(otaBaCxJbxx.getId());
otaBaCxList = otaBaCxListService.queryById(otaBaCxJbxx.getOtaId());
otaBaCxList.updateData(otaBaCxJbxx);
otaBaCxListService.editById(otaBaCxList);
}
otaBaCxJbxx.setOtaId(otaBaCxJbxx.getOtaId());
otaBaCxJbxx.setUpdateTime(now);
saveOrUpdate(otaBaCxJbxx);
ComparisonUtil cu = new ComparisonUtil();
@@ -156,7 +158,7 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
}
private OtaBaCxJbxx getByOtaId(String otaId) {
if(StringUtils.isEmpty(otaId)){
if (StringUtils.isEmpty(otaId)) {
return null;
}
LambdaQueryWrapper<OtaBaCxJbxx> queryWrapper = new LambdaQueryWrapper<>();
@@ -214,7 +216,12 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
jbxx.setCplb(ImportFileUtil.getCellValue(cell, wb));
row = s.getRow(4);
cell = row.getCell(1);
String ggpc = ImportFileUtil.getCellValue(cell, wb);
if (StringUtils.isEmpty(cpbh)) {
throw new JeroBootException("公告批次不能为空");
}
jbxx.setGgpc(ImportFileUtil.getCellValue(cell, wb));
row = s.getRow(5);
cell = row.getCell(1);
jbxx.setCpsb(ImportFileUtil.getCellValue(cell, wb));
@@ -72,6 +72,8 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
ComparisonUtil cu = new ComparisonUtil();
if (ObjectUtils.isEmpty(otaBaCxJsfzbacsOld)) {
otaBaCxJsfzbacsOld = new OtaBaCxJsfzbacs();
}else{
otaBaCxJsfzbacs.setId(otaBaCxJsfzbacsOld.getId());
}
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaId, OtaModuleEnum.CX_JSFZXTJCBACS, otaBaCxJsfzbacsOld, otaBaCxJsfzbacs, sysDictService);
saveOrUpdate(otaBaCxJsfzbacs);
@@ -282,6 +284,9 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
List<OtaBaCxSjmk> oldList = OtaBaCxSjmkService.queryByOtaId(otaId);
OtaBaCxSjmkService.deleteByOtaId(otaId);
List<OtaBaCxSjmk> sjmkList = parseList(upFile, otaId, cut);
if (ObjectUtils.isEmpty(oldList)) {
oldList = new ArrayList<>();
}
reList.addAll(cu.comparisonListRecord(otaId, OtaModuleEnum.CX_JSFZXTJCBACS, OtaTitleEnum.BJMC.getName(), oldList, sjmkList, sysDictService));
OtaBaCxSjmkService.saveOrUpdateBatch(sjmkList);
otaBaCxTxjlService.saveBatch(reList);
@@ -239,6 +239,9 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
}
List<OtaBaCxKsjjsmccs> oldList = getByOtaId(otaId);
if (ObjectUtils.isEmpty(oldList)) {
oldList = new ArrayList<>();
}
List<OtaBaCxKsjjsmccs> mccsList = parseFile(upFile, attFile, otaId, cut);
ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, OtaTitleEnum.GNMC.getName(), oldList, mccsList, sysDictService);
@@ -236,6 +236,9 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
throw new JeroBootException("请上传正确的文件");
}
List<OtaBaCxKsjxtmccs> oldList = getByOtaId(otaId);
if (ObjectUtils.isEmpty(oldList)) {
oldList = new ArrayList<>();
}
List<OtaBaCxKsjxtmccs> mccsList = parseFile(upFile, attFile, otaId, cut);
ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, OtaTitleEnum.XTLB.getName(), oldList, mccsList, sysDictService);
@@ -2,6 +2,7 @@ package com.jero.modules.ota.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.ota.entity.AttachmentEO;
import com.jero.modules.ota.entity.OtaBaCxAqcs;
import com.jero.modules.ota.entity.OtaBaCxTxjl;
@@ -11,15 +12,22 @@ 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.utils.ComparisonUtil;
import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.service.ISysDictService;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.File;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 升级备案-用户告知内容及方式
@@ -30,6 +38,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, OtaBaSjGgnrfs> implements IOtaBaSjGgnrfsService {
@Value(value = "${ota.templatePath}")
private String templatePath;
@Value(value = "${ota.uploadPath}")
private String uploadPath;
@Autowired
private IOtaBaCxTxjlService otaBaCxTxjlService;
@@ -137,4 +150,37 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
queryWrapper.eq(OtaBaSjGgnrfs::getOtaId, otaId);
return this.getOne(queryWrapper, false);
}
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "用户告知内容及方式.zip");
}
@Override
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
parseFileList(upLoadFiles, otaId, cut);
}
@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) {
throw new JeroBootException("请上传正确的文件");
}
}
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
}
}
@@ -1,89 +1,120 @@
package com.jero.modules.ota.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.modules.ota.entity.AttachmentEO;
import com.jero.modules.ota.entity.OtaBaCxAqcs;
import com.jero.modules.ota.entity.OtaBaSjJssj;
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
import com.jero.modules.ota.mapper.OtaBaSjJssjMapper;
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
import com.jero.modules.ota.service.IOtaBaSjJssjService;
import com.jero.modules.ota.service.IOtaBaSjJssjyyService;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 升级备案-结束升级
* @Author: jero-boot
* @Date: 2023-03-28
* @Date: 2023-03-28
* @Version: V1.0
*/
@Service
public class OtaBaSjJssjServiceImpl extends ServiceImpl<OtaBaSjJssjMapper, OtaBaSjJssj> implements IOtaBaSjJssjService {
/**
* 保存
*
* @param otaBaSjJssj
* @return
*/
@Override
@Autowired
private IOtaBaSjJssjyyService otaBaSjJssjyyService;
/**
* 保存
*
* @param otaBaSjJssj
* @return
*/
@Override
public void add(OtaBaSjJssj otaBaSjJssj) {
Date now = new Date();
otaBaSjJssj.setCreateTime(now);
otaBaSjJssj.setUpdateTime(now);
save(otaBaSjJssj);
otaBaSjJssjyyService.saveBatch(otaBaSjJssj.getList());
}
/**
* 更新
*
* @param otaBaSjJssj
* @return
*/
@Override
/**
* 更新
*
* @param otaBaSjJssj
* @return
*/
@Override
public void editById(OtaBaSjJssj otaBaSjJssj) {
Date now = new Date();
Date now = new Date();
otaBaSjJssj.setUpdateTime(now);
saveOrUpdate(otaBaSjJssj);
saveOrUpdate(otaBaSjJssj);
otaBaSjJssjyyService.deleteByOtaId(otaBaSjJssj.getOtaId());
otaBaSjJssjyyService.saveBatch(otaBaSjJssj.getList());
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public OtaBaSjJssj queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
* 列表查询
*
* @return
*/
@Override
public List<OtaBaSjJssj> queryList() {
return list();
}
@Override
public OtaBaSjJssj queryByOtaId(String otaId) {
LambdaQueryWrapper<OtaBaSjJssj> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaSjJssj::getOtaId, otaId);
OtaBaSjJssj res = this.getOne(queryWrapper, false);
List<OtaBaSjJssjyy> list = otaBaSjJssjyyService.queryByOtaId(otaId);
res.setList(list);
return res;
}
}
@@ -1,29 +1,34 @@
package com.jero.modules.ota.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.modules.ota.entity.OtaBaSjJssj;
import com.jero.modules.ota.entity.OtaBaSjJssjyy;
import com.jero.modules.ota.mapper.OtaBaSjJssjyyMapper;
import com.jero.modules.ota.service.IOtaBaSjJssjyyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 升级备案-结束升级原因
* @Author: jero-boot
* @Date: 2023-03-28
* @Date: 2023-03-28
* @Version: V1.0
*/
@Service
public class OtaBaSjJssjyyServiceImpl extends ServiceImpl<OtaBaSjJssjyyMapper, OtaBaSjJssjyy> implements IOtaBaSjJssjyyService {
/**
* 保存
*
* @param otaBaSjJssjyy
* @return
*/
@Override
/**
* 保存
*
* @param otaBaSjJssjyy
* @return
*/
@Override
public void add(OtaBaSjJssjyy otaBaSjJssjyy) {
Date now = new Date();
otaBaSjJssjyy.setCreateTime(now);
@@ -31,59 +36,77 @@ public class OtaBaSjJssjyyServiceImpl extends ServiceImpl<OtaBaSjJssjyyMapper, O
save(otaBaSjJssjyy);
}
/**
* 更新
*
* @param otaBaSjJssjyy
* @return
*/
@Override
/**
* 更新
*
* @param otaBaSjJssjyy
* @return
*/
@Override
public void editById(OtaBaSjJssjyy otaBaSjJssjyy) {
Date now = new Date();
Date now = new Date();
otaBaSjJssjyy.setUpdateTime(now);
saveOrUpdate(otaBaSjJssjyy);
saveOrUpdate(otaBaSjJssjyy);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
/**
* 通过id删除
*
* @param id
* @return
*/
@Override
public void deleteById(String id) {
removeById(id);
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
@Override
public void deleteByOtaId(String otaId) {
if(StringUtils.isNotEmpty(otaId)){
LambdaQueryWrapper<OtaBaSjJssjyy> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaSjJssjyy::getOtaId, otaId);
remove(queryWrapper);
}
}
/**
* 批量删除
*
* @param ids
* @return
*/
@Override
public void deleteByIds(List<String> ids) {
removeByIds(ids);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
/**
* 通过id查询
*
* @param id
* @return
*/
@Override
public OtaBaSjJssjyy queryById(String id) {
return getById(id);
}
/**
* 列表查询
*
* @return
*/
@Override
* 列表查询
*
* @return
*/
@Override
public List<OtaBaSjJssjyy> queryList() {
return list();
}
@Override
public List<OtaBaSjJssjyy> queryByOtaId(String otaId) {
LambdaQueryWrapper<OtaBaSjJssjyy> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaSjJssjyy::getOtaId, otaId);
return this.list(queryWrapper);
}
}
@@ -2,15 +2,22 @@ package com.jero.modules.ota.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.ota.entity.OtaBaCxJbxx;
import com.jero.modules.ota.entity.OtaBaSjList;
import com.jero.modules.ota.entity.OtaBaSjLsjl;
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
import com.jero.modules.ota.mapper.OtaBaSjListMapper;
import com.jero.modules.ota.service.IOtaBaSjListService;
import com.jero.modules.ota.service.IOtaBaSjLsjlService;
import com.jero.modules.ota.service.*;
import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.util.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@@ -24,11 +31,34 @@ import java.util.List;
@Service
public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBaSjList> implements IOtaBaSjListService {
@Value(value = "${ota.templatePath}")
private String templatePath;
@Value(value = "${ota.uploadPath}")
private String uploadPath;
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@Autowired
private IOtaBaSjLsjlService otaBaSjLsjlService;
@Autowired
private IOtaBaSjSjmbcxService otaBaSjSjmbcxService;
@Autowired
private IOtaBaSjSjmbclService otaBaSjSjmbclService;
@Autowired
private IOtaBaCxAqcsService otaBaCxAqcsService;
@Autowired
private IOtaBaSjSjxtbhService otaBaSjSjxtbhService;
@Autowired
private IOtaBaSjSjfzbhService otaBaSjSjfzbhService;
@Autowired
private IOtaBaSjGgnrfsService otaBaSjGgnrfsService;
/**
@@ -127,4 +157,30 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
throw new JeroBootException(ex.getMessage());
}
}
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "在线升级活动备案.zip");
}
@Override
public void importData(MultipartFile file, String cut) throws Exception {
List<File> fileList = ImportFileUtil.importZip(file, cut, uploadPath);
OtaBaSjSjmbcx mbcx = otaBaSjSjmbcxService.parseFileList(fileList, "", cut);
String otaId = mbcx.getOtaId();
if (StringUtils.isNotEmpty(otaId)) {
otaBaSjSjmbclService.parseFileList(fileList, otaId, cut);
otaBaCxAqcsService.parseFileList(fileList, otaId, cut);
otaBaSjSjxtbhService.parseFileList(fileList, otaId, cut);
otaBaSjSjfzbhService.parseFileList(fileList, otaId, cut);
otaBaSjGgnrfsService.parseFileList(fileList, otaId, cut);
} else {
throw new JeroBootException("导入失败");
}
}
@Override
public void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception {
}
}
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.ota.entity.*;
import com.jero.modules.ota.enums.OtaModuleEnum;
@@ -13,16 +14,27 @@ import com.jero.modules.ota.service.IOtaBaCxTxjlService;
import com.jero.modules.ota.service.IOtaBaSjListService;
import com.jero.modules.ota.service.IOtaBaSjSjfzbhService;
import com.jero.modules.ota.utils.ComparisonUtil;
import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.util.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.File;
import java.lang.reflect.Field;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 升级备案-本次升级的驾驶辅助功能与参数变化
@@ -45,6 +57,12 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
@Autowired
private IOSSFileService ossFileService;
@Value(value = "${ota.templatePath}")
private String templatePath;
@Value(value = "${ota.uploadPath}")
private String uploadPath;
/**
* 保存
*/
@@ -189,4 +207,94 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
queryWrapper.eq(OtaBaSjSjfzbh::getOtaId, otaId);
return this.list(queryWrapper);
}
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "本次升级的驾驶辅助功能与参数变化.zip");
}
@Override
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
parseFileList(upLoadFiles, otaId, cut);
}
@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) {
throw new JeroBootException("请上传正确的文件");
}
List<OtaBaSjSjfzbh> oldList = getByOtaId(otaId);
if (ObjectUtils.isEmpty(oldList)) {
oldList = new ArrayList<>();
}
List<OtaBaSjSjfzbh> newList = parseFile(upFile, attFile, otaId, cut);
ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJJSMCBH, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService);
deleteByOtaId(otaId);
saveOrUpdateBatch(newList);
otaBaCxTxjlService.saveBatch(reList);
}
private List<OtaBaSjSjfzbh> parseFile(File upFile, File attFile, String otaId, String cut) throws Exception {
Date now = new Date();
List<OtaBaSjSjfzbh> fzbhList = new ArrayList<>();
Workbook wb = ImportFileUtil.readExcel(upFile);
Sheet s = wb.getSheetAt(0);
int rows = s.getPhysicalNumberOfRows();
for (int i = 4; i < rows; i++) {
Row row = s.getRow(i);
Cell cell = row.getCell(0);
String str = ImportFileUtil.getCellValue(cell, wb);
OtaBaSjSjfzbh fzbh = new OtaBaSjSjfzbh();
if ("证明材料".equals(str)) {
//列表数据数量,在证明材料处结束
OtaBaSjList otaBaSjList = otaBaSjListService.queryById(otaId);
if (ObjectUtils.isNotEmpty(otaBaSjList)) {
cell = row.getCell(1);
str = ImportFileUtil.getCellValue(cell, wb);
String[] strs = str.split(",");
otaBaSjList.setSjjsfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService));
otaBaSjListService.editById(otaBaSjList);
}
break;
} else {
fzbh.setOtaId(otaId);
fzbh.setCreateTime(now);
fzbh.setUpdateTime(now);
cell = row.getCell(0);
fzbh.setGnmc(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(1);
fzbh.setSjmdlx(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(2);
fzbh.setSjqbgcs(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(3);
fzbh.setSjhbgcs(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(4);
fzbh.setGnbgms(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(5);
fzbh.setSytjbg(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(6);
fzbh.setSjsjkzq(ImportFileUtil.getCellValue(cell, wb));
fzbhList.add(fzbh);
}
}
return fzbhList;
}
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
}
}
@@ -1,6 +1,7 @@
package com.jero.modules.ota.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.ota.entity.*;
import com.jero.modules.ota.enums.OtaModuleEnum;
import com.jero.modules.ota.mapper.OtaBaSjSjmbclMapper;
@@ -9,17 +10,28 @@ import com.jero.modules.ota.service.IOtaBaSjListService;
import com.jero.modules.ota.service.IOtaBaSjLsjlService;
import com.jero.modules.ota.service.IOtaBaSjSjmbclService;
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.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.File;
import java.util.List;
import java.util.Date;
import java.util.UUID;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 升级备案-升级目标车辆
@@ -30,6 +42,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, OtaBaSjSjmbcl> implements IOtaBaSjSjmbclService {
@Value(value = "${ota.templatePath}")
private String templatePath;
@Value(value = "${ota.uploadPath}")
private String uploadPath;
@Autowired
private ISysDictService sysDictService;
@@ -59,7 +76,7 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
if (ObjectUtils.isEmpty(otaBaSjSjmbclOld)) {
otaBaSjSjmbclOld = new OtaBaSjSjmbcl();
}
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjSjmbcl.getOtaId(), OtaModuleEnum.CX_AQCS, otaBaSjSjmbclOld, otaBaSjSjmbcl, sysDictService);
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjSjmbcl.getOtaId(), OtaModuleEnum.SJ_SJMBCL, otaBaSjSjmbclOld, otaBaSjSjmbcl, sysDictService);
otaBaCxTxjlService.saveBatch(reList);
}
}
@@ -131,11 +148,50 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
}
private OtaBaSjSjmbcl getByOtaId(String otaId) {
if(StringUtils.isEmpty(otaId)){
if (StringUtils.isEmpty(otaId)) {
return null;
}
LambdaQueryWrapper<OtaBaSjSjmbcl> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaSjSjmbcl::getOtaId, otaId);
return this.getOne(queryWrapper, false);
}
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "本次升级涉及的目标车辆.zip");
}
@Override
public OtaBaSjSjmbcl parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
File upFile = null;
for (File f : upLoadFiles) {
if (f.getName().equals("本次升级涉及的目标车辆.xlsx")) {
upFile = f;
}
}
if (null == upFile) {
throw new JeroBootException("请上传正确的文件");
}
OtaBaSjSjmbcl mbcl = parseFile(upFile, cut);
mbcl.setOtaId(otaId);
add(mbcl);
return mbcl;
}
private OtaBaSjSjmbcl parseFile(File upFile, String cut) {
OtaBaSjSjmbcl mbcl = new OtaBaSjSjmbcl();
return mbcl;
}
@Override
public OtaBaSjSjmbcl importData(MultipartFile file, String otaId, String cut) throws Exception {
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
OtaBaSjSjmbcl mbcl = parseFileList(upLoadFiles, otaId, cut);
return mbcl;
}
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
}
}
@@ -1,24 +1,37 @@
package com.jero.modules.ota.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.ota.entity.*;
import com.jero.modules.ota.enums.OtaModuleEnum;
import com.jero.modules.ota.mapper.OtaBaSjSjmbcxMapper;
import com.jero.modules.ota.service.IOtaBaCxJbxxService;
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
import com.jero.modules.ota.service.IOtaBaSjListService;
import com.jero.modules.ota.service.IOtaBaSjSjmbcxService;
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.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.File;
import java.util.List;
import java.util.Date;
import java.util.UUID;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 升级备案-升级目标车型
@@ -38,6 +51,16 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
@Autowired
private IOtaBaCxTxjlService otaBaCxTxjlService;
@Autowired
private IOtaBaCxJbxxService otaBaCxJbxxService;
@Value(value = "${ota.templatePath}")
private String templatePath;
@Value(value = "${ota.uploadPath}")
private String uploadPath;
/**
* 保存
*
@@ -60,6 +83,7 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
otaBaSjSjmbcx.setCreateTime(now);
} else {
otaBaSjSjmbcxOld = this.getByOtaId(otaBaSjSjmbcx.getOtaId());
otaBaSjSjmbcx.setId(otaBaSjSjmbcxOld.getId());
otaBaSjList = otaBaSjListService.queryById(otaBaSjSjmbcx.getOtaId());
otaBaSjList.updateData(otaBaSjSjmbcx);
otaBaSjListService.editById(otaBaSjList);
@@ -139,11 +163,79 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
}
private OtaBaSjSjmbcx getByOtaId(String otaId) {
if(org.apache.commons.lang3.StringUtils.isEmpty(otaId)){
if (org.apache.commons.lang3.StringUtils.isEmpty(otaId)) {
return null;
}
LambdaQueryWrapper<OtaBaSjSjmbcx> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaSjSjmbcx::getOtaId, otaId);
return this.getOne(queryWrapper, false);
}
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "升级目标车型.zip");
}
@Override
public OtaBaSjSjmbcx importData(MultipartFile file, String otaId, String cut) throws Exception {
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
OtaBaSjSjmbcx mbcx = parseFileList(upLoadFiles, otaId, cut);
return mbcx;
}
@Override
public OtaBaSjSjmbcx parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
File upFile = null;
for (File f : upLoadFiles) {
if (f.getName().equals("车型基本信息.xlsx")) {
upFile = f;
}
}
if (null == upFile) {
throw new JeroBootException("请上传正确的文件");
}
OtaBaSjSjmbcx mbcx = parseFile(upFile, cut);
mbcx.setOtaId(otaId);
add(mbcx);
return mbcx;
}
private OtaBaSjSjmbcx parseFile(File upFile, String cut) throws Exception {
OtaBaSjSjmbcx mbcx = new OtaBaSjSjmbcx();
Workbook wb = ImportFileUtil.readExcel(upFile);
Sheet s = wb.getSheetAt(0);
Row row = s.getRow(1);
Cell cell = row.getCell(2);
mbcx.setBabh(ImportFileUtil.getCellValue(cell, wb));
row = s.getRow(2);
cell = row.getCell(2);
mbcx.setQymc(ImportFileUtil.getCellValue(cell, wb));
row = s.getRow(3);
cell = row.getCell(2);
String pc = ImportFileUtil.getCellValue(cell, wb);
if (StringUtils.isEmpty(pc)) {
throw new JeroBootException("车型及功能备案《公告》批次不能为空");
}
//查找车型备案的同批次数据
LambdaQueryWrapper<OtaBaCxJbxx> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaCxJbxx::getGgpc, pc);
OtaBaCxJbxx jbxx = otaBaCxJbxxService.getOne(queryWrapper, false);
if (ObjectUtils.isEmpty(jbxx)) {
throw new JeroBootException("车型及功能备案《公告》批次:" + jbxx + " 无法找到车型备案数据");
}
mbcx.setBapc(pc);
mbcx.setCpsb(jbxx.getCpsb());
mbcx.setCpmc(jbxx.getCpmc());
mbcx.setCpxh(jbxx.getCpxh());
mbcx.setDllx1(jbxx.getDllx1());
mbcx.setDllx2(jbxx.getDllx2());
return mbcx;
}
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
}
}
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.ota.entity.*;
import com.jero.modules.ota.enums.OtaModuleEnum;
@@ -12,16 +13,27 @@ import com.jero.modules.ota.mapper.OtaBaSjSjxtbhMapper;
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
import com.jero.modules.ota.service.IOtaBaSjSjxtbhService;
import com.jero.modules.ota.utils.ComparisonUtil;
import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.util.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.File;
import java.lang.reflect.Field;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 升级备案-本次升级的系统名称与参数变化
@@ -40,6 +52,12 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
@Autowired
private IOSSFileService ossFileService;
@Value(value = "${ota.templatePath}")
private String templatePath;
@Value(value = "${ota.uploadPath}")
private String uploadPath;
/**
* 保存
*/
@@ -82,7 +100,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
oldList = new ArrayList<>();
}
ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.XTMC.getName(), oldList, newList, sysDictService);
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.SJKZQMC.getName(), oldList, newList, sysDictService);
saveOrUpdateBatch(newList);
otaBaCxTxjlService.saveBatch(reList);
}
@@ -173,4 +191,84 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
queryWrapper.eq(OtaBaSjSjxtbh::getOtaId, otaId);
return this.list(queryWrapper);
}
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "本次升级的系统名称与变更参数.zip");
}
@Override
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
parseFileList(upLoadFiles, otaId, cut);
}
@Override
public void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
File upFile = null;
for (File f : upLoadFiles) {
if (f.getName().equals("本次升级的系统名称与变更参数.xlsx")) {
upFile = f;
}
}
if (null == upFile) {
throw new JeroBootException("请上传正确的文件");
}
List<OtaBaSjSjxtbh> newList = parseFile(upFile, otaId, cut);
List<OtaBaSjSjxtbh> oldList = getByOtaId(otaId);
if (ObjectUtils.isEmpty(oldList)) {
oldList = new ArrayList<>();
}
ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.SJKZQMC.getName(), oldList, newList, sysDictService);
saveOrUpdateBatch(newList);
otaBaCxTxjlService.saveBatch(reList);
}
private List<OtaBaSjSjxtbh> parseFile(File upFile, String otaId, String cut) throws Exception {
Date now = new Date();
List<OtaBaSjSjxtbh> list = new ArrayList<>();
Workbook wb = ImportFileUtil.readExcel(upFile);
Sheet s = wb.getSheetAt(0);
int rows = s.getPhysicalNumberOfRows();
for (int i = 4; i < rows; i++) {
Row row = s.getRow(i);
Cell cell = row.getCell(0);
OtaBaSjSjxtbh xtbh = new OtaBaSjSjxtbh();
cell = row.getCell(1);
xtbh.setSjqbgcs(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(2);
xtbh.setSjhbgcs(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(3);
xtbh.setSjkzqmc(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(4);
xtbh.setYjbb(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(5);
xtbh.setSjqrjbb(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(6);
xtbh.setSjhrjbb(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(7);
xtbh.setSjqczxt(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(8);
xtbh.setSjhczxt(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(9);
xtbh.setSjbyzsj(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(10);
xtbh.setSjbdx(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(11);
xtbh.setSfcfsj(ImportFileUtil.getCellValue(cell, wb));
xtbh.setCreateTime(now);
xtbh.setUpdateTime(now);
xtbh.setOtaId(otaId);
list.add(xtbh);
}
return list;
}
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
}
}
@@ -2,22 +2,30 @@ package com.jero.modules.ota.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.ota.entity.*;
import com.jero.modules.ota.enums.OtaModuleEnum;
import com.jero.modules.ota.mapper.OtaBaSjSjyxpgMapper;
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
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;
import java.io.File;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 升级备案-升级影响评估
@@ -35,6 +43,12 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
@Autowired
private IOtaBaCxTxjlService otaBaCxTxjlService;
@Value(value = "${ota.templatePath}")
private String templatePath;
@Value(value = "${ota.uploadPath}")
private String uploadPath;
/**
* 保存
*
@@ -128,11 +142,50 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
}
private OtaBaSjSjyxpg getByOtaId(String otaId) {
if(org.apache.commons.lang3.StringUtils.isEmpty(otaId)){
if (org.apache.commons.lang3.StringUtils.isEmpty(otaId)) {
return null;
}
LambdaQueryWrapper<OtaBaSjSjyxpg> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OtaBaSjSjyxpg::getOtaId, otaId);
return this.getOne(queryWrapper, false);
}
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "升级影响评估.zip");
}
@Override
public OtaBaSjSjyxpg importData(MultipartFile file, String otaId, String cut) throws Exception {
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
OtaBaSjSjyxpg sjyxpg = parseFileList(upLoadFiles, otaId, cut);
return sjyxpg;
}
private OtaBaSjSjyxpg parseFile(File upFile, String cut) {
OtaBaSjSjyxpg sjyxpg = new OtaBaSjSjyxpg();
return sjyxpg;
}
@Override
public OtaBaSjSjyxpg parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
File upFile = null;
for (File f : upLoadFiles) {
if (f.getName().equals("车型基本信息.xlsx")) {
upFile = f;
}
}
if (null == upFile) {
throw new JeroBootException("请上传正确的文件");
}
OtaBaSjSjyxpg sjyxpg = parseFile(upFile, cut);
sjyxpg.setOtaId(otaId);
add(sjyxpg);
return sjyxpg;
}
@Override
public void exportData(File file, String otaId, String cut) throws Exception {
}
}
@@ -85,7 +85,7 @@ public class ComparisonUtil<T> {
for (T oldObj : oldList) {
String oldId = idField.get(oldObj).toString();
if (oldId.equals(id.toString())) {
resList.addAll(comparisonCertRecord(otaId, otaModuleEnum, tableTitle, newObj, oldObj, sysDictService));
resList.addAll(comparisonCertRecord(otaId, otaModuleEnum, tableTitle, oldObj, newObj, sysDictService));
}
}
}
@@ -148,7 +148,7 @@ public class ComparisonUtil<T> {
if (ObjectUtils.isNotEmpty(newVal)) {
Field tableField = newClazz.getClass().getDeclaredField(tableTitle);
tableField.setAccessible(true);
Object newTitleVal = tableField.get(newVal);
Object newTitleVal = tableField.get(newClazz);
if (ObjectUtils.isNotEmpty(newTitleVal)) {
newTitleStr = newTitleVal.toString();
}
@@ -139,11 +139,12 @@ public class ProjectCertificationInventoryEO implements Serializable {
private String bussDocumentLibraryId;
/**交付物模板*/
// @Excel(name = "交付物模板", width = 15)
@ApiModelProperty(value = "交付物模板")
private String deliverableTemplate;
/**交付物模板名称**/
@TableField(exist = false)
@Excel(name = "交付物模板", width = 15)
private String deliverableTemplateName;
/**交付结果*/
@@ -157,7 +158,6 @@ public class ProjectCertificationInventoryEO implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "截止日期")
private Date endTime;
/**流程状态*/
@ApiModelProperty(value = "流程状态")
private String flowStatus;
@@ -213,4 +213,8 @@ public class ProjectCertificationInventoryEO implements Serializable {
@TableField(exist = false)
private String excelName;
// @Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd")
// @TableField(exist = false)
// private String endTimeStr;
}
@@ -137,11 +137,12 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
private java.lang.String bussDocumentLibraryId;
/**交付物模板*/
// @Excel(name = "交付物模板", width = 15)
@ApiModelProperty(value = "交付物模板")
private java.lang.String deliverableTemplate;
/**交付物模板名称**/
@TableField(exist = false)
@Excel(name = "交付物模板", width = 15)
private String deliverableTemplateName;
/**交付结果*/
@@ -102,19 +102,19 @@ public class ProjectLawsInventoryEO implements Serializable {
/**适用地区*/
@ApiModelProperty(value = "适用地区")
//@Dict(dicCode ="region")
@Excel(name = "适用地区", width = 15, dicCode = "region")
// @Excel(name = "适用地区", width = 15, dicCode = "region")
private java.lang.String region;
@TableField(exist = false)
private String region_dictText;
/**对应标准*/
@Excel(name = "对应标准", width = 20)
// @Excel(name = "对应标准", width = 20)
@ApiModelProperty(value = "对应标准")
private String correspondingStandard;
/**实施类别*/
@Excel(name = "实施类别", width = 20,dicCode ="implement_type")
// @Excel(name = "实施类别", width = 20,dicCode ="implement_type")
@ApiModelProperty(value = "实施类别")
//@Dict(dicCode ="implement_type")
private String implementType;
@@ -122,7 +122,7 @@ public class ProjectLawsInventoryEO implements Serializable {
private String implementType_dictText;
/**新车型实施日期*/
@Excel(name = "新车型实施日期", width = 20, format = "yyyy-MM-dd")
// @Excel(name = "新车型实施日期", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "新车型实施日期")
@@ -132,7 +132,7 @@ public class ProjectLawsInventoryEO implements Serializable {
private String xin1Che1Xing2Shi2Shi1Ri4Qi1String;
/**在产车实施日期*/
@Excel(name = "在产车实施日期", width = 20, format = "yyyy-MM-dd")
// @Excel(name = "在产车实施日期", width = 20, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "在产车实施日期")
@@ -162,7 +162,7 @@ public class ProjectLawsInventoryEO implements Serializable {
private String applicableSupplement;
/**WVTA ID*/
@Excel(name = "WVTA ID", width = 20)
// @Excel(name = "WVTA ID", width = 20)
@ApiModelProperty(value = "WVTA ID")
private String wvtaId;
@@ -187,7 +187,7 @@ public class ProjectLawsInventoryEO implements Serializable {
@ApiModelProperty(value = "认证工程师id")
private String homologationEngineerId;
@Excel(name = "认证工程师", width = 20)
// @Excel(name = "认证工程师", width = 20)
@TableField(exist = false)
@ApiModelProperty(value = "认证工程师名称")
private String homologationEngineerName;//认证工程师名称
@@ -238,7 +238,7 @@ public class ProjectLawsInventoryEO implements Serializable {
private String designInitiatorId;
/**设计符合性确认-发起人名称*/
@Excel(name = "发起人", width = 20,groupName = "设计符合性确认")
// @Excel(name = "发起人", width = 20,groupName = "设计符合性确认")
@TableField(exist = false)
private String designInitiatorName;
@@ -372,7 +372,7 @@ public class ProjectLawsInventoryEO implements Serializable {
private String verifyInitiatorId;
/**验证符合性确认-发起人名称*/
@Excel(name = "发起人", width = 20,groupName = "验证符合性确认")
// @Excel(name = "发起人", width = 20,groupName = "验证符合性确认")
@TableField(exist = false)
private String verifyInitiatorName;
@@ -101,29 +101,29 @@ public class ProjectLawsInventoryEOEn implements Serializable {
/**适用地区*/
@ApiModelProperty(value = "适用地区")
@Dict(dicCode ="Area")
@Excel(name = "Area", width = 15)
// @Excel(name = "Area", width = 15)
private String region;
/**对应标准*/
@Excel(name = "Compare EU/CN", width = 20)
// @Excel(name = "Compare EU/CN", width = 20)
@ApiModelProperty(value = "对应标准")
private String correspondingStandard;
/**实施类别*/
@Excel(name = "Usage", width = 20,dicCode ="implement_type")
// @Excel(name = "Usage", width = 20,dicCode ="implement_type")
@ApiModelProperty(value = "实施类别")
@Dict(dicCode ="implement_type")
private String implementType;
/**新车型实施日期*/
@Excel(name = "New Type Execution Date", width = 30, format = "yyyy-MM-dd")
// @Excel(name = "New Type Execution Date", width = 30, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "新车型实施日期")
private Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
/**在产车实施日期*/
@Excel(name = "New Vehicle Execution Date", width = 30, format = "yyyy-MM-dd")
// @Excel(name = "New Vehicle Execution Date", width = 30, format = "yyyy-MM-dd") 67169
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "在产车实施日期")
@@ -146,7 +146,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
private String applicableSupplement;
/**WVTA ID*/
@Excel(name = "WVTA ID", width = 20)
// @Excel(name = "WVTA ID", width = 20)
@ApiModelProperty(value = "WVTA ID")
private String wvtaId;
@@ -169,7 +169,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
@ApiModelProperty(value = "认证工程师id")
private String homologationEngineerId;
@Excel(name = "Homologation Engineer", width = 25)
// @Excel(name = "Homologation Engineer", width = 25)
@TableField(exist = false)
@ApiModelProperty(value = "认证工程师名称")
private String homologationEngineerName;//认证工程师名称
@@ -213,7 +213,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
private String designInitiatorId;
/**设计符合性确认-发起人名称*/
@Excel(name = "Reviewer", width = 25,groupName = "Design Compliance Check")
// @Excel(name = "Reviewer", width = 25,groupName = "Design Compliance Check")
@TableField(exist = false)
private String designInitiatorName;
@@ -325,7 +325,7 @@ public class ProjectLawsInventoryEOEn implements Serializable {
private String verifyInitiatorId;
/**验证符合性确认-发起人名称*/
@Excel(name = "Reviewer", width = 25,groupName = "Validation Compliance Check")
// @Excel(name = "Reviewer", width = 25,groupName = "Validation Compliance Check")
@TableField(exist = false)
private String verifyInitiatorName;
@@ -21,6 +21,7 @@ public enum ProjectRoleEnum {
MANAGER("manage","11",""),
ADMIN("系统管理员","12",""),
VIEWER("Viewer","13",""),
DUTYPERSON("责任人","14","")
;
String name;
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.utils.IOUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -15,12 +16,14 @@ import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.DateUtils;
import com.jero.common.util.oss.CosBootUtil;
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService;
import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService;
import com.jero.modules.document.controller.BussDocumentLibraryEOController;
import com.jero.modules.document.entity.BussDocumentLibraryEO;
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
import com.jero.modules.feishu.service.IFeishuService;
import com.jero.modules.oss.entity.OSSFile;
@@ -63,15 +66,18 @@ import org.aspectj.util.FileUtil;
import org.jeecgframework.poi.excel.ExcelExportUtil;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
import org.joda.time.DateTime;
import org.springframework.beans.BeanUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import java.io.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -85,6 +91,8 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile;
/**
* @Description: 项目库-认证清单表
* @Author: jero-boot
@@ -139,6 +147,15 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
@Autowired
private IOSSFileService ossFileService;
@Autowired
SysCategoryMapper sysCategoryMapper;
@Autowired
private IBussDocumentLibraryEOService iBussDocumentLibraryEOService;
@Autowired
private IProjectRelatedPersonnelService iProjectRelatedPersonnelService;
@Autowired
private IOSSFileService iOSSFileService;
/**
* 保存
*
@@ -2651,13 +2668,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
public void importData(MultipartFile file, ProjectCertificationInventoryEO projectCertificationInventoryEO) {
String title = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
title = "类别,检验项目,配置项,WVTA ID," +
"*标准编号,*责任领域,工程接口人,责任人," +
"交付物类型,截止日期";
}else{
title = "Category,Inspection Items,Configuration Item,WVTA ID," +
"*Standard No,*Responsible Field,Eng. Interface,Assignee," +
"Deliverable Type,Due Date";
title = "*类别,*检验项目,*配置项,*WVTA ID," +
"*标准编号,*责任领域,*工程接口人,*责任人," +
"*交付物类型,交付物模板,*截止日期";
}else {
title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID," +
"*Standard No,*Responsible Field,*Eng. Interface,*Assignee," +
"*Deliverable Type,Deliverable Template,*Due Date";
}
int pos = file.getOriginalFilename().lastIndexOf(".");
@@ -2802,7 +2819,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
}
if (dataList.size() == 0) {
//删除原上传文件
FileUnZip.deleteDir(saveDirectory);
@@ -2816,7 +2832,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
//数据转换 JSON.parseObject(JSON.toJSONString(map), MyUser.class)
for (Map<String, String> stringStringMap : dataList) {
ProjectCertificationInventoryEO projectCertificationInventoryEOTemp = JSON.parseObject(JSON.toJSONString(stringStringMap), ProjectCertificationInventoryEO.class);
// projectCertificationInventoryEOTemp.setCut(projectCertificationInventoryEO.getCut());
projectCertificationInventoryEOTemp.setCut(projectCertificationInventoryEO.getCut());
projectCertificationInventoryEOTemp.setProjectLibraryId(projectCertificationInventoryEO.getProjectLibraryId());
projectCertificationInventoryEOTemp.setFlowStatus(CertificationInventoryFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
datas.add(projectCertificationInventoryEOTemp);
@@ -2842,17 +2858,553 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
workbook.close();
// List<SysCategory> categoryList = sysCategoryService.list();
List<SysCategory> categoryList = sysCategoryService.list();
//普通数据字典
// List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
// importDatas(datas, dictItemList, zipEntryName,saveDirectory,projectCertificationInventoryEO,categoryList);
String cut = projectCertificationInventoryEO.getCut();
importDisposeData(datas,cut);
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
importDatas(datas, dictItemList, zipEntryName,saveDirectory,projectCertificationInventoryEO,categoryList);
// String cut = projectCertificationInventoryEO.getCut();
// importDisposeData(datas,cut);
//删除原上传文件
FileUnZip.deleteDir(saveDirectory);
}
private void importDatas(List<ProjectCertificationInventoryEO> datas,
List<SysDictItem> dictItemList, String zipEntryName,
File saveDirectory, ProjectCertificationInventoryEO projectCertificationInventoryEOTemp,
List<SysCategory> categoryList) {
List<String> msgList = new ArrayList<>();
//模板数据验证
msgList = dataTemplateVerify(datas, dictItemList, zipEntryName, projectCertificationInventoryEOTemp, categoryList);
if (msgList.size() > 0) {
//返回报错信息
String html = "";
for (String s : msgList) {
html += s + "</br>";
}
FileUnZip.deleteDir(saveDirectory);
throw new JeroBootException(html);
}else {
if (datas.size() != 0) {
this.saveBatch(datas);
}
}
}
//模板数据验证
private List<String> dataTemplateVerify(List<ProjectCertificationInventoryEO> datas,
List<SysDictItem> dictItemList, String zipEntryName,
ProjectCertificationInventoryEO projectCertificationInventoryEOTemp,
List<SysCategory> categoryList) {
String dictId = sysCategoryMapper.getDictId("ren4_zheng4_-_jiao1_fu4_wu4_lei4_xing2");
List<SysCategory> collect = categoryList.stream().filter(e -> e.getSysDictId().equals(dictId)).collect(Collectors.toList());
List<String> treeNameList = new ArrayList<>();
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
treeNameList = collect.stream().map(SysCategory::getName).collect(Collectors.toList());
}else{
treeNameList = collect.stream().map(SysCategory::getEnName).collect(Collectors.toList());
}
int i = 2;
List<String> msgList = new ArrayList<>();
String value = "";
boolean flag = true;
//编号验证
verifySerialNumber(datas,projectCertificationInventoryEOTemp);
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : datas) {
i++;
String errorMsg = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
errorMsg = "" + i + "行:";
}else{
errorMsg = i + " line";
}
//类别
String category = projectCertificationInventoryEO.getCategory();
//检验项目
String inspectionItem = projectCertificationInventoryEO.getInspectionItem();
//配置项
String configItem = projectCertificationInventoryEO.getConfigItem();
//WVTA ID
String wvtaId = projectCertificationInventoryEO.getWvtaId();
//标准编号
String serialNumber = projectCertificationInventoryEO.getSerialNumber();
//责任领域
String dutyTerritory = projectCertificationInventoryEO.getDutyTerritoryName();
//工程接口人engineeringInterfacePerson
String sdt = projectCertificationInventoryEO.getSdtName();
//责任人
String dutyPerson = projectCertificationInventoryEO.getDutyPersonName();
//交付物类型
String deliverableType = projectCertificationInventoryEO.getDeliverableTypeName();
//截止时间
Date endTime = projectCertificationInventoryEO.getEndTime();
//文件
//交付物模板
String deliverableTemplate = projectCertificationInventoryEO.getDeliverableTemplateName();
//编号必填
flag = must(projectCertificationInventoryEO, errorMsg, msgList, serialNumber, "编号", "Standard No");
//WVTA ID
if(StringUtils.isNotBlank(wvtaId)){
if(wvtaId.length() > 100){
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "WVTA ID不能超过100个字符, ";
}else{
message = errorMsg + " The WVTA ID cannot contain more than 100 characters, ";
}
msgList.add(message);
}
} else {
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "WVTA ID不能为空, ";
}else{
message = errorMsg + " The WVTA ID cannot null, ";
}
msgList.add(message);
}
//类别
if(StringUtils.isNotBlank(category)){
if(category.length() > 100){
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "类别不能超过100个字符, ";
}else{
message = errorMsg + " The Category cannot contain more than 100 characters, ";
}
msgList.add(message);
}
}else {
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "类别不能为空, ";
}else{
message = errorMsg + " The Category cannot null, ";
}
msgList.add(message);
}
//检验项目
if(StringUtils.isNotBlank(inspectionItem)){
if(inspectionItem.length() > 100){
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "检验项目不能超过100个字符, ";
}else{
message = errorMsg + " The InspectionItem cannot contain more than 100 characters, ";
}
msgList.add(message);
}
}else {
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "检验项目不能为空, ";
}else{
message = errorMsg + " The InspectionItem cannot null, ";
}
msgList.add(message);
}
//配置项
if(StringUtils.isNotBlank(configItem)){
if(configItem.length() > 100){
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "配置项不能超过100个字符, ";
}else{
message = errorMsg + " The ConfigItem cannot contain more than 100 characters, ";
}
msgList.add(message);
}
}else {
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "配置项不能为空, ";
}else{
message = errorMsg + " The ConfigItem cannot null, ";
}
msgList.add(message);
}
//责任领域
if(StringUtils.isNotBlank(dutyTerritory)){
value = pullMore(dictItemList, projectCertificationInventoryEO, errorMsg, dutyTerritory,msgList,"责任领域","Responsible Field","duty_territory");
if(StringUtils.isNotBlank(value)){
projectCertificationInventoryEO.setDutyTerritory(value);
}
}else {
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "责任领域不能为空, ";
}else{
message = errorMsg + " The Responsible Field cannot null, ";
}
msgList.add(message);
}
//工程接口人(责任领域下的工程接口人)
Map<String, Object> objectMap = iProjectRelatedPersonnelService.queryPersonByProjectId(projectCertificationInventoryEOTemp.getProjectLibraryId(), value);
//工程接口人
List<Map<String, String>> mapPersonList = (List<Map<String, String>>) objectMap.get("engineeringInterfacePersonList");
//所有人
List<Map<String, String>> allPersonList = (List<Map<String, String>>) objectMap.get("allPersonList");
String nameCn = "";
String nameEn = "";
//工程接口人
if(StringUtils.isNotBlank(sdt)){
nameCn = "工程接口人";
nameEn = "Eng. Interface ";
//验证人员是否存在
personnelVerify(projectCertificationInventoryEO, errorMsg, msgList, sdt, mapPersonList,nameCn,nameEn, com.jero.modules.project.enums.ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue());
}else {
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "工程接口人不能为空, ";
}else{
message = errorMsg + " The Eng. Interface cannot null, ";
}
msgList.add(message);
}
//责任人
if(StringUtils.isNotBlank(dutyPerson)){
nameCn = "责任人";
nameEn = "Assignee";
//验证人员是否存在
personnelVerify(projectCertificationInventoryEO, errorMsg, msgList, dutyPerson, allPersonList,nameCn,nameEn, com.jero.modules.project.enums.ProjectRoleEnum.DUTYPERSON.getValue());
}else {
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "责任人不能为空, ";
}else{
message = errorMsg + " The Assignee cannot null, ";
}
msgList.add(message);
}
//交付物类型
if(StringUtils.isNotEmpty(deliverableType)){
value = tree(categoryList,treeNameList, projectCertificationInventoryEO, errorMsg, deliverableType,msgList,"交付物类型","Deliverable Type","deliverable_template");
if(StringUtils.isNotBlank(value)){
String treeId = getTreeId(categoryList, projectCertificationInventoryEOTemp, treeNameList, value);
projectCertificationInventoryEO.setDeliverableType(treeId);
}
}else{
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "交付物类型不能为空, ";
}else{
message = errorMsg + " The Deliverable Type cannot null, ";
}
msgList.add(message);
}
//交付物模板
value = templateTransition(zipEntryName, projectCertificationInventoryEO, errorMsg, deliverableTemplate,msgList,"交付物模板","Deliverable Template");
if(StringUtils.isNotBlank(value)){
projectCertificationInventoryEO.setDeliverableTemplate(value);
}
//截止时间
SimpleDateFormat sd = new SimpleDateFormat();
String endTimeStr = sd.format(endTime);
if(StringUtils.isNotBlank(endTimeStr)){
flag = dateVerify(projectCertificationInventoryEO, errorMsg, endTime,msgList,"截止时间","Due Date");
if(flag){
projectCertificationInventoryEO.setEndTime(projectCertificationInventoryEO.getEndTime());
}
}else{
String message = "";
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
message = errorMsg + "截止时间不能为空, ";
}else{
message = errorMsg + " The Due Date Type cannot null, ";
}
msgList.add(message);
}
}
return msgList;
}
//必填
private boolean must(ProjectCertificationInventoryEO projectCertificationInventoryEO, String errorMsg,
List<String> msgList, String serialNumber,String nameCn,String nameEn) {
int errorCount = 0;
if(StringUtils.isBlank(serialNumber)){
errorCount ++;
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
errorMsg += nameCn + "为必填项,不能为空, ";
}else{
errorMsg += nameEn + "This parameter is mandatory and cannot be empty, ";
}
msgList.add(errorMsg);
}
if(errorCount == 0){
return true;
}else{
return false;
}
}
private boolean dateVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO,
String errorMsg, Date field, List<String> msgList, String nameCn, String nameEn) {
//判断格式是否正确
boolean flag = true;
if(ObjectUtils.isNotEmpty(field)){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String format = sdf.format(field);
if (!DateUtils.isValidDate(format)) {
flag = false;
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
errorMsg += nameCn + "格式不正确, 正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日";
}else{
errorMsg += nameEn + " Incorrect format correct format is:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日";
}
msgList.add(errorMsg);
}
}
return flag;
}
private String templateTransition(String zipEntryName,
ProjectCertificationInventoryEO projectCertificationInventoryEO,
String errorMsg, String deliverableTemplate, List<String> msgList,
String nameCn, String nameEn) {
String value = "";
if (StringUtils.isNotBlank(deliverableTemplate)) {
StringBuilder sb = new StringBuilder();
for (String fileName : deliverableTemplate.split(",")) {
List<File> nowFileList = new ArrayList<>();
nowFileList = FileUnZip.readFileByFilename(zipEntryName, fileName,projectCertificationInventoryEO.getCut(),errorMsg,msgList,nameCn,nameEn);
if (nowFileList.size() == 0) {
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
// errorMsg += "压缩包中没有" + fileName + "文件; ";
// }else{
// errorMsg += " Not in the zip package" + fileName + "file; ";
// }
// msgList.add(errorMsg);
} else {
try {
FileInputStream input = new FileInputStream(nowFileList.get(0));
MultipartFile multipartFile =
new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input);
//文件存入文件表
OSSFile ossFile = iOSSFileService.uploadLocalOfCos(multipartFile, "", null,null);
if (ObjectUtils.isNotEmpty(ossFile)) {
sb.append(ossFile.getId() + ",");
}
} catch (IOException e) {
log.error("认证清单导入"+e.getMessage());
}
}
}
if (StringUtils.isNotBlank(sb)) {
value = sb.substring(0, sb.length() - 1);
}
}
return value;
}
private String getTreeId(List<SysCategory> categoryList,
ProjectCertificationInventoryEO projectCertificationInventoryEOTemp,
List<String> treeNameList, String value) {
StringBuilder sb = new StringBuilder();
for (String valueTemp : value.split(",")) {
if (treeNameList.contains(valueTemp)) {
List<SysCategory> sysCategoryList = new ArrayList<>();
if (CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())) {
sysCategoryList = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList());
} else {
sysCategoryList = categoryList.stream().filter(e -> e.getEnName().equals(valueTemp)).collect(Collectors.toList());
}
if (sysCategoryList.size() != 0) {
sb.append(sysCategoryList.get(0).getId() + ",");
}
}
}
if (StringUtils.isNotBlank(sb)) {
String substring = sb.substring(0, sb.length() - 1);
return substring;
}
return null;
}
private String tree(List<SysCategory> categoryList, List<String> nameList,
ProjectCertificationInventoryEO projectCertificationInventoryEO,
String errorMsg, String value, List<String> msgList,
String nameCn, String nameEn, String dictCode) {
if (StringUtils.isNotBlank(value)) {
StringBuilder sb = new StringBuilder();
for (String s : value.split(",")) {
if(!nameList.contains(s)){
sb.append(s+",");
}
}
if(StringUtils.isNotBlank(sb)){
String substring = sb.substring(0, sb.length() - 1);
if (CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())) {
errorMsg += nameCn + "中的" + substring + "与数据字典不匹配, ";
} else {
errorMsg += nameEn + " " + substring + " does not match the data dictionary, ";
}
msgList.add(errorMsg);
}else{
StringBuilder sbTemp = new StringBuilder();
for (String s : value.split(",")) {
List<SysCategory> collect = new ArrayList<>();
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
collect = categoryList.stream().filter(e -> s.equals(e.getName())).collect(Collectors.toList());
if(collect.size() != 0){
sbTemp.append(collect.get(0).getName()+",");
}
}else{
collect = categoryList.stream().filter(e -> s.equals(e.getEnName())).collect(Collectors.toList());
if(collect.size() != 0){
sbTemp.append(collect.get(0).getEnName()+",");
}
}
}
if(StringUtils.isNotBlank(sbTemp)){
String substring = sbTemp.substring(0, sbTemp.length() - 1);
return substring;
}
}
}
return null;
}
private void personnelVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO,
String errorMsg, List<String> msgList, String regulationOwnerId,
List<Map<String, String>> mapList, String nameCn, String nameEn, String fieldNumber) {
//单选
if(regulationOwnerId.contains(",")){
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
errorMsg += nameCn + "导入只能填写一个用户名, ";
}else{
errorMsg += "Only one user name can be entered for"+ nameEn +"import, ";
}
msgList.add(errorMsg);
}
if(mapList.size() != 0){
int count = 0;
for (Map<String, String> stringStringMap : mapList) {
String name = stringStringMap.get("name");
if(regulationOwnerId.equals(name)){
count ++;
if(com.jero.modules.project.enums.ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue().equals(fieldNumber)){
projectCertificationInventoryEO.setSdt(stringStringMap.get("value"));
}else if(com.jero.modules.project.enums.ProjectRoleEnum.DUTYPERSON.getValue().equals(fieldNumber)){
projectCertificationInventoryEO.setDutyPerson(stringStringMap.get("value"));
}
break;
}
}
if(count == 0){
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
errorMsg += nameCn+regulationOwnerId+"与相关人员名单中责任领域下的人员不匹配";
}else{
errorMsg += nameEn+regulationOwnerId+"does not match a person under the Responsible Field in the relevant person list";
}
msgList.add(errorMsg);
}
}else{
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
errorMsg += nameCn+regulationOwnerId+"与相关人员名单中责任领域下的人员不匹配";
}else{
errorMsg += nameEn+regulationOwnerId+"does not match a person under the Responsible Field in the relevant person list";
}
msgList.add(errorMsg);
}
}
private String pullMore(List<SysDictItem> dictItemList, ProjectCertificationInventoryEO projectCertificationInventoryEO,
String errorMsg, String value, List<String> msgList,
String nameCn, String nameEn, String dictCode) {
List<String> valueList = new ArrayList<>();
if (StringUtils.isNotBlank(value)) {
List<String> list = Arrays.asList(value.split(","));
List<SysDictItem> sysDictItemList = new ArrayList<>();
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
sysDictItemList = dictItemList.stream().filter(e ->dictCode.equals(e.getDictCode()) && list.contains(e.getItemText())).collect(Collectors.toList());
}else{
sysDictItemList = dictItemList.stream().filter(e ->dictCode.equals(e.getDictCode()) && list.contains(e.getEnName())).collect(Collectors.toList());
}
if(list.size() == sysDictItemList.size()){
valueList = sysDictItemList.stream().map(SysDictItem::getItemValue).collect(Collectors.toList());
}else{
//数据中有与数据字典不匹配的值
List<String> finalValueList = valueList;
List<String> diffList = list.stream().filter(e -> !finalValueList.contains(e)).collect(Collectors.toList());
if (CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())) {
errorMsg += nameCn + "中的" + StringUtils.join(diffList,",") + "与数据字典不匹配, ";
} else {
errorMsg += nameEn + " " + StringUtils.join(diffList,",") + " does not match the data dictionary, ";
}
msgList.add(errorMsg);
}
}
return StringUtils.join(valueList,",");
}
//编号验证
private void verifySerialNumber(List<ProjectCertificationInventoryEO> datas,
ProjectCertificationInventoryEO projectCertificationInventoryEOTemp) {
//1. 验证标准号在文档库中是否存在
List<String> serialNumberList = datas.stream().map(ProjectCertificationInventoryEO::getSerialNumber).collect(Collectors.toList());
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(BussDocumentLibraryEO::getSerialNumber,serialNumberList);
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapper);
//文档库中可能存在重复的标准号
List<String> serialNumberListTemp = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).distinct().collect(Collectors.toList());
if(serialNumberList.size() != serialNumberListTemp.size()){
//存在文档库没有的数据
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
List<String> serialNumbers = serialNumberList.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList());
if(serialNumbers.size() > 0){
if(CutEnum.CN.getValue().equals(datas.get(0).getCut())){
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
}else{
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
}
}
}else{
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : datas) {
List<BussDocumentLibraryEO> collect = bussDocumentLibraryEOList.stream()
.filter(e -> e.getSerialNumber().equals(projectCertificationInventoryEO.getSerialNumber())).collect(Collectors.toList());
projectCertificationInventoryEO.setBussDocumentLibraryId(collect.get(0).getId());
}
}
// //2. 验证标准号在法规清单中是否添加过
// LambdaQueryWrapper<ProjectCertificationInventoryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
// lambdaQueryWrapper.in(ProjectCertificationInventoryEO::getSerialNumber,serialNumberList).in(ProjectCertificationInventoryEO::getProjectLibraryId,projectCertificationInventoryEOTemp.getProjectLibraryId());
// List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(lambdaQueryWrapper);
// List<String> serialNumberTempList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getSerialNumber).collect(Collectors.toList());
// if(projectCertificationInventoryEOList.size() > 0){
// if(CutEnum.CN.getValue().equals(datas.get(0).getCut())){
// throw new JeroBootException(StringUtils.join(serialNumberTempList,",")+"已存在,不能重复添加");
// }else{
// throw new JeroBootException(StringUtils.join(serialNumberTempList,",")+" already exists and cannot be added again");
// }
// }
}
/**
* 导出数据
* @param response
@@ -2870,10 +3422,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
queryWrapper.orderByDesc("create_time","serial_number");
//导出的数据
dataList = this.list(queryWrapper);
//文件
List<OSSFile> fileInfos = getOssFiles(dataList);
//处理文件名称
for (int i = 0; i < dataList.size(); i++) {
if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){
String fileName = ossFileService.getFileInfos(dataList.get(i).getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
dataList.get(i).setDeliveryResult(fileName);
}
if(StringUtils.isNotEmpty(dataList.get(i).getDeliverableTemplate())){
String deliverableTemplateName = template(fileInfos, dataList.get(i).getDeliverableTemplate());
dataList.get(i).setDeliverableTemplateName(deliverableTemplateName);
}
}
String cut = projectCertificationInventoryEO.getCut();
@@ -2890,7 +3451,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
fileTemp.mkdirs();
//文件
// exportFile(dataList,fileInfos);
exportFile(dataList,fileInfos);
String excelName = projectCertificationInventoryEO.getExcelName()+".xlsx";
// String excelName = "";
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
@@ -2943,6 +3504,75 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
private void exportFile(List<ProjectCertificationInventoryEO> dataList, List<OSSFile> fileInfos) throws IOException{
if(fileInfos.size() != 0){
for(ProjectCertificationInventoryEO projectCertificationInventoryEO : dataList){
String deliverableTemplate = projectCertificationInventoryEO.getDeliverableTemplate();
String serialNumber = projectCertificationInventoryEO.getSerialNumber();
if(StringUtils.isBlank(serialNumber)){
continue;
}
List<OSSFile> deliverableTemplateFileList = new ArrayList<>();
List<OSSFile> oSSFileList = new ArrayList<>();
if(StringUtils.isNotBlank(deliverableTemplate)){
deliverableTemplateFileList = fileInfos.stream().filter(e -> deliverableTemplate.contains(e.getId())).collect(Collectors.toList());
oSSFileList.addAll(deliverableTemplateFileList);
}
if(oSSFileList.size() != 0){
String fileNowPath = uploadpath + "/tempZip/" + serialNumber;
File file = new File(fileNowPath);
if (file.exists()) {
file.delete();
}
file.mkdirs();
for (OSSFile ossFile : oSSFileList) {
String url = ossFile.getUrl();
if(StringUtils.isNotBlank(url)){
//判断文件是否存在
boolean b = CosBootUtil.doesObjectExist(url);
if(b){
InputStream download = CosBootUtil.download(url);
copyFile(download, fileNowPath + File.separator + ossFile.getFileName());
}
}
}
}
}
}
}
private String template(List<OSSFile> fileInfos, String value) {
StringBuilder sb = new StringBuilder();
for (String s : value.split(",")) {
List<OSSFile> collect = fileInfos.stream().filter(e -> s.equals(e.getId())).collect(Collectors.toList());
if(collect.size() != 0){
sb.append(collect.get(0).getFileName()+",");
}
}
String substring = "";
if(StringUtils.isNotBlank(sb)){
substring = sb.substring(0, sb.length() - 1);
}
return substring;
}
private List<OSSFile> getOssFiles(List<ProjectCertificationInventoryEO> dataList) {
List<String> fileIdList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : dataList) {
if(StringUtils.isNotBlank(projectCertificationInventoryEO.getDeliverableTemplate())){
fileIdList.add(projectCertificationInventoryEO.getDeliverableTemplate());
}
}
//查询所有的文件
List<OSSFile> fileInfos = new ArrayList<>();
if(fileIdList.size() != 0){
fileInfos = iOSSFileService.getFileInfos(StringUtils.join(fileIdList, ","));
}
return fileInfos;
}
private String pull(List<SysDictItem> sysDictItems, String field,String dictCode) {
if(StringUtils.isBlank(field)){
return null;
@@ -3008,33 +3638,37 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
private String fieldConvert(String field){
if (field == null) return null;
switch (field) {
case "类别": return "category";
case "检验项目": return "inspectionItem";
case "配置项": return "configItem";
case "WVTA ID": return "wvtaId";
case "*类别": return "category";
case "*检验项目": return "inspectionItem";
case "*配置项": return "configItem";
case "*WVTA ID": return "wvtaId";
case "*标准编号": return "serialNumber";
case "*责任领域": return "dutyTerritoryName";
case "工程接口人": return "sdtName";
case "责任人": return "dutyPersonName";
case "交付物类型": return "deliverableTypeName";
case "*工程接口人": return "sdtName";
case "*责任人": return "dutyPersonName";
case "*交付物类型": return "deliverableTypeName";
case "交付物模板": return "deliverableTemplateName";
case "交付结果": return "deliveryResult";
case "截止日期": return "endTime";
case "*截止日期": return "endTime";
// case "*截止日期": return "endTimeStr";
case "流程状态": return "flowStatus";
case "报告编号": return "reportNumber";
case "产品型号": return "productModel";
case "生产企业名称": return "productionEnterpriseName";
case "认证进度": return "certificationProgress";
case "Category": return "category";
case "Inspection Items": return "inspectionItem";
case "Configuration Item": return "configItem";
case "*Category": return "category";
case "*Inspection Items": return "inspectionItem";
case "*Configuration Item": return "configItem";
case "*Standard No": return "serialNumber";
case "*Responsible Field": return "dutyTerritoryName";
case "Eng. Interface": return "sdtName";
case "Assignee": return "dutyPersonName";
case "Deliverable Type": return "deliverableTypeNameEn";
case "*Eng. Interface": return "sdtName";
case "*Assignee": return "dutyPersonName";
case "*Deliverable Type": return "deliverableTypeNameEn";
case "Deliverable Template": return "deliverableTemplateName";
case "Deliverables Result": return "deliveryResult";
case "Due Date": return "endTime";
case "*Due Date": return "endTime";
// case "*Due Date": return "endTimeStr";
case "Process Status": return "flowStatus";
case "Report No": return "reportNumber";
case "Product Model": return "productModel";
@@ -3064,11 +3698,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
title = "*类别,*检验项目,*配置项,*WVTA ID," +
"*标准编号,*责任领域,*工程接口人,*责任人," +
"交付物类型,*交付物模板,*截止日期";
"*交付物类型,交付物模板,*截止日期";
}else {
title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID," +
"*Standard No,*Responsible Field,*Eng. Interface,*Assignee," +
"Deliverable Type,*Deliverable Template,*Due Date";
"*Deliverable Type,Deliverable Template,*Due Date";
}
List<String> list = Arrays.asList(title.split(","));
@@ -3108,11 +3742,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
"5.交付物模板字段为文件属性,填写时需要在本文件同级目录下以标准号为名称建立文件夹,并在文件夹下放置文件,假设在AAA标准号下放置了B.docx,则应填写AAA/B.docx";
}else{
explain = "Filling explanation\n" +
"1.Import data starts at the fourth line\n" +
"1.Import data starts at the third line\n" +
"2.All fields marked with * must be filled in\n"+
"3.Assignee,Deliverable Type,Eng. Interface,Standard No,Responsible Field,Fields are radio attributes that must match the corresponding field option in the system\n" +
"4.Category,WVTA ID,Configuration Item,Inspection Items,Fill in the text\n" +
"5.Deliverable Template,When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. If b. diocx is stored under the AAA standard number, enter AAA/B. doc";
"5.Deliverable Template,When filling in the field, you need to create a folder in the directory of the same level as the file with the name of the standard number and place the file in the folder. If b. docx is stored under the AAA standard number, enter AAA/B. docx";
}
for(int i = 0; i < 2; i++){
//表头
@@ -3151,8 +3785,14 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
@Override
public Result<?> citeDeliverable(JSONObject json) {
String resultMsg = "引用交付物成功!";
String cut = json.getString("cut");
String resultMsg = "";
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
resultMsg = "引用交付物成功!";
}else {
resultMsg = "Successfully referenced deliverables!";
}
String projectCertificationInventoryIds = json.getString("projectCertificationInventoryIds");
if(StringUtils.isEmpty(projectCertificationInventoryIds)){
@@ -4958,7 +4958,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
public void exportTemplate(ProjectLawsInventoryEO projectLawsInventoryEO, HttpServletResponse response, HttpServletRequest request) {
OutputStream os = null;
HSSFWorkbook workbook = new HSSFWorkbook();
String fileOriName = "法规清单导入模板.xls";
String fileOriName = "";
String sheetName = "";
if(CutEnum.CN.getValue().equals(projectLawsInventoryEO.getCut())){
fileOriName = "法规清单导入模板.xls";
sheetName = "法规清单导入模板";
}else if(StringUtils.equals(projectLawsInventoryEO.getCut(),CutEnum.EN.getValue())){
fileOriName = "Regulatory List Import Template.xls";
sheetName = "Regulatory List Import Template";
}
String filePath = uploadpath + File.separator + fileOriName;
try {
String titleOne = "";
@@ -4995,7 +5003,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
nowFile.delete();
}
nowFile.mkdirs();
HSSFSheet sheet = workbook.createSheet("虚拟清单导入模板");
HSSFSheet sheet = workbook.createSheet(sheetName);
sheet.setDefaultColumnWidth(16);//列宽
HSSFCellStyle cellStyle = workbook.createCellStyle();
cellStyle.setWrapText(true);//自动换行
@@ -9923,8 +9931,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}
}
if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername()))
|| lawEngineerNameList.contains(loginUser.getUsername())){
if(lawEngineerNameList.contains(loginUser.getUsername())){
SysRole sysRole = new SysRole();
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue());
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
@@ -9934,7 +9941,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
sysRoles.add(sysRole);
}
List<String> certificationEngineerList = new ArrayList<>();
/*List<String> certificationEngineerList = new ArrayList<>();
if(projectRelatedPersonnels.size() != 0){
for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels){
String certificationEngineerName1 = projectRelatedPersonnel.getCertificationEngineerName();
@@ -9954,7 +9961,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getCode());
}
sysRoles.add(sysRole);
}
}*/
List<String> engineeringInterfacePersonList = new ArrayList<>();
if(projectRelatedPersonnels.size() != 0){
@@ -9962,12 +9969,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
String engineeringInterfacePerson = projectRelatedPersonnel.getEngineeringInterfacePersonName();
if(StringUtils.isNotBlank(engineeringInterfacePerson)){
engineeringInterfacePerson = engineeringInterfacePerson.replaceAll(" ","");
certificationEngineerList.addAll(Arrays.asList(engineeringInterfacePerson.split(",")));
engineeringInterfacePersonList.addAll(Arrays.asList(engineeringInterfacePerson.split(",")));
}
}
}
if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername()))
|| engineeringInterfacePersonList.contains(loginUser.getUsername())){
if(engineeringInterfacePersonList.contains(loginUser.getUsername())){
SysRole sysRole = new SysRole();
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.INTERFACE_PERSON1.getValue());
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
@@ -11,15 +11,15 @@
<a @click="handleReset">{{$t('empty')}}</a>
</template>
<a-button-group>
<a-button type="primary" @click="handleOpen" style="height: 38px":style='`marginRight:${MarginRight?MarginRight:"8px"}`'>
<a-button type="primary" @click="handleOpen" style="height: 38px":style='`marginLeft:${MarginRight?MarginRight:"8px"}`'>
<!-- <a-icon type="appstore" theme="twoTone" spin/>-->
<a-icon type="filter" theme="filled"/>
<span>{{$t('advancedQuery')}}</span>
</a-button>
<a-button style="margin-right: 8px;height: 38px" v-if="izMobile" type="primary" icon="delete" @click="handleReset"/>
<a-button style="margin-left: 8px;height: 38px" v-if="izMobile" type="primary" icon="delete" @click="handleReset"/>
</a-button-group>
</a-tooltip>
<a-button v-else style="height: 38px" type="primary" icon="filter" @click="handleOpen" :style='`marginRight:${MarginRight?MarginRight:"8px"}`'>{{$t('advancedQuery')}}</a-button>
<a-button v-else style="height: 38px" type="primary" icon="filter" @click="handleOpen" :style='`marginLeft:${MarginRight?MarginRight:"8px"}`'>{{$t('advancedQuery')}}</a-button>
</slot>
<j-modal
:title="$t('advancedQuery')"
@@ -45,15 +45,15 @@
</template>
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<a @click="handleToggleSearch">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a-col>
</span>
</a-row>
@@ -45,15 +45,15 @@
</template>
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
<a @click="handleToggleSearch">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
</a-col>
</span>
</a-row>
@@ -94,15 +94,15 @@
</template>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
<a @click="handleToggleSearch">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
</a-col>
</span>
</a-row>
@@ -110,16 +110,15 @@
class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<!-- v-if="this.$route.query.it === undefined"-->
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
<a @click="handleToggleSearch">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
</a-col>
</span>
</a-row>
@@ -255,9 +255,10 @@
let Action
if (this.title == this.$t('CertificationProgress')) {
query = {
id: this.formInline.id,
certificationProgress: this.formInline.certificationProgress,
certificationProgressRemark: this.formInline.certificationProgressRemark
...this.formInline
// id: this.formInline.id,
// certificationProgress: this.formInline.certificationProgress,
// certificationProgressRemark: this.formInline.certificationProgressRemark
}
url = this.url.edit
Action = putAction
@@ -48,12 +48,11 @@
</template>
<span style="float: right;overflow: hidden;margin-right: 11px; " class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" style="margin-left: 8px"
@click="searchReset">{{ $t('reset') }}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
@@ -45,15 +45,15 @@
</template>
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<a @click="handleToggleSearch">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</a-col>
</span>
</a-row>
@@ -221,30 +221,30 @@
</a-col>
</a-row>
<a-row :gutter="24">
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>-->
<!-- <span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'homologationEngineerId'">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('certifiedEngineer')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- v-model="formInline.homologationEngineerId">-->
<!-- <a-select-option v-for="(item, key) in certificationEngineerList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name}}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>-->
<!-- <span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'homologationEngineerId'">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('certifiedEngineer')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- v-model="formInline.homologationEngineerId">-->
<!-- <a-select-option v-for="(item, key) in certificationEngineerList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name}}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -252,13 +252,13 @@
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'">
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"-->
<!-- :isSingleChoice="true"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- v-model="formInline.engineeringInterfacePersonName"/>-->
<!-- <PersonnelSelection-->
<!-- :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"-->
<!-- :isSingleChoice="true"-->
<!-- :personneQuery="formInline"-->
<!-- v-if="visible"-->
<!-- @change="PersonnelSelectionChange"-->
<!-- v-model="formInline.engineeringInterfacePersonName"/>-->
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
class="box-input"
allowClear
@@ -276,41 +276,41 @@
</div>
</a-col>
</a-row>
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-multi" prop="region">-->
<!-- &lt;!&ndash; <a-input class="box-input"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="true"&ndash;&gt;-->
<!-- &lt;!&ndash; v-model="formInline.region_dictText"/>&ndash;&gt;-->
<!-- <j-multi-select-tag class="box-input" v-model="formInline.region"-->
<!-- :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'region'"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel-text" :prop="'remarks'">
<a-textarea
style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="false"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- <a-row :gutter="24">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-multi" prop="region">-->
<!-- &lt;!&ndash; <a-input class="box-input"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="true"&ndash;&gt;-->
<!-- &lt;!&ndash; v-model="formInline.region_dictText"/>&ndash;&gt;-->
<!-- <j-multi-select-tag class="box-input" v-model="formInline.region"-->
<!-- :placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'region'"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel-text" :prop="'remarks'">
<a-textarea
style="width: 100%"
:placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="false"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<div class="header-text">
&nbsp;{{$t('confirmationOfDesignConformity')}}
</div>
@@ -326,21 +326,22 @@
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
:disabled="isEdit(this.formInline)"
@change="PersonnelSelectionChange"
v-model="formInline.designDutyIdName"/>
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- v-model="formInline.designDutyId">-->
<!-- <a-select-option v-for="(item, key) in designDutyList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- v-model="formInline.designDutyId">-->
<!-- <a-select-option v-for="(item, key) in designDutyList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
@@ -361,66 +362,67 @@
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
@change="dateChange({db_field_name:'designDueDate'})"
format="YYYY-MM-DD"
:disabled="isEdit(this.formInline)"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.designDueDate"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="designInitiatorId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- v-model="formInline.designInitiatorId">-->
<!-- <a-select-option v-for="(item, key) in designInitiatorList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.designInitiator"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('designInitiator')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('Sponsor')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="designInitiatorId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- v-model="formInline.designInitiatorId">-->
<!-- <a-select-option v-for="(item, key) in designInitiatorList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.designInitiator"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('designInitiator')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('Sponsor')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
</a-row>
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'designDueDate'">-->
<!-- <a-date-picker class="box-input"-->
<!-- :placeholder="$t('PleaseSelect')+$t('cutoffTime')"-->
<!-- @change="dateChange({db_field_name:'designDueDate'})"-->
<!-- format="YYYY-MM-DD"-->
<!-- :getCalendarContainer="(trigger) => trigger.parentNode"-->
<!-- v-model="formInline.designDueDate"-->
<!-- style="width: 100%"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.designInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'designDueDate'">-->
<!-- <a-date-picker class="box-input"-->
<!-- :placeholder="$t('PleaseSelect')+$t('cutoffTime')"-->
<!-- @change="dateChange({db_field_name:'designDueDate'})"-->
<!-- format="YYYY-MM-DD"-->
<!-- :getCalendarContainer="(trigger) => trigger.parentNode"-->
<!-- v-model="formInline.designDueDate"-->
<!-- style="width: 100%"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
@@ -436,6 +438,7 @@
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:disabled="isEdit(this.formInline)"
:tree-data="DeliverableTreeList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
@@ -475,177 +478,178 @@
<a-form-model-item class="itemModel-text" :prop="'designRemark'">
<a-textarea
style="width: 100%"
:disabled="isEdit(this.formInline)"
:placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')"
v-model="formInline.designRemark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<!-- <div class="header-text" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- &nbsp;{{$t('PrehomoConfirmation')}}-->
<!-- </div>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="prehomoInitiatorId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- class="box-input"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- allowClear-->
<!-- v-model="formInline.prehomoInitiatorId">-->
<!-- <a-select-option v-for="(item, key) in prehomoInitiatorList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.prehomoInitiator"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('prehomoInitiator')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('Sponsor')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('personLiable')">{{$t('personLiable')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="prehomoDutyId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="formInline.prehomoDutyId">-->
<!-- <a-select-option v-for="(item, key) in prehomoDutyList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.prehomoDuty"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('prehomoDuty')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('personLiable')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'prehomoDueDate'">-->
<!-- <a-date-picker class="box-input"-->
<!-- :placeholder="$t('PleaseSelect')+$t('cutoffTime')"-->
<!-- @change="dateChange({db_field_name:'prehomoDueDate'})"-->
<!-- format="YYYY-MM-DD"-->
<!-- :getCalendarContainer="(trigger) => trigger.parentNode"-->
<!-- v-model="formInline.prehomoDueDate"-->
<!-- style="width: 100%"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="prehomoDeliverableType">-->
<!-- <a-tree-select-->
<!-- tree-node-filter-prop="title"-->
<!-- v-model="formInline.prehomoDeliverableType"-->
<!-- :maxTagCount="1"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- class="box-input"-->
<!-- style="width: 100%"-->
<!-- :tree-data="DeliverableTreeList"-->
<!-- tree-checkable-->
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
<!-- />-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.prehomoDeliverableType"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoDeliverableType ? true : false"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('prehomoDeliverableType')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'deliverable_template'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">-->
<!-- <a-button type="primary" class="button-text"-->
<!-- @click="clickButtonToUpload('prehomoDeliverableTemplate')">-->
<!-- {{ (formInline.prehomoDeliverableTemplate === 'null' || formInline.prehomoDeliverableTemplate === ''-->
<!-- ||-->
<!-- formInline.prehomoDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')-->
<!-- }}-->
<!-- </a-button>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="24">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-text" :prop="'prehomoRemark'">-->
<!-- <a-textarea-->
<!-- style="width: 100%"-->
<!-- :placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')"-->
<!-- v-model="formInline.prehomoRemark" :rows="4"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <div class="header-text" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- &nbsp;{{$t('PrehomoConfirmation')}}-->
<!-- </div>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="prehomoInitiatorId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- class="box-input"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- allowClear-->
<!-- v-model="formInline.prehomoInitiatorId">-->
<!-- <a-select-option v-for="(item, key) in prehomoInitiatorList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.prehomoInitiator"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('prehomoInitiator')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('Sponsor')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('personLiable')">{{$t('personLiable')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="prehomoDutyId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="formInline.prehomoDutyId">-->
<!-- <a-select-option v-for="(item, key) in prehomoDutyList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.prehomoDuty"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('prehomoDuty')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('personLiable')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'prehomoDueDate'">-->
<!-- <a-date-picker class="box-input"-->
<!-- :placeholder="$t('PleaseSelect')+$t('cutoffTime')"-->
<!-- @change="dateChange({db_field_name:'prehomoDueDate'})"-->
<!-- format="YYYY-MM-DD"-->
<!-- :getCalendarContainer="(trigger) => trigger.parentNode"-->
<!-- v-model="formInline.prehomoDueDate"-->
<!-- style="width: 100%"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="prehomoDeliverableType">-->
<!-- <a-tree-select-->
<!-- tree-node-filter-prop="title"-->
<!-- v-model="formInline.prehomoDeliverableType"-->
<!-- :maxTagCount="1"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- class="box-input"-->
<!-- style="width: 100%"-->
<!-- :tree-data="DeliverableTreeList"-->
<!-- tree-checkable-->
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
<!-- />-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.prehomoDeliverableType"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.prehomoDeliverableType ? true : false"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('prehomoDeliverableType')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'deliverable_template'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">-->
<!-- <a-button type="primary" class="button-text"-->
<!-- @click="clickButtonToUpload('prehomoDeliverableTemplate')">-->
<!-- {{ (formInline.prehomoDeliverableTemplate === 'null' || formInline.prehomoDeliverableTemplate === ''-->
<!-- ||-->
<!-- formInline.prehomoDeliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')-->
<!-- }}-->
<!-- </a-button>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.prehomoInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- <a-col :span="24">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('descriptionDeliverables')">{{$t('descriptionDeliverables')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel-text" :prop="'prehomoRemark'">-->
<!-- <a-textarea-->
<!-- style="width: 100%"-->
<!-- :placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')"-->
<!-- v-model="formInline.prehomoRemark" :rows="4"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- </a-row>-->
<div class="header-text">
&nbsp;{{$t('verificationAndConformityconfirmation')}}
</div>
@@ -661,6 +665,7 @@
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
:disabled="isEditVerifi(this.formInline)"
@change="PersonnelSelectionChange"
v-model="formInline.verifyDutyIdName"/>
</a-form-model-item>
@@ -677,50 +682,51 @@
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
@change="dateChange({db_field_name:'verifyDueDate'})"
format="YYYY-MM-DD"
:disabled="isEditVerifi(this.formInline)"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.verifyDueDate"
style="width: 100%"/>
</a-form-model-item>
</div>
</a-col>
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="verifyInitiatorId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- v-model="formInline.verifyInitiatorId">-->
<!-- <a-select-option v-for="(item, key) in verifyInitiatorList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.verifyInitiator"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('verifyInitiator')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('Sponsor')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="verifyInitiatorId">-->
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- v-model="formInline.verifyInitiatorId">-->
<!-- <a-select-option v-for="(item, key) in verifyInitiatorList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- &lt;!&ndash; <j-dict-select-tag class="box-input" v-model="formInline.verifyInitiator"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="formInline.roleCode == 0 ? false : true"&ndash;&gt;-->
<!-- &lt;!&ndash; @input="handleInput('verifyInitiator')"&ndash;&gt;-->
<!-- &lt;!&ndash; :placeholder="$t('PleaseSelect')+$t('Sponsor')"&ndash;&gt;-->
<!-- &lt;!&ndash; :type="'select'"&ndash;&gt;-->
<!-- &lt;!&ndash; :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>&ndash;&gt;-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
</a-row>
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- -->
<!-- </a-row>-->
<!-- <a-row :gutter="24" v-if="formInline.roleCodeIndex == 0 ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.homologationEngineerId &&-->
<!-- formInline.homologationEngineerId == userInfoQuery.id) ||-->
<!-- (formInline.roleCodeIndex == 4 && formInline.verifyInitiatorId == formInline.regulationOwnerId &&-->
<!-- formInline.regulationOwnerId == userInfoQuery.id)">-->
<!-- -->
<!-- </a-row>-->
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
@@ -736,6 +742,7 @@
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:disabled="isEditVerifi(this.formInline)"
:tree-data="DeliverableTreeList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
@@ -776,6 +783,7 @@
<a-form-model-item class="itemModel-text" :prop="'verifyRemark'">
<a-textarea
style="width: 100%"
:disabled="isEditVerifi(this.formInline)"
:placeholder="$t('PleaseEnter')+$t('descriptionDeliverables')"
v-model="formInline.verifyRemark" :rows="4"/>
</a-form-model-item>
@@ -827,7 +835,8 @@
</a-row>
</div>
<div class="header-text" v-if="rejectCauseListOne && rejectCauseListOne.length > 0 && formInline.roleCodeIndex == 0">
<div class="header-text"
v-if="rejectCauseListOne && rejectCauseListOne.length > 0 && formInline.roleCodeIndex == 0">
{{$t('verifyComplianceConfirmReturnReason')}}
</div>
@@ -984,6 +993,22 @@
this.userInfoQuery = this.userInfo()
},
methods: {
isEdit(val) {
if (val.designFlowStatus == 'Task to be confirmed' || val.designFlowStatus == 'Results to be submitted' ||
val.designFlowStatus == 'Results to be reviewed') {
return true
} else {
return false
}
},
isEditVerifi(val) {
if (val.verifyFlowStatus == 'Task to be confirmed' || val.verifyFlowStatus == 'Results to be submitted' ||
val.verifyFlowStatus == 'Results to be reviewed') {
return true
} else {
return false
}
},
...mapGetters(['userInfo']),
getRejectCause(id) {
let query = {
@@ -1301,8 +1326,15 @@
this.$set(this, 'rules', rules)
},
clickButtonToUpload(item) {
let isTrue = false
if (item == 'designDeliverableTemplate') {
isTrue = this.isEdit(this.formInline)
} else if (item == 'verifyDeliverableTemplate') {
isTrue = this.isEditVerifi(this.formInline)
}
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.$refs.uploadFile.disabled = isTrue
this.uploadName = item
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
if (res.success) {
@@ -79,12 +79,11 @@
<!-- </template>-->
<span style="float: right;overflow: hidden;margin-right: 11px; " class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" style="margin-left: 8px"
@click="searchReset">{{ $t('reset') }}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />-->
+9 -10
View File
@@ -54,16 +54,15 @@
</template>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<a-button class="box-button" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" style="margin-left: 8px"
@click="searchReset">{{ $t('reset') }}</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a @click="handleToggleSearch">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
</a-col>
</span>
</a-row>