Merge remote-tracking branch 'origin/develop_1' into develop_1
This commit is contained in:
+109
-56
@@ -1,56 +1,109 @@
|
|||||||
//package com.adc.da.slrs.sarStandPartCodeApply.controller;
|
package com.adc.da.slrs.sarStandPartCodeApply.controller;
|
||||||
//
|
|
||||||
//import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
//import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
//import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.service.ISarStandPartCodeApplyService;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.StandPartCodeExcelVO;
|
||||||
//import com.adc.da.slrs.sarStandardsInfo.controller.SarStandardsInfoController;
|
import com.adc.da.slrs.sarStandPartCodeApply.service.ISarStandPartCodeApplyService;
|
||||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.adc.da.slrs.sarStandardsInfo.controller.SarStandardsInfoController;
|
||||||
//import io.swagger.annotations.Api;
|
import com.alibaba.excel.EasyExcel;
|
||||||
//import io.swagger.annotations.ApiOperation;
|
import com.alibaba.fastjson.JSON;
|
||||||
//import org.slf4j.Logger;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
//import org.slf4j.LoggerFactory;
|
import io.swagger.annotations.Api;
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import io.swagger.annotations.ApiOperation;
|
||||||
//import org.springframework.web.bind.annotation.PostMapping;
|
import org.slf4j.Logger;
|
||||||
//import org.springframework.web.bind.annotation.RequestBody;
|
import org.slf4j.LoggerFactory;
|
||||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
//import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.*;
|
||||||
//
|
|
||||||
//import java.util.Date;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
//import java.util.List;
|
import java.net.URLEncoder;
|
||||||
//
|
import java.util.ArrayList;
|
||||||
//@RestController
|
import java.util.Arrays;
|
||||||
//@Api(tags = "零部件编号申请")
|
import java.util.Date;
|
||||||
//@RequestMapping("/api/sarStandPartCodeApply")//前端和后端对的接口
|
import java.util.List;
|
||||||
//public class SarStandPartCodeApplyController extends BaseController<SarStandPartCodeApply> {
|
|
||||||
//
|
@RestController
|
||||||
// //创建日志实例
|
@Api(tags = "零部件编号申请", value = "SarStandPartCodeApplyController", description = "零部件编号申请控制类")
|
||||||
// private static final Logger logger = LoggerFactory.getLogger(SarStandardsInfoController.class);
|
@RequestMapping("/api/sarStandPartCodeApply")//前端和后端对的接口
|
||||||
//
|
public class SarStandPartCodeApplyController extends BaseController<SarStandPartCodeApply> {
|
||||||
// @Autowired
|
|
||||||
// private ISarStandPartCodeApplyService sarStandPartCodeApplyService;
|
//创建日志实例
|
||||||
//
|
private static final Logger logger = LoggerFactory.getLogger(SarStandardsInfoController.class);
|
||||||
// @ApiOperation("零部件编号申请新增")
|
|
||||||
// @PostMapping("/add")
|
@Autowired
|
||||||
// public ResponseMessage<Object> add(@RequestBody List<SarStandPartCodeApply> sarStandPartCodeApply){
|
private ISarStandPartCodeApplyService sarStandPartCodeApplyService;
|
||||||
// sarStandPartCodeApply.forEach(sarStandPartCodeApply1 -> sarStandPartCodeApply1.setCreateTime(new Date()));
|
|
||||||
// if (sarStandPartCodeApplyService.saveBatch(sarStandPartCodeApply)){
|
@ApiOperation("零部件编号申请新增")
|
||||||
// return Result.success("新增成功");
|
@PostMapping("/add")
|
||||||
// }
|
public ResponseMessage<Object> add(@RequestBody List<SarStandPartCodeApply> sarStandPartCodeApply) {
|
||||||
// else {
|
sarStandPartCodeApply.forEach(sarStandPartCodeApply1 -> sarStandPartCodeApply1.setCreateTime(new Date()));
|
||||||
// return Result.error("新增失败");
|
if (sarStandPartCodeApplyService.saveBatch(sarStandPartCodeApply)) {
|
||||||
// }
|
return Result.success("新增成功");
|
||||||
// }
|
} else {
|
||||||
//
|
return Result.error("新增失败");
|
||||||
// /**
|
}
|
||||||
// * 分页查询零部件
|
}
|
||||||
// * @param sarStandPartCodeApplyPage: 筛选、分页信息
|
|
||||||
// * @return IPage<SarStandPartCodeApply>
|
/**
|
||||||
// */
|
* 分页查询零部件
|
||||||
// public ResponseMessage<IPage<SarStandPartCodeApply>> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage){
|
*
|
||||||
// IPage<SarStandPartCodeApply> sarStandPartCodeApplyIPage = sarStandPartCodeApplyService.getSarStandPartCodeApplyPage(sarStandPartCodeApplyPage);
|
* @param sarStandPartCodeApplyPage: 筛选、分页信息
|
||||||
// return Result.success(sarStandPartCodeApplyIPage);
|
* @return IPage<SarStandPartCodeApply>
|
||||||
// }
|
*/
|
||||||
//}
|
@ApiOperation("分页查询零部件")
|
||||||
|
@GetMapping
|
||||||
|
public ResponseMessage<IPage<SarStandPartCodeApply>> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage) {
|
||||||
|
IPage<SarStandPartCodeApply> sarStandPartCodeApplyIPage = sarStandPartCodeApplyService.getSarStandPartCodeApplyPage(sarStandPartCodeApplyPage);
|
||||||
|
return Result.success(sarStandPartCodeApplyIPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除零部件
|
||||||
|
*
|
||||||
|
* @param idList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "批量删除零部件")
|
||||||
|
@PostMapping("/deleteListAll")
|
||||||
|
public ResponseMessage deleteListAll(String[] idList) {
|
||||||
|
if (idList == null || idList.length == 0) {
|
||||||
|
return Result.success("200", "要删除的数据为空");
|
||||||
|
} else {
|
||||||
|
List<String> list = new ArrayList<>(Arrays.asList(idList));
|
||||||
|
String src = sarStandPartCodeApplyService.del(list);
|
||||||
|
return Result.success("200", src);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("导出Excel表")
|
||||||
|
@GetMapping(value = "exportPartInfoExcel")
|
||||||
|
public void exportPartInfoExcel(StandPartCodeExcelVO standPartCodeExcelVO, HttpServletResponse response) throws Exception {
|
||||||
|
// 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman
|
||||||
|
try {
|
||||||
|
response.setContentType("application/vnd.ms-excel");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
|
||||||
|
if (standPartCodeExcelVO.getExportName() == null) {
|
||||||
|
standPartCodeExcelVO.setExportName("零部件申请信息");
|
||||||
|
}
|
||||||
|
String fileName = URLEncoder.encode(standPartCodeExcelVO.getExportName(), "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
|
List<SarStandPartCodeApply> data = sarStandPartCodeApplyService.getPartInfoExcelData(standPartCodeExcelVO);
|
||||||
|
//这里需要设置不关闭流
|
||||||
|
EasyExcel.write(response.getOutputStream(), SarStandPartCodeApply.class).autoCloseStream(Boolean.FALSE)
|
||||||
|
.sheet("sheet1").doWrite(data);
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println(e);
|
||||||
|
//重置response
|
||||||
|
response.reset();
|
||||||
|
response.setContentType("application/json");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
response.getWriter().println(JSON.toJSONString(Result.error()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
+15
-15
@@ -1,15 +1,15 @@
|
|||||||
//package com.adc.da.slrs.sarStandPartCodeApply.dao;
|
package com.adc.da.slrs.sarStandPartCodeApply.dao;
|
||||||
//
|
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
|
||||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
//import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
//import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
//
|
|
||||||
//@Mapper
|
@Mapper
|
||||||
//public interface SarStandPartCodeApplyDao extends BaseMapper<SarStandPartCodeApply> {
|
public interface SarStandPartCodeApplyDao extends BaseMapper<SarStandPartCodeApply> {
|
||||||
// IPage<SarStandPartCodeApply> getAllDatasByPage(Page page, @Param("sar")SarStandPartCodeApplyPage sarStandPartCodeApply);
|
IPage<SarStandPartCodeApply> getAllDatasByPage(Page page, @Param("sar")SarStandPartCodeApplyPage sarStandPartCodeApply);
|
||||||
//
|
|
||||||
//}
|
}
|
||||||
|
|||||||
+84
-84
@@ -1,84 +1,84 @@
|
|||||||
//package com.adc.da.slrs.sarStandPartCodeApply.entity;
|
package com.adc.da.slrs.sarStandPartCodeApply.entity;
|
||||||
//
|
|
||||||
//import com.adc.da.base.entity.BaseEntity;
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
//import com.alibaba.excel.annotation.ExcelIgnore;
|
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||||
//import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
//import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
//import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
//import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
//import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
//import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
//import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
//import lombok.Data;
|
import lombok.Data;
|
||||||
//import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
//import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
//import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
//
|
|
||||||
//import java.util.Date;
|
import java.util.Date;
|
||||||
//
|
|
||||||
//@Data
|
@Data
|
||||||
//@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
//@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
//@ApiModel(value = "SarStandPartCodeApply对象",description = "SarStandPartCodeApply基础表里的所有属性")
|
@ApiModel(value = "SarStandPartCodeApply对象",description = "SarStandPartCodeApply基础表里的所有属性")
|
||||||
//public class SarStandPartCodeApply extends BaseEntity {
|
public class SarStandPartCodeApply extends BaseEntity {
|
||||||
//
|
|
||||||
// //版本号
|
//版本号
|
||||||
// private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
//
|
|
||||||
// @ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
|
@ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
|
||||||
// @ApiModelProperty(value = "主键")//接口标志
|
@ApiModelProperty(value = "主键")//接口标志
|
||||||
// @TableId(type = IdType.UUID)//数据库表里的主键
|
@TableId(type = IdType.UUID)//数据库表里的主键
|
||||||
// private String id;
|
private String id;
|
||||||
//
|
|
||||||
// @ExcelProperty("子组号")//Excel里的表头显示的是什么
|
@ExcelProperty("子组号")//Excel里的表头显示的是什么
|
||||||
// @ApiModelProperty(value = "子组号")//接口标志
|
@ApiModelProperty(value = "子组号")//接口标志
|
||||||
// @TableField("SUBGROUP_NUMBER")//数据库表里的字段
|
@TableField("SUBGROUP_NUMBER")//数据库表里的字段
|
||||||
// private String subgroupNumber;
|
private String subgroupNumber;
|
||||||
//
|
|
||||||
// @ExcelProperty("子组结构号")//Excel里的表头显示的是什么
|
@ExcelProperty("子组结构号")//Excel里的表头显示的是什么
|
||||||
// @ApiModelProperty(value = "子组结构号")//接口标志
|
@ApiModelProperty(value = "子组结构号")//接口标志
|
||||||
// @TableField("SUBGROUP_STRUCTURE_NUMBER")//数据库表里的字段
|
@TableField("SUBGROUP_STRUCTURE_NUMBER")//数据库表里的字段
|
||||||
// private String subgroupStructureNumber;
|
private String subgroupStructureNumber;
|
||||||
//
|
|
||||||
// @ExcelProperty("子组结构名称")//Excel里的表头显示的是什么
|
@ExcelProperty("子组结构名称")//Excel里的表头显示的是什么
|
||||||
// @ApiModelProperty(value = "子组结构名称")//接口标志
|
@ApiModelProperty(value = "子组结构名称")//接口标志
|
||||||
// @TableField("SUBGROUP_STRUCTURE_NAME")//数据库表里的字段
|
@TableField("SUBGROUP_STRUCTURE_NAME")//数据库表里的字段
|
||||||
// private String subgroupStructureName;
|
private String subgroupStructureName;
|
||||||
//
|
|
||||||
// @ExcelProperty("分组代号")//Excel里的表头显示的是什么
|
@ExcelProperty("分组代号")//Excel里的表头显示的是什么
|
||||||
// @ApiModelProperty(value = "分组代号")//接口标志
|
@ApiModelProperty(value = "分组代号")//接口标志
|
||||||
// @TableField("GROUP_CODE")//数据库表里的字段
|
@TableField("GROUP_CODE")//数据库表里的字段
|
||||||
// private String groupCode;
|
private String groupCode;
|
||||||
//
|
|
||||||
// @ExcelProperty("零部件分类名称")//Excel里的表头显示的是什么
|
@ExcelProperty("零部件分类名称")//Excel里的表头显示的是什么
|
||||||
// @ApiModelProperty(value = "零部件分类名称")//接口标志
|
@ApiModelProperty(value = "零部件分类名称")//接口标志
|
||||||
// @TableField("PART_CATEGORY_NAME")//数据库表里的字段
|
@TableField("PART_CATEGORY_NAME")//数据库表里的字段
|
||||||
// private String partCategoryName;
|
private String partCategoryName;
|
||||||
//
|
|
||||||
// @ExcelProperty("零部件分类代号")//Excel里的表头显示的是什么
|
@ExcelProperty("零部件分类代号")//Excel里的表头显示的是什么
|
||||||
// @ApiModelProperty(value = "零部件分类代号")//接口标志
|
@ApiModelProperty(value = "零部件分类代号")//接口标志
|
||||||
// @TableField("PART_CATEGORY_CODE")//数据库表里的字段
|
@TableField("PART_CATEGORY_CODE")//数据库表里的字段
|
||||||
// private String partCategoryCode;
|
private String partCategoryCode;
|
||||||
//
|
|
||||||
// @ExcelProperty("备注")//Excel里的表头显示的是什么
|
@ExcelProperty("备注")//Excel里的表头显示的是什么
|
||||||
// @ApiModelProperty(value = "备注")//接口标志
|
@ApiModelProperty(value = "备注")//接口标志
|
||||||
// @TableField("REMARKS")//数据库表里的字段
|
@TableField("REMARKS")//数据库表里的字段
|
||||||
// private String remarks;
|
private String remarks;
|
||||||
//
|
|
||||||
// @ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
|
@ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
|
||||||
// @ApiModelProperty(value = "创建部门")//接口标志
|
@ApiModelProperty(value = "创建部门")//接口标志
|
||||||
// @TableField("CREATE_DEPT_ID")//数据库表里的字段
|
@TableField("CREATE_DEPT_ID")//数据库表里的字段
|
||||||
// private String createDeptId;
|
private String createDeptId;
|
||||||
//
|
|
||||||
// @ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
|
@ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
|
||||||
// @ApiModelProperty(value = "创建人")//接口标志
|
@ApiModelProperty(value = "创建人")//接口标志
|
||||||
// @TableField("CREATE_BY_ID")//数据库表里的字段
|
@TableField("CREATE_BY_ID")//数据库表里的字段
|
||||||
// private String createById;
|
private String createById;
|
||||||
//
|
|
||||||
// @ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
|
@ExcelIgnore//这个字段在导出Excel的时候不显示在Excel表头里
|
||||||
// @ApiModelProperty(value = "创建时间")//接口标志
|
@ApiModelProperty(value = "创建时间")//接口标志
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//时间格式化
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//时间格式化
|
||||||
// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//时间格式化
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//时间格式化
|
||||||
// @TableField("CREATE_TIME")//数据库表里的字段
|
@TableField("CREATE_TIME")//数据库表里的字段
|
||||||
// private Date createTime;
|
private Date createTime;
|
||||||
//}
|
}
|
||||||
|
|||||||
+51
-51
@@ -1,51 +1,51 @@
|
|||||||
//package com.adc.da.slrs.sarStandPartCodeApply.entity;
|
package com.adc.da.slrs.sarStandPartCodeApply.entity;
|
||||||
//
|
|
||||||
//import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
//import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
//import lombok.Data;
|
import lombok.Data;
|
||||||
//
|
|
||||||
//import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
//
|
|
||||||
//@Data
|
@Data
|
||||||
//@ApiModel(value = "SarStandPartCodeApply分页",description = "SarStandPartCodeApply对象分页信息")
|
@ApiModel(value = "SarStandPartCodeApply分页",description = "SarStandPartCodeApply对象分页信息")
|
||||||
//public class SarStandPartCodeApplyPage {
|
public class SarStandPartCodeApplyPage {
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "主键")
|
@ApiModelProperty(value = "主键")
|
||||||
// private String id;
|
private String id;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "子组号")
|
@ApiModelProperty(value = "子组号")
|
||||||
// private String subgroupNumber;
|
private String subgroupNumber;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "子组结构号")
|
@ApiModelProperty(value = "子组结构号")
|
||||||
// private String subgroupStructureNumber;
|
private String subgroupStructureNumber;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "子组结构名称")
|
@ApiModelProperty(value = "子组结构名称")
|
||||||
// private String subgroupStructureName;
|
private String subgroupStructureName;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "分组代号")
|
@ApiModelProperty(value = "分组代号")
|
||||||
// private String groupCode;
|
private String groupCode;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "零部件分类名称")
|
@ApiModelProperty(value = "零部件分类名称")
|
||||||
// private String partCategoryName;
|
private String partCategoryName;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "零部件分类代号")
|
@ApiModelProperty(value = "零部件分类代号")
|
||||||
// private String partCategoryCode;
|
private String partCategoryCode;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
// private String remarks;
|
private String remarks;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "创建部门")
|
@ApiModelProperty(value = "创建部门")
|
||||||
// private String createDeptId;
|
private String createDeptId;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "创建人")
|
@ApiModelProperty(value = "创建人")
|
||||||
// private String createById;
|
private String createById;
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
// private Timestamp createTime;
|
private Timestamp createTime;
|
||||||
//
|
|
||||||
// @ApiModelProperty("当前页")
|
@ApiModelProperty("当前页")
|
||||||
// private Integer current;
|
private Integer current;
|
||||||
//
|
|
||||||
// @ApiModelProperty("每页条数")
|
@ApiModelProperty("每页条数")
|
||||||
// private Integer size;
|
private Integer size;
|
||||||
//}
|
}
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
package com.adc.da.slrs.sarStandPartCodeApply.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "零部件申请ExcelVO类")
|
||||||
|
public class StandPartCodeExcelVO {
|
||||||
|
@ApiModelProperty("文件名")
|
||||||
|
String exportName;
|
||||||
|
@ApiModelProperty("导出的零部件ID列表")
|
||||||
|
List<String> ids;
|
||||||
|
}
|
||||||
+33
-16
@@ -1,16 +1,33 @@
|
|||||||
//package com.adc.da.slrs.sarStandPartCodeApply.service;
|
package com.adc.da.slrs.sarStandPartCodeApply.service;
|
||||||
//
|
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
|
||||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.StandPartCodeExcelVO;
|
||||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
//
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
//public interface ISarStandPartCodeApplyService extends IService<SarStandPartCodeApply> {
|
|
||||||
//
|
import java.util.List;
|
||||||
// /**
|
|
||||||
// * 分页查询零部件
|
public interface ISarStandPartCodeApplyService extends IService<SarStandPartCodeApply> {
|
||||||
// * @param sarStandPartCodeApplyPage: 筛选、分页信息
|
|
||||||
// * @return: IPage<SarStandPartCodeApply>
|
/**
|
||||||
// */
|
* 分页查询零部件
|
||||||
// IPage<SarStandPartCodeApply> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage);
|
* @param sarStandPartCodeApplyPage: 筛选、分页信息
|
||||||
//}
|
* @return: IPage<SarStandPartCodeApply>
|
||||||
|
*/
|
||||||
|
IPage<SarStandPartCodeApply> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除零件申请信息
|
||||||
|
* @param idList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String del(List<String> idList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取导出Excel的数据
|
||||||
|
* @param standPartCodeExcelVO: ids
|
||||||
|
* @return List<SarStandPartCodeApply>
|
||||||
|
*/
|
||||||
|
List<SarStandPartCodeApply> getPartInfoExcelData(StandPartCodeExcelVO standPartCodeExcelVO);
|
||||||
|
}
|
||||||
|
|||||||
+91
-35
@@ -1,35 +1,91 @@
|
|||||||
//package com.adc.da.slrs.sarStandPartCodeApply.service.impl;
|
package com.adc.da.slrs.sarStandPartCodeApply.service.impl;
|
||||||
//
|
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.dao.SarStandPartCodeApplyDao;
|
import com.adc.da.slrs.sarStandPartCodeApply.dao.SarStandPartCodeApplyDao;
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApply;
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.SarStandPartCodeApplyPage;
|
||||||
//import com.adc.da.slrs.sarStandPartCodeApply.service.ISarStandPartCodeApplyService;
|
import com.adc.da.slrs.sarStandPartCodeApply.entity.StandPartCodeExcelVO;
|
||||||
//import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified;
|
import com.adc.da.slrs.sarStandPartCodeApply.service.ISarStandPartCodeApplyService;
|
||||||
//import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified;
|
||||||
//import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||||
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
//import org.springframework.stereotype.Service;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
//
|
import org.springframework.stereotype.Service;
|
||||||
//import javax.annotation.Resource;
|
|
||||||
//import java.util.List;
|
import javax.annotation.Resource;
|
||||||
//
|
import java.util.List;
|
||||||
//@Service
|
|
||||||
//public class SarStandPartCodeApplyServiceImpl extends ServiceImpl<SarStandPartCodeApplyDao, SarStandPartCodeApply> implements ISarStandPartCodeApplyService {
|
@Service
|
||||||
//
|
public class SarStandPartCodeApplyServiceImpl extends ServiceImpl<SarStandPartCodeApplyDao, SarStandPartCodeApply> implements ISarStandPartCodeApplyService {
|
||||||
// @Autowired
|
|
||||||
// private SarStandPartCodeApplyDao sarStandPartCodeApplyDao;
|
@Autowired
|
||||||
//
|
private SarStandPartCodeApplyDao sarStandPartCodeApplyDao;
|
||||||
// @Resource
|
|
||||||
// private SarStandardsInfoDao sarStandardsInfoDao;
|
@Resource
|
||||||
//
|
private SarStandardsInfoDao sarStandardsInfoDao;
|
||||||
// public IPage<SarStandPartCodeApply> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage){
|
|
||||||
// QueryWrapper<SarStandPartCodeApply> sarStandPartCodeApplyQueryWrapper = new QueryWrapper<>();
|
/**
|
||||||
// if (sarStandPartCodeApplyQueryWrapper.)
|
* 分页查询零部件信息
|
||||||
// }
|
* @param sarStandPartCodeApplyPage: 筛选、分页信息
|
||||||
//
|
* @return :IPage<SarStandPartCodeApply>
|
||||||
//
|
*/
|
||||||
//}
|
@Override
|
||||||
|
public IPage<SarStandPartCodeApply> getSarStandPartCodeApplyPage(SarStandPartCodeApplyPage sarStandPartCodeApplyPage){
|
||||||
|
QueryWrapper<SarStandPartCodeApply> sarStandPartCodeApplyQueryWrapper = new QueryWrapper<>();
|
||||||
|
//根据子组号查询
|
||||||
|
if (sarStandPartCodeApplyPage.getSubgroupNumber() != null){
|
||||||
|
sarStandPartCodeApplyQueryWrapper.like("SUBGROUP_NUMBER",sarStandPartCodeApplyPage.getSubgroupNumber());
|
||||||
|
}
|
||||||
|
//根据分组代号查询
|
||||||
|
if (sarStandPartCodeApplyPage.getGroupCode() != null){
|
||||||
|
sarStandPartCodeApplyQueryWrapper.like("GROUP_CODE",sarStandPartCodeApplyPage.getGroupCode());
|
||||||
|
}
|
||||||
|
//根据零件分类代号查询
|
||||||
|
if (sarStandPartCodeApplyPage.getPartCategoryCode() != null){
|
||||||
|
sarStandPartCodeApplyQueryWrapper.like("PART_CATEGORY_CODE",sarStandPartCodeApplyPage.getPartCategoryCode());
|
||||||
|
}
|
||||||
|
Page<SarStandPartCodeApply> standPartCodeApplyPage=new Page<>();
|
||||||
|
//判断前端是否提供页码和每页条数
|
||||||
|
if (sarStandPartCodeApplyPage.getCurrent()!=null && sarStandPartCodeApplyPage.getSize()!=null){
|
||||||
|
standPartCodeApplyPage = new Page<>(sarStandPartCodeApplyPage.getCurrent(),sarStandPartCodeApplyPage.getSize());
|
||||||
|
}
|
||||||
|
return sarStandPartCodeApplyDao.selectPage(standPartCodeApplyPage,sarStandPartCodeApplyQueryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除零部件信息
|
||||||
|
* @param idList: 批量删除的id数组
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String del(List<String> idList){
|
||||||
|
QueryWrapper<SarStandPartCodeApply> wrapper = new QueryWrapper<>();
|
||||||
|
for (String id: idList) {
|
||||||
|
wrapper.eq("ID",id);
|
||||||
|
sarStandPartCodeApplyDao.delete(wrapper);
|
||||||
|
}
|
||||||
|
sarStandPartCodeApplyDao.deleteBatchIds(idList);
|
||||||
|
return "删除成功";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取导出excel的数据
|
||||||
|
* @param standPartCodeExcelVO: ids
|
||||||
|
* @return List<SarStandPartCodeApply>
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SarStandPartCodeApply> getPartInfoExcelData(StandPartCodeExcelVO standPartCodeExcelVO){
|
||||||
|
QueryWrapper<SarStandPartCodeApply> sarStandPartCodeApplyQueryWrapper = new QueryWrapper<>();
|
||||||
|
if (standPartCodeExcelVO.getIds()!=null && standPartCodeExcelVO.getIds().size()>0){
|
||||||
|
sarStandPartCodeApplyQueryWrapper.in("id",standPartCodeExcelVO.getIds());
|
||||||
|
}
|
||||||
|
List<SarStandPartCodeApply> stand = sarStandPartCodeApplyDao.selectList(sarStandPartCodeApplyQueryWrapper);
|
||||||
|
List<SarStandPartCodeApply> a = stand;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user