diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysPermissionController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysPermissionController.java index fcb31c6e8..84956933d 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysPermissionController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysPermissionController.java @@ -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; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEO.java index d01f5c487..fdda05dd9 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEO.java @@ -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; // 交付物类型名称-英文 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEOEn.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEOEn.java index 6b15de62c..e7f53d6c4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEOEn.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/entity/AuthDummyInventoryInfoEOEn.java @@ -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; // 交付物类型名称-英文 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java index 366b3c223..722c114cb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/authDummy/service/impl/AuthDummyInventoryInfoEOServiceImpl.java @@ -859,18 +859,18 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl 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 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(); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjJssjController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjJssjController.java index 85d2b1985..0c0aa5c3f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjJssjController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjJssjController.java @@ -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 queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId) { + OtaBaSjJssj otaBaSjJssj = otaBaSjJssjService.queryByOtaId(otaId); + return Result.OK(otaBaSjJssj); + } + /** * 导出excel * diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java index c35f95389..d6dff0bc6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java @@ -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 { - @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 queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjList, req.getParameterMap()); - queryWrapper.orderByDesc("create_time"); - Page page = new Page(pageNo, pageSize); - IPage pageList = otaBaSjListService.page(page, queryWrapper); - return Result.OK(pageList); - } + @Autowired + private IOtaBaSjListService otaBaSjListService; /** - * 列表查询 - * - * @return - */ - @AutoLog(value = "升级备案-升级活动备案列表-列表查询") - @ApiOperation(value="升级备案-升级活动备案列表-列表查询", notes="升级备案-升级活动备案列表-列表查询") - @GetMapping(value = "/list") - public Result> 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 queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjList, req.getParameterMap()); + queryWrapper.orderByDesc("create_time"); + Page page = new Page(pageNo, pageSize); + IPage pageList = otaBaSjListService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "升级备案-升级活动备案列表-列表查询") + @ApiOperation(value = "升级备案-升级活动备案列表-列表查询", notes = "升级备案-升级活动备案列表-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { List 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(); + } + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjfzbhController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjfzbhController.java index 68f918d5c..092843d4f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjfzbhController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjfzbhController.java @@ -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 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(); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbclController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbclController.java index 27a1979ed..a0282f7b1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbclController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbclController.java @@ -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 { - @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 queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjmbcl, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = otaBaSjSjmbclService.page(page, queryWrapper); - return Result.OK(pageList); - } + @Autowired + private IOtaBaSjSjmbclService otaBaSjSjmbclService; /** - * 列表查询 - * - * @return - */ - @AutoLog(value = "升级备案-升级目标车辆-列表查询") - @ApiOperation(value="升级备案-升级目标车辆-列表查询", notes="升级备案-升级目标车辆-列表查询") - @GetMapping(value = "/list") - public Result> 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 queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjmbcl, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = otaBaSjSjmbclService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "升级备案-升级目标车辆-列表查询") + @ApiOperation(value = "升级备案-升级目标车辆-列表查询", notes = "升级备案-升级目标车辆-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { List 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); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbcxController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbcxController.java index 80dd6e4dc..da1396afe 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbcxController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbcxController.java @@ -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 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); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjxtbhController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjxtbhController.java index eda9826e8..8aaf94b89 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjxtbhController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjxtbhController.java @@ -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 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(); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjyxpgController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjyxpgController.java index 1f173e37c..903148732 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjyxpgController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjyxpgController.java @@ -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 { - @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 queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjyxpg, req.getParameterMap()); - Page page = new Page(pageNo, pageSize); - IPage pageList = otaBaSjSjyxpgService.page(page, queryWrapper); - return Result.OK(pageList); - } + @Autowired + private IOtaBaSjSjyxpgService otaBaSjSjyxpgService; /** - * 列表查询 - * - * @return - */ - @AutoLog(value = "升级备案-升级影响评估-列表查询") - @ApiOperation(value="升级备案-升级影响评估-列表查询", notes="升级备案-升级影响评估-列表查询") - @GetMapping(value = "/list") - public Result> 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 queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjSjyxpg, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = otaBaSjSjyxpgService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "升级备案-升级影响评估-列表查询") + @ApiOperation(value = "升级备案-升级影响评估-列表查询", notes = "升级备案-升级影响评估-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { List 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); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxJbxx.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxJbxx.java index 9d7a9858e..45a78473a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxJbxx.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxJbxx.java @@ -84,6 +84,7 @@ public class OtaBaCxJbxx implements Serializable { /**产品类别*/ @Excel(name = "产品类别", width = 15) @ApiModelProperty(value = "产品类别") + @Dict(dicCode = "product_category") private java.lang.String cplb; /**公告批次*/ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxQt.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxQt.java index 8a270af8a..2c7ab2e6b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxQt.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxQt.java @@ -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; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjJssj.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjJssj.java index 02d89dabc..4a640ca0d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjJssj.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjJssj.java @@ -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 list; + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjJssjyy.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjJssjyy.java index 9fd7c1ecd..f5c542b5d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjJssjyy.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjJssjyy.java @@ -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) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaModuleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaModuleEnum.java index b581d6e6b..7aeade984 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaModuleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaModuleEnum.java @@ -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"), diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java index 530dbbd81..8dd21374f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java @@ -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"), diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjGgnrfsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjGgnrfsService.java index d88eddf86..8f0b59aea 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjGgnrfsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjGgnrfsService.java @@ -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 { List 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 upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, String otaId, String cut) throws Exception;} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjJssjService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjJssjService.java index 47d54b889..cda4f18dd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjJssjService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjJssjService.java @@ -58,4 +58,6 @@ public interface IOtaBaSjJssjService extends IService { * @return */ List queryList(); + + OtaBaSjJssj queryByOtaId(String otaId); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjJssjyyService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjJssjyyService.java index d5b73f790..40273ee1f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjJssjyyService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjJssjyyService.java @@ -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 { - /** - * 保存 - * - * @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 ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaSjJssjyy queryById(String id); /** - * 列表查询 - * - * @return - */ + * 列表查询 + * + * @return + */ List queryList(); + + List queryByOtaId(String otaId); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java index d0b34c3ca..d7b14bae9 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java @@ -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 { - /** - * 保存 - * - * @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 ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaSjList queryById(String id); /** - * 列表查询 - * - * @return - */ + * 列表查询 + * + * @return + */ List 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; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjfzbhService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjfzbhService.java index 06182eeb4..ff3bfa535 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjfzbhService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjfzbhService.java @@ -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 { - /** - * 保存 - * - * @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 ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaSjSjfzbh queryById(String id); /** - * 列表查询 - * - * @return - */ + * 列表查询 + * + * @return + */ List 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 upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbclService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbclService.java index 73e7e44da..2b63a87ef 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbclService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbclService.java @@ -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 { - /** - * 保存 - * - * @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 ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaSjSjmbcl queryById(String id); /** - * 列表查询 - * - * @return - */ + * 列表查询 + * + * @return + */ List queryList(); OtaBaSjSjmbcl queryByOtaId(String otaId, String otaIdT); + + void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; + + OtaBaSjSjmbcl parseFileList(List 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; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbcxService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbcxService.java index 99c6198ba..32be72b65 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbcxService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbcxService.java @@ -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 { - /** - * 保存 - * - * @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 ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaSjSjmbcx queryById(String id); /** - * 列表查询 - * - * @return - */ + * 列表查询 + * + * @return + */ List 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 upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjxtbhService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjxtbhService.java index 8814bb255..17b9bb40e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjxtbhService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjxtbhService.java @@ -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 { - /** - * 保存 - * - */ + /** + * 保存 + */ 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 ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaSjSjxtbh queryById(String id); /** - * 列表查询 - * - * @return - */ + * 列表查询 + * + * @return + */ List 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 upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjyxpgService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjyxpgService.java index af9b71545..fa3a37a04 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjyxpgService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjyxpgService.java @@ -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 { - /** - * 保存 - * - * @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 ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaSjSjyxpg queryById(String id); /** - * 列表查询 - * - * @return - */ + * 列表查询 + * + * @return + */ List 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 upLoadFiles, String otaId, String cut) throws Exception; + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java index a15d769fb..452839e8e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java @@ -117,6 +117,14 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(OtaBaCxAqcs::getOtaId, otaId); + remove(queryWrapper); + } + } + /** * 批量删除 * @@ -163,7 +171,7 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java index 50470134a..bd2c6f8ee 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxJbxxServiceImpl.java @@ -77,10 +77,12 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); @@ -214,7 +216,12 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl reList = cu.comparisonRecord(otaId, OtaModuleEnum.CX_JSFZXTJCBACS, otaBaCxJsfzbacsOld, otaBaCxJsfzbacs, sysDictService); saveOrUpdate(otaBaCxJsfzbacs); @@ -282,6 +284,9 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl oldList = OtaBaCxSjmkService.queryByOtaId(otaId); OtaBaCxSjmkService.deleteByOtaId(otaId); List 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); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java index 2e08de9a6..6b68cc0d4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java @@ -239,6 +239,9 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl oldList = getByOtaId(otaId); + if (ObjectUtils.isEmpty(oldList)) { + oldList = new ArrayList<>(); + } List mccsList = parseFile(upFile, attFile, otaId, cut); ComparisonUtil cu = new ComparisonUtil(); List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, OtaTitleEnum.GNMC.getName(), oldList, mccsList, sysDictService); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java index fc1be2573..a31008aac 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java @@ -236,6 +236,9 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl oldList = getByOtaId(otaId); + if (ObjectUtils.isEmpty(oldList)) { + oldList = new ArrayList<>(); + } List mccsList = parseFile(upFile, attFile, otaId, cut); ComparisonUtil cu = new ComparisonUtil(); List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, OtaTitleEnum.XTLB.getName(), oldList, mccsList, sysDictService); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGgnrfsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGgnrfsServiceImpl.java index 450dc1296..a3aeb236c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGgnrfsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGgnrfsServiceImpl.java @@ -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 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 upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); + parseFileList(upLoadFiles, otaId, cut); + } + + @Override + public void parseFileList(List 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 { + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjJssjServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjJssjServiceImpl.java index a1ca06560..73a45b937 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjJssjServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjJssjServiceImpl.java @@ -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 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 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 queryList() { return list(); } + + @Override + public OtaBaSjJssj queryByOtaId(String otaId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(OtaBaSjJssj::getOtaId, otaId); + OtaBaSjJssj res = this.getOne(queryWrapper, false); + + List list = otaBaSjJssjyyService.queryByOtaId(otaId); + res.setList(list); + return res; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjJssjyyServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjJssjyyServiceImpl.java index 269273d3a..1639e919b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjJssjyyServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjJssjyyServiceImpl.java @@ -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 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 queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(OtaBaSjJssjyy::getOtaId, otaId); + remove(queryWrapper); + } + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override public void deleteByIds(List 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 queryList() { return list(); } + + @Override + public List queryByOtaId(String otaId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(OtaBaSjJssjyy::getOtaId, otaId); + return this.list(queryWrapper); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjListServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjListServiceImpl.java index a8c408a30..26ed5e1db 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjListServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjListServiceImpl.java @@ -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 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 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 { + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java index 6f78465c2..5b9ef816e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java @@ -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 upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); + parseFileList(upLoadFiles, otaId, cut); + } + + @Override + public void parseFileList(List 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 oldList = getByOtaId(otaId); + if (ObjectUtils.isEmpty(oldList)) { + oldList = new ArrayList<>(); + } + List newList = parseFile(upFile, attFile, otaId, cut); + ComparisonUtil cu = new ComparisonUtil(); + List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJJSMCBH, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService); + deleteByOtaId(otaId); + saveOrUpdateBatch(newList); + otaBaCxTxjlService.saveBatch(reList); + } + + private List parseFile(File upFile, File attFile, String otaId, String cut) throws Exception { + Date now = new Date(); + List 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 { + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java index c45ce3849..5d54760a5 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java @@ -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 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 reList = cu.comparisonRecord(otaBaSjSjmbcl.getOtaId(), OtaModuleEnum.CX_AQCS, otaBaSjSjmbclOld, otaBaSjSjmbcl, sysDictService); + List reList = cu.comparisonRecord(otaBaSjSjmbcl.getOtaId(), OtaModuleEnum.SJ_SJMBCL, otaBaSjSjmbclOld, otaBaSjSjmbcl, sysDictService); otaBaCxTxjlService.saveBatch(reList); } } @@ -131,11 +148,50 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl 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 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 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 { + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java index 7d2ad60d2..6891f3cbb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java @@ -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 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 upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); + OtaBaSjSjmbcx mbcx = parseFileList(upLoadFiles, otaId, cut); + return mbcx; + } + + @Override + public OtaBaSjSjmbcx parseFileList(List 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 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 { + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java index 95b1ce711..5c6b86a55 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjxtbhServiceImpl.java @@ -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(); } ComparisonUtil cu = new ComparisonUtil(); - List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.XTMC.getName(), oldList, newList, sysDictService); + List 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 upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); + parseFileList(upLoadFiles, otaId, cut); + } + + @Override + public void parseFileList(List 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 newList = parseFile(upFile, otaId, cut); + List oldList = getByOtaId(otaId); + if (ObjectUtils.isEmpty(oldList)) { + oldList = new ArrayList<>(); + } + ComparisonUtil cu = new ComparisonUtil(); + List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.SJKZQMC.getName(), oldList, newList, sysDictService); + saveOrUpdateBatch(newList); + otaBaCxTxjlService.saveBatch(reList); + } + + private List parseFile(File upFile, String otaId, String cut) throws Exception { + Date now = new Date(); + List 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 { + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java index a71537d20..111049ed2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java @@ -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 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 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 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 { + + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java index aece5fd23..4abaa3d70 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java @@ -85,7 +85,7 @@ public class ComparisonUtil { 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 { 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(); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java index 74d413d05..54c3fb880 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java @@ -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; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java index d9f5e41fd..1f31acd54 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java @@ -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; /**交付结果*/ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java index c66e7ce3d..8ebc4d8d4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEO.java @@ -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; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java index d380e7c48..b156a0f74 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLawsInventoryEOEn.java @@ -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; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java index 24bfda6e3..cbffa1463 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java @@ -21,6 +21,7 @@ public enum ProjectRoleEnum { MANAGER("manage","11",""), ADMIN("系统管理员","12",""), VIEWER("Viewer","13",""), + DUTYPERSON("责任人","14","") ; String name; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index bc470b601..93499a10a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -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 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 categoryList = sysCategoryService.list(); + List categoryList = sysCategoryService.list(); //普通数据字典 -// List dictItemList = sysDictItemServiceImpl.selectItemsAll(); -// importDatas(datas, dictItemList, zipEntryName,saveDirectory,projectCertificationInventoryEO,categoryList); - String cut = projectCertificationInventoryEO.getCut(); - importDisposeData(datas,cut); + List dictItemList = sysDictItemServiceImpl.selectItemsAll(); + importDatas(datas, dictItemList, zipEntryName,saveDirectory,projectCertificationInventoryEO,categoryList); +// String cut = projectCertificationInventoryEO.getCut(); +// importDisposeData(datas,cut); //删除原上传文件 FileUnZip.deleteDir(saveDirectory); } + private void importDatas(List datas, + List dictItemList, String zipEntryName, + File saveDirectory, ProjectCertificationInventoryEO projectCertificationInventoryEOTemp, + List categoryList) { + List msgList = new ArrayList<>(); + //模板数据验证 + msgList = dataTemplateVerify(datas, dictItemList, zipEntryName, projectCertificationInventoryEOTemp, categoryList); + + if (msgList.size() > 0) { + //返回报错信息 + String html = ""; + for (String s : msgList) { + html += s + "
"; + } + FileUnZip.deleteDir(saveDirectory); + throw new JeroBootException(html); + }else { + if (datas.size() != 0) { + this.saveBatch(datas); + } + } + } + + //模板数据验证 + private List dataTemplateVerify(List datas, + List dictItemList, String zipEntryName, + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp, + List categoryList) { + String dictId = sysCategoryMapper.getDictId("ren4_zheng4_-_jiao1_fu4_wu4_lei4_xing2"); + List collect = categoryList.stream().filter(e -> e.getSysDictId().equals(dictId)).collect(Collectors.toList()); + List 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 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 objectMap = iProjectRelatedPersonnelService.queryPersonByProjectId(projectCertificationInventoryEOTemp.getProjectLibraryId(), value); + + //工程接口人 + List> mapPersonList = (List>) objectMap.get("engineeringInterfacePersonList"); + //所有人 + List> allPersonList = (List>) 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 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 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 msgList, + String nameCn, String nameEn) { + String value = ""; + if (StringUtils.isNotBlank(deliverableTemplate)) { + StringBuilder sb = new StringBuilder(); + for (String fileName : deliverableTemplate.split(",")) { + List 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 categoryList, + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp, + List treeNameList, String value) { + StringBuilder sb = new StringBuilder(); + for (String valueTemp : value.split(",")) { + if (treeNameList.contains(valueTemp)) { + List 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 categoryList, List nameList, + ProjectCertificationInventoryEO projectCertificationInventoryEO, + String errorMsg, String value, List 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 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 msgList, String regulationOwnerId, + List> 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 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 dictItemList, ProjectCertificationInventoryEO projectCertificationInventoryEO, + String errorMsg, String value, List msgList, + String nameCn, String nameEn, String dictCode) { + List valueList = new ArrayList<>(); + if (StringUtils.isNotBlank(value)) { + List list = Arrays.asList(value.split(",")); + List 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 finalValueList = valueList; + List 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 datas, + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp) { + //1. 验证标准号在文档库中是否存在 + List serialNumberList = datas.stream().map(ProjectCertificationInventoryEO::getSerialNumber).collect(Collectors.toList()); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.in(BussDocumentLibraryEO::getSerialNumber,serialNumberList); + List bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapper); + //文档库中可能存在重复的标准号 + List serialNumberListTemp = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).distinct().collect(Collectors.toList()); + if(serialNumberList.size() != serialNumberListTemp.size()){ + //存在文档库没有的数据 + List collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList()); + List 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 collect = bussDocumentLibraryEOList.stream() + .filter(e -> e.getSerialNumber().equals(projectCertificationInventoryEO.getSerialNumber())).collect(Collectors.toList()); + projectCertificationInventoryEO.setBussDocumentLibraryId(collect.get(0).getId()); + } + } +// //2. 验证标准号在法规清单中是否添加过 +// LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); +// lambdaQueryWrapper.in(ProjectCertificationInventoryEO::getSerialNumber,serialNumberList).in(ProjectCertificationInventoryEO::getProjectLibraryId,projectCertificationInventoryEOTemp.getProjectLibraryId()); +// List projectCertificationInventoryEOList = this.list(lambdaQueryWrapper); +// List 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 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 dataList, List 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 deliverableTemplateFileList = new ArrayList<>(); + List 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 fileInfos, String value) { + StringBuilder sb = new StringBuilder(); + for (String s : value.split(",")) { + List 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 getOssFiles(List dataList) { + List fileIdList = new ArrayList<>(); + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : dataList) { + if(StringUtils.isNotBlank(projectCertificationInventoryEO.getDeliverableTemplate())){ + fileIdList.add(projectCertificationInventoryEO.getDeliverableTemplate()); + } + } + //查询所有的文件 + List fileInfos = new ArrayList<>(); + if(fileIdList.size() != 0){ + fileInfos = iOSSFileService.getFileInfos(StringUtils.join(fileIdList, ",")); + } + return fileInfos; + } + private String pull(List sysDictItems, String field,String dictCode) { if(StringUtils.isBlank(field)){ return null; @@ -3008,33 +3638,37 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl list = Arrays.asList(title.split(",")); @@ -3108,11 +3742,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl 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)){ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java index 0cde55614..4b6431dae 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLawsInventoryEOServiceImpl.java @@ -4958,7 +4958,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl certificationEngineerList = new ArrayList<>(); + /*List certificationEngineerList = new ArrayList<>(); if(projectRelatedPersonnels.size() != 0){ for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels){ String certificationEngineerName1 = projectRelatedPersonnel.getCertificationEngineerName(); @@ -9954,7 +9961,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl engineeringInterfacePersonList = new ArrayList<>(); if(projectRelatedPersonnels.size() != 0){ @@ -9962,12 +9969,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl{{$t('empty')}} - + {{$t('advancedQuery')}} - + - {{$t('advancedQuery')}} + {{$t('advancedQuery')}} + + {{ !toggleSearchStatus ? $t('open') : $t('away') }} + + + {{$t('reset')}} + {{$t('query')}} - {{$t('query')}} - {{$t('reset')}} - - {{ !toggleSearchStatus ? $t('open') : $t('away') }} - - diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue index 83303ced2..891996117 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue @@ -45,15 +45,15 @@ - - {{$t('query')}} - {{$t('reset')}} - - {{ !toggleSearchStatus ? $t('open') : $t('away') }} - + + {{ !toggleSearchStatus ? $t('open') : $t('away') }} + + {{$t('reset')}} + {{$t('query')}} + diff --git a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue index 41ef684b2..e2577d9e7 100644 --- a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue +++ b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue @@ -94,15 +94,15 @@ - - {{$t('query')}} - {{$t('reset')}} - + {{ !toggleSearchStatus ? $t('open') : $t('away') }} - + + {{$t('reset')}} + {{$t('query')}} + diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 9fe341730..968fc7dff 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -110,16 +110,15 @@ class="table-page-search-submitButtons"> - - {{$t('query')}} - {{$t('reset')}} - - {{ !toggleSearchStatus ? $t('open') : $t('away') }} - + + {{ !toggleSearchStatus ? $t('open') : $t('away') }} + + {{$t('reset')}} + {{$t('query')}} + diff --git a/jero-web/src/views/projectManagement/components/TaskListModel.vue b/jero-web/src/views/projectManagement/components/TaskListModel.vue index 06ca28a16..7eac348a5 100644 --- a/jero-web/src/views/projectManagement/components/TaskListModel.vue +++ b/jero-web/src/views/projectManagement/components/TaskListModel.vue @@ -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 diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 48626c18f..0c407627d 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -48,12 +48,11 @@ - - {{ $t('query') }} - {{ $t('reset') }} + {{$t('reset')}} + {{$t('query')}} + diff --git a/jero-web/src/views/projectManagement/components/listAddModel.vue b/jero-web/src/views/projectManagement/components/listAddModel.vue index 357bafbd2..e639112d9 100644 --- a/jero-web/src/views/projectManagement/components/listAddModel.vue +++ b/jero-web/src/views/projectManagement/components/listAddModel.vue @@ -45,15 +45,15 @@ + + {{ !toggleSearchStatus ? $t('open') : $t('away') }} + + + {{$t('reset')}} + {{$t('query')}} - {{$t('query')}} - {{$t('reset')}} - - {{ !toggleSearchStatus ? $t('open') : $t('away') }} - - diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index 9a4a571c8..fe42f0fd7 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -221,30 +221,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
@@ -252,13 +252,13 @@ {{$t('engineeringInterfacePerson')}}
- - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - -
-
- {{$t('remarks')}} -
- - - -
-
-
+ + + + + + + + + + + + + + + + + + + + + +
+
+ {{$t('remarks')}} +
+ + + +
+
+
 {{$t('confirmationOfDesignConformity')}}
