md
This commit is contained in:
parent
bc23375fe9
commit
058fac872b
@ -1,17 +0,0 @@
|
||||
package com.xdadan.erp.oms2c.service.print;
|
||||
|
||||
import com.xdadan.erp.oms.common.core.domain.AjaxResult;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IXddTplPrint {
|
||||
|
||||
public AjaxResult genPDF(Map<String, Object> order, OutputStream os) throws Exception;
|
||||
|
||||
public AjaxResult genPNG(Map<String, Object> order, OutputStream os) throws Exception;
|
||||
|
||||
|
||||
public String genPNGBase64(Map<String, Object> order) throws Exception;
|
||||
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
package com.xdadan.erp.oms2c.service.print;
|
||||
|
||||
import com.itextpdf.text.Element;
|
||||
|
||||
/**
|
||||
* 打印单元信息
|
||||
*/
|
||||
public class ItemCell {
|
||||
|
||||
String name;
|
||||
|
||||
String value;
|
||||
|
||||
int fontSize;
|
||||
|
||||
boolean isBold;
|
||||
|
||||
// Element.ALIGN_CENTER
|
||||
int alignment;
|
||||
|
||||
String objType;
|
||||
|
||||
public ItemCell(String name, String value, int fontSize, boolean isBold, int alignment, String objType) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.fontSize = fontSize;
|
||||
this.isBold = isBold;
|
||||
this.alignment = alignment;
|
||||
this.objType = objType;
|
||||
}
|
||||
|
||||
public ItemCell(String name, String value, int fontSize, boolean isBold, String objType) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.fontSize = fontSize;
|
||||
this.isBold = false;
|
||||
this.alignment = Element.ALIGN_LEFT;
|
||||
this.objType = objType;
|
||||
}
|
||||
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getFontSize() {
|
||||
return fontSize;
|
||||
}
|
||||
|
||||
public void setFontSize(int fontSize) {
|
||||
this.fontSize = fontSize;
|
||||
}
|
||||
|
||||
public boolean isBold() {
|
||||
return isBold;
|
||||
}
|
||||
|
||||
public void setBold(boolean bold) {
|
||||
isBold = bold;
|
||||
}
|
||||
|
||||
public String getObjType() {
|
||||
return objType;
|
||||
}
|
||||
|
||||
public void setObjType(String objType) {
|
||||
this.objType = objType;
|
||||
}
|
||||
|
||||
public int getAlignment() {
|
||||
return alignment;
|
||||
}
|
||||
|
||||
public void setAlignment(int alignment) {
|
||||
this.alignment = alignment;
|
||||
}
|
||||
}
|
||||
@ -1,243 +0,0 @@
|
||||
package com.xdadan.erp.oms2c.service.print;
|
||||
|
||||
import com.itextpdf.text.*;
|
||||
import com.itextpdf.text.pdf.*;
|
||||
import com.itextpdf.xmp.impl.Base64;
|
||||
import com.xdadan.erp.oms2c.utils.BarcodeZxingUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class XddBasePrint implements IXddTplPrint {
|
||||
/**
|
||||
* 抽象类 , 子类必须配置
|
||||
* @param orderMap
|
||||
* @return
|
||||
*/
|
||||
protected abstract ArrayList<ItemCell> getItemCelconfig(Map<String, Object> orderMap);
|
||||
|
||||
protected void genPdfByTpl(ArrayList<ItemCell> printItems, InputStream tplInStream, OutputStream pdfOutStream){
|
||||
PdfReader reader;
|
||||
PdfStamper stamper;
|
||||
try {
|
||||
reader = new PdfReader(tplInStream);//读取pdf模板
|
||||
stamper = new PdfStamper(reader, pdfOutStream);
|
||||
//方法二:使用iTextAsian.jar中的字体
|
||||
BaseFont baseFont = BaseFont.createFont("STSong-Light", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
|
||||
// Font font = new Font(baseFont);
|
||||
AcroFields form = stamper.getAcroFields();
|
||||
form.addSubstitutionFont(baseFont);
|
||||
|
||||
for(ItemCell itemCell:printItems){
|
||||
if("Text".equals(itemCell.getObjType())) {
|
||||
addText(stamper, form, itemCell);
|
||||
}
|
||||
else if("BarCode".equals(itemCell.getObjType())) {
|
||||
insertBarCodeImage(stamper, form, itemCell);
|
||||
}
|
||||
}
|
||||
|
||||
stamper.setFormFlattening(true);//如果为false那么生成的PDF文件还能编辑,一定要设为true
|
||||
stamper.close();
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
protected void genPdfByTplBase64(ArrayList<ItemCell> printItems, String tplBase64Data, OutputStream pdfOutStream){
|
||||
PdfReader reader;
|
||||
PdfStamper stamper;
|
||||
try {
|
||||
String tplData = Base64.decode(tplBase64Data);
|
||||
InputStream tplInStream = new ByteArrayInputStream(tplData.getBytes(Charset.forName("UTF-8")));
|
||||
reader = new PdfReader(tplInStream);//读取pdf模板
|
||||
stamper = new PdfStamper(reader, pdfOutStream);
|
||||
//方法二:使用iTextAsian.jar中的字体
|
||||
BaseFont baseFont = BaseFont.createFont("STSong-Light", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
|
||||
// Font font = new Font(baseFont);
|
||||
AcroFields form = stamper.getAcroFields();
|
||||
form.addSubstitutionFont(baseFont);
|
||||
|
||||
for(ItemCell itemCell:printItems){
|
||||
if("Text".equals(itemCell.getObjType())) {
|
||||
addText(stamper, form, itemCell);
|
||||
}
|
||||
else if("BarCode".equals(itemCell.getObjType())) {
|
||||
insertBarCodeImage(stamper, form, itemCell);
|
||||
}
|
||||
}
|
||||
|
||||
stamper.setFormFlattening(true);//如果为false那么生成的PDF文件还能编辑,一定要设为true
|
||||
stamper.close();
|
||||
}
|
||||
catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void insertBarCodeImage(PdfStamper stamper, AcroFields s, ItemCell itemCell)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<AcroFields.FieldPosition> photograph = s.getFieldPositions(itemCell.getName());
|
||||
if(CollectionUtils.isEmpty(photograph)){
|
||||
return;
|
||||
}
|
||||
|
||||
Rectangle rect = photograph.get(0).position;
|
||||
|
||||
float x = rect.getLeft();
|
||||
float y = rect.getBottom();
|
||||
|
||||
// BufferedImage outputImage = BarCode4jUtils.getBarCodeImage(mailNo,(int)rect.getWidth(),(int)rect.getHeight());
|
||||
BufferedImage outputImage = BarcodeZxingUtil.getBarCodeImage(itemCell.getValue(),(int)rect.getWidth()*4,(int)rect.getHeight()*4);
|
||||
// BufferedImage outputImage = BarcodeZxingUtil.getBarCodeImage2(mailNo,(int)rect.getWidth(),(int)rect.getHeight());
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();//io流
|
||||
ImageIO.write(outputImage, "png", baos);//写入流中
|
||||
byte[] bytes = baos.toByteArray();//转换成字节
|
||||
Image image = Image.getInstance(bytes);
|
||||
image.setAbsolutePosition(x,y);
|
||||
// 禁止缩放
|
||||
image.scaleAbsolute(rect.getWidth(), rect.getHeight());
|
||||
PdfContentByte cb = stamper.getOverContent((int)photograph.get(0).page);
|
||||
cb.addImage(image);
|
||||
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void addText(PdfStamper stamper, AcroFields s, ItemCell itemCell) throws IOException, DocumentException {
|
||||
|
||||
if(StringUtils.isEmpty(itemCell.getValue())){
|
||||
return;
|
||||
}
|
||||
// BaseFont bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
|
||||
// BaseFont bf = BaseFont.createFont("/font/simhei.ttf", BaseFont.IDENTITY_H,BaseFont.NOT_EMBEDDED);
|
||||
BaseFont bf = BaseFont.createFont("/font/simsun.ttf", BaseFont.IDENTITY_H,BaseFont.NOT_EMBEDDED);
|
||||
|
||||
Font font = new Font(bf, itemCell.getFontSize(), itemCell.isBold()?Font.BOLD:Font.NORMAL);
|
||||
|
||||
// Font font = new Font("微软雅黑", fontSize,Font.BOLD);
|
||||
//Font font = FontFactory.getFont(FontFactory.COURIER, 20, Font.BOLD, BaseColor.RED);
|
||||
List<AcroFields.FieldPosition> multiLinePosition = s.getFieldPositions(itemCell.getName());
|
||||
if(CollectionUtils.isEmpty(multiLinePosition)){
|
||||
return;
|
||||
}
|
||||
int page = multiLinePosition.get(0).page;
|
||||
Rectangle rectangle = multiLinePosition.get(0).position;
|
||||
float left = rectangle.getLeft();
|
||||
float right = rectangle.getRight();
|
||||
float top = rectangle.getTop();
|
||||
float bottom = rectangle.getBottom();
|
||||
PdfContentByte pdfContentByte = stamper.getOverContent(page);
|
||||
ColumnText columnText = new ColumnText(pdfContentByte);
|
||||
|
||||
Rectangle r = new Rectangle(left, bottom, right, top);
|
||||
columnText.setSimpleColumn(r);
|
||||
|
||||
//FontFactory.getFont(FontFactory.COURIER, 20, Font.BOLD, BaseColor.RED)
|
||||
Chunk chunk = new Chunk(itemCell.getValue());
|
||||
Paragraph paragraph = new Paragraph(itemCell.getFontSize(), chunk);
|
||||
// Paragraph paragraph = new Paragraph(chunk);
|
||||
//paragraph.setSpacingBefore(16);
|
||||
columnText.addText(paragraph);
|
||||
// 设置字体,如果不设置添加的中文将无法显示
|
||||
paragraph.setFont(font);
|
||||
paragraph.setAlignment(itemCell.alignment);
|
||||
columnText.addElement(paragraph);
|
||||
columnText.go();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
//String target = "/Users/zhiyu/Desktop/test/aaa_bin.bmp";
|
||||
String target = "/Users/alan/Downloads/banner_tanex.jpg";
|
||||
File file = new File(target);
|
||||
BufferedImage image = ImageIO.read(file);
|
||||
drawGraphic(0, 0, image);
|
||||
}
|
||||
|
||||
public static void drawGraphic(int start_x, int start_y, BufferedImage image) {
|
||||
int width = image.getWidth();
|
||||
int height = image.getHeight();
|
||||
|
||||
int col = (width - 1) / 8 + 1;
|
||||
|
||||
String str = "";
|
||||
byte[] arrayOfByte = new byte[width * height];
|
||||
|
||||
int h = 0;
|
||||
//int b1 = 0;
|
||||
int arrindex = 0;
|
||||
//int m = 0;
|
||||
|
||||
|
||||
while (h < height) {
|
||||
for (int w = 0; w < width; w++) {
|
||||
arrindex = h * col + w / 8;
|
||||
System.out.println("w:" + w + ", h:" + h);
|
||||
if ((image.getRGB(w, h) & 0xFFFFFF) < 3092271) {
|
||||
int n = arrindex;
|
||||
byte[] arrayOfByte1 = arrayOfByte;
|
||||
|
||||
arrayOfByte1[n] = (byte) (arrayOfByte1[n] | 128 >> w % 8);
|
||||
} else {
|
||||
int n = arrindex;
|
||||
byte[] arrayOfByte1 = arrayOfByte;
|
||||
|
||||
arrayOfByte1[n] = (byte) (arrayOfByte1[n] & (128 >> w % 8 ^ 0xFFFFFFFF));
|
||||
}
|
||||
}
|
||||
++h;
|
||||
//if ((++h - b1) * col >= 1024 || h == height) {
|
||||
// str = bbbb(aaaaaa(arrayOfByte, m, arrindex - m + 1));
|
||||
// m = arrindex + 1;
|
||||
// String str1 = "EG " + col + " " + (h - b1) + " " + start_x + " " + (start_y + b1) + " " + str + "\r\n";
|
||||
//
|
||||
// System.out.println(str1);
|
||||
// //b(str1);
|
||||
// b1 = h;
|
||||
// k++;
|
||||
//}
|
||||
}
|
||||
|
||||
str = toHexString(copy(arrayOfByte, 0, arrindex + 1));
|
||||
System.out.println(str);
|
||||
|
||||
}
|
||||
static String toHexString(byte[] paramArrayOfbyte) {
|
||||
String str = "";
|
||||
for (int i = 0; i < paramArrayOfbyte.length; i++) {
|
||||
String hex = Integer.toHexString(paramArrayOfbyte[i] & 0xFF);
|
||||
if (hex.length() == 1) {
|
||||
hex = '0' + hex;
|
||||
}
|
||||
str = str + hex;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private static byte[] copy(byte[] paramArrayOfbyte, int start, int length) {
|
||||
byte[] arrayOfByte = new byte[length];
|
||||
for (int i = 0; i < length; i++) {
|
||||
arrayOfByte[i] = paramArrayOfbyte[start + i];
|
||||
}
|
||||
return arrayOfByte;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,381 +0,0 @@
|
||||
package com.xdadan.erp.oms2c.service.print;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.rendering.ImageType;
|
||||
import org.apache.pdfbox.rendering.PDFRenderer;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class ZPLConveterUtil {
|
||||
private static int blackLimit = 380;
|
||||
private static int total;
|
||||
private static int widthBytes;
|
||||
/**
|
||||
* 是否压缩 true=压缩 false=不压缩
|
||||
**/
|
||||
private static boolean isCompressHex = true;
|
||||
private static Map<Integer, String> mapCode = new HashMap<Integer, String>();
|
||||
{
|
||||
mapCode.put(1, "G");
|
||||
mapCode.put(2, "H");
|
||||
mapCode.put(3, "I");
|
||||
mapCode.put(4, "J");
|
||||
mapCode.put(5, "K");
|
||||
mapCode.put(6, "L");
|
||||
mapCode.put(7, "M");
|
||||
mapCode.put(8, "N");
|
||||
mapCode.put(9, "O");
|
||||
mapCode.put(10, "P");
|
||||
mapCode.put(11, "Q");
|
||||
mapCode.put(12, "R");
|
||||
mapCode.put(13, "S");
|
||||
mapCode.put(14, "T");
|
||||
mapCode.put(15, "U");
|
||||
mapCode.put(16, "V");
|
||||
mapCode.put(17, "W");
|
||||
mapCode.put(18, "X");
|
||||
mapCode.put(19, "Y");
|
||||
mapCode.put(20, "g");
|
||||
mapCode.put(40, "h");
|
||||
mapCode.put(60, "i");
|
||||
mapCode.put(80, "j");
|
||||
mapCode.put(100, "k");
|
||||
mapCode.put(120, "l");
|
||||
mapCode.put(140, "m");
|
||||
mapCode.put(160, "n");
|
||||
mapCode.put(180, "o");
|
||||
mapCode.put(200, "p");
|
||||
mapCode.put(220, "q");
|
||||
mapCode.put(240, "r");
|
||||
mapCode.put(260, "s");
|
||||
mapCode.put(280, "t");
|
||||
mapCode.put(300, "u");
|
||||
mapCode.put(320, "v");
|
||||
mapCode.put(340, "w");
|
||||
mapCode.put(360, "x");
|
||||
mapCode.put(380, "y");
|
||||
mapCode.put(400, "z");
|
||||
}
|
||||
|
||||
/**
|
||||
* the BufferedImage to String
|
||||
*
|
||||
* @param orginalImage
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private static String createBody(BufferedImage orginalImage) throws IOException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
Graphics2D graphics = orginalImage.createGraphics();
|
||||
graphics.drawImage(orginalImage, 0, 0, null);
|
||||
int height = orginalImage.getHeight();
|
||||
int width = orginalImage.getWidth();
|
||||
int rgb, red, green, blue, index=0;
|
||||
char auxBinaryChar[] = {'0', '0', '0', '0', '0', '0', '0', '0'};
|
||||
widthBytes = width/8;
|
||||
if(width%8>0){
|
||||
widthBytes= (((int)(width/8))+1);
|
||||
} else {
|
||||
widthBytes= width/8;
|
||||
}
|
||||
total = widthBytes*height;
|
||||
for (int h = 0; h<height; h++)
|
||||
{
|
||||
for (int w = 0; w<width; w++)
|
||||
{
|
||||
rgb = orginalImage.getRGB(w, h);
|
||||
red = (rgb >> 16 ) & 0x000000FF;
|
||||
green = (rgb >> 8 ) & 0x000000FF;
|
||||
blue = (rgb) & 0x000000FF;
|
||||
char auxChar = '1';
|
||||
int totalColor = red + green + blue;
|
||||
if(totalColor>blackLimit){
|
||||
auxChar = '0';
|
||||
}
|
||||
auxBinaryChar[index] = auxChar;
|
||||
index++;
|
||||
if(index==8 || w==(width-1)){
|
||||
sb.append(fourByteBinary(new String(auxBinaryChar)));
|
||||
auxBinaryChar = new char[]{'0', '0', '0', '0', '0', '0', '0', '0'};
|
||||
index=0;
|
||||
}
|
||||
}
|
||||
sb.append("\n");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
private static String fourByteBinary(String binaryStr){
|
||||
int decimal = Integer.parseInt(binaryStr,2);
|
||||
if (decimal>15){
|
||||
return Integer.toString(decimal,16).toUpperCase();
|
||||
} else {
|
||||
return "0" + Integer.toString(decimal,16).toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Image to zpl string data.
|
||||
*
|
||||
* @param image
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public String convertFromImg(BufferedImage image) throws IOException {
|
||||
String cuerpo = createBody(image);
|
||||
if (isCompressHex) {
|
||||
cuerpo = encodeHexAscii(cuerpo, 20);
|
||||
}
|
||||
return headDoc() + cuerpo + footDoc();
|
||||
|
||||
}
|
||||
|
||||
private static String encodeHexAscii(String code){
|
||||
int maxlinea = widthBytes * 2;
|
||||
StringBuffer sbCode = new StringBuffer();
|
||||
StringBuffer sbLinea = new StringBuffer();
|
||||
String previousLine = null;
|
||||
int counter = 1;
|
||||
char aux = code.charAt(0);
|
||||
boolean firstChar = false;
|
||||
for(int i = 1; i< code.length(); i++ ){
|
||||
if(firstChar){
|
||||
aux = code.charAt(i);
|
||||
firstChar = false;
|
||||
continue;
|
||||
}
|
||||
if(code.charAt(i)=='\n'){
|
||||
if(counter>=maxlinea && aux=='0'){
|
||||
sbLinea.append(",");
|
||||
} else if(counter>=maxlinea && aux=='F'){
|
||||
sbLinea.append("!");
|
||||
} else if (counter>20){
|
||||
int multi20 = (counter/20)*20;
|
||||
int resto20 = (counter%20);
|
||||
sbLinea.append(mapCode.get(multi20));
|
||||
if(resto20!=0){
|
||||
sbLinea.append(mapCode.get(resto20) + aux);
|
||||
} else {
|
||||
sbLinea.append(aux);
|
||||
}
|
||||
} else {
|
||||
sbLinea.append(mapCode.get(counter) + aux);
|
||||
if(mapCode.get(counter)==null){
|
||||
}
|
||||
}
|
||||
counter = 1;
|
||||
firstChar = true;
|
||||
if(sbLinea.toString().equals(previousLine)){
|
||||
sbCode.append(":");
|
||||
} else {
|
||||
sbCode.append(sbLinea.toString());
|
||||
}
|
||||
previousLine = sbLinea.toString();
|
||||
sbLinea.setLength(0);
|
||||
continue;
|
||||
}
|
||||
if(aux == code.charAt(i)){
|
||||
counter++;
|
||||
} else {
|
||||
if(counter>20){
|
||||
int multi20 = (counter/20)*20;
|
||||
int resto20 = (counter%20);
|
||||
sbLinea.append(mapCode.get(multi20));
|
||||
if(resto20!=0){
|
||||
sbLinea.append(mapCode.get(resto20) + aux);
|
||||
} else {
|
||||
sbLinea.append(aux);
|
||||
}
|
||||
} else {
|
||||
sbLinea.append(mapCode.get(counter) + aux);
|
||||
}
|
||||
counter = 1;
|
||||
aux = code.charAt(i);
|
||||
}
|
||||
}
|
||||
return sbCode.toString();
|
||||
}
|
||||
|
||||
private String encodeHexAscii(String code,int number) {
|
||||
int maxlinea = widthBytes * 2;
|
||||
StringBuffer sbCode = new StringBuffer();
|
||||
StringBuffer sbLinea = new StringBuffer();
|
||||
String previousLine = null;
|
||||
int counter = 1;
|
||||
char aux = code.charAt(0);
|
||||
boolean firstChar = false;
|
||||
for (int i = 1; i < code.length(); i++) {
|
||||
if (firstChar) {
|
||||
aux = code.charAt(i);
|
||||
firstChar = false;
|
||||
continue;
|
||||
}
|
||||
if (code.charAt(i) == '\n') {
|
||||
if (counter >= maxlinea && aux == '0') {
|
||||
sbLinea.append(",");
|
||||
} else if (counter >= maxlinea && aux == 'F') {
|
||||
sbLinea.append("!");
|
||||
} else if (counter > number) {
|
||||
int multi20 = (counter / number) * number;
|
||||
int resto20 = (counter % number);
|
||||
sbLinea.append(mapCode.get(multi20));
|
||||
if (resto20 != 0) {
|
||||
sbLinea.append(mapCode.get(resto20) + aux);
|
||||
} else {
|
||||
sbLinea.append(aux);
|
||||
}
|
||||
} else {
|
||||
sbLinea.append(mapCode.get(counter) + aux);
|
||||
if (mapCode.get(counter) == null) {
|
||||
}
|
||||
}
|
||||
counter = 1;
|
||||
firstChar = true;
|
||||
if (sbLinea.toString().equals(previousLine)) {
|
||||
sbCode.append(":");
|
||||
} else {
|
||||
sbCode.append(sbLinea.toString());
|
||||
}
|
||||
previousLine = sbLinea.toString();
|
||||
sbLinea.setLength(0);
|
||||
continue;
|
||||
}
|
||||
if (aux == code.charAt(i)) {
|
||||
counter++;
|
||||
} else {
|
||||
if (counter > number) {
|
||||
int multi20 = (counter / number) * number;
|
||||
int resto20 = (counter % number);
|
||||
sbLinea.append(mapCode.get(multi20));
|
||||
if (resto20 != 0) {
|
||||
sbLinea.append(mapCode.get(resto20) + aux);
|
||||
} else {
|
||||
sbLinea.append(aux);
|
||||
}
|
||||
} else {
|
||||
sbLinea.append(mapCode.get(counter) + aux);
|
||||
}
|
||||
counter = 1;
|
||||
aux = code.charAt(i);
|
||||
}
|
||||
}
|
||||
return sbCode.toString();
|
||||
}
|
||||
|
||||
private static String headDoc(){
|
||||
String str = "^XA " +
|
||||
"^FO0,0^GFA,"+ total + ","+ total + "," + widthBytes +", ";
|
||||
return str;
|
||||
}
|
||||
|
||||
private static String footDoc(){
|
||||
String str = "^FS"+
|
||||
"^XZ";
|
||||
return str;
|
||||
}
|
||||
|
||||
public void setCompressHex(boolean compressHex) {
|
||||
this.isCompressHex = compressHex;
|
||||
}
|
||||
public void setBlacknessLimitPercentage(int percentage){
|
||||
blackLimit = (percentage * 768 / 100);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* PDF转ZPL格式
|
||||
* @param pdf pdf文件字节数组
|
||||
* @return 返回ZPL格式
|
||||
* @throws IOException
|
||||
*/
|
||||
public static String convertPdfToZpl(byte[] pdf) throws IOException {
|
||||
PDDocument doc = PDDocument.load(pdf);
|
||||
PDFRenderer renderer = new PDFRenderer(doc);
|
||||
BufferedImage orginalImage = renderer.renderImageWithDPI(0, 200);
|
||||
return ZPLConveterUtil.convertImgToZpl(orginalImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* PDF转ZPL格式(压缩会返回用null表示英文字母的字符串)
|
||||
* @param pdfPath pdf文件路径
|
||||
* @return 返回ZPL格式
|
||||
* @throws IOException
|
||||
*/
|
||||
public static String convertPdfToZpl(String pdfPath) throws IOException {
|
||||
PDDocument doc = PDDocument.load(new File(pdfPath));
|
||||
PDFRenderer renderer = new PDFRenderer(doc);
|
||||
BufferedImage orginalImage = renderer.renderImageWithDPI(0, 200);
|
||||
return ZPLConveterUtil.convertImgToZpl(orginalImage);
|
||||
}
|
||||
|
||||
/**
|
||||
* PDF转ZPL格式(压缩不会返回用null表示的字符串,压缩的更彻底一点)
|
||||
* @param pdfPath pdf文件路径
|
||||
* @return 返回ZPL格式
|
||||
*/
|
||||
public static String convertPDFToZPL(String pdfPath) {
|
||||
File sourceFile = new File(pdfPath);
|
||||
PDDocument document = null;
|
||||
try {
|
||||
if (sourceFile.exists()) {
|
||||
document = PDDocument.load(sourceFile);
|
||||
PDFRenderer pdfRenderer = new PDFRenderer(document);
|
||||
int dpi = 203;// use less dpi for to save more space in harddisk. For professional usage you
|
||||
BufferedImage bImage = pdfRenderer.renderImageWithDPI(0, dpi, ImageType.RGB);
|
||||
ZPLConveterUtil zplConveterUtil = new ZPLConveterUtil();
|
||||
String zplStr = zplConveterUtil.convertFromImg(bImage);
|
||||
zplStr = zplStr.replace("\n", "");
|
||||
return zplStr;
|
||||
} else {
|
||||
log.error("generate pdf failed");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("error is {}", e);
|
||||
} finally {
|
||||
try {
|
||||
if (document != null) {
|
||||
document.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("close stram failed,the exception is {}", e);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* PDF转ZPL格式
|
||||
* @param imagePath 图片文件路径
|
||||
* @return 返回ZPL格式
|
||||
* @throws IOException
|
||||
*/
|
||||
public static String convertImgToZpl(String imagePath) throws IOException {
|
||||
BufferedImage orginalImage = ImageIO.read(new File(imagePath));
|
||||
return ZPLConveterUtil.convertImgToZpl(orginalImage);
|
||||
}
|
||||
|
||||
public static String convertImgToZpl(BufferedImage image) throws IOException {
|
||||
String cuerpo = createBody(image);
|
||||
if(isCompressHex)
|
||||
cuerpo = encodeHexAscii(cuerpo);
|
||||
return headDoc() + cuerpo + footDoc();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String pdf = ZPLConveterUtil.convertPdfToZpl("D:\\label.pdf");
|
||||
System.out.println(pdf);
|
||||
|
||||
// String pdf2 = ZPLConveterUtil.convertPDFToZPL("D:\\label.pdf");
|
||||
// System.out.println(pdf2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,241 +0,0 @@
|
||||
package com.xdadan.erp.oms2c.service.print.tanex;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.itextpdf.text.Element;
|
||||
import com.xdadan.erp.oms.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.oms2c.service.print.IXddTplPrint;
|
||||
import com.xdadan.erp.oms2c.service.print.ItemCell;
|
||||
import com.xdadan.erp.oms2c.service.print.XddBasePrint;
|
||||
import com.xdadan.erp.oms2c.utils.sensitive.Convert;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.rendering.ImageType;
|
||||
import org.apache.pdfbox.rendering.PDFRenderer;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class TanexTplPrintImpl extends XddBasePrint {
|
||||
|
||||
/**
|
||||
* 模版文件
|
||||
*/
|
||||
private static String tplName="tpl/tanex_sd_2.pdf";
|
||||
// private static String tplName="/Users/alan/work/git/doitinfo/ai/logistic/src/main/resources/print_tpl/tanex/tanex_sd_2.pdf";
|
||||
|
||||
/**
|
||||
* 单元条目配置
|
||||
* @param orderMap
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
protected ArrayList<ItemCell> getItemCelconfig(Map<String, Object> orderMap) {
|
||||
ArrayList<ItemCell> printItems = new ArrayList<>();
|
||||
|
||||
String package3dm = "";
|
||||
String packageWJC = "";
|
||||
|
||||
String pdfInfo =MapUtils.getString(orderMap,"pdf_info","");
|
||||
if(!StringUtils.isEmpty(pdfInfo)) {
|
||||
String[] pdfInfoArr = pdfInfo.split("]");
|
||||
if (pdfInfoArr.length > 0) {
|
||||
package3dm = pdfInfoArr[0].replace("[", "");
|
||||
packageWJC = pdfInfoArr[1].replace("[", "");
|
||||
}
|
||||
}
|
||||
|
||||
// 设置打印参数信息
|
||||
String orderSn="订单号:"+MapUtils.getString(orderMap,"order_sn","");
|
||||
printItems.add(new ItemCell("package3dm",package3dm,10,true,Element.ALIGN_CENTER,"Text"));
|
||||
printItems.add(new ItemCell("packageWJC",packageWJC,16,true,Element.ALIGN_CENTER,"Text"));
|
||||
printItems.add(new ItemCell("orderSn", orderSn,6,true,"Text"));
|
||||
|
||||
String logisticNo="运单编号:"+MapUtils.getString(orderMap,"yd_sn","");
|
||||
printItems.add(new ItemCell("logisticNo", logisticNo,7,true,Element.ALIGN_CENTER,"Text"));
|
||||
|
||||
// 条码显示
|
||||
printItems.add(new ItemCell("barcodeImg1", MapUtils.getString(orderMap,"yd_sn",""),1,true,"BarCode"));
|
||||
// printItems.add(new ItemCell("barcodeImg2", MapUtils.getString(orderMap,"yd_sn",""),22,true,"BarCode"));
|
||||
|
||||
String mobile=MapUtils.getString(orderMap,"mobile","");
|
||||
mobile= Convert.mobile(mobile);
|
||||
// address= Convert.address(address);
|
||||
String consignee=MapUtils.getString(orderMap,"consignee","");
|
||||
consignee= Convert.chineseNameFirst(consignee);
|
||||
|
||||
printItems.add(new ItemCell("company", MapUtils.getString(orderMap,"company",""),8,true,"Text"));
|
||||
printItems.add(new ItemCell("consignee", consignee,9,true,"Text"));
|
||||
printItems.add(new ItemCell("mobile", mobile,9,true,"Text"));
|
||||
printItems.add(new ItemCell("address", MapUtils.getString(orderMap,"address",""),8,false,"Text"));
|
||||
|
||||
|
||||
String sendPersonAndMobile= Convert.mobile(MapUtils.getString(orderMap,"send_person",""))+" " + Convert.mobile(MapUtils.getString(orderMap,"send_mobile",""));
|
||||
printItems.add(new ItemCell("sendCompany", MapUtils.getString(orderMap,"send_company",""),8,true,"Text"));
|
||||
// printItems.add(new ItemCell("sendMobile", MapUtils.getString(orderMap,"send_mobile",""),22,true,"Text"));
|
||||
// printItems.add(new ItemCell("sendPerson", MapUtils.getString(orderMap,"send_person",""),22,true,"Text"));
|
||||
printItems.add(new ItemCell("sendPersonAndMobile", MapUtils.getString(orderMap,"send_person",""),8,true,"Text"));
|
||||
// printItems.add(new ItemCell("remark", MapUtils.getString(orderMap,"remark",""),22,true,"Text"));
|
||||
printItems.add(new ItemCell("sendAddress", MapUtils.getString(orderMap,"send_address",""),8,false,"Text"));
|
||||
|
||||
String goodsInfo="货物信息:"+MapUtils.getString(orderMap,"goods_info","");
|
||||
printItems.add(new ItemCell("goodsInfo", goodsInfo,6,false,"Text"));
|
||||
|
||||
String parcelQty = "件数:"+MapUtils.getString(orderMap,"parcel_qty","")+"件";
|
||||
printItems.add(new ItemCell("parcelQty", parcelQty,6,true,"Text"));
|
||||
printItems.add(new ItemCell("createDay", MapUtils.getString(orderMap,"create_day",""),6,true,"Text"));
|
||||
|
||||
String extData =MapUtils.getString(orderMap,"ext_data","");
|
||||
if(!StringUtils.isEmpty(extData)){
|
||||
// 解析gson数据
|
||||
try
|
||||
{
|
||||
Map mapExtData = JSON.parseObject(extData,Map.class);
|
||||
// printItems.add(new ItemCell("k1", MapUtils.getString(mapExtData,"k1",""),8,true,"Text"));
|
||||
// printItems.add(new ItemCell("k2", MapUtils.getString(mapExtData,"k2",""),8,true,"Text"));
|
||||
printItems.add(new ItemCell("k3", MapUtils.getString(mapExtData,"k3",""),15,true,Element.ALIGN_CENTER,"Text"));
|
||||
// printItems.add(new ItemCell("k4", MapUtils.getString(mapExtData,"k4",""),8,true,"Text"));
|
||||
// printItems.add(new ItemCell("k5", MapUtils.getString(mapExtData,"k5",""),8,true,"Text"));
|
||||
// printItems.add(new ItemCell("k6", MapUtils.getString(mapExtData,"k6",""),8,true,"Text"));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
return printItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主要控制模版的字体显示
|
||||
* @param orderMap
|
||||
* @param os
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult genPDF(Map<String, Object> orderMap, OutputStream os) throws Exception {
|
||||
AjaxResult ar = new AjaxResult();
|
||||
|
||||
ClassPathResource classPathResource = new ClassPathResource(tplName);
|
||||
InputStream tplInStream = classPathResource.getInputStream();
|
||||
// InputStream tplInStream = new FileInputStream(new File(tplName));
|
||||
|
||||
// 生成pdf文件
|
||||
genPdfByTpl(getItemCelconfig(orderMap),tplInStream,os);
|
||||
|
||||
return ar;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult genPNG(Map<String, Object> order, OutputStream os) throws Exception {
|
||||
AjaxResult ar = new AjaxResult();
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
genPDF(order, bos);
|
||||
PDDocument document = PDDocument.load(bos.toByteArray());
|
||||
PDFRenderer renderer = new PDFRenderer(document);
|
||||
BufferedImage bufferedImage = renderer.renderImageWithDPI(0, 280, ImageType.RGB);
|
||||
ImageIO.write(bufferedImage, "png", os);
|
||||
return ar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String genPNGBase64(Map<String, Object> order) throws Exception {
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
|
||||
// 生成pdf
|
||||
genPDF(order,bos);
|
||||
PDDocument document = PDDocument.load(bos.toByteArray());
|
||||
// bos.close();
|
||||
PDFRenderer renderer = new PDFRenderer(document);
|
||||
BufferedImage bufferedImage = renderer.renderImageWithDPI(0, 280, ImageType.RGB);
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
ImageIO.write(bufferedImage, "jpg", out);
|
||||
|
||||
Base64.Encoder encoder = Base64.getEncoder();
|
||||
|
||||
String base64Str = "data:image/jpg;base64,"+encoder.encodeToString(out.toByteArray());
|
||||
System.out.println(base64Str);
|
||||
|
||||
return base64Str;
|
||||
}
|
||||
|
||||
|
||||
public static void testPrint(int i) throws Exception {
|
||||
|
||||
// String newPDFPath = "/Users/alan/Downloads/ynmb_blank_t21.pdf";
|
||||
String newPDFPath = "/Users/alan/Downloads/ynmb_blank_t_x"+i+".png";
|
||||
FileOutputStream out = new FileOutputStream(newPDFPath);//输出流
|
||||
|
||||
|
||||
Map<String,Object> order=new HashMap<>();
|
||||
order.put("order_sn", "DT20210901001");
|
||||
order.put("yd_sn", "SF1374689807723");
|
||||
order.put("kdgs", "TANEX");
|
||||
order.put("pdf_info", "[山东淄博-胡志明][越南DN]");
|
||||
// order.put("packageWJC", ".");
|
||||
// order.put("address", Convert.address("上海市黄浦区河南南路1009弄3号902室上海市黄浦区河南南路1009弄3号902室上海市黄浦区河南南路1009弄3号902室"));
|
||||
order.put("address", "上海市黄浦区河南南路1009弄3号902室上海市黄浦区河南南路1009弄3号902室上海市黄浦区河南南路1009弄3号902室");
|
||||
order.put("company", "SDSDS");
|
||||
order.put("mobile", Convert.mobile("13818228246"));
|
||||
order.put("consignee", Convert.chineseNameFirst("张三"));
|
||||
|
||||
// order.put("consigneeAndMobile", Convert.chineseNameFirst("张三"+" "+"13818228246"));
|
||||
order.put("send_address", "Vancouver");
|
||||
order.put("send_company", "2324");
|
||||
order.put("send_mobile", "1604-683-1088");
|
||||
order.put("send_person", "Vancouver");
|
||||
order.put("ext_data", "{\"k1\":\"阿尔巴尼亚\",\"k2\":\"阿尔巴尼亚快递\",\"k3\":\"阿尔巴尼亚国际特快\",\"k4\":\"1-10工作日\",\"k5\":\"阿尔AL\",\"k6\":\"山东淄博-阿尔巴尼亚地拉那\"}");
|
||||
// order.put("sendPersonAndMobile", "Vancouver"+" "+"1604-683-1088");
|
||||
order.put("goods_info", "日常用品");
|
||||
order.put("parcel_qty", "1");
|
||||
order.put("create_day", "2023-12-30");
|
||||
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
|
||||
IXddTplPrint xtp = new TanexTplPrintImpl();
|
||||
xtp.genPDF(order,os);
|
||||
// xtp.genPNG(order,os);
|
||||
|
||||
// 生成pdf base64
|
||||
byte[] pdfBytes = os.toByteArray();
|
||||
String pdfBase64Str = Base64.getEncoder().encodeToString(pdfBytes);
|
||||
System.out.println(pdfBase64Str);
|
||||
|
||||
// xtp.genPNGBase64(order);
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
|
||||
for(int i=0;i<1;i++){
|
||||
testPrint(i);
|
||||
}
|
||||
|
||||
|
||||
// xtp.testPdfPrint("/Users/alan/work/git/doitinfo/ai/logistic/src/main/resources/print_tpl/ynmb_blank.pdf","/Users/alan/Downloads/ynmb_blank_t21.pdf");
|
||||
// testPdfPrint("/Users/alan/work/git/doitinfo/ai/logistic/src/main/resources/print_tpl/ynmb_blank.pdf","/Users/alan/Downloads/ynmb_blank_t21.pdf");
|
||||
// testPdfPrint2Png("/Users/alan/work/git/doitinfo/ai/logistic/src/main/resources/print_tpl/lt_blank_bd.pdf","/Users/alan/Downloads/ynmb_blank_t10.png");
|
||||
// testPdfPrint2Png("/Users/alan/Downloads/ynmb_blank_t21.pdf","/Users/alan/Downloads/ynmb_blank_x1.png");
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,269 +0,0 @@
|
||||
<?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.xdadan.erp.oms2c.mapper.EmisElectronicPagApplyMapper">
|
||||
|
||||
<resultMap type="EmisElectronicPagApply" id="EmisElectronicPagApplyResult" extends="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.EmisBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="prefix" column="prefix" />
|
||||
<result property="applySeq" column="apply_seq" />
|
||||
<result property="applyDate" column="apply_date" />
|
||||
<result property="provideType" column="provide_type" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="applyManCode" column="apply_man_code" />
|
||||
<result property="applySiteCode" column="apply_site_code" />
|
||||
<result property="applyCount" column="apply_count" />
|
||||
<result property="unitMoney" column="unit_money" />
|
||||
<result property="sumMoney" column="sum_money" />
|
||||
<result property="blSend" column="bl_send" />
|
||||
<result property="sendDate" column="send_date" />
|
||||
<result property="sendManCode" column="send_man_code" />
|
||||
<result property="sendSiteCode" column="send_site_code" />
|
||||
<result property="sendCenterManCode" column="send_center_man_code" />
|
||||
<result property="sendCenterSiteCode" column="send_center_site_code" />
|
||||
<result property="blCancel" column="bl_cancel" />
|
||||
<result property="cancelManCode" column="cancel_man_code" />
|
||||
<result property="cancelDate" column="cancel_date" />
|
||||
<result property="cancelSiteCode" column="cancel_site_code" />
|
||||
<result property="userSiteCode" column="user_site_code" />
|
||||
<result property="provideFlag" column="provide_flag" />
|
||||
|
||||
|
||||
<association property="createByName" column="create_by" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectEmpNameByUserId" fetchType="lazy"/>
|
||||
<association property="updateByName" column="create_by" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectEmpNameByUserId" fetchType="lazy"/>
|
||||
<association property="createSiteName" column="create_site" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectSiteNameByCode" fetchType="lazy"/>
|
||||
<association property="updateSiteName" column="update_site" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectSiteNameByCode" fetchType="lazy"/>
|
||||
|
||||
|
||||
<association property="applySiteName" column="apply_site_code" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
||||
<association property="sendSiteName" column="send_site_code" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
||||
<association property="cancelSiteName" column="cancel_site_code" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
||||
<association property="userSiteName" column="user_site_code" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
||||
|
||||
<association property="applyManName" column="apply_man_code" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectEmpNameByCode"/>
|
||||
<association property="sendManName" column="send_man_code" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectEmpNameByCode"/>
|
||||
<association property="cancelManName" column="cancel_man_code" select="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.selectEmpNameByCode"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectEmisElectronicPagApplyVo">
|
||||
select id, prefix, apply_seq, apply_date, provide_type, material_code, material_name, apply_man_code, apply_site_code, apply_count, unit_money, sum_money, bl_send, send_date, send_man_code, send_site_code, send_center_man_code, send_center_site_code, bl_cancel, cancel_man_code, cancel_date, cancel_site_code, user_site_code, provide_flag, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_electronic_pag_apply
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisElectronicPagApplyList" parameterType="EmisElectronicPagApply" resultMap="EmisElectronicPagApplyResult">
|
||||
<include refid="selectEmisElectronicPagApplyVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="prefix != null and prefix != ''"> and prefix = #{prefix}</if>
|
||||
<if test="applySeq != null and applySeq != ''"> and apply_seq = #{applySeq}</if>
|
||||
<if test="applyDate != null "> and apply_date = #{applyDate}</if>
|
||||
<if test="provideType != null and provideType != ''"> and provide_type = #{provideType}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="applyManCode != null and applyManCode != ''"> and apply_man_code = #{applyManCode}</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''"> and apply_site_code = #{applySiteCode}</if>
|
||||
<if test="applyCount != null "> and apply_count = #{applyCount}</if>
|
||||
<if test="unitMoney != null "> and unit_money = #{unitMoney}</if>
|
||||
<if test="sumMoney != null "> and sum_money = #{sumMoney}</if>
|
||||
<if test="blSend != null and blSend != ''"> and bl_send = #{blSend}</if>
|
||||
<if test="sendDate != null "> and send_date = #{sendDate}</if>
|
||||
<if test="sendManCode != null and sendManCode != ''"> and send_man_code = #{sendManCode}</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''"> and send_site_code = #{sendSiteCode}</if>
|
||||
<if test="sendCenterManCode != null and sendCenterManCode != ''"> and send_center_man_code = #{sendCenterManCode}</if>
|
||||
<if test="sendCenterSiteCode != null and sendCenterSiteCode != ''"> and send_center_site_code = #{sendCenterSiteCode}</if>
|
||||
<if test="blCancel != null and blCancel != ''"> and bl_cancel = #{blCancel}</if>
|
||||
<if test="cancelManCode != null and cancelManCode != ''"> and cancel_man_code = #{cancelManCode}</if>
|
||||
<if test="cancelDate != null "> and cancel_date = #{cancelDate}</if>
|
||||
<if test="cancelSiteCode != null and cancelSiteCode != ''"> and cancel_site_code = #{cancelSiteCode}</if>
|
||||
<if test="userSiteCode != null and userSiteCode != ''"> and user_site_code = #{userSiteCode}</if>
|
||||
<if test="provideFlag != null and provideFlag != ''"> and provide_flag = #{provideFlag}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site = #{createSite}</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site = #{updateSite}</if>
|
||||
|
||||
<if test="params.beginApplyDate != null and params.beginApplyDate != ''">
|
||||
and apply_date <![CDATA[ > ]]> #{params.beginApplyDate}
|
||||
</if>
|
||||
<if test="params.endApplyDate != null and params.endApplyDate != ''">
|
||||
and apply_date <![CDATA[ <= ]]> #{params.endApplyDate}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="checkUnique" parameterType="EmisElectronicPagApply" resultType="int">
|
||||
select count(1) from emis_electronic_pag_apply
|
||||
where del_flag='0'
|
||||
and id = #{id}
|
||||
and prefix = #{prefix}
|
||||
and apply_seq = #{applySeq}
|
||||
and apply_date = #{applyDate}
|
||||
and provide_type = #{provideType}
|
||||
and material_code = #{materialCode}
|
||||
and material_name = #{materialName}
|
||||
and apply_man_code = #{applyManCode}
|
||||
and apply_site_code = #{applySiteCode}
|
||||
and apply_count = #{applyCount}
|
||||
and unit_money = #{unitMoney}
|
||||
and sum_money = #{sumMoney}
|
||||
and bl_send = #{blSend}
|
||||
and send_date = #{sendDate}
|
||||
and send_man_code = #{sendManCode}
|
||||
and send_site_code = #{sendSiteCode}
|
||||
and send_center_man_code = #{sendCenterManCode}
|
||||
and send_center_site_code = #{sendCenterSiteCode}
|
||||
and bl_cancel = #{blCancel}
|
||||
and cancel_man_code = #{cancelManCode}
|
||||
and cancel_date = #{cancelDate}
|
||||
and cancel_site_code = #{cancelSiteCode}
|
||||
and user_site_code = #{userSiteCode}
|
||||
and provide_flag = #{provideFlag}
|
||||
and del_flag = #{delFlag}
|
||||
and create_by = #{createBy}
|
||||
and create_time = #{createTime}
|
||||
and update_by = #{updateBy}
|
||||
and update_time = #{updateTime}
|
||||
and remark = #{remark}
|
||||
and create_site = #{createSite}
|
||||
and update_site = #{updateSite}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEmisElectronicPagApplyById" parameterType="Long" resultMap="EmisElectronicPagApplyResult">
|
||||
select id, prefix, apply_seq, apply_date, provide_type, material_code, material_name, apply_man_code, apply_site_code, apply_count, unit_money, sum_money, bl_send, send_date, send_man_code, send_site_code, send_center_man_code, send_center_site_code, bl_cancel, cancel_man_code, cancel_date, cancel_site_code, user_site_code, provide_flag, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_electronic_pag_apply a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisElectronicPagApply" parameterType="EmisElectronicPagApply" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_electronic_pag_apply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="prefix != null and prefix != ''">prefix,</if>
|
||||
<if test="applySeq != null and applySeq != ''">apply_seq,</if>
|
||||
<if test="applyDate != null">apply_date,</if>
|
||||
<if test="provideType != null and provideType != ''">provide_type,</if>
|
||||
<if test="materialCode != null and materialCode != ''">material_code,</if>
|
||||
<if test="materialName != null and materialName != ''">material_name,</if>
|
||||
<if test="applyManCode != null and applyManCode != ''">apply_man_code,</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''">apply_site_code,</if>
|
||||
<if test="applyCount != null">apply_count,</if>
|
||||
<if test="unitMoney != null">unit_money,</if>
|
||||
<if test="sumMoney != null">sum_money,</if>
|
||||
<if test="blSend != null and blSend != ''">bl_send,</if>
|
||||
<if test="sendDate != null">send_date,</if>
|
||||
<if test="sendManCode != null and sendManCode != ''">send_man_code,</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''">send_site_code,</if>
|
||||
<if test="sendCenterManCode != null and sendCenterManCode != ''">send_center_man_code,</if>
|
||||
<if test="sendCenterSiteCode != null and sendCenterSiteCode != ''">send_center_site_code,</if>
|
||||
<if test="blCancel != null and blCancel != ''">bl_cancel,</if>
|
||||
<if test="cancelManCode != null and cancelManCode != ''">cancel_man_code,</if>
|
||||
<if test="cancelDate != null">cancel_date,</if>
|
||||
<if test="cancelSiteCode != null and cancelSiteCode != ''">cancel_site_code,</if>
|
||||
<if test="userSiteCode != null and userSiteCode != ''">user_site_code,</if>
|
||||
<if test="provideFlag != null and provideFlag != ''">provide_flag,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createSite != null and createSite != ''">create_site,</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="prefix != null and prefix != ''">#{prefix},</if>
|
||||
<if test="applySeq != null and applySeq != ''">#{applySeq},</if>
|
||||
<if test="applyDate != null">#{applyDate},</if>
|
||||
<if test="provideType != null and provideType != ''">#{provideType},</if>
|
||||
<if test="materialCode != null and materialCode != ''">#{materialCode},</if>
|
||||
<if test="materialName != null and materialName != ''">#{materialName},</if>
|
||||
<if test="applyManCode != null and applyManCode != ''">#{applyManCode},</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''">#{applySiteCode},</if>
|
||||
<if test="applyCount != null">#{applyCount},</if>
|
||||
<if test="unitMoney != null">#{unitMoney},</if>
|
||||
<if test="sumMoney != null">#{sumMoney},</if>
|
||||
<if test="blSend != null and blSend != ''">#{blSend},</if>
|
||||
<if test="sendDate != null">#{sendDate},</if>
|
||||
<if test="sendManCode != null and sendManCode != ''">#{sendManCode},</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''">#{sendSiteCode},</if>
|
||||
<if test="sendCenterManCode != null and sendCenterManCode != ''">#{sendCenterManCode},</if>
|
||||
<if test="sendCenterSiteCode != null and sendCenterSiteCode != ''">#{sendCenterSiteCode},</if>
|
||||
<if test="blCancel != null and blCancel != ''">#{blCancel},</if>
|
||||
<if test="cancelManCode != null and cancelManCode != ''">#{cancelManCode},</if>
|
||||
<if test="cancelDate != null">#{cancelDate},</if>
|
||||
<if test="cancelSiteCode != null and cancelSiteCode != ''">#{cancelSiteCode},</if>
|
||||
<if test="userSiteCode != null and userSiteCode != ''">#{userSiteCode},</if>
|
||||
<if test="provideFlag != null and provideFlag != ''">#{provideFlag},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisElectronicPagApply" parameterType="EmisElectronicPagApply">
|
||||
update emis_electronic_pag_apply
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="prefix != null and prefix != ''">prefix = #{prefix},</if>
|
||||
<if test="applySeq != null and applySeq != ''">apply_seq = #{applySeq},</if>
|
||||
<if test="applyDate != null">apply_date = #{applyDate},</if>
|
||||
<if test="provideType != null and provideType != ''">provide_type = #{provideType},</if>
|
||||
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
|
||||
<if test="materialName != null and materialName != ''">material_name = #{materialName},</if>
|
||||
<if test="applyManCode != null and applyManCode != ''">apply_man_code = #{applyManCode},</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''">apply_site_code = #{applySiteCode},</if>
|
||||
<if test="applyCount != null">apply_count = #{applyCount},</if>
|
||||
<if test="unitMoney != null">unit_money = #{unitMoney},</if>
|
||||
<if test="sumMoney != null">sum_money = #{sumMoney},</if>
|
||||
<if test="blSend != null and blSend != ''">bl_send = #{blSend},</if>
|
||||
<if test="sendDate != null">send_date = #{sendDate},</if>
|
||||
<if test="sendManCode != null and sendManCode != ''">send_man_code = #{sendManCode},</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''">send_site_code = #{sendSiteCode},</if>
|
||||
<if test="sendCenterManCode != null and sendCenterManCode != ''">send_center_man_code = #{sendCenterManCode},</if>
|
||||
<if test="sendCenterSiteCode != null and sendCenterSiteCode != ''">send_center_site_code = #{sendCenterSiteCode},</if>
|
||||
<if test="blCancel != null and blCancel != ''">bl_cancel = #{blCancel},</if>
|
||||
<if test="cancelManCode != null and cancelManCode != ''">cancel_man_code = #{cancelManCode},</if>
|
||||
<if test="cancelDate != null">cancel_date = #{cancelDate},</if>
|
||||
<if test="cancelSiteCode != null and cancelSiteCode != ''">cancel_site_code = #{cancelSiteCode},</if>
|
||||
<if test="userSiteCode != null and userSiteCode != ''">user_site_code = #{userSiteCode},</if>
|
||||
<if test="provideFlag != null and provideFlag != ''">provide_flag = #{provideFlag},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisElectronicPagApplyById" parameterType="Long">
|
||||
update emis_electronic_pag_apply set del_flag='1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisElectronicPagApplyByIds" parameterType="String">
|
||||
update emis_electronic_pag_apply set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -1,178 +0,0 @@
|
||||
<?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.xdadan.erp.oms2c.mapper.EmisElectronicPagMapper">
|
||||
|
||||
<resultMap type="EmisElectronicPag" id="EmisElectronicPagResult" extends="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.EmisBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="prefix" column="prefix" />
|
||||
<result property="startNo" column="start_no" />
|
||||
<result property="endNo" column="end_no" />
|
||||
<result property="billCount" column="bill_count" />
|
||||
<result property="unitMoney" column="unit_money" />
|
||||
<result property="billFee" column="bill_fee" />
|
||||
<result property="curStartNo" column="cur_start_no" />
|
||||
<result property="hasBillCount" column="has_bill_count" />
|
||||
<result property="provideDate" column="provide_date" />
|
||||
<result property="provideMan" column="provide_man" />
|
||||
<result property="provideSite" column="provide_site" />
|
||||
<result property="status" column="status" />
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisElectronicPagVo">
|
||||
select id, prefix, start_no, end_no, bill_count, unit_money, bill_fee, cur_start_no, has_bill_count, provide_date, provide_man, provide_site, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_electronic_pag
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisElectronicPagList" parameterType="EmisElectronicPag" resultMap="EmisElectronicPagResult">
|
||||
<include refid="selectEmisElectronicPagVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="prefix != null and prefix != ''"> and prefix like concat('%', #{prefix}, '%')</if>
|
||||
<if test="startNo != null and startNo != ''"> and start_no like concat('%', #{startNo}, '%')</if>
|
||||
<if test="endNo != null and endNo != ''"> and end_no like concat('%', #{endNo}, '%')</if>
|
||||
<if test="billCount != null "> and bill_count = #{billCount}</if>
|
||||
<if test="unitMoney != null "> and unit_money = #{unitMoney}</if>
|
||||
<if test="billFee != null "> and bill_fee = #{billFee}</if>
|
||||
<if test="curStartNo != null and curStartNo != ''"> and cur_start_no like concat('%', #{curStartNo}, '%')</if>
|
||||
<if test="hasBillCount != null "> and has_bill_count = #{hasBillCount}</if>
|
||||
<if test="provideDate != null "> and provide_date = #{provideDate}</if>
|
||||
<if test="provideMan != null and provideMan != ''"> and provide_man like concat('%', #{provideMan}, '%')</if>
|
||||
<if test="provideSite != null and provideSite != ''"> and provide_site like concat('%', #{provideSite}, '%')</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="checkUnique" parameterType="EmisElectronicPag" resultType="int">
|
||||
select count(1) from emis_electronic_pag
|
||||
where del_flag='0'
|
||||
and id = #{id}
|
||||
and prefix = #{prefix}
|
||||
and start_no = #{startNo}
|
||||
and end_no = #{endNo}
|
||||
and bill_count = #{billCount}
|
||||
and unit_money = #{unitMoney}
|
||||
and bill_fee = #{billFee}
|
||||
and cur_start_no = #{curStartNo}
|
||||
and has_bill_count = #{hasBillCount}
|
||||
and provide_date = #{provideDate}
|
||||
and provide_man = #{provideMan}
|
||||
and provide_site = #{provideSite}
|
||||
and status = #{status}
|
||||
and del_flag = #{delFlag}
|
||||
and create_by = #{createBy}
|
||||
and create_time = #{createTime}
|
||||
and update_by = #{updateBy}
|
||||
and update_time = #{updateTime}
|
||||
and remark = #{remark}
|
||||
and create_site = #{createSite}
|
||||
and update_site = #{updateSite}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEmisElectronicPagById" parameterType="Long" resultMap="EmisElectronicPagResult">
|
||||
select id, prefix, start_no, end_no, bill_count, unit_money, bill_fee, cur_start_no, has_bill_count, provide_date, provide_man, provide_site, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_electronic_pag a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisElectronicPag" parameterType="EmisElectronicPag" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_electronic_pag
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="prefix != null and prefix != ''">prefix,</if>
|
||||
<if test="startNo != null and startNo != ''">start_no,</if>
|
||||
<if test="endNo != null and endNo != ''">end_no,</if>
|
||||
<if test="billCount != null">bill_count,</if>
|
||||
<if test="unitMoney != null">unit_money,</if>
|
||||
<if test="billFee != null">bill_fee,</if>
|
||||
<if test="curStartNo != null and curStartNo != ''">cur_start_no,</if>
|
||||
<if test="hasBillCount != null">has_bill_count,</if>
|
||||
<if test="provideDate != null">provide_date,</if>
|
||||
<if test="provideMan != null and provideMan != ''">provide_man,</if>
|
||||
<if test="provideSite != null and provideSite != ''">provide_site,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createSite != null and createSite != ''">create_site,</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="prefix != null and prefix != ''">#{prefix},</if>
|
||||
<if test="startNo != null and startNo != ''">#{startNo},</if>
|
||||
<if test="endNo != null and endNo != ''">#{endNo},</if>
|
||||
<if test="billCount != null">#{billCount},</if>
|
||||
<if test="unitMoney != null">#{unitMoney},</if>
|
||||
<if test="billFee != null">#{billFee},</if>
|
||||
<if test="curStartNo != null and curStartNo != ''">#{curStartNo},</if>
|
||||
<if test="hasBillCount != null">#{hasBillCount},</if>
|
||||
<if test="provideDate != null">#{provideDate},</if>
|
||||
<if test="provideMan != null and provideMan != ''">#{provideMan},</if>
|
||||
<if test="provideSite != null and provideSite != ''">#{provideSite},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisElectronicPag" parameterType="EmisElectronicPag">
|
||||
update emis_electronic_pag
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="prefix != null and prefix != ''">prefix = #{prefix},</if>
|
||||
<if test="startNo != null and startNo != ''">start_no = #{startNo},</if>
|
||||
<if test="endNo != null and endNo != ''">end_no = #{endNo},</if>
|
||||
<if test="billCount != null">bill_count = #{billCount},</if>
|
||||
<if test="unitMoney != null">unit_money = #{unitMoney},</if>
|
||||
<if test="billFee != null">bill_fee = #{billFee},</if>
|
||||
<if test="curStartNo != null and curStartNo != ''">cur_start_no = #{curStartNo},</if>
|
||||
<if test="hasBillCount != null">has_bill_count = #{hasBillCount},</if>
|
||||
<if test="provideDate != null">provide_date = #{provideDate},</if>
|
||||
<if test="provideMan != null and provideMan != ''">provide_man = #{provideMan},</if>
|
||||
<if test="provideSite != null and provideSite != ''">provide_site = #{provideSite},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisElectronicPagById" parameterType="Long">
|
||||
delete from emis_electronic_pag where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisElectronicPagByIds" parameterType="String">
|
||||
delete from emis_electronic_pag where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,208 +0,0 @@
|
||||
<?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.xdadan.erp.oms2c.mapper.EmisElectronicSitePagMapper">
|
||||
|
||||
<resultMap type="EmisElectronicSitePag" id="EmisElectronicSitePagResult" extends="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.EmisBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="prefix" column="prefix" />
|
||||
<result property="startNo" column="start_no" />
|
||||
<result property="endNo" column="end_no" />
|
||||
<result property="curStartNo" column="cur_start_no" />
|
||||
<result property="useSiteCode" column="use_site_code" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="billCount" column="bill_count" />
|
||||
<result property="unitMoney" column="unit_money" />
|
||||
<result property="hasBillCount" column="has_bill_count" />
|
||||
<result property="billFee" column="bill_fee" />
|
||||
<result property="provideDate" column="provide_date" />
|
||||
<result property="provideMan" column="provide_man" />
|
||||
<result property="provideSite" column="provide_site" />
|
||||
<result property="applySeq" column="apply_seq" />
|
||||
<result property="centerPagId" column="center_pag_id" />
|
||||
<result property="provideFlag" column="provide_flag" />
|
||||
<result property="status" column="status" />
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisElectronicSitePagVo">
|
||||
select id, prefix, start_no, end_no, cur_start_no, use_site_code, material_code, bill_count, unit_money, has_bill_count, bill_fee, provide_date, provide_man, provide_site, apply_seq, center_pag_id, provide_flag, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_electronic_site_pag
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisElectronicSitePagList" parameterType="EmisElectronicSitePag" resultMap="EmisElectronicSitePagResult">
|
||||
<include refid="selectEmisElectronicSitePagVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="prefix != null and prefix != ''"> and prefix = #{prefix}</if>
|
||||
<if test="startNo != null and startNo != ''"> and start_no = #{startNo}</if>
|
||||
<if test="endNo != null and endNo != ''"> and end_no like concat('%', #{endNo}, '%')</if>
|
||||
<if test="curStartNo != null and curStartNo != ''"> and cur_start_no like concat('%', #{curStartNo}, '%')</if>
|
||||
<if test="useSiteCode != null and useSiteCode != ''"> and use_site_code like concat('%', #{useSiteCode}, '%')</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if>
|
||||
<if test="billCount != null "> and bill_count = #{billCount}</if>
|
||||
<if test="unitMoney != null "> and unit_money = #{unitMoney}</if>
|
||||
<if test="hasBillCount != null "> and has_bill_count = #{hasBillCount}</if>
|
||||
<if test="billFee != null "> and bill_fee = #{billFee}</if>
|
||||
<if test="provideDate != null "> and provide_date = #{provideDate}</if>
|
||||
<if test="provideMan != null and provideMan != ''"> and provide_man like concat('%', #{provideMan}, '%')</if>
|
||||
<if test="provideSite != null and provideSite != ''"> and provide_site like concat('%', #{provideSite}, '%')</if>
|
||||
<if test="applySeq != null and applySeq != ''"> and apply_seq like concat('%', #{applySeq}, '%')</if>
|
||||
<if test="centerPagId != null "> and center_pag_id = #{centerPagId}</if>
|
||||
<if test="provideFlag != null and provideFlag != ''"> and provide_flag like concat('%', #{provideFlag}, '%')</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="checkUnique" parameterType="EmisElectronicSitePag" resultType="int">
|
||||
select count(1) from emis_electronic_site_pag
|
||||
where del_flag='0'
|
||||
and id = #{id}
|
||||
and prefix = #{prefix}
|
||||
and start_no = #{startNo}
|
||||
and end_no = #{endNo}
|
||||
and cur_start_no = #{curStartNo}
|
||||
and use_site_code = #{useSiteCode}
|
||||
and material_code = #{materialCode}
|
||||
and bill_count = #{billCount}
|
||||
and unit_money = #{unitMoney}
|
||||
and has_bill_count = #{hasBillCount}
|
||||
and bill_fee = #{billFee}
|
||||
and provide_date = #{provideDate}
|
||||
and provide_man = #{provideMan}
|
||||
and provide_site = #{provideSite}
|
||||
and apply_seq = #{applySeq}
|
||||
and center_pag_id = #{centerPagId}
|
||||
and provide_flag = #{provideFlag}
|
||||
and status = #{status}
|
||||
and del_flag = #{delFlag}
|
||||
and create_by = #{createBy}
|
||||
and create_time = #{createTime}
|
||||
and update_by = #{updateBy}
|
||||
and update_time = #{updateTime}
|
||||
and remark = #{remark}
|
||||
and create_site = #{createSite}
|
||||
and update_site = #{updateSite}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEmisElectronicSitePagById" parameterType="Long" resultMap="EmisElectronicSitePagResult">
|
||||
select id, prefix, start_no, end_no, cur_start_no, use_site_code, material_code, bill_count, unit_money, has_bill_count, bill_fee, provide_date, provide_man, provide_site, apply_seq, center_pag_id, provide_flag, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_electronic_site_pag a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisElectronicSitePag" parameterType="EmisElectronicSitePag" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_electronic_site_pag
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="prefix != null and prefix != ''">prefix,</if>
|
||||
<if test="startNo != null and startNo != ''">start_no,</if>
|
||||
<if test="endNo != null and endNo != ''">end_no,</if>
|
||||
<if test="curStartNo != null and curStartNo != ''">cur_start_no,</if>
|
||||
<if test="useSiteCode != null and useSiteCode != ''">use_site_code,</if>
|
||||
<if test="materialCode != null and materialCode != ''">material_code,</if>
|
||||
<if test="billCount != null">bill_count,</if>
|
||||
<if test="unitMoney != null">unit_money,</if>
|
||||
<if test="hasBillCount != null">has_bill_count,</if>
|
||||
<if test="billFee != null">bill_fee,</if>
|
||||
<if test="provideDate != null">provide_date,</if>
|
||||
<if test="provideMan != null and provideMan != ''">provide_man,</if>
|
||||
<if test="provideSite != null and provideSite != ''">provide_site,</if>
|
||||
<if test="applySeq != null and applySeq != ''">apply_seq,</if>
|
||||
<if test="centerPagId != null">center_pag_id,</if>
|
||||
<if test="provideFlag != null and provideFlag != ''">provide_flag,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createSite != null and createSite != ''">create_site,</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="prefix != null and prefix != ''">#{prefix},</if>
|
||||
<if test="startNo != null and startNo != ''">#{startNo},</if>
|
||||
<if test="endNo != null and endNo != ''">#{endNo},</if>
|
||||
<if test="curStartNo != null and curStartNo != ''">#{curStartNo},</if>
|
||||
<if test="useSiteCode != null and useSiteCode != ''">#{useSiteCode},</if>
|
||||
<if test="materialCode != null and materialCode != ''">#{materialCode},</if>
|
||||
<if test="billCount != null">#{billCount},</if>
|
||||
<if test="unitMoney != null">#{unitMoney},</if>
|
||||
<if test="hasBillCount != null">#{hasBillCount},</if>
|
||||
<if test="billFee != null">#{billFee},</if>
|
||||
<if test="provideDate != null">#{provideDate},</if>
|
||||
<if test="provideMan != null and provideMan != ''">#{provideMan},</if>
|
||||
<if test="provideSite != null and provideSite != ''">#{provideSite},</if>
|
||||
<if test="applySeq != null and applySeq != ''">#{applySeq},</if>
|
||||
<if test="centerPagId != null">#{centerPagId},</if>
|
||||
<if test="provideFlag != null and provideFlag != ''">#{provideFlag},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisElectronicSitePag" parameterType="EmisElectronicSitePag">
|
||||
update emis_electronic_site_pag
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="prefix != null and prefix != ''">prefix = #{prefix},</if>
|
||||
<if test="startNo != null and startNo != ''">start_no = #{startNo},</if>
|
||||
<if test="endNo != null and endNo != ''">end_no = #{endNo},</if>
|
||||
<if test="curStartNo != null and curStartNo != ''">cur_start_no = #{curStartNo},</if>
|
||||
<if test="useSiteCode != null and useSiteCode != ''">use_site_code = #{useSiteCode},</if>
|
||||
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
|
||||
<if test="billCount != null">bill_count = #{billCount},</if>
|
||||
<if test="unitMoney != null">unit_money = #{unitMoney},</if>
|
||||
<if test="hasBillCount != null">has_bill_count = #{hasBillCount},</if>
|
||||
<if test="billFee != null">bill_fee = #{billFee},</if>
|
||||
<if test="provideDate != null">provide_date = #{provideDate},</if>
|
||||
<if test="provideMan != null and provideMan != ''">provide_man = #{provideMan},</if>
|
||||
<if test="provideSite != null and provideSite != ''">provide_site = #{provideSite},</if>
|
||||
<if test="applySeq != null and applySeq != ''">apply_seq = #{applySeq},</if>
|
||||
<if test="centerPagId != null">center_pag_id = #{centerPagId},</if>
|
||||
<if test="provideFlag != null and provideFlag != ''">provide_flag = #{provideFlag},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisElectronicSitePagById" parameterType="Long">
|
||||
delete from emis_electronic_site_pag where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisElectronicSitePagByIds" parameterType="String">
|
||||
delete from emis_electronic_site_pag where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -1,113 +0,0 @@
|
||||
<?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.xdadan.erp.oms2c.mapper.EmisFeeTypeMapper">
|
||||
|
||||
<resultMap type="EmisFeeType" id="EmisFeeTypeResult" extends="com.xdadan.erp.oms2c.mapper.EmisBaseMapper.EmisBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="feeTypeCode" column="fee_type_code" />
|
||||
<result property="feeTypeName" column="fee_type_name" />
|
||||
<result property="feeTypeNameEn" column="fee_type_name_en" />
|
||||
<result property="status" column="status" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisFeeTypeVo">
|
||||
select id, fee_type_code, fee_type_name, fee_type_name_en, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_fee_type
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisFeeTypeList" parameterType="EmisFeeType" resultMap="EmisFeeTypeResult">
|
||||
<include refid="selectEmisFeeTypeVo"/>
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="feeTypeCode != null and feeTypeCode != ''"> and fee_type_code like concat('%', #{feeTypeCode}, '%')</if>
|
||||
<if test="feeTypeName != null and feeTypeName != ''"> and fee_type_name like concat('%', #{feeTypeName}, '%')</if>
|
||||
<if test="feeTypeNameEn != null and feeTypeNameEn != ''"> and fee_type_name_en like concat('%', #{feeTypeNameEn}, '%')</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
||||
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectEmisFeeTypeById" parameterType="Long" resultMap="EmisFeeTypeResult">
|
||||
select id, fee_type_code, fee_type_name, fee_type_name_en, status, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_fee_type a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisFeeType" parameterType="EmisFeeType">
|
||||
insert into emis_fee_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="feeTypeCode != null and feeTypeCode != ''">fee_type_code,</if>
|
||||
<if test="feeTypeName != null and feeTypeName != ''">fee_type_name,</if>
|
||||
<if test="feeTypeNameEn != null and feeTypeNameEn != ''">fee_type_name_en,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createSite != null and createSite != ''">create_site,</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="feeTypeCode != null and feeTypeCode != ''">#{feeTypeCode},</if>
|
||||
<if test="feeTypeName != null and feeTypeName != ''">#{feeTypeName},</if>
|
||||
<if test="feeTypeNameEn != null and feeTypeNameEn != ''">#{feeTypeNameEn},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisFeeType" parameterType="EmisFeeType">
|
||||
update emis_fee_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="feeTypeCode != null and feeTypeCode != ''">fee_type_code = #{feeTypeCode},</if>
|
||||
<if test="feeTypeName != null and feeTypeName != ''">fee_type_name = #{feeTypeName},</if>
|
||||
<if test="feeTypeNameEn != null and feeTypeNameEn != ''">fee_type_name_en = #{feeTypeNameEn},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisFeeTypeById" parameterType="Long">
|
||||
delete from emis_fee_type where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisFeeTypeByIds" parameterType="String">
|
||||
delete from emis_fee_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user