添加标协会员联系人接口

This commit is contained in:
zhangqinlin
2021-11-04 17:03:42 +08:00
parent b2341d1a0b
commit 9cd758a531
11 changed files with 24 additions and 647 deletions
@@ -1,20 +0,0 @@
//package com.jero.mail.commont;
//
//import lombok.Data;
//
//import java.util.Date;
//
///**
// * @author zql
// * @date 2021/10/29 10:41
// */
//@Data
//public class BatOrder {
// private String id;
// private String addressName;
// private String addressPhone;
// private String address;
// private String tracking_number;
// private String filePath;
// private Date mileTime;
//}
@@ -1,17 +0,0 @@
//package com.jero.mail.commont;
//
//import lombok.Data;
//
///**
// * @author zql
// * @date 2021/10/29 10:44
// */
//@Data
//public class HospitalInformation {
// private String hospitalName;
// private String phoneNumber;
// private String province;
// private String city;
// private String county;
// private String area;
//}
@@ -1,481 +0,0 @@
//package com.jero.mail.commont;
//
//import java.awt.*;
//import java.awt.image.BufferedImage;
//import java.io.*;
//import java.util.Date;
//import javax.imageio.ImageIO;
//import cn.hutool.core.date.DateUtil;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.io.FileUtils;
//import com.sun.image.codec.jpeg.JPEGCodec;
//import com.sun.image.codec.jpeg.JPEGEncodeParam;
//import com.sun.image.codec.jpeg.JPEGImageEncoder;
//import org.springframework.util.ResourceUtils;
//
//
///**
// * @author zql
// * @date 2021/10/29 10:31
// */
//public class Print {
//
// /**
// * 生成电子面单图片工具
// *
// * @author chunge
// * @version 1.0
// * @time 2021/08/01
// */
// @Slf4j
// public static class EMSGenerateUtil {
//
// //图片的宽度
// public static final int IMG_WIDTH = 799;
//
// //图片的宽度
// public static final int IMG_HEIGHT = 1199;
//
// //LOGO的宽度
// public static final int LOGO_WIDTH = 220;
// //LOGO高度
// public static final int LOGO_HEIGHT = 70;
// public static BufferedImage image;
//
// public static void createImage(String fileLocation) {
// FileOutputStream fos = null;
// BufferedOutputStream bos = null;
// try {
// fos = new FileOutputStream(fileLocation);
// bos = new BufferedOutputStream(fos);
// JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(bos);
// encoder.encode(image);
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// try {
// if (bos != null) bos.close();
// if (fos != null) fos.close();
// } catch (Exception e2) {
// e2.printStackTrace();
// }
// }
// }
//
//
// /**
// * 插入图片 自定义图片的宽高
// *
// * @param imgPath 插入图片的路径
// * @param imgWidth 设置图片的宽度
// * @param imgHeight 设置图片的高度
// * @param isCompress 是否按输入的宽高定义图片的尺寸,只有为true时 输入的宽度和高度才起作用<br/>
// * 为false时输入的宽高不起作用,按输入图片的默认尺寸
// * @return
// * @throws Exception
// */
// private static Image insertImage(String imgPath, int imgWidth, int imgHeight, boolean isCompress) throws Exception {
// File fileimage = new File(imgPath);
// Image src = ImageIO.read(fileimage);
// if (isCompress) {
// Image image = src.getScaledInstance(imgWidth, imgHeight, Image.SCALE_SMOOTH);
// return image;
// }
// return src;
// }
//
// /**
// * 生成
// */
// public static boolean generateOrder(String orderPath, BatOrder orderParam, HospitalInformation hospitalInformation, boolean isCompress, int imgWidth, int imgHeidht) {
// if (null == orderParam)
// return false;
// String picPath = orderPath;
// int startHeight = 0; //表格的起始高度
// int startWidth = 0; //表格的起始宽度
// try {
// image = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_INT_RGB);
// Graphics2D g = image.createGraphics();
//
// //以运单号为名称创建存放订单的目录
// File mk = new File(picPath + orderParam.getTracking_number());
// if (mk.exists()) {
// FileUtils.deleteDirectory(mk);
// }
// FileUtils.forceMkdir(mk);
//
// //设置背景色为白色
// g.setColor(Color.WHITE);
// //设置颜色区域大小
// g.fillRect(0, 0, IMG_WIDTH, IMG_HEIGHT);
//
// /*
// * 绘制表格 填充内容
// * */
// //表格线条的颜色
// g.setColor(Color.BLACK);
// //边框加粗
// g.setStroke(new BasicStroke(2.0f));
// //消除文本出现锯齿现象
// g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
//
// //设置虚线条
// Stroke bs = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, new float[]{16, 4}, 0);
// g.setStroke(bs);
//
// //表格的四个边框
// g.drawLine(startWidth + 16, startHeight + 16, startWidth + 783, startHeight + 16); //上边框
// g.drawLine(startWidth + 16, startHeight + 16, startWidth + 16, startHeight + 1183); //左边框
// g.drawLine(startWidth + 16, startHeight + 1183, startWidth + 783, startHeight + 1183); //下边框
// g.drawLine(startWidth + 783, startHeight + 16, startWidth + 783, startHeight + 1183); //右边框
//
// //分割线左边
// //标准快递
// Font fontSfTyp = new Font("黑体", Font.BOLD, 45);//Font.BOLD(加粗)
// g.setFont(fontSfTyp);
// g.drawString("标准快递", startWidth + 78, startHeight + 120);
//
// Font fontSfTyp2 = new Font("黑体", Font.BOLD, 16);//Font.BOLD(加粗)
// g.setFont(fontSfTyp2);
// g.drawString("时间:" + DateUtil.format(orderParam.getMileTime(), "yyyy-MM-dd HH:mm:ss"), startWidth + 75, startHeight + 145);
//
// //第一行竖 分割线
// g.drawLine(startWidth + 336, startHeight + 16, startWidth + 336, startHeight + 176); //右边框
//
// //分割线右边
// //生成code128a 条码
// SFBarCodeGenerateUtil.generateBarCode128_a(orderParam.getTracking_number(), //运单号
// picPath + orderParam.getTracking_number() + ".png", //图片名称
// 440, //图片宽度
// 100);
// //导入条码图片
// Image sfBarImg = insertImage(picPath + orderParam.getTracking_number() + ".png", 0, 0, false);
// g.drawImage(sfBarImg, startWidth + 340, startHeight + 32, null);
// g.drawString(orderParam.getTracking_number(), startWidth + 500, startHeight + 150);
//
// //绘制表格内容 第1行
// g.drawLine(startWidth + 16, startHeight + 176, startWidth + 783, startHeight + 176);
//
// //绘制表格内容 第2行
// g.drawLine(startWidth + 16, startHeight + 248, startWidth + 783, startHeight + 248);
// g.setFont(fontSfTyp);
// g.drawString(orderParam.getFilePath(), startWidth + 100, startHeight + 220);
//
// Font fontSfTyp3 = new Font("黑体", Font.BOLD, 28);
// g.setFont(fontSfTyp3);
// //收:
// g.drawString("收:" + orderParam.getAddressName() + " " + orderParam.getAddressPhone(), startWidth + 18, startHeight + 280);
// if (orderParam.getAddress().length() > 22) {
// g.drawString(" " + orderParam.getAddress().substring(0, 22), startWidth + 18, startHeight + 310);
// g.drawString(" " + orderParam.getAddress().substring(22, orderParam.getAddress().length()), startWidth + 18, startHeight + 340);
// } else {
// g.drawString(" " + orderParam.getAddress().substring(0, orderParam.getAddress().length()), startWidth + 18, startHeight + 310);
// }
//
// //绘制表格内容 第3行
// g.drawLine(startWidth + 16, startHeight + 408, startWidth + 783, startHeight + 408);
// //寄
// Font fontSfTyp4 = new Font("黑体", Font.PLAIN, 20);//Font.PLAIN(普通)
// g.setFont(fontSfTyp4);
//
// //绘制表格内容 第4行
// g.drawLine(startWidth + 16, startHeight + 472, startWidth + 783, startHeight + 472);
// g.drawString("寄:" + hospitalInformation.getHospitalName() + " " + hospitalInformation.getPhoneNumber(), startWidth + 18, startHeight + 430);
// String address = hospitalInformation.getProvince() + hospitalInformation.getCity() + hospitalInformation.getCounty() + hospitalInformation.getArea();
// if (address.length() > 30) {
// g.drawString(" " + address.substring(0, 30), startWidth + 18, startHeight + 450);
// g.drawString(" " + address.substring(30, address.length()), startWidth + 18, startHeight + 470);
// } else {
// g.drawString(" " + address.substring(0, address.length()), startWidth + 18, startHeight + 450);
// }
//
// g.drawString("付款方式:", startWidth + 18, startHeight + 500);
// g.drawString("计费重量(KG):", startWidth + 18, startHeight + 530);
// g.drawString("保价金额:", startWidth + 18, startHeight + 560);
//
// //第5行竖 分割线
// g.drawLine(startWidth + 464, startHeight + 472, startWidth + 464, startHeight + 583); //右边框
//
// g.drawString("收件人\\代收人:", startWidth + 468, startHeight + 495);
// g.drawString("签收时间 年 月 日 时", startWidth + 468, startHeight + 530);
// Font fontSfTyp5 = new Font("黑体", Font.PLAIN, 16);//Font.PLAIN(普通)
// g.setFont(fontSfTyp5);
// g.drawString("快件送达收货人地址:经收件人或收件人允", startWidth + 468, startHeight + 560);
// g.drawString("许的代收人签字,视为送达", startWidth + 468, startHeight + 580);
//
// //绘制表格内容 第5行
// g.drawLine(startWidth + 16, startHeight + 583, startWidth + 783, startHeight + 583);
//
// g.setFont(fontSfTyp4);
// g.drawString("件数: 重量(KG", startWidth + 18, startHeight + 600);
// g.drawString("配货信息:物品", startWidth + 18, startHeight + 620);
//
// //绘制表格内容 第5行
// g.drawLine(startWidth + 16, startHeight + 719, startWidth + 783, startHeight + 719);
//
// g.drawString("配货信息:物品", startWidth + 18, startHeight + 620);
//
// g.drawLine(startWidth + 16, startHeight + 735, startWidth + 783, startHeight + 735);
//
// //分割线右边
// //生成code128a 条码
// SFBarCodeGenerateUtil.generateBarCode128_a(orderParam.getTracking_number(), //运单号
// picPath + orderParam.getTracking_number() + ".png", //图片名称
// 440, //图片宽度
// 60);
// //导入条码图片
// Image sfBarImg2 = insertImage(picPath + orderParam.getTracking_number() + ".png", 0, 0, false);
// g.drawImage(sfBarImg2, startWidth + 20, startHeight + 750, null);
// g.drawString(orderParam.getTracking_number(), startWidth + 180, startHeight + 830);
//
// //插入Logo
// //从springboot资源目录获取获取logo图片地址:
// String logoPath = ResourceUtils.getFile("classpath:ems\\ems.png").getPath();
// Image sublogoImg = insertImage(logoPath, LOGO_WIDTH, LOGO_HEIGHT, true);
// g.drawImage(sublogoImg, startWidth + 480, startHeight + 750, null);
//
// g.drawLine(startWidth + 16, startHeight + 855, startWidth + 783, startHeight + 855);
//
// g.drawString("收:" + orderParam.getAddressName() + " " + orderParam.getAddressPhone(), startWidth + 18, startHeight + 880);
// if (orderParam.getAddress().length() > 20) {
// g.drawString(" " + orderParam.getAddress().substring(0, 20), startWidth + 18, startHeight + 900);
// g.drawString(" " + orderParam.getAddress().substring(20, orderParam.getAddress().length()), startWidth + 18, startHeight + 920);
// } else {
// g.drawString(" " + orderParam.getAddress().substring(0, orderParam.getAddress().length()), startWidth + 18, startHeight + 900);
// }
// //竖线
// g.drawLine(startWidth + 464, startHeight + 855, startWidth + 464, startHeight + 991);
//
// g.drawString("寄:" + hospitalInformation.getHospitalName(), startWidth + 468, startHeight + 880);
// g.drawString(" " + hospitalInformation.getPhoneNumber(), startWidth + 468, startHeight + 900);
// if (address.length() > 14) {
// g.drawString(" " + address.substring(0, 14), startWidth + 468, startHeight + 920);
// g.drawString(" " + address.substring(14, address.length()), startWidth + 468, startHeight + 940);
// } else {
// g.drawString(" " + address.substring(0, address.length()), startWidth + 468, startHeight + 920);
// }
//
// g.drawLine(startWidth + 16, startHeight + 991, startWidth + 783, startHeight + 991);
//
// g.drawString("备注:", startWidth + 18, startHeight + 1020);
//
// g.drawLine(startWidth + 16, startHeight + 1127, startWidth + 783, startHeight + 1127);
//
// g.drawString("网址:www.ems.com.cn 客服电话:11183", startWidth + 45, startHeight + 1160);
//
// g.drawLine(startWidth + 559, startHeight + 1127, startWidth + 559, startHeight + 1183);
//
// g.drawString("L", startWidth + 750, startHeight + 1170);
//
// g.dispose();
// File sfbarFile = new File(picPath + orderParam.getId() + ".jpg");
// if (sfbarFile.exists() && sfbarFile.isFile()) {
// sfbarFile.delete();
// }
// //生成订单图片
// createImage(picPath + orderParam.getId() + ".jpg");
// if (isCompress) {
// compressImg(picPath + orderParam.getId() + ".jpg", imgWidth, imgHeidht);
// }
// log.info("订单生成成功. " + picPath + orderParam.getId() + ".jpg");
// return true;
// } catch (Exception e) {
// e.printStackTrace();
// }
// return false;
// }
//
//
// /**
// * 水平翻转图像 顺时针旋转90度、左右翻转
// *
// * @param bi 目标图像
// * @return
// */
// private static BufferedImage rotate90DX(BufferedImage bi) {
// int width = bi.getWidth();
// int height = bi.getHeight();
//
// BufferedImage biFlip = new BufferedImage(height, width, bi.getType());
//
// for (int i = 0; i < width; i++)
// for (int j = 0; j < height; j++)
// biFlip.setRGB(height - 1 - j, width - 1 - i, bi.getRGB(i, j));
//
// return biFlip;
// }
//
//
// /**
// * 水平翻转图像 逆时针旋转90度、左右翻转
// *
// * @param bi 目标图像
// * @return
// */
// private static BufferedImage rotate90SX(BufferedImage bi) {
// int width = bi.getWidth();
// int height = bi.getHeight();
//
// BufferedImage biFlip = new BufferedImage(height, width, bi.getType());
//
// for (int i = 0; i < width; i++)
// for (int j = 0; j < height; j++)
// biFlip.setRGB(j, i, bi.getRGB(i, j));
//
// return biFlip;
// }
//
// /**
// * 根据规定尺寸压缩图片
// *
// * @param imgPath 图片路径
// * @param width 图片宽度
// * @param height 图片高度
// */
// private static void compressImg(String imgPath, int width, int height) {
// /**
// * 设置条码图片的尺寸
// * */
// BufferedInputStream bis = null;
// BufferedOutputStream out = null;
// FileOutputStream fis = null;
// try {
// File sfFile = new File(imgPath);
// if (sfFile.isFile() && sfFile.exists()) {
// //读取图片
// bis = new BufferedInputStream(new FileInputStream(imgPath));
// //转换成图片对象
// Image bi = ImageIO.read(bis).getScaledInstance(width, height, Image.SCALE_SMOOTH);
// //构建图片流 设置图片宽和高
// BufferedImage tag = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
// //绘制改变尺寸后的图
// tag.getGraphics().drawImage(bi, 0, 0, width, height, null);
// //保存图片
// fis = new FileOutputStream(imgPath);
// JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(fis);
// JPEGEncodeParam jep = JPEGCodec.getDefaultJPEGEncodeParam(tag);
// //设置压缩图片质量
// jep.setQuality(3f, true);
// encoder.encode(tag, jep);
// }
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// try {
// if (fis != null) fis.close();
// if (out != null) out.close();
// if (bis != null) bis.close();
// } catch (Exception e2) {
// e2.printStackTrace();
// }
// }
// }
//
// //创建目录
// private static boolean createDir(String destDirName) {
// try {
// File file = new File(destDirName);
// if (destDirName.endsWith(File.separator))
// destDirName += File.separator;
// if (file.mkdir())
// return true;
// } catch (Exception e) {
// e.printStackTrace();
// }
// return false;
// }
//
// //删除目录
// public static boolean removeDir(File dir) {
// File[] files = dir.listFiles();
// for (File file : files) {
// if (file.isDirectory()) {
// return removeDir(file);
// } else {
// return file.delete();
// }
// }
// return dir.delete();
// }
//
// //删除目录
// public static boolean deleteMk(String dirPath) {
// File dirFile = new File(dirPath);
// if (dirFile.isDirectory()) {
// File[] files = dirFile.listFiles();
// for (int i = 0; i < files.length; i++) {
// files[i].delete();
// }
// }
// return dirFile.delete();
// }
//
// /**
// * 把文件转换为byte[]
// *
// * @param filePath 文件路径
// */
// public static byte[] getFileBytes(String filePath) {
// byte[] buffer = null;
// FileInputStream fis = null;
// ByteArrayOutputStream bos = null;
// try {
// File file = new File(filePath);
// fis = new FileInputStream(file);
// bos = new ByteArrayOutputStream(1000);
// byte[] b = new byte[1000];
// int n;
// while ((n = fis.read(b)) != -1) {
// bos.write(b, 0, n);
// }
// buffer = bos.toByteArray();
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// } finally {
// try {
// if (bos != null) {
// bos.close();
// }
// if (fis != null) {
// fis.close();
// }
// } catch (Exception e2) {
// e2.printStackTrace();
// }
// }
// return buffer;
// }
//
//
// }
// public static void main(String[] args) {
// BatOrder param = new BatOrder();
//
// param.setTracking_number("883987638272");
// param.setTracking_number("883987638272");
// param.setFilePath("310-新A-沙区02-沙区揽投-*");
// param.setAddressName("春哥");
// param.setAddressPhone("15261800000");
// param.setAddress("重庆市重庆市南岸区南岸区测试大道重庆交通大学测试小区1栋00单元00");
//
// HospitalInformation hospitalInformation = new HospitalInformation();
// hospitalInformation.setHospitalName("江苏大学");
// hospitalInformation.setPhoneNumber("025-91918230");
// hospitalInformation.setProvince("江苏");
// hospitalInformation.setCity("南京市市");
// hospitalInformation.setCounty("栖霞区区");
// hospitalInformation.setArea("南京仙林大学城199号");
//
// EMSGenerateUtil.generateOrder(
// "D:\\12345\\",
// param,
// hospitalInformation,
// false,
// 600,
// 400);
// }
//
//
//}
@@ -1,51 +0,0 @@
//package com.jero.mail.commont;
//
//import com.google.zxing.BarcodeFormat;
//import com.google.zxing.EncodeHintType;
//import com.google.zxing.MultiFormatWriter;
//import com.google.zxing.WriterException;
//import com.google.zxing.client.j2se.MatrixToImageWriter;
//import com.google.zxing.common.BitMatrix;
//import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
//
//import java.io.BufferedOutputStream;
//import java.io.File;
//import java.io.FileOutputStream;
//import java.io.IOException;
//import java.util.Hashtable;
//
///**
// * @author zql
// * @date 2021/10/29 10:57
// */
//public class SFBarCodeGenerateUtil {
// /**
// * 快递单号 wayBillNo
// *
// * @param generatePathName 指定文件名
// * @param wayBillNo 写入的内容
// * @param width 尺寸宽
// * @param height 尺寸高
// */
// public static void generateBarCode128_a(String wayBillNo, String generatePathName, int width, int height) {
// Hashtable<EncodeHintType, Object> hints = new Hashtable<EncodeHintType, Object>();
// // 字符集
// hints.put(EncodeHintType.CHARACTER_SET, "GBK");// Constant.CHARACTER);
// // 容错质量
// hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M);
// try {
// // 尺寸
// BitMatrix bitMatrix;
// bitMatrix = new MultiFormatWriter().encode(wayBillNo, BarcodeFormat.CODE_128, width, height, hints);
// BufferedOutputStream buffer = null;
// buffer = new BufferedOutputStream(new FileOutputStream(generatePathName));
// // ok
// MatrixToImageWriter.writeToStream(bitMatrix, "png", new FileOutputStream(new File(generatePathName)));
// buffer.close();
// } catch (WriterException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
//}
@@ -26,12 +26,8 @@ import com.jero.common.system.base.controller.JeroController;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.util.PasswordUtil;
import com.jero.common.util.oConvertUtils;
//import com.jero.mail.commont.BatOrder;
//import com.jero.mail.commont.HospitalInformation;
//import com.jero.mail.commont.Print;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.mail.commont.constant;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.entity.PayMailBillProject;
@@ -600,41 +596,17 @@ public class PayMailBillController extends JeroController<PayMailBill, IPayMailB
return Result.OK();
}
// /**
// * 票据邮寄打印
// *
// */
// @ApiOperation(value="票据邮寄打印", notes="票据邮寄打印")
// @Transactional
// @PostMapping(value = "/print")
// public Result<?> print(@RequestParam(name="id") String id) {
// PayMailBill payMailBill = payMailBillService.getById(id);
// BatOrder param = new BatOrder();
// param.setId("EMS票单");
// param.setMileTime(payMailBill.getSendDate());
// param.setTracking_number(payMailBill.getPostNo());
// param.setFilePath("310-新A-沙区02-沙区揽投-*");
// param.setAddressName(payMailBill.getContactName());
// param.setAddressPhone(PasswordUtil.decrypt(payMailBill.getContactMobile()));
// param.setAddress(payMailBill.getContactAddress());
//
// HospitalInformation hospitalInformation = new HospitalInformation();
// hospitalInformation.setHospitalName(payMailBill.getMailer());
// hospitalInformation.setPhoneNumber(PasswordUtil.decrypt(payMailBill.getContactMobile()));
// hospitalInformation.setProvince("江苏");
// hospitalInformation.setCity("南京市市");
// hospitalInformation.setCounty("栖霞区区");
// hospitalInformation.setArea("南京仙林大学城199号");
//
// Print.EMSGenerateUtil.generateOrder(
// "D:\\",
// param,
// hospitalInformation,
// false,
// 600,
// 400);
// return Result.OK();
// }
/**
* 票据邮寄打印
* 标协会员系统邮寄无法存联系人信息
*/
@ApiOperation(value="标协会员打印获取联系人信息", notes="标协会员打印获取联系人信息")
@Transactional
@PostMapping(value = "/print")
public Result<?> print(@RequestParam(name="id") String id){
PayContactsManagement payContactsManagement=payMailBillService.print(id);
return Result.OK(payContactsManagement);
}
/**
@@ -8,7 +8,6 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.jero.common.api.vo.Result;
import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.common.ProjectCommon;
import com.jero.common.dto.SendMessageDTO;
import com.jero.common.enums.CompanyMessageEnums;
import com.jero.common.enums.ManagementMessageEnums;
@@ -20,7 +19,6 @@ import com.jero.common.util.PasswordUtil;
import com.jero.common.util.oConvertUtils;
import com.jero.contract.entity.PayIncomeContract;
import com.jero.contract.service.IPayIncomeContractService;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.entity.PayMailContracrList;
import com.jero.mail.entity.PayMailContract;
import com.jero.mail.service.IPayMailContractService;
@@ -249,20 +247,7 @@ public class PayMailContractController extends JeroController<PayMailContract, I
}
return Result.OK("操作成功!");
}
//
// /**
// * 票据邮寄打印
// *
// */
// @ApiOperation(value="合同邮寄打印", notes="合同邮寄打印")
// @Transactional
// @PostMapping(value = "/print")
// public Result<?> print(@RequestParam(name="id") String id) {
// PayMailContract payMailContract = payMailContractService.getById(id);
// HashMap<String, PayMailContract> hashMap = new HashMap<>();
// hashMap.put("payMailBill",payMailContract);
// return Result.OK(hashMap);
// }
/**
* 导出excel
*/
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.company.entity.PayContactsManagement;
import com.jero.mail.PayMailBillVO;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.entity.PayMailBillSearch;
@@ -70,4 +71,6 @@ public interface PayMailBillMapper extends BaseMapper<PayMailBill> {
IPage<PayMailBill> pageLists(Page<PayMailBill> page,@Param("payMailBillSearch") PayMailBillSearch payMailBillSearch);
PayContactsManagement print(@Param("id") String id);
}
@@ -81,28 +81,8 @@
group by pmb.id ORDER BY post_status ASC,create_time DESC
</select>
<select id="print" resultType="com.jero.mail.entity.PayMailBill">
SELECT pmb.id,
project_name as projectName,
bill_no AS billNo,
pmb.invoice_amount as invoiceAmount,
principal_name as principalName,
charge_company_name as chargeCompanyName,
contact_name as contactName,
contact_mobile as contactMobile,
post_status as postStatus,
send_method as sendMethod ,
pmbp.project_id as projectId,
create_time,
mailer,
post_no as postNo,
send_date as sendDate,
pmb.remark
from pay_mail_bill pmb left join pay_mail_bill_project pmbp on(pmb.id=pmbp.bill_id) where pmb.id=#{id}
${ew.customSqlSegment}
group by pmb.id
ORDER BY post_status ASC,create_time DESC
<select id="print" resultType="com.jero.company.entity.PayContactsManagement">
select pcm.* from pay_mail_bill pmb left join pay_company_management pcm on(pmb.contact_id=pcm.id) where pmb.id=#{id}
</select>
<select id="getCompanyCommonProject" resultType="java.lang.String"></select>
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jero.common.api.vo.Result;
import com.jero.company.entity.PayContactsManagement;
import com.jero.mail.PayMailBillVO;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.entity.PayMailBillSearch;
@@ -85,5 +86,6 @@ public interface IPayMailBillService extends IService<PayMailBill> {
IPage<PayMailBill> pageList(Page<PayMailBill> page, QueryWrapper<PayMailBill> queryWrapper);
PayContactsManagement print(String id);
}
@@ -482,6 +482,11 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
return payMailBillMapper.pageList(page,queryWrapper);
}
@Override
public PayContactsManagement print(String id) {
return payMailBillMapper.print(id);
}
//校验不同项目是否属于同一个公司,开票金额是否大于当前未开票金额,企业名称是否审核
private String checkCompanyProject(List<PayMailBillProject> bmpList) {
@@ -1085,7 +1085,6 @@
) pwgs
ON (pwg.id=pwgs.working_group_id)
left JOIN sys_user su on(pwg.principal_id_a=su.id) left join sys_depart sd on(su.org_code=sd.org_code)
<where>
<if test="idList != null and idList != ''">
pwg.principal_id_a in