This commit is contained in:
parent
11dcbc8c6d
commit
8fddc51659
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.gzgqj.business.app.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.bonus.gzgqj.business.plan.entity.FileUploadVo;
|
||||
import com.bonus.gzgqj.business.plan.entity.PageInfo;
|
||||
import lombok.Data;
|
||||
|
|
@ -14,14 +15,19 @@ import java.util.List;
|
|||
@Data
|
||||
public class PartApplyAppVo extends PageInfo {
|
||||
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private int xh;
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@Excel(name = "领料单编号", width = 10.0, orderNum = "1")
|
||||
private String code;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Excel(name = "状态", width = 10.0, orderNum = "6",dict = "status=1_待审核,2_待发货,3_审核驳回,4_已发货")
|
||||
private String status;
|
||||
/**
|
||||
* 审核节点类型
|
||||
|
|
@ -30,18 +36,22 @@ public class PartApplyAppVo extends PageInfo {
|
|||
/**
|
||||
* 领料人
|
||||
*/
|
||||
@Excel(name = "领用人", width = 10.0, orderNum = "3")
|
||||
private String userName;
|
||||
/**
|
||||
* 配件类型
|
||||
*/
|
||||
@Excel(name = "领用类型", width = 10.0, orderNum = "2",dict = "type=0_设备,1_工器具")
|
||||
private String type;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注", width = 10.0, orderNum = "7")
|
||||
private String remark;
|
||||
/**
|
||||
* 申请总数量
|
||||
*/
|
||||
@Excel(name = "领用数量", width = 10.0, orderNum = "5")
|
||||
private int applyNum;
|
||||
|
||||
/**
|
||||
|
|
@ -75,7 +85,7 @@ public class PartApplyAppVo extends PageInfo {
|
|||
* 创建人
|
||||
*/
|
||||
private String creater;
|
||||
|
||||
@Excel(name = "联系电话", width = 10.0, orderNum = "4")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
|
|
@ -150,5 +160,7 @@ public class PartApplyAppVo extends PageInfo {
|
|||
|
||||
private String shUrl;
|
||||
|
||||
private String infoMsg;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.gzgqj.business.app.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import org.omg.CORBA.INTERNAL;
|
||||
|
||||
|
|
@ -9,6 +10,9 @@ import org.omg.CORBA.INTERNAL;
|
|||
@Data
|
||||
public class PartApplyDetailAppVo {
|
||||
|
||||
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private int xh;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
|
|
@ -24,31 +28,38 @@ public class PartApplyDetailAppVo {
|
|||
/**
|
||||
* 申请数量
|
||||
*/
|
||||
@Excel(name = "数量", width = 10.0, orderNum = "5")
|
||||
private int applyNum;
|
||||
/**
|
||||
* 配件类型
|
||||
*/
|
||||
@Excel(name = "配件类型", width = 10.0, orderNum = "1")
|
||||
private String partType;
|
||||
/**
|
||||
* 配件名称
|
||||
*/
|
||||
@Excel(name = "配件名称", width = 10.0, orderNum = "2")
|
||||
private String partName;
|
||||
/**
|
||||
* 配件 型号
|
||||
*/
|
||||
@Excel(name = "规格型号", width = 10.0, orderNum = "3")
|
||||
private String partModel;
|
||||
|
||||
/**
|
||||
* 配件 型号
|
||||
*/
|
||||
@Excel(name = "单位", width = 10.0, orderNum = "4")
|
||||
private String partUnit;
|
||||
/**
|
||||
* 金钱
|
||||
*/
|
||||
@Excel(name = "金额", width = 10.0, orderNum = "7")
|
||||
private String money;
|
||||
/**
|
||||
* 平准单价
|
||||
*/
|
||||
@Excel(name = "单价", width = 10.0, orderNum = "6")
|
||||
private String price;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,30 @@
|
|||
package com.bonus.gzgqj.business.bases.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import com.bonus.gzgqj.business.app.entity.PartApplyAppVo;
|
||||
import com.bonus.gzgqj.business.app.entity.PartApplyDetailAppVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputDetails;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputVo;
|
||||
import com.bonus.gzgqj.business.bases.service.PartApplyService;
|
||||
import com.bonus.gzgqj.business.plan.entity.PlanApplyBeanPlanExport;
|
||||
import com.bonus.gzgqj.business.plan.entity.PlanDataDetailBean;
|
||||
import com.bonus.gzgqj.manager.annotation.DecryptAndVerify;
|
||||
import com.bonus.gzgqj.manager.core.entity.EncryptedReq;
|
||||
import com.bonus.gzgqj.manager.webResult.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -40,27 +51,92 @@ public class PartApplyController {
|
|||
PageInfo<PartApplyAppVo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询领料详情
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getPartDetails")
|
||||
@PostMapping("getPartDetails")
|
||||
@DecryptAndVerify(decryptedClass = PartApplyAppVo.class)
|
||||
public ServerResponse getPartDetails(EncryptedReq<PartApplyAppVo> dto) {
|
||||
return service.getPartDetails(dto.getData());
|
||||
}
|
||||
/**
|
||||
* 领料出库 查询
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getPartDetailsList")
|
||||
@DecryptAndVerify(decryptedClass = PartApplyAppVo.class)
|
||||
public PageInfo<PartApplyDetailAppVo> getPartDetailsList(EncryptedReq<PartApplyAppVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<PartApplyDetailAppVo> list = service.getPartDetailsList(dto.getData());;
|
||||
PageInfo<PartApplyDetailAppVo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
/**
|
||||
* 导出需求计划
|
||||
* @param
|
||||
* @param
|
||||
* @param
|
||||
*/
|
||||
@PostMapping("export")
|
||||
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody PartApplyAppVo dto) {
|
||||
try {
|
||||
List<PartApplyAppVo> list = service.findByPage(dto);;
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
});
|
||||
ExportParams exportParams = new ExportParams("领料出库", "领料出库", ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PlanApplyBeanPlanExport.class, list);
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("领料出库" + ".xlsx", "UTF-8"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 导出需求计划详情
|
||||
* @param request
|
||||
* @param response
|
||||
* @param
|
||||
*/
|
||||
@PostMapping("exportDetail")
|
||||
public void exportDetail(HttpServletRequest request, HttpServletResponse response,@RequestBody PartApplyAppVo dto) {
|
||||
try {
|
||||
List<PartApplyDetailAppVo> list = service.getPartDetailsList(dto);;
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
});
|
||||
ExportParams exportParams = new ExportParams("出库明细", "出库明细", ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PlanDataDetailBean.class, list);
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("出库明细" + ".xlsx", "UTF-8"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 数据审核
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("auditData")
|
||||
@PostMapping("auditData")
|
||||
@DecryptAndVerify(decryptedClass = PartApplyAppVo.class)
|
||||
public ServerResponse auditData(EncryptedReq<PartApplyAppVo> dto) {
|
||||
return service.auditData(dto.getData());
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.gzgqj.business.bases.controller;
|
|||
|
||||
|
||||
import com.bonus.gzgqj.business.app.entity.PartApplyAppVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartBackDetailsVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartBackVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.UserPatypeInfo;
|
||||
import com.bonus.gzgqj.business.bases.service.PartBackService;
|
||||
|
|
@ -55,7 +56,7 @@ public class PartBackController {
|
|||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getUserList")
|
||||
@PostMapping("getUserList")
|
||||
@DecryptAndVerify(decryptedClass = UserPatypeInfo.class)
|
||||
public ServerResponse getUserList(EncryptedReq<UserPatypeInfo> dto) {
|
||||
return service.getUserList(dto.getData());
|
||||
|
|
@ -67,11 +68,27 @@ public class PartBackController {
|
|||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getInfoDetails")
|
||||
@PostMapping("getInfoDetails")
|
||||
@DecryptAndVerify(decryptedClass = PartBackVo.class)
|
||||
public ServerResponse getInfoDetails(EncryptedReq<PartBackVo> dto) {
|
||||
return service.getInfoDetails(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料出库 查询
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getInfoDetailsList")
|
||||
@DecryptAndVerify(decryptedClass = PartBackVo.class)
|
||||
public PageInfo<PartBackDetailsVo> getInfoDetailsList(EncryptedReq<PartBackVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<PartBackDetailsVo> list = service.getInfoDetailsList(dto.getData());;
|
||||
PageInfo<PartBackDetailsVo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询配件类型
|
||||
* @param dto
|
||||
|
|
@ -85,6 +102,7 @@ public class PartBackController {
|
|||
PageInfo<UserPatypeInfo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配件 退料
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -1,21 +1,33 @@
|
|||
package com.bonus.gzgqj.business.bases.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputDetails;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputVo;
|
||||
import com.bonus.gzgqj.business.bases.service.PartInputService;
|
||||
import com.bonus.gzgqj.business.plan.entity.PlanApplyBean;
|
||||
import com.bonus.gzgqj.business.plan.entity.PlanApplyBeanPlanExport;
|
||||
import com.bonus.gzgqj.business.plan.entity.PlanDataDetailBean;
|
||||
import com.bonus.gzgqj.business.plan.entity.ProNeedInfo;
|
||||
import com.bonus.gzgqj.manager.annotation.DecryptAndVerify;
|
||||
import com.bonus.gzgqj.manager.core.entity.EncryptedReq;
|
||||
import com.bonus.gzgqj.manager.webResult.ServerResponse;
|
||||
import com.bonus.gzgqj.manager.webResult.StringUtils;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -44,6 +56,62 @@ public class PartInputController {
|
|||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出需求计划
|
||||
* @param
|
||||
* @param
|
||||
* @param
|
||||
*/
|
||||
@PostMapping("export")
|
||||
public void export(HttpServletRequest request, HttpServletResponse response, @RequestBody PartInputVo dto) {
|
||||
try {
|
||||
List<PartInputVo> list = service.findByPage(dto);
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
});
|
||||
ExportParams exportParams = new ExportParams("配件入库", "配件入库", ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PlanApplyBeanPlanExport.class, list);
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("配件入库" + ".xlsx", "UTF-8"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 导出需求计划详情
|
||||
* @param request
|
||||
* @param response
|
||||
* @param
|
||||
*/
|
||||
@PostMapping("exportDetail")
|
||||
public void exportDetail(HttpServletRequest request, HttpServletResponse response,@RequestBody PartInputVo dto) {
|
||||
try {
|
||||
List<PartInputDetails> list = service.getInputDetailList(dto);;
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
});
|
||||
ExportParams exportParams = new ExportParams("入库明细", "入库明细", ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PlanDataDetailBean.class, list);
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("入库明细" + ".xlsx", "UTF-8"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 配件入库接口
|
||||
|
|
@ -93,7 +161,7 @@ public class PartInputController {
|
|||
|
||||
|
||||
/**
|
||||
* 部分查询入库明细
|
||||
* 部分也查询查询入库明细
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.gzgqj.business.bases.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.hpsf.Decimal;
|
||||
|
||||
|
|
@ -13,16 +14,21 @@ public class PartInputDetails {
|
|||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private int xh;
|
||||
|
||||
private String id;
|
||||
|
||||
private String inputId;
|
||||
/**
|
||||
* 批次数量
|
||||
*/
|
||||
@Excel(name = "入库量", width = 10.0, orderNum = "5")
|
||||
private int inputNum;
|
||||
/**
|
||||
* 单个价格
|
||||
*/
|
||||
@Excel(name = "单价", width = 10.0, orderNum = "6")
|
||||
private String partPrice;
|
||||
/**
|
||||
* 总价格
|
||||
|
|
@ -36,6 +42,7 @@ public class PartInputDetails {
|
|||
/**
|
||||
* 厂家名称
|
||||
*/
|
||||
@Excel(name = "配件厂家", width = 10.0, orderNum = "6")
|
||||
private String vendName;
|
||||
/**
|
||||
* 配件id
|
||||
|
|
@ -44,22 +51,27 @@ public class PartInputDetails {
|
|||
/**
|
||||
* 配件类型
|
||||
*/
|
||||
@Excel(name = "配件类型", width = 10.0, orderNum = "1")
|
||||
private String partType;
|
||||
/**
|
||||
* 配件名称
|
||||
*/
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "2")
|
||||
private String partName;
|
||||
|
||||
/**
|
||||
* 配件类型
|
||||
* 规格型号
|
||||
*/
|
||||
@Excel(name = "规格型号", width = 10.0, orderNum = "3")
|
||||
private String partModel;
|
||||
|
||||
/**
|
||||
* 配件类型
|
||||
* 单位
|
||||
*/
|
||||
@Excel(name = "单位", width = 10.0, orderNum = "4")
|
||||
private String partUnit;
|
||||
|
||||
@Excel(name = "备注", width = 10.0, orderNum = "6")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.gzgqj.business.bases.entity;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.bonus.gzgqj.business.plan.entity.FileUploadVo;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.hpsf.Decimal;
|
||||
|
|
@ -12,6 +13,9 @@ import java.util.List;
|
|||
*/
|
||||
@Data
|
||||
public class PartInputVo {
|
||||
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private int xh;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
|
@ -19,6 +23,7 @@ public class PartInputVo {
|
|||
/**
|
||||
* 编码
|
||||
*/
|
||||
@Excel(name = "入库编号", width = 10.0, orderNum = "1")
|
||||
private String code;
|
||||
/**
|
||||
* 入库人
|
||||
|
|
@ -28,14 +33,17 @@ public class PartInputVo {
|
|||
/**
|
||||
* 入库日期
|
||||
*/
|
||||
@Excel(name = "入库时间", width = 10.0, orderNum = "4")
|
||||
private String inputDay;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注", width = 10.0, orderNum = "5")
|
||||
private String remark;
|
||||
/**
|
||||
* 单价是否录入
|
||||
*/
|
||||
@Excel(name = "备注", width = 10.0, orderNum = "6",dict = "isFlag=0_否,1_是")
|
||||
private String isFlag;
|
||||
|
||||
/**
|
||||
|
|
@ -53,10 +61,12 @@ public class PartInputVo {
|
|||
/**
|
||||
* 总金额
|
||||
*/
|
||||
@Excel(name = "成本价格", width = 10.0, orderNum = "3")
|
||||
private String allPrice;
|
||||
/**
|
||||
* 入库数量
|
||||
*/
|
||||
@Excel(name = "入库数量", width = 10.0, orderNum = "2")
|
||||
private int inputNum;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -68,4 +68,11 @@ public interface PartApplyMapper {
|
|||
* @param paTypeVo
|
||||
*/
|
||||
void updatePaTypeVoById(PaTypeVo paTypeVo);
|
||||
|
||||
/**
|
||||
* 出库明细
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<String> getInfoMsg(PartApplyAppVo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.gzgqj.business.bases.service;
|
||||
|
||||
import com.bonus.gzgqj.business.app.entity.PartApplyAppVo;
|
||||
import com.bonus.gzgqj.business.app.entity.PartApplyDetailAppVo;
|
||||
import com.bonus.gzgqj.manager.webResult.ServerResponse;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
|
@ -47,4 +48,11 @@ public interface PartApplyService {
|
|||
* @return
|
||||
*/
|
||||
ServerResponse partOutInfo(PartApplyAppVo data);
|
||||
|
||||
/**
|
||||
* 分页查询详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<PartApplyDetailAppVo> getPartDetailsList(PartApplyAppVo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ public class PartApplyServiceImpl implements PartApplyService{
|
|||
public ServerResponse getPartDetails(PartApplyAppVo data) {
|
||||
try{
|
||||
PartApplyAppVo vo=mapper.getPartDetails(data);
|
||||
List<String> info=mapper.getInfoMsg(data);
|
||||
String infoMsg = String.join(",", info);
|
||||
vo.setInfoMsg(infoMsg);
|
||||
//图片转换
|
||||
String bast641=transBast64(vo.getLyUrl());
|
||||
String bast642=transBast64(vo.getCkUrl());
|
||||
|
|
@ -78,8 +81,6 @@ public class PartApplyServiceImpl implements PartApplyService{
|
|||
vo.setZdUrl(bast644);
|
||||
List<FileUploadVo> flieList=uploadService.getFileList(data.getId(),"t_part_apply",null);
|
||||
vo.setFileList(flieList);
|
||||
List<PartApplyDetailAppVo> details=mapper.getDetailsList(data);
|
||||
vo.setDetailsList(details);
|
||||
return ServerResponse.createSuccess(vo);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
|
|
@ -87,6 +88,22 @@ public class PartApplyServiceImpl implements PartApplyService{
|
|||
return ServerResponse.createSuccess(new PartApplyAppVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询申请记录详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PartApplyDetailAppVo> getPartDetailsList(PartApplyAppVo data) {
|
||||
try{
|
||||
List<PartApplyDetailAppVo> details=mapper.getDetailsList(data);
|
||||
return details;
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return new ArrayList<PartApplyDetailAppVo>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核 数据
|
||||
* @param data
|
||||
|
|
@ -204,6 +221,9 @@ public class PartApplyServiceImpl implements PartApplyService{
|
|||
|
||||
public String transBast64(String url){
|
||||
try{
|
||||
if(StringHelper.isEmpty(url)){
|
||||
return "";
|
||||
}
|
||||
Path path = Paths.get(url);
|
||||
byte[] fileBytes = Files.readAllBytes(path);
|
||||
return Base64.getEncoder().encodeToString(fileBytes);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.gzgqj.business.bases.service;
|
||||
|
||||
import com.bonus.gzgqj.business.bases.entity.PaTypeVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartBackDetailsVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartBackVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.UserPatypeInfo;
|
||||
import com.bonus.gzgqj.manager.webResult.ServerResponse;
|
||||
|
|
@ -43,4 +44,11 @@ public interface PartBackService {
|
|||
List<PartBackVo> findByPage(PartBackVo data);
|
||||
|
||||
ServerResponse getInfoDetails(PartBackVo data);
|
||||
|
||||
/**
|
||||
* 查询 详情分页
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<PartBackDetailsVo> getInfoDetailsList(PartBackVo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,21 @@ public class PartBackServiceImpl implements PartBackService {
|
|||
}
|
||||
return ServerResponse.createSuccess(new PartBackVo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询详情数据
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PartBackDetailsVo> getInfoDetailsList(PartBackVo data) {
|
||||
try{
|
||||
List<PartBackDetailsVo> detailList=mapper.getInfoDetailList(data);
|
||||
return detailList;
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return new ArrayList<PartBackDetailsVo>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getUserList(UserPatypeInfo data) {
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ public class ExportController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 来源,明细导出
|
||||
* @param request
|
||||
|
|
@ -351,16 +352,28 @@ public class ExportController {
|
|||
outputStream.close();
|
||||
workbook.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 文件统一下载
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -81,6 +81,12 @@
|
|||
from pa_type
|
||||
where id=#{id}
|
||||
</select>
|
||||
<select id="getInfoMsg" resultType="java.lang.String">
|
||||
select CONCAT(part_name,":",SUM(apply_num)) detail
|
||||
from t_part_apply_details
|
||||
where apply_id=#{id}
|
||||
GROUP BY part_name
|
||||
</select>
|
||||
|
||||
<update id="updatePaTypeVoById">
|
||||
update pa_type set num=#{num},ck_num=#{ckNum} where id=#{id}
|
||||
|
|
|
|||
Loading…
Reference in New Issue