src/main/java/org/springblade/common/node/TreeStringNode.java
@@ -70,6 +70,11 @@ private Integer isNine; /** * 是否阵地 */ private Integer isFront; /** * 排序 */ private Integer sort; src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml
@@ -84,6 +84,8 @@ jg.grid_name, jp.principal, jp.principal_phone, jp.nine_type, jp.is_nine, br.town_name, br.village_name, bu.`name`, src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
@@ -197,6 +197,7 @@ jp.house_code houseCode, jp.place_name AS NAME, jp.is_nine AS isNine, jp.is_front AS isFront, br.name neiName, FALSE AS hasChildren FROM jczz_place jp src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java
@@ -90,35 +90,36 @@ item.setPlaceCheckId(placeCheck.getId()); item.setCreateUser(AuthUtil.getUserId()); }); List<PatrolRecord> collect = patrolRecordVOList.stream().filter(item -> item.getState().equals(0)).collect(Collectors.toList()); boolean b = bean.saveBatch(collect); updateById(placeCheck); if (b) { // 隐患问题大于0 则创建任务 try { Integer integer = number.get(); if (integer > 0) { // 保存任务表 ITaskService bean2 = SpringUtils.getBean(ITaskService.class); Long aLong = bean2.saveTask(CommonConstant.NUMBER_FOUR, DictConstant.FIRE_RECTIFICATION_NOTICE, 1, "", AuthUtil.getUserId(), placeCheck.getHouseCode(), CommonConstant.NUMBER_EIGHT,4); if (aLong > 0) { // 保存任务详情表 ITaskPlaceRectificationService bean1 = SpringUtil.getBean(ITaskPlaceRectificationService.class); TaskPlaceRectificationEntity copy = BeanUtil.copy(placeCheck, TaskPlaceRectificationEntity.class); copy.setTaskId(aLong); copy.setPlaceCheckId(placeCheck.getId()); copy.setId(null); copy.setStatus(4); bean1.save(copy); // List<PatrolRecord> collect = patrolRecordVOList.stream().filter(item -> item.getState().equals(0)).collect(Collectors.toList()); if (patrolRecordVOList != null && patrolRecordVOList.size() > 0) { boolean b = bean.saveBatch(patrolRecordVOList); if (b) { // 隐患问题大于0 则创建任务 try { Integer integer = number.get(); if (integer > 0) { // 保存任务表 ITaskService bean2 = SpringUtils.getBean(ITaskService.class); Long aLong = bean2.saveTask(CommonConstant.NUMBER_FOUR, DictConstant.FIRE_RECTIFICATION_NOTICE, 1, "", AuthUtil.getUserId(), placeCheck.getHouseCode(), CommonConstant.NUMBER_EIGHT, 4); if (aLong > 0) { // 保存任务详情表 ITaskPlaceRectificationService bean1 = SpringUtil.getBean(ITaskPlaceRectificationService.class); TaskPlaceRectificationEntity copy = BeanUtil.copy(placeCheck, TaskPlaceRectificationEntity.class); copy.setTaskId(aLong); copy.setPlaceCheckId(placeCheck.getId()); copy.setId(null); copy.setStatus(4); bean1.save(copy); } } } catch (Exception e) { logger.error("任务保存失败!", e); } } catch (Exception e) { logger.error("任务保存失败!", e); return b; } return b; } throw new Exception("保存失败!"); return save; } return false; } src/main/java/org/springblade/modules/place/vo/PlaceCheckVO.java
@@ -90,6 +90,12 @@ @ApiModelProperty(value = "隐患数量", example = "") private Integer number; @ApiModelProperty(value = "九小类型", example = "") private String nineType; @ApiModelProperty(value = "是否九小", example = "") private Integer isNine; private Long jpid; } src/main/java/org/springblade/modules/taskPlaceRectification/controller/TaskPlaceRectificationController.java
@@ -32,9 +32,13 @@ import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.Func; import org.springblade.modules.house.excel.HouseAndHoldExcel; import org.springblade.modules.house.excel.HouseAndHoldImporter; import org.springblade.modules.house.excel.HouseExcel; import org.springblade.modules.house.vo.HouseVO; import org.springblade.modules.taskPlaceRectification.dto.TaskPlaceRectificationDTO; import org.springblade.modules.taskPlaceRectification.excel.PlaceRectificationsExcel; import org.springblade.modules.taskPlaceRectification.excel.PlaceRectificationsImporter; import org.springblade.modules.taskPlaceRectification.excel.TaskPlaceRectificationExcel; import org.springblade.modules.taskPlaceRectification.vo.TaskPlaceRectificationsVO; import org.springframework.web.bind.annotation.*; @@ -44,6 +48,7 @@ import org.springblade.modules.taskPlaceRectification.wrapper.TaskPlaceRectificationWrapper; import org.springblade.modules.taskPlaceRectification.service.ITaskPlaceRectificationService; import org.springblade.core.boot.ctrl.BladeController; import org.springframework.web.multipart.MultipartFile; import java.util.List; @@ -200,5 +205,15 @@ ExcelUtil.export(response, "整改数据" + DateUtil.time(), "场所数据表", list, TaskPlaceRectificationExcel.class); } /** * 导入房屋及住户/租户人员数据 */ @PostMapping("import-placeRectifications") public R importPlaceRectifications(MultipartFile file, Integer isCovered) { PlaceRectificationsImporter placeRectificationsImporter = new PlaceRectificationsImporter(taskPlaceRectificationService, isCovered == 1); ExcelUtil.save(file, placeRectificationsImporter, PlaceRectificationsExcel.class); return R.success("操作成功"); } } src/main/java/org/springblade/modules/taskPlaceRectification/excel/PlaceRectificationsExcel.java
New file @@ -0,0 +1,54 @@ package org.springblade.modules.taskPlaceRectification.excel; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.alibaba.excel.annotation.write.style.HeadRowHeight; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springblade.modules.patrol.vo.PatrolRecordVO; import org.springblade.modules.place.vo.PlacePoiLabelVO; import java.util.List; @Data @ColumnWidth(25) @HeadRowHeight(20) @ContentRowHeight(18) public class PlaceRectificationsExcel { private static final long serialVersionUID = 1L; @ExcelProperty( value = "场所类别") private String nineType; @ExcelProperty(value = "场所名称") private String placeName; @ExcelProperty(value = "场所地址") private String placeAddress; @ExcelProperty(value = "标准地址编码") private String houseCode; @ExcelProperty(value = "场所标准地址") private String addressName; @ExcelProperty(value = "场所负责人") private String principal; @ExcelProperty(value = "负责人电话") private String principalPhone; @ExcelProperty(value = "限期整改时间") private String rectificationEndTime; @ExcelProperty(value = "督促整改责任人及联系方式") private String police; @ExcelProperty(value = "责任人姓名及联系方式") private String principals; } src/main/java/org/springblade/modules/taskPlaceRectification/excel/PlaceRectificationsImporter.java
New file @@ -0,0 +1,42 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.taskPlaceRectification.excel; import lombok.RequiredArgsConstructor; import org.springblade.core.excel.support.ExcelImporter; import org.springblade.modules.house.excel.HouseAndHoldExcel; import org.springblade.modules.house.service.IHouseService; import org.springblade.modules.taskPlaceRectification.service.ITaskPlaceRectificationService; import java.util.List; /** * 人房数据导入类 * * @author Chill */ @RequiredArgsConstructor public class PlaceRectificationsImporter implements ExcelImporter<PlaceRectificationsExcel> { private final ITaskPlaceRectificationService iTaskPlaceRectificationService; private final Boolean isCovered; @Override public void save(List<PlaceRectificationsExcel> data) { iTaskPlaceRectificationService.importPlaceRectifications(data, isCovered); } } src/main/java/org/springblade/modules/taskPlaceRectification/service/ITaskPlaceRectificationService.java
@@ -16,14 +16,13 @@ */ package org.springblade.modules.taskPlaceRectification.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import org.springblade.modules.house.excel.HouseExcel; import org.springblade.modules.taskPlaceRectification.dto.TaskPlaceRectificationDTO; import org.springblade.modules.taskPlaceRectification.entity.TaskPlaceRectificationEntity; import org.springblade.modules.taskPlaceRectification.excel.PlaceRectificationsExcel; import org.springblade.modules.taskPlaceRectification.excel.TaskPlaceRectificationExcel; import org.springblade.modules.taskPlaceRectification.vo.TaskPlaceRectificationVO; import org.springblade.core.mp.base.BaseService; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.modules.taskPlaceRectification.vo.TaskPlaceRectificationsVO; import java.util.List; @@ -68,4 +67,6 @@ Object rectificationStatistics(TaskPlaceRectificationVO taskPlaceRectification); List<TaskPlaceRectificationExcel> export(TaskPlaceRectificationsVO taskPlaceRectificationVO); void importPlaceRectifications(List<PlaceRectificationsExcel> data, Boolean isCovered); } src/main/java/org/springblade/modules/taskPlaceRectification/service/impl/TaskPlaceRectificationServiceImpl.java
@@ -16,28 +16,39 @@ */ package org.springblade.modules.taskPlaceRectification.service.impl; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import io.lettuce.core.ScriptOutputType; import liquibase.repackaged.org.apache.commons.lang3.StringUtils; import org.springblade.common.cache.SysCache; import org.springblade.common.utils.SpringUtils; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity; import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService; import org.springblade.modules.house.excel.HouseExcel; import org.springblade.modules.patrol.entity.PatrolRecord; import org.springblade.modules.patrol.service.IPatrolRecordService; import org.springblade.modules.patrol.vo.PatrolRecordVO; import org.springblade.modules.place.entity.PlaceCheckEntity; import org.springblade.modules.place.entity.PlaceEntity; import org.springblade.modules.place.excel.NinePlaceExcel; import org.springblade.modules.place.service.IPlaceCheckService; import org.springblade.modules.place.service.IPlaceService; import org.springblade.modules.system.entity.DictBiz; import org.springblade.modules.system.entity.Region; import org.springblade.modules.system.entity.User; import org.springblade.modules.system.service.IDeptService; import org.springblade.modules.system.service.IDictBizService; import org.springblade.modules.system.service.IRegionService; import org.springblade.modules.system.service.IUserService; import org.springblade.modules.system.vo.RegionVO; import org.springblade.modules.task.entity.TaskEntity; import org.springblade.modules.task.service.ITaskService; import org.springblade.modules.taskPlaceRectification.dto.TaskPlaceRectificationDTO; import org.springblade.modules.taskPlaceRectification.entity.TaskPlaceRectificationEntity; import org.springblade.modules.taskPlaceRectification.excel.PlaceRectificationsExcel; import org.springblade.modules.taskPlaceRectification.excel.TaskPlaceRectificationExcel; import org.springblade.modules.taskPlaceRectification.vo.TaskPlaceRectificationVO; import org.springblade.modules.taskPlaceRectification.mapper.TaskPlaceRectificationMapper; @@ -50,6 +61,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * 场所整改任务表 服务实现类 @@ -93,7 +106,7 @@ StringBuilder builder = new StringBuilder(""); List<PatrolRecordVO> patrolRecordVOList = taskPlaceRectificationVO.getPatrolRecordVOList(); for (int i = 0; i < patrolRecordVOList.size(); i++) { if(patrolRecordVOList.get(i).getState().equals(0)){ if (patrolRecordVOList.get(i).getState().equals(0)) { builder.append(i + 1).append(" : ").append(patrolRecordVOList.get(i).getItemsName()).append("; "); } } @@ -130,7 +143,7 @@ .set(TaskEntity::getRemark, taskPlaceRectification.getReasonFailure()) .eq(TaskEntity::getId, taskPlaceRectification.getTaskId())); // 更新任务详情状态 if(taskPlaceRectification.getStatus().equals(2)){ if (taskPlaceRectification.getStatus().equals(2)) { taskPlaceRectification.setRectificationFlag(2); } boolean b1 = updateById(taskPlaceRectification); @@ -188,7 +201,7 @@ StringBuilder builder = new StringBuilder(""); List<PatrolRecordVO> patrolRecordVOList = taskPlaceRectificationExcel.getPatrolRecordVOList(); for (int i = 0; i < patrolRecordVOList.size(); i++) { if(patrolRecordVOList.get(i).getState().equals(0)){ if (patrolRecordVOList.get(i).getState().equals(0)) { builder.append(i + 1).append(" : ").append(patrolRecordVOList.get(i).getItemsName()).append("; "); } } @@ -196,4 +209,144 @@ } return export; } @Override public void importPlaceRectifications(List<PlaceRectificationsExcel> data, Boolean isCovered) { IPlaceService bean = SpringUtils.getBean(IPlaceService.class); IUserService bean1 = SpringUtils.getBean(IUserService.class); IPlaceCheckService bean2 = SpringUtils.getBean(IPlaceCheckService.class); IDoorplateAddressService bean3 = SpringUtils.getBean(IDoorplateAddressService.class); List<String> objects = new ArrayList<>(); for (PlaceRectificationsExcel datum : data) { String phone1 = getPhone(datum.getPrincipals()); String name = getName(datum.getPrincipals()); datum.setPrincipalPhone(phone1); datum.setPrincipal(name); // 1.判断场所是否存在 PlaceEntity one = bean.getOne(Wrappers.<PlaceEntity>lambdaQuery() .eq(PlaceEntity::getHouseCode, datum.getHouseCode()) .eq(PlaceEntity::getIsDeleted, 0)); if (one == null) { // 新增场所 DoorplateAddressEntity one1 = bean3.getOne(Wrappers.<DoorplateAddressEntity>lambdaQuery() .eq(DoorplateAddressEntity::getAddressCode, datum.getHouseCode())); if (one1 == null) { objects.add(datum.getHouseCode()); } PlaceCheckEntity placeCheckEntity = new PlaceCheckEntity(); String police = datum.getPolice(); String phone = getPhone(police); if (StringUtils.isNotBlank(phone)) { User one3 = bean1.getOne(Wrappers.<User>lambdaQuery() .eq(User::getPhone, phone) .eq(User::getIsDeleted, 0)); if (one3 != null) { placeCheckEntity.setCreateUser(one3.getId()); } } // 4.保存检查表 placeCheckEntity.setHouseCode(datum.getHouseCode()); bean2.save(placeCheckEntity); continue; } // 2.判断负责人电话是否存在 if (StringUtils.isBlank(datum.getPrincipalPhone())) { one.setLocation(datum.getAddressName()); one.setPlaceName(datum.getPlaceName()); bean.updateById(one); PlaceCheckEntity placeCheckEntity = new PlaceCheckEntity(); String police = datum.getPolice(); String phone = getPhone(police); if (StringUtils.isNotBlank(phone)) { User one3 = bean1.getOne(Wrappers.<User>lambdaQuery() .eq(User::getPhone, phone) .eq(User::getIsDeleted, 0)); if (one3 != null) { placeCheckEntity.setCreateUser(one3.getId()); } } // 4.保存检查表 placeCheckEntity.setHouseCode(datum.getHouseCode()); bean2.save(placeCheckEntity); continue; } // 2.判断负责人是否存在 User one1 = bean1.getOne(Wrappers.<User>lambdaQuery() .eq(User::getPhone, datum.getPrincipalPhone()) .eq(User::getIsDeleted, 0)); if (one1 == null) { // 创建 User newUser = new User(); //如果用户不存在,则新增一个用户 newUser.setAccount(datum.getPrincipalPhone().trim()); newUser.setPhone(datum.getPrincipalPhone().trim()); newUser.setName(datum.getPrincipal().trim()); newUser.setRealName(datum.getPrincipal().trim()); // 社区群众部门 newUser.setDeptId("1727979636479037441"); // 目前暂定居民角色, newUser.setRoleId("1717429059648606209"); //默认密码为 123456 newUser.setPassword("123456"); // 设置机构 // 用户新增 boolean submit = bean1.submit(newUser); // 3.更新场所负责人 one.setPrincipal(newUser.getRealName()); one.setPrincipalUserId(newUser.getId()); one.setPrincipalPhone(newUser.getPhone()); one.setLocation(datum.getAddressName()); one.setPlaceName(datum.getPlaceName()); bean.updateById(one); } else { // 3.更新场所负责人 one.setPrincipal(one1.getRealName()); one.setPrincipalUserId(one1.getId()); one.setPrincipalPhone(one1.getPhone()); one.setLocation(datum.getAddressName()); one.setPlaceName(datum.getPlaceName()); bean.updateById(one); } PlaceCheckEntity placeCheckEntity = new PlaceCheckEntity(); String police = datum.getPolice(); String phone = getPhone(police); if (StringUtils.isNotBlank(phone)) { User one3 = bean1.getOne(Wrappers.<User>lambdaQuery() .eq(User::getPhone, phone) .eq(User::getIsDeleted, 0)); if (one3 != null) { placeCheckEntity.setCreateUser(one3.getId()); } } // 4.保存检查表 placeCheckEntity.setHouseCode(datum.getHouseCode()); bean2.save(placeCheckEntity); } System.out.println("没有数据:" + JSON.toJSONString(objects)); } private String getPhone(String text) { Pattern pattern = Pattern.compile("1[3-9]\\d{9}"); Matcher matcher = pattern.matcher(text); while (matcher.find()) { return matcher.group(); } return ""; } private String getName(String text) { // Pattern pattern = Pattern.compile("[\\\\u4e00-\\\\u9fa5]+"); // Matcher matcher = pattern.matcher(text); String result = text.replaceAll("[^\\u4e00-\\u9fa5]", ""); // while (matcher.find()) { // return matcher.group(); // } return result; } } src/main/java/org/springblade/modules/taskPlaceSelfCheck/controller/TaskPlaceSelfCheckController.java
@@ -58,8 +58,8 @@ */ @ApiOperation("获取消防自查记任务表详细信息") @GetMapping(value = "/getInfo") public R<TaskPlaceSelfCheckVO> getInfo(@RequestParam("id") Long id){ TaskPlaceSelfCheckDTO taskPlaceSelfCheckDTO = taskPlaceSelfCheckService.selectTaskPlaceSelfCheckById(id); public R<TaskPlaceSelfCheckVO> getInfo(TaskPlaceSelfCheckEntity taskPlaceSelfCheck){ TaskPlaceSelfCheckDTO taskPlaceSelfCheckDTO = taskPlaceSelfCheckService.selectTaskPlaceSelfCheckById(taskPlaceSelfCheck); TaskPlaceSelfCheckVO taskPlaceSelfCheckDetailVO = BeanUtil.copy(taskPlaceSelfCheckDTO, TaskPlaceSelfCheckVO.class); return R.data(taskPlaceSelfCheckDetailVO); } src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.java
@@ -44,10 +44,10 @@ /** * 查询消防自查记任务表 * * @param id 消防自查记任务表ID * @param taskPlaceSelfCheck 消防自查记任务表ID * @return 消防自查记任务表 */ public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById(Long id); public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById( @Param("palce") TaskPlaceSelfCheckEntity taskPlaceSelfCheck); /** * 查询消防自查记任务表列表 src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.xml
@@ -173,7 +173,7 @@ jpe.legal_person, jt.remark reasonFailure, jda.address_name FROM FROM jczz_task_place_self_check jtpr LEFT JOIN jczz_task jt ON jt.id = jtpr.task_id LEFT JOIN jczz_place jp ON jtpr.house_code = jp.house_code @@ -182,8 +182,10 @@ LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id LEFT JOIN blade_user bu ON bu.id = jtpr.create_user LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtpr.house_code WHERE jtpr.id = #{id} <where> <if test="palce.id != null ">and jtpr.id = #{palce.id}</if> <if test="palce.taskId != null ">and jtpr.task_id = #{palce.taskId}</if> </where> </select> <select id="selectTaskPlaceSelfCheckList" src/main/java/org/springblade/modules/taskPlaceSelfCheck/service/ITaskPlaceSelfCheckService.java
@@ -47,7 +47,7 @@ * @param id 消防自查记任务表ID * @return 消防自查记任务表 */ public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById(Long id); public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById(TaskPlaceSelfCheckEntity taskPlaceSelfCheck); /** * 查询消防自查记任务表列表 src/main/java/org/springblade/modules/taskPlaceSelfCheck/service/impl/TaskPlaceSelfCheckServiceImpl.java
@@ -63,12 +63,12 @@ /** * 查询消防自查记任务表 * * @param id 消防自查记任务表ID * @param taskPlaceSelfCheck 消防自查记任务表ID * @return 消防自查记任务表 */ @Override public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById(Long id) { return this.baseMapper.selectTaskPlaceSelfCheckById(id); public TaskPlaceSelfCheckDTO selectTaskPlaceSelfCheckById(TaskPlaceSelfCheckEntity taskPlaceSelfCheck) { return this.baseMapper.selectTaskPlaceSelfCheckById(taskPlaceSelfCheck); } /** @@ -90,7 +90,7 @@ // 1.保存任务表 ITaskService bean2 = SpringUtils.getBean(ITaskService.class); Long aLong = bean2.saveTask(CommonConstant.NUMBER_ONE, DictConstant.FIRE_SELF_CHECK_NOTICE, 1, "", AuthUtil.getUserId(), taskPlaceSelfCheck.getHouseCode(), CommonConstant.NUMBER_TWO, 4); "", AuthUtil.getUserId(), taskPlaceSelfCheck.getHouseCode(), CommonConstant.NUMBER_TWO, 1); if (aLong <= 0) { return false; } @@ -130,13 +130,16 @@ if (save) { // 3.更新题目记录 List<TaskPlaceRecordVO> taskPlaceRecordList = taskPlaceSelfCheck.getTaskPlaceRecordVOList(); ITaskPlaceRecordService bean = SpringUtil.getBean(ITaskPlaceRecordService.class); List<TaskPlaceRecordEntity> collect = taskPlaceRecordList.stream().filter(item -> item.getState().equals(0)).collect(Collectors.toList()); boolean b = bean.updateBatchById(collect); if (b) { return b; if (taskPlaceRecordList != null && taskPlaceRecordList.size() > 0) { ITaskPlaceRecordService bean = SpringUtil.getBean(ITaskPlaceRecordService.class); List<TaskPlaceRecordEntity> copy = BeanUtil.copy(taskPlaceRecordList, TaskPlaceRecordEntity.class); boolean b = bean.updateBatchById(copy); if (b) { return b; } throw new Exception("保存失败!"); } throw new Exception("保存失败!"); return save; } throw new Exception("保存失败!"); }