@@ -326,21 +326,22 @@ :isSingleChoice="true" :personneQuery="formInline" v-if="visible" + :disabled="isEdit(this.formInline)" @change="PersonnelSelectionChange" v-model="formInline.designDutyIdName"/> - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -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%"/>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
@@ -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 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 {{$t('verificationAndConformityconfirmation')}}
@@ -661,6 +665,7 @@ :isSingleChoice="true" :personneQuery="formInline" v-if="visible" + :disabled="isEditVerifi(this.formInline)" @change="PersonnelSelectionChange" v-model="formInline.verifyDutyIdName"/> @@ -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%"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + +
@@ -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 @@ @@ -827,7 +835,8 @@
-
+
{{$t('verifyComplianceConfirmReturnReason')}}
@@ -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) { diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 34ba87b53..e3c918e25 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -79,12 +79,11 @@ - - {{ $t('query') }} - {{ $t('reset') }} + {{$t('reset')}} + {{$t('query')}} + diff --git a/jero-web/src/views/regulationsKanban/index.vue b/jero-web/src/views/regulationsKanban/index.vue index 7bce34131..2f6e21cb8 100644 --- a/jero-web/src/views/regulationsKanban/index.vue +++ b/jero-web/src/views/regulationsKanban/index.vue @@ -54,16 +54,15 @@ - - {{ $t('query') }} - {{ $t('reset') }} - - {{ !toggleSearchStatus ? $t('open') : $t('away') }} - - + + {{ !toggleSearchStatus ? $t('open') : $t('away') }} + + + {{$t('reset')}} + {{$t('query')}} +