认证虚拟清单基础、认证虚拟清单明细开发。
This commit is contained in:
+180
@@ -0,0 +1,180 @@
|
||||
package com.jero.modules.authDummy.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
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.authDummy.entity.AuthDummyInventoryBaseEO;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.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-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="认证虚拟清单基础表")
|
||||
@RestController
|
||||
@RequestMapping("/authDummy/authDummyInventoryBaseEO")
|
||||
@Slf4j
|
||||
public class AuthDummyInventoryBaseEOController extends JeroController<AuthDummyInventoryBaseEO, IAuthDummyInventoryBaseEOService> {
|
||||
@Autowired
|
||||
private IAuthDummyInventoryBaseEOService authDummyInventoryBaseEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param authDummyInventoryBaseEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "认证虚拟清单基础表-分页列表查询")
|
||||
@ApiOperation(value="认证虚拟清单基础表-分页列表查询", notes="认证虚拟清单基础表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(AuthDummyInventoryBaseEO authDummyInventoryBaseEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
@RequestParam(name="cut", defaultValue="cn") String cut,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<AuthDummyInventoryBaseEO> queryWrapper = QueryGenerator.initQueryWrapper(authDummyInventoryBaseEO, req.getParameterMap());
|
||||
Page<AuthDummyInventoryBaseEO> page = new Page<AuthDummyInventoryBaseEO>(pageNo, pageSize);
|
||||
IPage<AuthDummyInventoryBaseEO> pageList = authDummyInventoryBaseEOService.page(page, queryWrapper);
|
||||
this.authDummyInventoryBaseEOService.disposeData(page.getRecords(),cut);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "认证虚拟清单基础表-列表查询")
|
||||
@ApiOperation(value="认证虚拟清单基础表-列表查询", notes="认证虚拟清单基础表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<AuthDummyInventoryBaseEO>> queryList() {
|
||||
List<AuthDummyInventoryBaseEO> list = authDummyInventoryBaseEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param authDummyInventoryBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "认证虚拟清单基础表-添加")
|
||||
@ApiOperation(value="认证虚拟清单基础表-添加", notes="认证虚拟清单基础表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody AuthDummyInventoryBaseEO authDummyInventoryBaseEO) {
|
||||
authDummyInventoryBaseEOService.add(authDummyInventoryBaseEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param authDummyInventoryBaseEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "认证虚拟清单基础表-编辑")
|
||||
@ApiOperation(value="认证虚拟清单基础表-编辑", notes="认证虚拟清单基础表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody AuthDummyInventoryBaseEO authDummyInventoryBaseEO) {
|
||||
authDummyInventoryBaseEOService.editById(authDummyInventoryBaseEO);
|
||||
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) {
|
||||
authDummyInventoryBaseEOService.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.authDummyInventoryBaseEOService.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) {
|
||||
AuthDummyInventoryBaseEO authDummyInventoryBaseEO = authDummyInventoryBaseEOService.queryById(id);
|
||||
if(authDummyInventoryBaseEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(authDummyInventoryBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param authDummyInventoryBaseEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, AuthDummyInventoryBaseEO authDummyInventoryBaseEO) {
|
||||
return super.exportXls(request, authDummyInventoryBaseEO, AuthDummyInventoryBaseEO.class, "认证虚拟清单基础表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, AuthDummyInventoryBaseEO.class);
|
||||
}
|
||||
|
||||
@AutoLog(value = "认证虚拟清单基础表-批量发布或撤回")
|
||||
@ApiOperation(value="认证虚拟清单基础表-批量发布或撤回", notes="认证虚拟清单基础表-批量发布或撤回")
|
||||
@PostMapping(value = "/batchIssueOrWithdraw")
|
||||
public Result<?> batchIssueOrWithdraw(@RequestBody JSONObject json) {
|
||||
return this.authDummyInventoryBaseEOService.batchIssueOrWithdraw(json);
|
||||
}
|
||||
}
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
package com.jero.modules.authDummy.controller;
|
||||
|
||||
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.constant.enums.CutEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="认证虚拟清单详情表")
|
||||
@RestController
|
||||
@RequestMapping("/authDummy/authDummyInventoryInfoEO")
|
||||
@Slf4j
|
||||
public class AuthDummyInventoryInfoEOController extends JeroController<AuthDummyInventoryInfoEO, IAuthDummyInventoryInfoEOService> {
|
||||
@Autowired
|
||||
private IAuthDummyInventoryInfoEOService authDummyInventoryInfoEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "认证虚拟清单详情表-分页列表查询")
|
||||
@ApiOperation(value="认证虚拟清单详情表-分页列表查询", notes="认证虚拟清单详情表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(AuthDummyInventoryInfoEO authDummyInventoryInfoEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<AuthDummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(authDummyInventoryInfoEO, req.getParameterMap());
|
||||
Page<AuthDummyInventoryInfoEO> page = new Page<AuthDummyInventoryInfoEO>(pageNo, pageSize);
|
||||
IPage<AuthDummyInventoryInfoEO> pageList = authDummyInventoryInfoEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "认证虚拟清单详情表-列表查询")
|
||||
@ApiOperation(value="认证虚拟清单详情表-列表查询", notes="认证虚拟清单详情表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<AuthDummyInventoryInfoEO>> queryList() {
|
||||
List<AuthDummyInventoryInfoEO> list = authDummyInventoryInfoEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "认证虚拟清单详情表-添加")
|
||||
@ApiOperation(value="认证虚拟清单详情表-添加", notes="认证虚拟清单详情表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody AuthDummyInventoryInfoEO authDummyInventoryInfoEO) {
|
||||
authDummyInventoryInfoEOService.add(authDummyInventoryInfoEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "认证虚拟清单详情表-编辑")
|
||||
@ApiOperation(value="认证虚拟清单详情表-编辑", notes="认证虚拟清单详情表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody AuthDummyInventoryInfoEO authDummyInventoryInfoEO) {
|
||||
authDummyInventoryInfoEOService.editById(authDummyInventoryInfoEO);
|
||||
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) {
|
||||
authDummyInventoryInfoEOService.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.authDummyInventoryInfoEOService.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) {
|
||||
AuthDummyInventoryInfoEO authDummyInventoryInfoEO = authDummyInventoryInfoEOService.queryById(id);
|
||||
if(authDummyInventoryInfoEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(authDummyInventoryInfoEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param authDummyInventoryInfoEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, AuthDummyInventoryInfoEO authDummyInventoryInfoEO) {
|
||||
return super.exportXls(request, authDummyInventoryInfoEO, AuthDummyInventoryInfoEO.class, "认证虚拟清单详情表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, AuthDummyInventoryInfoEO.class);
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "认证虚拟清单详情表-复制")
|
||||
@ApiOperation(value="认证虚拟清单详情表-复制", notes="认证虚拟清单详情表-复制")
|
||||
@GetMapping(value = "/copyInfoByIds")
|
||||
public Result<?> copyInfoByIds(@RequestParam(name="ids",required=true) String ids,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
return this.authDummyInventoryInfoEOService.copyInfoByIds(ids,cut);
|
||||
}
|
||||
|
||||
@AutoLog(value = "认证虚拟清单详情表-批量设置")
|
||||
@ApiOperation(value="认证虚拟清单详情表-批量设置", notes="认证虚拟清单详情表-批量设置")
|
||||
@PostMapping(value = "/setBatch")
|
||||
public Result<?> setBatch(@RequestBody AuthDummyInventoryInfoEO authDummyInventoryInfoEO) {
|
||||
return this.authDummyInventoryInfoEOService.setBatch(authDummyInventoryInfoEO);
|
||||
}
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.jero.modules.authDummy.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
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.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单基础表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("auth_dummy_inventory_base")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="auth_dummy_inventory_base对象", description="认证虚拟清单基础表")
|
||||
public class AuthDummyInventoryBaseEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@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 java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@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 java.lang.String sysOrgCode;
|
||||
|
||||
/**虚拟清单名称*/
|
||||
@Excel(name = "虚拟清单名称", width = 15)
|
||||
@ApiModelProperty(value = "虚拟清单名称")
|
||||
private java.lang.String name;
|
||||
|
||||
/**使用说明*/
|
||||
@Excel(name = "使用说明", width = 15)
|
||||
@ApiModelProperty(value = "使用说明")
|
||||
private java.lang.String useExplain;
|
||||
|
||||
/**状态*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
private java.lang.String state;
|
||||
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package com.jero.modules.authDummy.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.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("auth_dummy_inventory_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="auth_dummy_inventory_info对象", description="认证虚拟清单详情表")
|
||||
public class AuthDummyInventoryInfoEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@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 java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@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 java.lang.String sysOrgCode;
|
||||
|
||||
/**类别*/
|
||||
@Excel(name = "类别", width = 15)
|
||||
@ApiModelProperty(value = "类别")
|
||||
private java.lang.String category;
|
||||
|
||||
/**检验项目*/
|
||||
@Excel(name = "检验项目", width = 15)
|
||||
@ApiModelProperty(value = "检验项目")
|
||||
private java.lang.String inspectionItem;
|
||||
|
||||
/**配置项*/
|
||||
@Excel(name = "配置项", width = 15)
|
||||
@ApiModelProperty(value = "配置项")
|
||||
private java.lang.String configItem;
|
||||
|
||||
/**WVTA ID*/
|
||||
@Excel(name = "WVTA ID", width = 15)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private java.lang.String wvtaId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "标准编号", width = 15)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private java.lang.String serialNumber;
|
||||
|
||||
/**责任领域*/
|
||||
@Excel(name = "责任领域", width = 15)
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private java.lang.String dutyTerritory;
|
||||
|
||||
/**交付物*/
|
||||
@Excel(name = "交付物", width = 15)
|
||||
@ApiModelProperty(value = "交付物")
|
||||
private java.lang.String deliverable;
|
||||
|
||||
/**文档库id*/
|
||||
@Excel(name = "文档库id", width = 15)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
private java.lang.String bussDocumentLibraryId;
|
||||
|
||||
/**认证虚拟清单基础表id*/
|
||||
@Excel(name = "认证虚拟清单基础表id", width = 15)
|
||||
@ApiModelProperty(value = "认证虚拟清单基础表id")
|
||||
private java.lang.String authDummyInventoryBaseId;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String ids;
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.authDummy.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryBaseEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单基础表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface AuthDummyInventoryBaseEOMapper extends BaseMapper<AuthDummyInventoryBaseEO> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.authDummy.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface AuthDummyInventoryInfoEOMapper extends BaseMapper<AuthDummyInventoryInfoEO> {
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.authDummy.mapper.AuthDummyInventoryBaseEOMapper">
|
||||
<resultMap id="AuthDummyInventoryBaseEOResultMap" type="com.jero.modules.authDummy.entity.AuthDummyInventoryBaseEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="name" property="name" />
|
||||
<result column="use_explain" property="useExplain" />
|
||||
<result column="state" property="state" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.authDummy.mapper.AuthDummyInventoryInfoEOMapper">
|
||||
<resultMap id="AuthDummyInventoryInfoEOResultMap" type="com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="category" property="category" />
|
||||
<result column="inspection_item" property="inspectionItem" />
|
||||
<result column="config_item" property="configItem" />
|
||||
<result column="wvta_id" property="wvtaId" />
|
||||
<result column="serial_number" property="serialNumber" />
|
||||
<result column="duty_territory" property="dutyTerritory" />
|
||||
<result column="deliverable" property="deliverable" />
|
||||
<result column="buss_document_library_id" property="bussDocumentLibraryId" />
|
||||
<result column="auth_dummy_inventory_base_id" property="authDummyInventoryBaseId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.jero.modules.authDummy.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryBaseEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单基础表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IAuthDummyInventoryBaseEOService extends IService<AuthDummyInventoryBaseEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param authDummyInventoryBaseEO
|
||||
* @return
|
||||
*/
|
||||
void add(AuthDummyInventoryBaseEO authDummyInventoryBaseEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param authDummyInventoryBaseEO
|
||||
* @return
|
||||
*/
|
||||
void editById(AuthDummyInventoryBaseEO authDummyInventoryBaseEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
AuthDummyInventoryBaseEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<AuthDummyInventoryBaseEO> queryList();
|
||||
|
||||
/**
|
||||
* 发布或撤回
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
Result<?> batchIssueOrWithdraw(JSONObject json);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<AuthDummyInventoryBaseEO> datas, String cut);
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.jero.modules.authDummy.service;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IAuthDummyInventoryInfoEOService extends IService<AuthDummyInventoryInfoEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @return
|
||||
*/
|
||||
void add(AuthDummyInventoryInfoEO authDummyInventoryInfoEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @return
|
||||
*/
|
||||
void editById(AuthDummyInventoryInfoEO authDummyInventoryInfoEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
AuthDummyInventoryInfoEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<AuthDummyInventoryInfoEO> queryList();
|
||||
|
||||
/**
|
||||
* 复制
|
||||
* @param ids
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
Result<?> copyInfoByIds(String ids, String cut);
|
||||
|
||||
/**
|
||||
* 批量设置
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @return
|
||||
*/
|
||||
Result<?> setBatch(AuthDummyInventoryInfoEO authDummyInventoryInfoEO);
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
package com.jero.modules.authDummy.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryBaseEO;
|
||||
import com.jero.modules.authDummy.mapper.AuthDummyInventoryBaseEOMapper;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService;
|
||||
import com.jero.modules.dummy.enums.InventoryStateEnum;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单基础表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class AuthDummyInventoryBaseEOServiceImpl extends ServiceImpl<AuthDummyInventoryBaseEOMapper, AuthDummyInventoryBaseEO> implements IAuthDummyInventoryBaseEOService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param authDummyInventoryBaseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(AuthDummyInventoryBaseEO authDummyInventoryBaseEO) {
|
||||
Date now = new Date();
|
||||
authDummyInventoryBaseEO.setCreateTime(now);
|
||||
authDummyInventoryBaseEO.setUpdateTime(now);
|
||||
save(authDummyInventoryBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param authDummyInventoryBaseEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(AuthDummyInventoryBaseEO authDummyInventoryBaseEO) {
|
||||
Date now = new Date();
|
||||
authDummyInventoryBaseEO.setUpdateTime(now);
|
||||
saveOrUpdate(authDummyInventoryBaseEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AuthDummyInventoryBaseEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<AuthDummyInventoryBaseEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> batchIssueOrWithdraw(JSONObject json) {
|
||||
String cut = json.getString("cut");
|
||||
String state = json.getString("state");
|
||||
String ids = json.getString("ids");
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
throw new JeroBootException("至少选择一条数据进行操作!");
|
||||
}
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
|
||||
LambdaUpdateWrapper<AuthDummyInventoryBaseEO> authDummyUpdateWrap = new LambdaUpdateWrapper<>();
|
||||
authDummyUpdateWrap.set(AuthDummyInventoryBaseEO::getState,state);
|
||||
|
||||
if(InventoryStateEnum.ISSUE.getValue().equals(state)){
|
||||
authDummyUpdateWrap.set(AuthDummyInventoryBaseEO::getUpdateBy,currentUser.getUsername());
|
||||
authDummyUpdateWrap.set(AuthDummyInventoryBaseEO::getUpdateTime,new Date());
|
||||
}
|
||||
|
||||
authDummyUpdateWrap.in(AuthDummyInventoryBaseEO::getId,idList);
|
||||
this.update(authDummyUpdateWrap);
|
||||
|
||||
if(InventoryStateEnum.ISSUE.getValue().equals(state)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
return Result.OK().success("发布成功");
|
||||
} else {
|
||||
return Result.OK().success("Release success!");
|
||||
}
|
||||
}else {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
return Result.OK().success("撤回成功");
|
||||
} else {
|
||||
return Result.OK().success("Withdrawal succeeded!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<AuthDummyInventoryBaseEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
for (AuthDummyInventoryBaseEO data : datas) {
|
||||
// TODO 处理数据,对接时再详细处理。
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
package com.jero.modules.authDummy.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryBaseEO;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
|
||||
import com.jero.modules.authDummy.mapper.AuthDummyInventoryInfoEOMapper;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* @Description: 认证虚拟清单详情表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyInventoryInfoEOMapper, AuthDummyInventoryInfoEO> implements IAuthDummyInventoryInfoEOService {
|
||||
|
||||
@Autowired
|
||||
private IAuthDummyInventoryBaseEOService authDummyInventoryBaseEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(AuthDummyInventoryInfoEO authDummyInventoryInfoEO) {
|
||||
Date now = new Date();
|
||||
authDummyInventoryInfoEO.setCreateTime(now);
|
||||
authDummyInventoryInfoEO.setUpdateTime(now);
|
||||
save(authDummyInventoryInfoEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param authDummyInventoryInfoEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(AuthDummyInventoryInfoEO authDummyInventoryInfoEO) {
|
||||
Date now = new Date();
|
||||
authDummyInventoryInfoEO.setUpdateTime(now);
|
||||
saveOrUpdate(authDummyInventoryInfoEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AuthDummyInventoryInfoEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<AuthDummyInventoryInfoEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> copyInfoByIds(String ids, String cut) {
|
||||
String resultMsg = "";
|
||||
try {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
LambdaQueryWrapper<AuthDummyInventoryInfoEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(AuthDummyInventoryInfoEO::getId,Arrays.asList(ids.split(",")));
|
||||
List<AuthDummyInventoryInfoEO> authDummyInventoryInfoEOList = this.list(wrapper);
|
||||
for (AuthDummyInventoryInfoEO authDummyInventoryInfoEO : authDummyInventoryInfoEOList) {
|
||||
authDummyInventoryInfoEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
}
|
||||
this.saveBatch(authDummyInventoryInfoEOList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "复制失败";
|
||||
}else{
|
||||
resultMsg = "Copy the failure";
|
||||
}
|
||||
return Result.error(resultMsg);
|
||||
}
|
||||
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
resultMsg = "复制成功";
|
||||
}else{
|
||||
resultMsg = "Copy success";
|
||||
}
|
||||
return Result.OK(resultMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> setBatch(AuthDummyInventoryInfoEO authDummyInventoryInfoEO) {
|
||||
String authDummyInventoryBaseId = authDummyInventoryInfoEO.getAuthDummyInventoryBaseId();
|
||||
AuthDummyInventoryBaseEO authDummyInventoryBaseEO = this.authDummyInventoryBaseEOService.queryById(authDummyInventoryBaseId);
|
||||
if(ObjectUtils.isEmpty(authDummyInventoryBaseEO)){
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
throw new JeroBootException("该虚拟认证清单不存在,批量编辑失败");
|
||||
}else{
|
||||
throw new JeroBootException("The virtual inventory does not exist, and batch editing failed.");
|
||||
}
|
||||
}else {
|
||||
String ids = authDummyInventoryInfoEO.getIds();
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
throw new JeroBootException("至少选择一条数据进行批量设置!");
|
||||
}
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
List<AuthDummyInventoryInfoEO> updateList = new ArrayList<>();
|
||||
for (String id : idList) {
|
||||
AuthDummyInventoryInfoEO updateAuthDummyEO = new AuthDummyInventoryInfoEO();
|
||||
updateAuthDummyEO.setId(id);
|
||||
|
||||
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getCategory())){
|
||||
updateAuthDummyEO.setCategory(authDummyInventoryInfoEO.getCategory());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getInspectionItem())){
|
||||
updateAuthDummyEO.setInspectionItem(authDummyInventoryInfoEO.getInspectionItem());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getConfigItem())){
|
||||
updateAuthDummyEO.setConfigItem(authDummyInventoryInfoEO.getConfigItem());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getWvtaId())){
|
||||
updateAuthDummyEO.setWvtaId(authDummyInventoryInfoEO.getWvtaId());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getSerialNumber())){
|
||||
updateAuthDummyEO.setSerialNumber(authDummyInventoryInfoEO.getSerialNumber());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getDutyTerritory())){
|
||||
updateAuthDummyEO.setDutyTerritory(authDummyInventoryInfoEO.getDutyTerritory());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getDeliverable())){
|
||||
updateAuthDummyEO.setDeliverable(authDummyInventoryInfoEO.getDeliverable());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getBussDocumentLibraryId())){
|
||||
updateAuthDummyEO.setBussDocumentLibraryId(authDummyInventoryInfoEO.getBussDocumentLibraryId());
|
||||
}
|
||||
updateList.add(updateAuthDummyEO);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(updateList)){
|
||||
this.updateBatchById(updateList);
|
||||
}
|
||||
}
|
||||
return Result.OK("批量设置成功!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user