1
This commit is contained in:
120
ruoyi-admin/src/main/java/com/ruoyi/Dzp/DzpSend.java
Normal file
120
ruoyi-admin/src/main/java/com/ruoyi/Dzp/DzpSend.java
Normal file
@@ -0,0 +1,120 @@
|
||||
package com.ruoyi.Dzp;
|
||||
|
||||
|
||||
import com.ruoyi.Dzp.domain.basLed;
|
||||
import com.ruoyi.Dzp.mapper.BasLedMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api2dzp")
|
||||
public class DzpSend {
|
||||
@Autowired
|
||||
private BasLedMapper mapper;
|
||||
|
||||
|
||||
@Scheduled(fixedDelay = 1000)
|
||||
public void InLed() throws IOException {
|
||||
basLed basLed = new basLed();
|
||||
basLed.setSendFlag("0");
|
||||
basLed.setId(1);
|
||||
List<com.ruoyi.Dzp.domain.basLed> basLeds = mapper.selectBasLedList(basLed);
|
||||
if (basLeds != null && basLeds.size() > 0 && (basLeds.get(0).getModel().equals("1") || basLeds.get(0).getModel().equals("2"))) {
|
||||
MyUdpSocket myUdpSocket = new MyUdpSocket(6666);
|
||||
ProtocolDemo.my_udp = myUdpSocket;
|
||||
String ip = basLeds.get(0).getIpAddress();
|
||||
String msgProductTitle = "物资编码:";
|
||||
String msgProduct = basLeds.get(0).getProduct_id();
|
||||
String msgSpecTitle = "物资规格:";
|
||||
String msgSpec = basLeds.get(0).getSpec();
|
||||
String msg3 = "托盘条码:" + basLeds.get(0).getTrayCode();
|
||||
String msg4 = null;
|
||||
if (basLeds.get(0).getModel().equals("1")) {
|
||||
msg4 = "入库数量:";
|
||||
} else {
|
||||
msg4 = "出库数量:";
|
||||
}
|
||||
String ms7 = "物资名称:";
|
||||
String msg8 = basLeds.get(0).getProductName();
|
||||
String msgQuantity = basLeds.get(0).getQuantity();
|
||||
if (ProtocolDemo.demo_play_chapterschedule4(ip, msgProductTitle, msgSpecTitle, msg4, msg3, msgSpec, msgProduct, ms7, msg8, msgQuantity)) {
|
||||
basLeds.get(0).setSendFlag("1");
|
||||
mapper.updateBasLed(basLeds.get(0));
|
||||
}
|
||||
myUdpSocket.close();
|
||||
|
||||
}
|
||||
basLed basLed2 = new basLed();
|
||||
basLed2.setSendFlag("0");
|
||||
basLed2.setId(2);
|
||||
List<com.ruoyi.Dzp.domain.basLed> basLeds2 = mapper.selectBasLedList(basLed2);
|
||||
if (basLeds2 != null && basLeds2.size() > 0 && (basLeds2.get(0).getModel().equals("1") || basLeds2.get(0).getModel().equals("2"))) {
|
||||
MyUdpSocket myUdpSocket = new MyUdpSocket(6666);
|
||||
ProtocolDemo.my_udp = myUdpSocket;
|
||||
|
||||
String ip = basLeds2.get(0).getIpAddress();
|
||||
String msgProductTitle = "物资编码:";
|
||||
String msgProduct = basLeds2.get(0).getProduct_id();
|
||||
String msgSpecTitle = "物资规格:";
|
||||
String msgSpec = basLeds2.get(0).getSpec();
|
||||
String msg3 = "托盘条码:" + basLeds2.get(0).getTrayCode();
|
||||
String msg4 = null;
|
||||
if (basLeds2.get(0).getModel().equals("1")) {
|
||||
msg4 = "入库数量:";
|
||||
} else {
|
||||
msg4 = "出库数量:";
|
||||
}
|
||||
String ms7 = "物资名称:";
|
||||
String msg8 = basLeds2.get(0).getProductName();
|
||||
String msgQuantity = basLeds2.get(0).getQuantity();
|
||||
if (ProtocolDemo.demo_play_chapterschedule4(ip, msgProductTitle, msgSpecTitle, msg4, msg3, msgSpec, msgProduct, ms7, msg8, msgQuantity)) {
|
||||
basLeds2.get(0).setSendFlag("1");
|
||||
mapper.updateBasLed(basLeds2.get(0));
|
||||
}
|
||||
|
||||
myUdpSocket.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Scheduled(fixedDelay = 1000)
|
||||
public void ErrorLed() throws IOException {
|
||||
basLed basLed = new basLed();
|
||||
basLed.setSendFlag("0");
|
||||
basLed.setId(1);
|
||||
List<com.ruoyi.Dzp.domain.basLed> basLeds = mapper.selectBasLedList(basLed);
|
||||
if (basLeds != null && basLeds.size() > 0 && basLeds.get(0).getModel().equals("3")) {
|
||||
MyUdpSocket myUdpSocket = new MyUdpSocket(6666);
|
||||
ProtocolDemo.my_udp = myUdpSocket;
|
||||
String ip = basLeds.get(0).getIpAddress();
|
||||
if (ProtocolDemo.demo_play_chapterschedule2(ip, "报警信息", basLeds.get(0).getErrorMsg())) {
|
||||
basLeds.get(0).setSendFlag("1");
|
||||
mapper.updateBasLed(basLeds.get(0));
|
||||
}
|
||||
myUdpSocket.close();
|
||||
|
||||
}
|
||||
basLed basLed2 = new basLed();
|
||||
basLed2.setSendFlag("0");
|
||||
basLed2.setId(2);
|
||||
List<com.ruoyi.Dzp.domain.basLed> basLeds2 = mapper.selectBasLedList(basLed2);
|
||||
if (basLeds2 != null && basLeds2.size() > 0 && basLeds2.get(0).getModel().equals("3")) {
|
||||
MyUdpSocket myUdpSocket = new MyUdpSocket(6666);
|
||||
ProtocolDemo.my_udp = myUdpSocket;
|
||||
String ip = basLeds2.get(0).getIpAddress();
|
||||
if (ProtocolDemo.demo_play_chapterschedule2(ip, "报警信息", basLeds2.get(0).getErrorMsg())) {
|
||||
basLeds2.get(0).setSendFlag("1");
|
||||
mapper.updateBasLed(basLeds2.get(0));
|
||||
}
|
||||
myUdpSocket.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
3235
ruoyi-admin/src/main/java/com/ruoyi/Dzp/LEDSender2010.java
Normal file
3235
ruoyi-admin/src/main/java/com/ruoyi/Dzp/LEDSender2010.java
Normal file
File diff suppressed because it is too large
Load Diff
164
ruoyi-admin/src/main/java/com/ruoyi/Dzp/Lzss.java
Normal file
164
ruoyi-admin/src/main/java/com/ruoyi/Dzp/Lzss.java
Normal file
@@ -0,0 +1,164 @@
|
||||
package com.ruoyi.Dzp;
|
||||
|
||||
public class Lzss {
|
||||
|
||||
static int N = 4096;
|
||||
static int F = 18;
|
||||
static int THRESHOLD = 2;
|
||||
static int NIL = N;
|
||||
|
||||
static int textsize = 0;
|
||||
static int codesize = 0;
|
||||
static int printcount = 0;
|
||||
static int text_buf[];
|
||||
static int match_position, match_length;
|
||||
static int lson[], rson[], dad[];
|
||||
|
||||
public Lzss() {
|
||||
lson = new int[N + 1];
|
||||
rson = new int[N + 257];
|
||||
dad = new int[N + 1];
|
||||
text_buf = new int[N + F - 1];
|
||||
}
|
||||
|
||||
private static void InitTree() /* initialize trees */
|
||||
{
|
||||
int i;
|
||||
textsize = 0; codesize = 0; printcount = 0;
|
||||
for (i = N + 1; i <= N + 256; i++) rson[i] = NIL;
|
||||
for (i = 0; i < N; i++) dad[i] = NIL;
|
||||
}
|
||||
|
||||
private static void InsertNode(int r)
|
||||
{
|
||||
int i, p, cmp;
|
||||
//unsigned char *key;
|
||||
|
||||
//key = &text_buf[r];
|
||||
cmp = 1; p = N + 1 + text_buf[r];
|
||||
rson[r] = NIL; lson[r] = NIL; match_length = 0;
|
||||
for ( ; ; ) {
|
||||
if (cmp >= 0) {
|
||||
if (rson[p] != NIL) p = rson[p];
|
||||
else { rson[p] = r; dad[r] = p; return; }
|
||||
} else {
|
||||
if (lson[p] != NIL) p = lson[p];
|
||||
else { lson[p] = r; dad[r] = p; return; }
|
||||
}
|
||||
for (i = 1; i < F; i++)
|
||||
if ((cmp = text_buf[r + i] - text_buf[p + i]) != 0) break;
|
||||
if (i > match_length) {
|
||||
match_position = p;
|
||||
if ((match_length = i) >= F) break;
|
||||
}
|
||||
}
|
||||
dad[r] = dad[p]; lson[r] = lson[p]; rson[r] = rson[p];
|
||||
dad[lson[p]] = r; dad[rson[p]] = r;
|
||||
if (rson[dad[p]] == p) rson[dad[p]] = r;
|
||||
else lson[dad[p]] = r;
|
||||
dad[p] = NIL;
|
||||
}
|
||||
|
||||
private static void DeleteNode(int p)
|
||||
{
|
||||
int q;
|
||||
|
||||
if (dad[p] == NIL) return;
|
||||
if (rson[p] == NIL) q = lson[p];
|
||||
else if (lson[p] == NIL) q = rson[p];
|
||||
else {
|
||||
q = lson[p];
|
||||
if (rson[q] != NIL) {
|
||||
do { q = rson[q]; } while (rson[q] != NIL);
|
||||
rson[dad[q]] = lson[q]; dad[lson[q]] = dad[q];
|
||||
lson[q] = lson[p]; dad[lson[p]] = q;
|
||||
}
|
||||
rson[q] = rson[p]; dad[rson[p]] = q;
|
||||
}
|
||||
dad[q] = dad[p];
|
||||
if (rson[dad[p]] == p) rson[dad[p]] = q; else lson[dad[p]] = q;
|
||||
dad[p] = NIL;
|
||||
}
|
||||
|
||||
public int Encode(byte[] ibuf, int istart, int isize, byte[] obuf, int ostart)
|
||||
{
|
||||
int i, c, len, r, s, last_match_length, code_buf_ptr;
|
||||
int[] code_buf = new int[17];
|
||||
int mask;
|
||||
int x, x1;
|
||||
|
||||
x=x1=0;
|
||||
InitTree();
|
||||
code_buf[0] = 0;
|
||||
code_buf_ptr = mask = 1;
|
||||
s = 0; r = N - F;
|
||||
for (i = s; i < r; i++) text_buf[i] = ' ';
|
||||
for (len = 0, c = 0; len < F && c < isize; len++, c++)
|
||||
{
|
||||
if (ibuf[istart + x] >= 0)
|
||||
text_buf[r + len] = ibuf[istart + x];
|
||||
else
|
||||
text_buf[r + len] = 0x100 + ibuf[istart + x];
|
||||
x++;
|
||||
}
|
||||
if ((textsize = len) == 0) return 0;
|
||||
for (i = 1; i <= F; i++) InsertNode(r - i);
|
||||
InsertNode(r);
|
||||
do {
|
||||
if (match_length > len) match_length = len;
|
||||
if (match_length <= THRESHOLD) {
|
||||
match_length = 1;
|
||||
code_buf[0] |= mask;
|
||||
code_buf[code_buf_ptr++] = text_buf[r];
|
||||
} else {
|
||||
code_buf[code_buf_ptr++] = match_position & 0xff;
|
||||
code_buf[code_buf_ptr++] = ((((match_position >> 4) & 0xf0) | (match_length - (THRESHOLD + 1))) & 0xff);
|
||||
}
|
||||
mask <<= 1;
|
||||
mask &= 0xff;
|
||||
if (mask == 0) {
|
||||
if (codesize + code_buf_ptr > isize) return 0;
|
||||
for (i = 0; i < code_buf_ptr; i++)
|
||||
{
|
||||
obuf[ostart + x1] = (byte)code_buf[i];
|
||||
x1++;
|
||||
}
|
||||
codesize += code_buf_ptr;
|
||||
code_buf[0] = 0; code_buf_ptr = mask = 1;
|
||||
}
|
||||
last_match_length = match_length;
|
||||
for (i = 0; i < last_match_length && c < isize; i++, c++) {
|
||||
DeleteNode(s); /* Delete old strings and */
|
||||
if (ibuf[istart + x] >= 0)
|
||||
text_buf[s] = ibuf[istart + x];
|
||||
else
|
||||
text_buf[s] = 0x100 + ibuf[istart + x];
|
||||
if (s < F - 1)
|
||||
{
|
||||
if (ibuf[istart + x] >= 0)
|
||||
text_buf[s + N] = ibuf[istart + x];
|
||||
else
|
||||
text_buf[s + N] = 0x100 + ibuf[istart + x];
|
||||
}
|
||||
s = (s + 1) & (N - 1); r = (r + 1) & (N - 1);
|
||||
InsertNode(r); /* Register the string in text_buf[r..r+F-1] */
|
||||
x++;
|
||||
}
|
||||
while (i++ < last_match_length) {
|
||||
DeleteNode(s);
|
||||
s = (s + 1) & (N - 1); r = (r + 1) & (N - 1);
|
||||
len--;
|
||||
if (len > 0) InsertNode(r);
|
||||
}
|
||||
} while (len > 0);
|
||||
if (code_buf_ptr > 1) {
|
||||
for (i = 0; i < code_buf_ptr; i++)
|
||||
{
|
||||
obuf[ostart + x1] = (byte)(code_buf[i]&0xff);
|
||||
x1++;
|
||||
}
|
||||
codesize += code_buf_ptr;
|
||||
}
|
||||
return x1;
|
||||
}
|
||||
}
|
||||
93
ruoyi-admin/src/main/java/com/ruoyi/Dzp/MyUdpSocket.java
Normal file
93
ruoyi-admin/src/main/java/com/ruoyi/Dzp/MyUdpSocket.java
Normal file
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.Dzp;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.DatagramChannel;
|
||||
import java.nio.channels.SelectionKey;
|
||||
import java.nio.channels.Selector;
|
||||
import java.util.Set;
|
||||
|
||||
public class MyUdpSocket {
|
||||
private DatagramChannel channel;
|
||||
private Selector selector;
|
||||
private final int MAX_SIZE = 1280;
|
||||
private static int client_port;
|
||||
private static String client_ip;
|
||||
ByteBuffer receive_buffer = ByteBuffer.allocate(MAX_SIZE);
|
||||
|
||||
public MyUdpSocket(int port) throws IOException {
|
||||
channel = DatagramChannel.open();
|
||||
selector = Selector.open();
|
||||
try {
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
|
||||
channel.configureBlocking(false);
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><D7BD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BD>ְ<D6B0><F3B6A8B5><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>˿<EFBFBD>
|
||||
channel.socket().bind(new InetSocketAddress(port));
|
||||
//Ϊͨ<CEAA><CDA8>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>
|
||||
channel.register(selector, SelectionKey.OP_READ);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public final void send(String ip, int port, byte[] buffer, int size) throws IOException {
|
||||
InetSocketAddress client = new InetSocketAddress(ip, port);
|
||||
channel.send(ByteBuffer.wrap(buffer, 0, size), client); //<2F><>EchoClient<6E>ظ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD>
|
||||
}
|
||||
|
||||
public final void close() throws IOException {
|
||||
selector.close();
|
||||
channel.close();
|
||||
}
|
||||
|
||||
public final int get_client_port() {
|
||||
return client_port;
|
||||
}
|
||||
|
||||
public final String get_client_ip() {
|
||||
return client_ip;
|
||||
}
|
||||
|
||||
public final void get_receive_buffer(byte[] buffer) {
|
||||
receive_buffer.get(buffer);
|
||||
}
|
||||
|
||||
public final int receive() {
|
||||
try {
|
||||
receive_buffer.clear();
|
||||
if (selector.select(10) != 0) {
|
||||
Set<SelectionKey> readyKeys = selector.selectedKeys();
|
||||
for (SelectionKey key : readyKeys) {
|
||||
readyKeys.remove(key);
|
||||
if (key.isReadable()) {
|
||||
DatagramChannel dc = (DatagramChannel) key.channel();
|
||||
InetSocketAddress client = (InetSocketAddress) dc.receive(receive_buffer); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Client<6E><74><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD>
|
||||
if (client != null) {
|
||||
client_ip = client.getAddress().getHostAddress();
|
||||
client_port = client.getPort();
|
||||
//System.out.println(client_ip+":"+client_port+" size="+receive_buffer.position());
|
||||
key.interestOps(SelectionKey.OP_READ);
|
||||
return receive_buffer.position();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public final void get_receive_packet(byte[] packet, int size) {
|
||||
int i;
|
||||
for (i = 0; i < size; i++) {
|
||||
packet[i] = receive_buffer.array()[i];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
995
ruoyi-admin/src/main/java/com/ruoyi/Dzp/ProtocolDemo.java
Normal file
995
ruoyi-admin/src/main/java/com/ruoyi/Dzp/ProtocolDemo.java
Normal file
@@ -0,0 +1,995 @@
|
||||
package com.ruoyi.Dzp;
|
||||
|
||||
|
||||
|
||||
import java.awt.*;
|
||||
//import java.util.Calendar;
|
||||
|
||||
public class ProtocolDemo {
|
||||
|
||||
// ====<3D><><EFBFBD>붯<EFBFBD><EBB6AF><EFBFBD><EFBFBD>ʽ<EFBFBD>б<EFBFBD>(<28><>ֵ<EFBFBD><D6B5>0<EFBFBD><30>ʼ)====
|
||||
// 0 = '<27><><EFBFBD>',
|
||||
// 1 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ',
|
||||
// 2 = '<27><><EFBFBD><EFBFBD><EFBFBD>ʾ',
|
||||
// 3 = '<27>Ϲ<EFBFBD><CFB9><EFBFBD>ʾ',
|
||||
// 4 = '<27>ҹ<EFBFBD><D2B9><EFBFBD>ʾ',
|
||||
// 5 = '<27>¹<EFBFBD><C2B9><EFBFBD>ʾ',
|
||||
// 6 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ',
|
||||
// 7 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ϲ<EFBFBD><CFB9><EFBFBD>ʾ',
|
||||
// 8 = '<27><><EFBFBD><EFBFBD><EFBFBD>ҹ<EFBFBD>',
|
||||
// 9 = '<27><><EFBFBD><EFBFBD><EFBFBD>¹<EFBFBD>',
|
||||
// 10 = '<27>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9>',
|
||||
// 11 = '<27>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9>',
|
||||
// 12 = '<27>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9>',
|
||||
// 13 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
// 14 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
// 15 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9>',
|
||||
// 16 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><D5B9>',
|
||||
// 17 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
// 18 = '<27><><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
// 19 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
// 20 = '<27><><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
// 21 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
// 22 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
// 23 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD><D2B6>',
|
||||
// 24 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD><D2B6>',
|
||||
// =====================================
|
||||
|
||||
// ====<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>б<EFBFBD>(<28><>ֵ<EFBFBD><D6B5>0<EFBFBD><30>ʼ)====
|
||||
// 0 = '<27><><EFBFBD>',
|
||||
// 1 = '<27><><EFBFBD><EFBFBD>ʧ',
|
||||
// 2 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ',
|
||||
// 3 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC>£',
|
||||
// 4 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC>£',
|
||||
// 5 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC>£',
|
||||
// 6 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD>',
|
||||
// 7 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD>',
|
||||
// 8 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£',
|
||||
// 9 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Һ<EFBFBD>£',
|
||||
// 10 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD>Ƴ<EFBFBD>',
|
||||
// 11 = '<27><><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD>Ƴ<EFBFBD>',
|
||||
// 12 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD>Ƴ<EFBFBD>',
|
||||
// 13 = '<27><><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><C2BD>Ƴ<EFBFBD>',
|
||||
// 14 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD>',
|
||||
// 15 = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD>',
|
||||
// 16 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD><D2B6>',
|
||||
// 17 = '<27><><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD><D2B6>'
|
||||
// =====================================
|
||||
|
||||
// ====ͣ<><CDA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>б<EFBFBD>(<28><>ֵ<EFBFBD><D6B5>0<EFBFBD><30>ʼ)====
|
||||
// 0 = '<27><>̬<EFBFBD><CCAC>ʾ',
|
||||
// 1 = '<27><>˸<EFBFBD><CBB8>ʾ'
|
||||
// =====================================
|
||||
|
||||
public static MyUdpSocket my_udp;
|
||||
public static LEDSender2010 ledsender = new LEDSender2010();
|
||||
//public static String ledhost = "127.0.0.1";
|
||||
public static String ledhost = "10.170.23.237";
|
||||
public static int ledport = 6666;
|
||||
public static int addr = 0;
|
||||
|
||||
public static void mysleep(int msec) {
|
||||
try {
|
||||
Thread.sleep(msec);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>UDP<44><50><EFBFBD><EFBFBD>bufferΪ<72><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>sizeΪ<65><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
public static void udp_send(byte[] buffer, int size) {
|
||||
byte[] packet = new byte[size];
|
||||
ledsender.blockCopy(packet, 0, buffer, 0, size);
|
||||
ledsender.print_stream(packet, size);
|
||||
try {
|
||||
my_udp.send(ledhost, ledport, packet, size);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void udp_send1(String ip, byte[] buffer, int size) {
|
||||
byte[] packet = new byte[size];
|
||||
ledsender.blockCopy(packet, 0, buffer, 0, size);
|
||||
ledsender.print_stream(packet, size);
|
||||
try {
|
||||
my_udp.send(ip, ledport, packet, size);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>UDP<44><50><EFBFBD><EFBFBD>bufferΪ<72><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>sizeΪ<65><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
||||
public static int udp_receive(byte[] buffer) {
|
||||
int size = 0;
|
||||
size = my_udp.receive();
|
||||
if (size > 0) {
|
||||
my_udp.get_receive_packet(buffer, size);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
public static int do_command(byte[] buffer, int size) {
|
||||
byte[] packet = new byte[1280];
|
||||
int tx, tx_repeat = 5;
|
||||
int isize = 0;
|
||||
int i;
|
||||
|
||||
for (tx = 0; tx < tx_repeat; tx++) {
|
||||
udp_send(buffer, size);
|
||||
for (i = 0; i < 50; i++) {
|
||||
isize = udp_receive(packet);
|
||||
if (isize > 0 && ledsender.parse_cmd_respond(packet, isize) == 1) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("<EFBFBD><EFBFBD>ʱ");
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void demo_reset_display() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_reset_display(packet, (byte) addr, 1);
|
||||
System.out.println("<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD>ʾ...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_power_on() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_set_power(packet, (byte) addr, 1);
|
||||
System.out.println("<EFBFBD><EFBFBD>Դ...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_power_off() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_set_power(packet, (byte) addr, 0);
|
||||
System.out.println("<EFBFBD>رյ<EFBFBD>Դ...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_get_power() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_get_power(packet, (byte) addr);
|
||||
System.out.println("<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>Դ״̬...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_set_bright() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_set_bright(packet, (byte) addr, 7);
|
||||
System.out.println("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_get_bright() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_get_bright(packet, (byte) addr);
|
||||
System.out.println("<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_adjust_time() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
//Calendar calendar = Calendar.getInstance();
|
||||
//ָ<><D6B8>ʱ<EFBFBD><CAB1>Уʱ<D0A3><CAB1>12Сʱ<D0A1><CAB1>
|
||||
//size=ledsender.pkg_adjust_time_ex(packet, (byte)addr, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)+1, calendar.get(Calendar.DAY_OF_WEEK)-1, calendar.get(Calendar.DAY_OF_MONTH), calendar.get(Calendar.HOUR), calendar.get(Calendar.MINUTE), calendar.get(Calendar.SECOND));
|
||||
//ָ<><D6B8>ʱ<EFBFBD><CAB1>Уʱ<D0A3><CAB1>24Сʱ<D0A1><CAB1>
|
||||
//size=ledsender.pkg_adjust_time_ex(packet, (byte)addr, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)+1, calendar.get(Calendar.DAY_OF_WEEK)-1, calendar.get(Calendar.DAY_OF_MONTH), calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE), calendar.get(Calendar.SECOND));
|
||||
//<2F>Ե<EFBFBD>ǰϵͳʱ<CDB3><CAB1>Уʱ
|
||||
size = ledsender.pkg_adjust_time(packet, (byte) addr);
|
||||
System.out.println("У<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_switch_on() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_set_switch(packet, (byte) addr, 1);
|
||||
System.out.println("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>5V<EFBFBD><EFBFBD><EFBFBD>...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_switch_off() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_set_switch(packet, (byte) addr, 0);
|
||||
System.out.println("<EFBFBD>ر<EFBFBD>5V<EFBFBD><EFBFBD><EFBFBD>...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_get_boardparam() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
size = ledsender.pkg_get_boardparam(packet, (byte) addr);
|
||||
System.out.println("<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
public static void demo_set_boardparam_ip(String ip) {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
byte[] ips = new byte[4];
|
||||
int i, k, k1, x;
|
||||
size = ledsender.pkg_get_boardparam(packet, (byte) addr);
|
||||
System.out.println("<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||
if (do_command(packet, size) == 1) {
|
||||
k = 0;
|
||||
x = 0;
|
||||
ip = ip + '.';
|
||||
for (i = 0; i < 4; i++) {
|
||||
k1 = ip.indexOf('.', k);
|
||||
if (k1 > k) {
|
||||
ips[i] = (byte) Integer.parseInt(ip.substring(k, k1));
|
||||
k = k1 + 1;
|
||||
x++;
|
||||
}
|
||||
}
|
||||
if (x == 4) {
|
||||
size = ledsender.pkg_set_boardparam_ip(packet, (byte) addr, ips);
|
||||
if (size > 0) {
|
||||
do_command(packet, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void demo_power_schedule() {
|
||||
int size;
|
||||
byte[] packet = new byte[1280];
|
||||
//<2F><>һ<EFBFBD><D2BB>7<EFBFBD><37>ÿ<EFBFBD>ն<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>տ<EFBFBD><D5BF>Զ<EFBFBD><D4B6><EFBFBD>3<EFBFBD><33>ʱ<EFBFBD><CAB1>
|
||||
size = ledsender.pkg_power_schedule_weekday(packet, (byte) addr, true);
|
||||
//<2F><>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>ʱ<EFBFBD>䲥<EFBFBD>ţ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD>21<32><31>ʱ<EFBFBD><CAB1>
|
||||
//size=ledsender.pkg_power_schedule_period(packet, (byte)addr, true);
|
||||
System.out.println("<EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD>...");
|
||||
do_command(packet, size);
|
||||
}
|
||||
|
||||
//dib_bufferΪ<72><CEAA><EFBFBD><EFBFBD>ͼƬ<CDBC><C6AC>RGB<47><42><EFBFBD>飬<EFBFBD><E9A3AC><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飬<EFBFBD><E9A3AC><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5>RGBֵ
|
||||
// <20><><EFBFBD>ص<EFBFBD>(X,Y)<29><>RGBֵ<42><D6B5><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>һ<EFBFBD><D2BB>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>64<36><34><EFBFBD><EFBFBD>32<33><32><EFBFBD><EFBFBD>
|
||||
// (0,0),(0,1),(0,2),...(0,31) (1,0),(1,1),(1,2),...(1,31) (2,0),(2,1),(2,2),...(2,31) ... (63,0),(63,1),(63,2),...(63,31)
|
||||
// <20><><EFBFBD>ص<EFBFBD><D8B5>RGBֵ<42><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>0-7λ<37><CEBB>ʾ<EFBFBD><CABE>ɫ<EFBFBD><C9AB>8-15λ<35><CEBB>ʾ<EFBFBD><CABE>ɫ<EFBFBD><C9AB>16-23<32><33>ʾ<EFBFBD><CABE>ɫ<EFBFBD><C9AB>24-31λ<31><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
|
||||
// <20><><EFBFBD><EFBFBD>dib_buffer[n]&0xFF <20><>ʾ<EFBFBD><CABE>ɫ
|
||||
// (dib_buffer[n]>>8)&0xFF <20><>ʾ<EFBFBD><CABE>ɫ
|
||||
// (dib_buffer[n]>>16)&0xFF <20><>ʾ<EFBFBD><CABE>ɫ
|
||||
public static int dib_width = 64;
|
||||
public static int dib_height = 64;
|
||||
public static int dib_buffer_size = dib_width * dib_height;
|
||||
public static int[] dib_buffer = new int[dib_buffer_size];
|
||||
|
||||
public static void draw_dib() {
|
||||
int x, y, z = 0;
|
||||
int seek = 0;
|
||||
int color = 0xFF;
|
||||
for (x = 0; x < dib_width; x++) {
|
||||
for (y = 0; y < dib_height; y++) {
|
||||
dib_buffer[seek++] = color;
|
||||
}
|
||||
z++;
|
||||
if (z >= 4) {
|
||||
switch (color) {
|
||||
case 0xFF:
|
||||
color = 0xFF00;
|
||||
break;
|
||||
case 0xFF00:
|
||||
color = 0xFFFF;
|
||||
break;
|
||||
case 0xFFFF:
|
||||
color = 0xFF;
|
||||
break;
|
||||
default:
|
||||
color = 0xFF;
|
||||
break;
|
||||
}
|
||||
z = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void send_data() {
|
||||
int size = 0;
|
||||
byte[] packet = new byte[1280];
|
||||
int i, j, k, x, r;
|
||||
int tx, tx_repeat = 5;
|
||||
boolean ok;
|
||||
//<2F><><EFBFBD><EFBFBD>ΪͨѶ<CDA8><D1B6><EFBFBD>룬<EFBFBD><EBA3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵIJ<DDB5>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UDPͨѶ<CDA8><D1B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (ledsender.GetDataSize() > (1 << 21)) {
|
||||
System.out.println("LED<EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><EFBFBD>ȳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>洢<EFBFBD>ռ<EFBFBD>");
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println("LED<EFBFBD><EFBFBD>Ŀѹ<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><EFBFBD><EFBFBD>" + ledsender.GetDataSize() + "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" + ledsender.get_pkg_count(512));
|
||||
ledsender.Compress();
|
||||
System.out.println("LED<EFBFBD><EFBFBD>Ŀѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><EFBFBD><EFBFBD>" + ledsender.GetDataSize() + "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" + ledsender.get_pkg_count(512));
|
||||
|
||||
//<2F><>ʼ<EFBFBD><CABC>
|
||||
ok = false;
|
||||
//System.out.println("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>...<2E><><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=0");
|
||||
for (tx = 0; tx < tx_repeat; tx++) {
|
||||
size = ledsender.pkg_begin(packet, addr);
|
||||
udp_send(packet, size);
|
||||
for (x = 0; x < 50; x++) {
|
||||
size = udp_receive(packet);
|
||||
if (size > 0 && ledsender.parse_trans_respond(packet, size, LEDSender2010.PKC_BEGIN, 0) > 0) {
|
||||
//System.out.println("<22><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>к<EFBFBD>=0");
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ok) break;
|
||||
}
|
||||
if (!ok) {
|
||||
System.out.println("<EFBFBD><EFBFBD>ʱ");
|
||||
return;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD>ݰ<EFBFBD>
|
||||
k = ledsender.get_pkg_count(512);
|
||||
i = 1;
|
||||
while (i <= k) {
|
||||
ok = false;
|
||||
//System.out.println("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD>...<2E><><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>="+i);
|
||||
for (tx = 0; tx < tx_repeat; tx++) {
|
||||
j = i;
|
||||
size = ledsender.pkg_data(packet, addr, i, 512);
|
||||
udp_send(packet, size);
|
||||
for (x = 0; x < 50; x++) {
|
||||
size = udp_receive(packet);
|
||||
if (size > 0) {
|
||||
r = ledsender.parse_trans_respond(packet, size, LEDSender2010.PKC_DATA, i);
|
||||
switch (r) {
|
||||
case 0x1:
|
||||
//System.out.println("<22><><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>к<EFBFBD>="+i);
|
||||
ok = true;
|
||||
j = i + 1;
|
||||
break;
|
||||
case 0x2:
|
||||
//System.out.println("<22><><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD>к<EFBFBD>У<EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>Ӧ<EFBFBD><D3A6>="+i+"<22><>ʵ<EFBFBD><CAB5>="+ledsender.fix_serialno);
|
||||
j = ledsender.fix_serialno;
|
||||
break;
|
||||
}
|
||||
//ok=true;
|
||||
//break;
|
||||
}
|
||||
if (ok) break;
|
||||
}
|
||||
i = j;
|
||||
if (ok) break;
|
||||
}
|
||||
if (!ok) {
|
||||
System.out.println("<EFBFBD><EFBFBD>ʱ");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ok = false;
|
||||
//System.out.println("<22><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>...<2E><><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>="+i);
|
||||
for (tx = 0; tx < tx_repeat; tx++) {
|
||||
size = ledsender.pkg_end(packet, addr, i);
|
||||
udp_send(packet, size);
|
||||
for (x = 0; x < 50; x++) {
|
||||
size = udp_receive(packet);
|
||||
if (size > 0 && ledsender.parse_trans_respond(packet, size, LEDSender2010.PKC_END, i) > 0) {
|
||||
//System.out.println("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>к<EFBFBD>="+i);
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ok) break;
|
||||
}
|
||||
if (!ok) {
|
||||
System.out.println("<EFBFBD><EFBFBD>ʱ");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
ok=false;
|
||||
for (x=0; x<100; x++){
|
||||
size=udp_receive(packet);
|
||||
switch (ledsender.parse_notify(packet, size)){
|
||||
case LEDSender2010.NOTIFY_ROOT_PLAY:
|
||||
System.out.println("<22><><EFBFBD>ͽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ɹ<EFBFBD>");
|
||||
ok=true;
|
||||
break;
|
||||
case LEDSender2010.NOTIFY_ROOT_DOWNLOAD:
|
||||
System.out.println("<22><><EFBFBD>ؽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ɹ<EFBFBD>");
|
||||
ok=true;
|
||||
break;
|
||||
}
|
||||
if (ok) break;
|
||||
}
|
||||
if (!ok) System.out.println("<22><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><F3A3ACB7><EFBFBD>/<2F><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>");
|
||||
*/
|
||||
}
|
||||
|
||||
public static boolean send_data1(String ip) {
|
||||
int size = 0;
|
||||
byte[] packet = new byte[1280];
|
||||
int i, j, k, x, r;
|
||||
int tx, tx_repeat = 5;
|
||||
boolean ok;
|
||||
// 下面为通讯代码,包括数据的拆分打包、发送
|
||||
// 由于是UDP通讯,增加
|
||||
|
||||
// 如果数据量大于上限,直接返回失败
|
||||
if (ledsender.GetDataSize() > (1 << 21)) {
|
||||
System.out.println("LED节目数据长度超出显示屏存储空间");
|
||||
return false;
|
||||
}
|
||||
|
||||
ledsender.Compress();
|
||||
|
||||
// 起始包发送
|
||||
ok = false;
|
||||
for (tx = 0; tx < tx_repeat; tx++) {
|
||||
size = ledsender.pkg_begin(packet, addr);
|
||||
udp_send1(ip, packet, size);
|
||||
for (x = 0; x < 50; x++) {
|
||||
size = udp_receive(packet);
|
||||
if (size > 0 && ledsender.parse_trans_respond(packet, size, LEDSender2010.PKC_BEGIN, 0) > 0) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ok) break;
|
||||
}
|
||||
// 起始包超时,返回失败
|
||||
if (!ok) {
|
||||
System.out.println("起始包发送超时");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 数据包发送
|
||||
k = ledsender.get_pkg_count(512);
|
||||
i = 1;
|
||||
while (i <= k) {
|
||||
ok = false;
|
||||
for (tx = 0; tx < tx_repeat; tx++) {
|
||||
j = i;
|
||||
size = ledsender.pkg_data(packet, addr, i, 512);
|
||||
udp_send1(ip, packet, size);
|
||||
for (x = 0; x < 50; x++) {
|
||||
size = udp_receive(packet);
|
||||
if (size > 0) {
|
||||
r = ledsender.parse_trans_respond(packet, size,LEDSender2010.PKC_DATA, i);
|
||||
switch (r) {
|
||||
case 0x1:
|
||||
ok = true;
|
||||
j = i + 1;
|
||||
break;
|
||||
case 0x2:
|
||||
j = ledsender.fix_serialno;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ok) break;
|
||||
}
|
||||
i = j;
|
||||
if (ok) break;
|
||||
}
|
||||
// 数据包超时,返回失败
|
||||
if (!ok) {
|
||||
System.out.println("数据包发送超时");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 结束包发送
|
||||
ok = false;
|
||||
for (tx = 0; tx < tx_repeat; tx++) {
|
||||
size = ledsender.pkg_end(packet, addr, i);
|
||||
udp_send1(ip, packet, size);
|
||||
for (x = 0; x < 50; x++) {
|
||||
size = udp_receive(packet);
|
||||
if (size > 0 && ledsender.parse_trans_respond(packet, size, LEDSender2010.PKC_END, i) > 0) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ok) break;
|
||||
}
|
||||
// 结束包超时,返回失败
|
||||
if (!ok) {
|
||||
System.out.println("结束包发送超时");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 所有步骤执行成功,返回true
|
||||
System.out.println("数据发送全部完成");
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void demo_upgrade() {
|
||||
ledsender.Upgrade("d:\\vsd.bin");
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_play() {
|
||||
//String[] formats={"#y", "<22><>", "#m", "<22><>", "#d", "<22><>", " ", "#h", ":", "#n", ":", "#s"};
|
||||
//String[] formats={"#h", ":", "#n", ":", "#s"};
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
//ledsender.MakeRoot(LEDSender2010.ROOT_PLAY, LEDSender2010.COLOR_TYPE_THREE);
|
||||
//ledsender.MakeRoot(LEDSender2010.ROOT_PLAY, LEDSender2010.COLOR_TYPE_FULL);
|
||||
ledsender.AddChapter(1, 1000);
|
||||
ledsender.AddRegion(0, 0, 256, 64);
|
||||
|
||||
/*
|
||||
//<2F><><EFBFBD><EFBFBD>ͼƬ
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
//draw_dib();
|
||||
//ledsender.AddDib(0, 0, 64, 64, dib_buffer, dib_buffer_size, dib_width, dib_height, 1, 5, 2, 5, 0, 0, 1000);
|
||||
BufferedImage bi;
|
||||
try {
|
||||
bi = LEDSender2010.createImageEx("<22>л<EFBFBD><D0BB><EFBFBD><EFBFBD><F1B9B2BA>", new Font("<22><><EFBFBD><EFBFBD>", Font.BOLD, 24), Color.BLACK, Color.CYAN, 0, false, 64);
|
||||
System.out.println("width:"+bi.getWidth()+"height:"+bi.getHeight());
|
||||
ledsender.AddWindow(0, 0, 64, 64, LEDSender2010.getBufferedImageRGB(bi), bi.getWidth() * bi.getHeight(), bi.getWidth(), bi.getHeight(), 2, 0, 2, 0, 0, 0, 0);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
*/
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD>У<EFBFBD>֧<EFBFBD>ֶ<EFBFBD><D6B6>뷽ʽ<EBB7BD><CABD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
//ledsender.AddTextJuhao(0, 0, 64, 32, "<22><>ӭ<EFBFBD><D3AD><EFBFBD>١<EFBFBD>лл<D0BB>ݹˡ<DDB9>", "<22><><EFBFBD><EFBFBD>", 24, Color.BLACK, Color.RED, 0, 2, true, 2, 0, 2, 0, 0, 0, 0);
|
||||
ledsender.AddTextEx(0, 0, 128, 32, "<EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",LEDSender2010.ALIGN_LEFT,LEDSender2010.ALIGN_TOP, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 16, Color.BLACK, new Color(255, 0, 0), 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
//ledsender.AddTextEx(128, 0, 160, 32, "лл<D0BB>ݹ<EFBFBD>", LEDSender2010.ALIGN_LEFT, LEDSender2010.ALIGN_TOP, "<22><><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
|
||||
//ledsender.AddLeaf(1, 2000);
|
||||
//ledsender.AddTextEx(0, 0, 128, 32, "ͬһ<CDAC><D2BB><EFBFBD>й<EFBFBD>", LEDSender2010.ALIGN_LEFT, LEDSender2010.ALIGN_TOP, "<22><><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
//ledsender.AddTextEx(128, 0, 160, 32, "ͬһ<CDAC><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", LEDSender2010.ALIGN_LEFT, LEDSender2010.ALIGN_TOP, "<22><><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
|
||||
/*
|
||||
//24<32><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddString(0, 0, 64, 32, "<22><>ӭ<EFBFBD><D3AD><EFBFBD><EFBFBD>abc", 2, 0, 2, 0, 0, 0, 0, 0xFF, 1);
|
||||
//24<32><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC>ʽyyyy<79><79>mm<6D><6D>dd<64><64>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddStringDateTime(0, 0, 256, 32, 0xFFFF, 1, formats, 6);
|
||||
*/
|
||||
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_play2() {
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_DOWNLOAD,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
//ledsender.MakeRoot(LEDSender2010.ROOT_PLAY, LEDSender2010.COLOR_TYPE_THREE);
|
||||
ledsender.AddChapter(1, 1000000);
|
||||
ledsender.AddRegion(0, 0, 256, 64);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD>У<EFBFBD>֧<EFBFBD>ֶ<EFBFBD><D6B6>뷽ʽ<EBB7BD><CABD>
|
||||
ledsender.AddLeaf(1, 200000);
|
||||
ledsender.AddWindows(0, 0, 64, 32);
|
||||
ledsender.AddChildText("<EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.RED, 0, 0, false, 6, 0, 2, 0, 0, 0, 0);
|
||||
ledsender.AddChildText("лл<EFBFBD>ݹ<EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.RED, 0, 0, false, 6, 0, 2, 0, 0, 0, 0);
|
||||
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_play_chapterschedule() {
|
||||
//String[] formats={"#y", "<22><>", "#m", "<22><>", "#d", "<22><>", " ", "#h", ":", "#n", ":", "#s"};
|
||||
//String[] formats={"#h", ":", "#n", ":", "#s"};
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
|
||||
ledsender.AddChapterEx(1, 1000, 1, 1, 0x7F, 2016, 8, 17, 0, 0, 0, 2016, 12, 27, 23, 59, 59);
|
||||
ledsender.AddRegion(0, 0, 64, 64);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>У<EFBFBD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddText(0, 0, 64, 32, "<EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>abc", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 2, true, 3, 0, 2, 0, 0, 0, 0);
|
||||
|
||||
ledsender.AddChapterEx(1, 1000, 1, 1, 0x7F, 2016, 4, 28, 10, 10, 0, 2016, 12, 27, 23, 15, 0);
|
||||
ledsender.AddRegion(0, 0, 64, 64);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD>У<EFBFBD>֧<EFBFBD>ֶ<EFBFBD><D6B6>뷽ʽ<EBB7BD><CABD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddTextEx(0, 0, 64, 32, "лл<EFBFBD>ݹ<EFBFBD>abc",LEDSender2010.ALIGN_CENTER,LEDSender2010.ALIGN_TOP, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_play_picture() {
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
ledsender.AddChapter(1, 1000);
|
||||
ledsender.AddRegion(0, 0, 64, 64);
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddPicture(0, 0, 64, 64, "c:\\demo.bmp", 1, 0, 2, 0, 0, 0, 0);
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_play_voice() {
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
ledsender.AddChapter(1, 1000);
|
||||
ledsender.AddRegion(0, 0, 64, 64);
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddTextEx(0, 0, 64, 32, "<EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>",LEDSender2010.ALIGN_CENTER,LEDSender2010.ALIGN_TOP, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
ledsender.AddVoice("<EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 5000, 10, 0, 5, 5, 1);
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_datetime_play() {
|
||||
String[] formats_datetime = {"#y", "<EFBFBD><EFBFBD>", "#m", "<EFBFBD><EFBFBD>", "#d", "<EFBFBD><EFBFBD>", " ", "#h", ":", "#n", ":", "#s"};
|
||||
String[] formats_date = {"#y", "<EFBFBD><EFBFBD>", "#m", "<EFBFBD><EFBFBD>", "#d", "<EFBFBD><EFBFBD>"};
|
||||
String[] formats_time = {"#h", ":", "#n", ":", "#s"};
|
||||
String[] formats_week = {"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "#w"};
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
//ledsender.MakeRoot(LEDSender2010.ROOT_PLAY, LEDSender2010.COLOR_TYPE_THREE);
|
||||
ledsender.AddChapter(1, 10000);
|
||||
ledsender.AddRegion(0, 0, 64, 64);
|
||||
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddDateTime(0, 0, 64, 32, formats_datetime, 12, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.YELLOW, 0);
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddDateTime(0, 0, 64, 32, formats_date, 6, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0);
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddDateTime(0, 0, 64, 32, formats_time, 5, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.GREEN, 0);
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddDateTime(0, 0, 64, 32, formats_week, 2, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0);
|
||||
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_schedule_child_play() {
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
//String[] formats_datetime={"#y", "<22><>", "#m", "<22><>", "#d", "<22><>", " ", "#h", ":", "#n", ":", "#s"};
|
||||
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
ledsender.AddChapter(1, 10000);
|
||||
ledsender.AddRegion(0, 0, 64, 64);
|
||||
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddWindows(0, 0, 64, 32);
|
||||
//ledsender.AddChildText("abc", "<22><><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, false, 1, 0, 2, 0, 0, 0, 0);
|
||||
ledsender.AddChildScheduleText("<EFBFBD><EFBFBD>ӭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 0, false, 1, 0, 2, 0, 0, 0, 2000, 2, 0x0, 2018, 2, 5, 7, 10, 0, 2018, 2, 6, 23, 15, 0);
|
||||
ledsender.AddChildScheduleText("лл<EFBFBD>ݹ<EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 0, false, 1, 0, 2, 0, 0, 0, 2000, 2, 0x0, 2018, 2, 5, 7, 10, 0, 2018, 2, 6, 23, 15, 0);
|
||||
ledsender.AddChildScheduleText("ͬһ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 0, false, 1, 0, 2, 0, 0, 0, 2000, 2, 0x0, 2018, 2, 8, 7, 10, 0, 2018, 2, 9, 23, 15, 0);
|
||||
ledsender.AddChildScheduleText("ͬһ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 0, false, 1, 0, 2, 0, 0, 0, 2000, 2, 0x0, 2018, 2, 8, 7, 10, 0, 2018, 2, 9, 23, 15, 0);
|
||||
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_fontset_import(MyUdpSocket udp, String ip, int num, String text) {
|
||||
byte[] packet = new byte[1024];
|
||||
byte[] s;
|
||||
int i, size;
|
||||
int c;
|
||||
|
||||
size = 0;
|
||||
try {
|
||||
s = text.getBytes("GB2312");
|
||||
size = 0;
|
||||
packet[size++] = 0x55;
|
||||
packet[size++] = 0x25;
|
||||
packet[size++] = 0x3E;
|
||||
packet[size++] = (byte) (((num / 100) % 10) + 0x30);
|
||||
packet[size++] = (byte) (((num / 10) % 10) + 0x30);
|
||||
packet[size++] = (byte) ((num % 10) + 0x30);
|
||||
for (i = 0; i < s.length; i++) {
|
||||
if (s[i] >= 0) c = s[i];
|
||||
else c = (256 + s[i]);
|
||||
switch (c >> 4) {
|
||||
case 0:
|
||||
packet[size++] = 0x30;
|
||||
break;
|
||||
case 1:
|
||||
packet[size++] = 0x31;
|
||||
break;
|
||||
case 2:
|
||||
packet[size++] = 0x32;
|
||||
break;
|
||||
case 3:
|
||||
packet[size++] = 0x33;
|
||||
break;
|
||||
case 4:
|
||||
packet[size++] = 0x34;
|
||||
break;
|
||||
case 5:
|
||||
packet[size++] = 0x35;
|
||||
break;
|
||||
case 6:
|
||||
packet[size++] = 0x36;
|
||||
break;
|
||||
case 7:
|
||||
packet[size++] = 0x37;
|
||||
break;
|
||||
case 8:
|
||||
packet[size++] = 0x38;
|
||||
break;
|
||||
case 9:
|
||||
packet[size++] = 0x39;
|
||||
break;
|
||||
case 10:
|
||||
packet[size++] = 0x61;
|
||||
break;
|
||||
case 11:
|
||||
packet[size++] = 0x62;
|
||||
break;
|
||||
case 12:
|
||||
packet[size++] = 0x63;
|
||||
break;
|
||||
case 13:
|
||||
packet[size++] = 0x64;
|
||||
break;
|
||||
case 14:
|
||||
packet[size++] = 0x65;
|
||||
break;
|
||||
case 15:
|
||||
packet[size++] = 0x66;
|
||||
break;
|
||||
default:
|
||||
packet[size++] = 0x30;
|
||||
break;
|
||||
}
|
||||
switch (c & 0xF) {
|
||||
case 0:
|
||||
packet[size++] = 0x30;
|
||||
break;
|
||||
case 1:
|
||||
packet[size++] = 0x31;
|
||||
break;
|
||||
case 2:
|
||||
packet[size++] = 0x32;
|
||||
break;
|
||||
case 3:
|
||||
packet[size++] = 0x33;
|
||||
break;
|
||||
case 4:
|
||||
packet[size++] = 0x34;
|
||||
break;
|
||||
case 5:
|
||||
packet[size++] = 0x35;
|
||||
break;
|
||||
case 6:
|
||||
packet[size++] = 0x36;
|
||||
break;
|
||||
case 7:
|
||||
packet[size++] = 0x37;
|
||||
break;
|
||||
case 8:
|
||||
packet[size++] = 0x38;
|
||||
break;
|
||||
case 9:
|
||||
packet[size++] = 0x39;
|
||||
break;
|
||||
case 10:
|
||||
packet[size++] = 0x61;
|
||||
break;
|
||||
case 11:
|
||||
packet[size++] = 0x62;
|
||||
break;
|
||||
case 12:
|
||||
packet[size++] = 0x63;
|
||||
break;
|
||||
case 13:
|
||||
packet[size++] = 0x64;
|
||||
break;
|
||||
case 14:
|
||||
packet[size++] = 0x65;
|
||||
break;
|
||||
case 15:
|
||||
packet[size++] = 0x66;
|
||||
break;
|
||||
default:
|
||||
packet[size++] = 0x30;
|
||||
break;
|
||||
}
|
||||
}
|
||||
packet[size++] = 0x23;
|
||||
packet[size++] = (byte) 0xAA;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
if (size > 0) {
|
||||
try {
|
||||
udp = new MyUdpSocket(8868);
|
||||
udp.send(ip, 6666, packet, size);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ֻ<><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ŀ
|
||||
public static void demo_play_sub_chapter() {
|
||||
ledsender.MakeChapter(LEDSender2010.ROOT_PLAY_CHAPTER,LEDSender2010.COLOR_TYPE_DOUBLE, 1, 0, 1, 1000);
|
||||
ledsender.AddRegion(0, 0, 64, 64);
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddTextEx(0, 0, 64, 32, "abc",LEDSender2010.ALIGN_CENTER,LEDSender2010.ALIGN_TOP, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
send_data();
|
||||
}
|
||||
|
||||
public static void demo_play_sub_chapter_ex() {
|
||||
ledsender.MakeChapterEx(LEDSender2010.ROOT_PLAY_CHAPTER,LEDSender2010.COLOR_TYPE_DOUBLE, 1, 0, 1, 1000, 1, 1, 0x7F, 2016, 8, 17, 0, 0, 0, 2016, 12, 27, 23, 59, 59);
|
||||
ledsender.AddRegion(0, 0, 64, 64);
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddTextEx(0, 0, 64, 32, "abc",LEDSender2010.ALIGN_CENTER,LEDSender2010.ALIGN_TOP, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
send_data();
|
||||
}
|
||||
|
||||
//ֻ<><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public static void demo_play_sub_region() {
|
||||
ledsender.MakeRegion(LEDSender2010.ROOT_PLAY_REGION,LEDSender2010.COLOR_TYPE_DOUBLE, 1, 0, 1, 0, 16, 128, 16);
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddTextEx(0, 0, 64, 32, "abc",LEDSender2010.ALIGN_CENTER,LEDSender2010.ALIGN_TOP, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
send_data();
|
||||
}
|
||||
|
||||
//ֻ<><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ҳ<EFBFBD><D2B3>
|
||||
public static void demo_play_sub_leaf() {
|
||||
String[] formats_datetime = {"#h", ":", "#n", ":", "#s"};
|
||||
ledsender.MakeLeaf(LEDSender2010.ROOT_PLAY_LEAF,LEDSender2010.COLOR_TYPE_DOUBLE, 1, 0, 0, 1, 1, 1000);
|
||||
ledsender.AddTextEx(0, 0, 64, 16, "abc",LEDSender2010.ALIGN_CENTER,LEDSender2010.ALIGN_TOP, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
ledsender.AddDateTime(0, 16, 64, 16, formats_datetime, 12, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 14, Color.BLACK, Color.YELLOW, 0);
|
||||
send_data();
|
||||
}
|
||||
|
||||
//ֻ<><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public static void demo_play_sub_object() {
|
||||
ledsender.MakeObject(LEDSender2010.ROOT_PLAY_OBJECT,LEDSender2010.COLOR_TYPE_DOUBLE, 1, 0, 0, 0, 1);
|
||||
//<2F>˴<EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ledsender.AddTextEx(0, 0, 64, 32, "abc",LEDSender2010.ALIGN_CENTER,LEDSender2010.ALIGN_TOP, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 12, Color.BLACK, Color.RED, 0, 1, 0, 2, 0, 0, 0, 0);
|
||||
send_data();
|
||||
}
|
||||
|
||||
//<2F>Զ<EFBFBD><D4B6>巽<EFBFBD><E5B7BD> <20><>̬<EFBFBD><CCAC>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
public static void demo_play_chapterschedule1(String ip, String msg) {
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
|
||||
ledsender.AddChapterEx(1, 1000, 1, 1, 0x7F, 2016, 8, 17, 0, 0, 0, 2016, 12, 27, 23, 59, 59);
|
||||
ledsender.AddRegion(0, 0, 192, 64);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>У<EFBFBD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddText(8, 24, 192, 64, msg, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
|
||||
send_data1(ip);
|
||||
}
|
||||
|
||||
//<2F>Զ<EFBFBD><D4B6>巽<EFBFBD><E5B7BD> <20><>̬<EFBFBD><CCAC>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
public static boolean demo_play_chapterschedule2(String ip, String msg1, String msg2) {
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
|
||||
ledsender.AddChapterEx(1, 1000, 1, 1, 0x7F, 2016, 8, 17, 0, 0, 0, 2016, 12, 27, 23, 59, 59);
|
||||
ledsender.AddRegion(0, 0, 192, 64);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>У<EFBFBD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddText(0, 11, 192, 32, msg1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(0, 37, 192, 32, msg2, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 16, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
|
||||
return send_data1(ip);
|
||||
}
|
||||
|
||||
//<2F>Զ<EFBFBD><D4B6>巽<EFBFBD><E5B7BD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public static void demo_play_chapterschedule3(String ip, String msg1, String msg2, String msg3, String msg4, String msg5, String msg) {
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
|
||||
ledsender.AddChapterEx(1, 1000, 1, 1, 0x7F, 2016, 8, 17, 0, 0, 0, 2016, 12, 27, 23, 59, 59);
|
||||
ledsender.AddRegion(0, 0, 400, 300);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>У<EFBFBD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddText(0, 0, 192, 21, msg, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(0, 12, 192, 21, msg1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(0, 24, 192, 21, msg2, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(0, 36, 192, 22, msg3, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
// ledsender.AddText(0, 48, 192, 22, msg4, "<22><><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
// ledsender.AddText(0, 50, 192, 22, msg5, "<22><><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
|
||||
send_data1(ip);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//<2F>Զ<EFBFBD><D4B6>巽<EFBFBD><E5B7BD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public static void demo_play_chapterschedule4(String ip, String msg1, String msg2, String msg3, String msg, String msgSpec, String msgProduct, String ms7, String msg8) {
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
|
||||
ledsender.AddChapterEx(1, 1000, 1, 1, 0x7F, 2016, 8, 17, 0, 0, 0, 2016, 12, 27, 23, 59, 59);
|
||||
ledsender.AddRegion(0, 0, 400, 300);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>У<EFBFBD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddText(0, 0, 192, 21, msg, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(0, 15, 192, 21, msg1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(0, 30, 192, 21, msg2, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(0, 45, 192, 22, msg3, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
// ledsender.AddText(0, 48, 192, 22, msg4, "<22><><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
// ledsender.AddText(0, 50, 192, 22, msg5, "<22><><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
|
||||
send_data1(ip);
|
||||
}
|
||||
|
||||
|
||||
public static boolean demo_play_chapterschedule4(String ip, String msg1, String msg2, String msg3, String msg,String msg5,String msg6,String msg7,String msg8, String msgQuantity) {
|
||||
|
||||
//<2F><><EFBFBD>ɽ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
|
||||
ledsender.MakeRoot(LEDSender2010.ROOT_PLAY,LEDSender2010.COLOR_TYPE_DOUBLE);
|
||||
|
||||
ledsender.AddChapterEx(1, 1000, 1, 1, 0x7F, 2016, 8, 17, 0, 0, 0, 2016, 12, 27, 23, 59, 59);
|
||||
ledsender.AddRegion(0, 0, 400, 300);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>У<EFBFBD>
|
||||
ledsender.AddLeaf(1, 2000);
|
||||
ledsender.AddText(0, 0, 192, 21, msg, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(0, 15, 192, 21, msg1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(65, 15, 192, 21, msg6, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 7, 0, 0, 5, 3000);
|
||||
ledsender.AddText(0, 30, 192, 21, msg2, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(65, 30, 192, 21, msg5, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 7, 0, 0, 5, 3000);
|
||||
ledsender.AddText(0, 45, 192, 22, msg3, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(65, 45, 192, 22, msgQuantity, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 7, 0, 0, 5, 3000);
|
||||
ledsender.AddText(0, 60, 192, 21, msg7, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 2, 0, 0, 5, 10000);
|
||||
ledsender.AddText(65, 60, 192, 21, msg8, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 13, Color.BLACK, Color.YELLOW, 0, 2, false, 1, 0, 7, 0, 0, 5, 3000);
|
||||
|
||||
|
||||
return send_data1(ip);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
try {
|
||||
my_udp = new MyUdpSocket(8818);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
//demo_play();
|
||||
//demo_play_voice();
|
||||
//demo_fontset_import(my_udp, "192.168.1.99", 0, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>123");
|
||||
//demo_reset_display();
|
||||
//demo_play_chapterschedule();
|
||||
//demo_upgrade();
|
||||
//demo_datetime_play();
|
||||
//demo_play_picture();
|
||||
//demo_schedule_child_play();
|
||||
demo_get_boardparam();
|
||||
//demo_set_boardparam_ip("192.168.1.99");
|
||||
//demo_power_off();
|
||||
//demo_power_on();
|
||||
//demo_get_power();
|
||||
//demo_set_bright();
|
||||
//demo_get_bright();
|
||||
//demo_adjust_time();
|
||||
//demo_switch_on();
|
||||
//demo_switch_off();
|
||||
//demo_power_schedule();
|
||||
|
||||
System.out.println("<EFBFBD><EFBFBD><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD>.");
|
||||
}
|
||||
|
||||
}
|
||||
27
ruoyi-admin/src/main/java/com/ruoyi/Dzp/domain/basLed.java
Normal file
27
ruoyi-admin/src/main/java/com/ruoyi/Dzp/domain/basLed.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.Dzp.domain;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class basLed extends BaseEntity {
|
||||
|
||||
private int id;
|
||||
private String product_id;
|
||||
private String spec;
|
||||
private String quantity;
|
||||
private String sendFlag;
|
||||
private String ipAddress;
|
||||
private String trayCode;
|
||||
private String model;
|
||||
private String productName;
|
||||
private String errorMsg;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.Dzp.mapper;
|
||||
|
||||
import com.ruoyi.Dzp.domain.basLed;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasLedMapper {
|
||||
|
||||
|
||||
List<basLed> selectBasLedList(basLed BasLed);
|
||||
|
||||
void updateBasLed(basLed BasLed);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class BatchNoGenerator{
|
||||
// 日期格式化模板:固定生成 yyyyMMdd 格式
|
||||
private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
|
||||
// 原子引用:存储当前日期,CAS保证【日期判断+重置】的原子性
|
||||
private static final AtomicReference<String> CURRENT_DATE =
|
||||
new AtomicReference<>(LocalDate.now().format(DATE_FORMATTER));
|
||||
|
||||
// 原子整数:流水号计数器,CPU级指令保证自增原子性
|
||||
private static final AtomicInteger SERIAL_NUMBER = new AtomicInteger(1);
|
||||
|
||||
// 流水号最大长度(4位,最大值9999)
|
||||
private static final int MAX_SERIAL = 9999;
|
||||
private static final String SERIAL_FORMAT = "%04d";
|
||||
|
||||
/**
|
||||
* 生成唯一批号(多线程安全,原子操作)
|
||||
* @return yyyyMMdd+4位流水号
|
||||
*/
|
||||
public static String generateBatchNo() {
|
||||
// 获取当前系统日期
|
||||
String today = LocalDate.now().format(DATE_FORMATTER);
|
||||
|
||||
// CAS自旋:保证日期判断、重置、计数的原子性
|
||||
while (true) {
|
||||
// 读取缓存的日期
|
||||
String cacheDate = CURRENT_DATE.get();
|
||||
|
||||
// 场景1:当天未跨天,直接生成流水号
|
||||
if (today.equals(cacheDate)) {
|
||||
// 原子自增获取当前序号
|
||||
int currentNum = SERIAL_NUMBER.getAndIncrement();
|
||||
|
||||
// 防止4位流水号溢出(超过9999)
|
||||
if (currentNum > MAX_SERIAL) {
|
||||
// 重置序号,抛出异常提示
|
||||
SERIAL_NUMBER.set(1);
|
||||
throw new RuntimeException("当日批号已达上限:" + MAX_SERIAL);
|
||||
}
|
||||
|
||||
// 拼接日期+4位流水号,返回结果
|
||||
return today + String.format(SERIAL_FORMAT, currentNum);
|
||||
}
|
||||
|
||||
// 场景2:跨天了,CAS原子更新日期并重置流水号
|
||||
if (CURRENT_DATE.compareAndSet(cacheDate, today)) {
|
||||
// 只有一个线程能执行到这里,重置为1
|
||||
SERIAL_NUMBER.set(1);
|
||||
return today + String.format(SERIAL_FORMAT, 1);
|
||||
}
|
||||
|
||||
// CAS更新失败:说明其他线程已完成跨天重置,重新循环
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// 模拟20个线程同时生成批号
|
||||
for (int i = 0; i < 20; i++) {
|
||||
new Thread(() -> {
|
||||
String batchNo = generateBatchNo();
|
||||
System.out.println("线程:" + Thread.currentThread().getName() + ",生成批号:" + batchNo);
|
||||
}).start();
|
||||
}
|
||||
|
||||
Thread.sleep(1000);
|
||||
System.out.println("=== 所有批号生成完成,无重复、无乱序 ===");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.api.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class CallBackErp implements Serializable {
|
||||
|
||||
/**
|
||||
|
||||
* | 方向 | 字段名 | 对应方向 | 字段名 |
|
||||
* | ------- | ---------------- | -------- | -------- |
|
||||
* | ERP→WMS | companyShortName | WMS→ERP | ccompany | 公司简称
|
||||
* | ERP→WMS | accountSetNo | WMS→ERP | cacc_id | 账套号
|
||||
* | ERP→WMS | warehouseId | WMS→ERP | cwhcode | 仓库
|
||||
* | ERP→WMS | customerId | WMS→ERP | cvencode | 客户
|
||||
* | ERP→WMS | customerName | WMS→ERP | cvenname | 客户名称
|
||||
* | ERP→WMS | remark | WMS→ERP | cmemo |
|
||||
*
|
||||
*/
|
||||
// 公司名称
|
||||
@JsonProperty("ccompany")
|
||||
private String ccompany;
|
||||
// WMS单据号
|
||||
@JsonProperty("ccode")
|
||||
private String ccode;
|
||||
// 操作日期
|
||||
@JsonProperty("ddate")
|
||||
private String ddate;
|
||||
// 业务类型
|
||||
@JsonProperty("cintype")
|
||||
private String cintype;
|
||||
// 供应商编码
|
||||
@JsonProperty("cvencode")
|
||||
private String cvencode;
|
||||
// 供应商名称
|
||||
@JsonProperty("cvenname")
|
||||
private String cvenname;
|
||||
// 出/入库人 操作人
|
||||
@JsonProperty("coptname")
|
||||
private String coptname;
|
||||
// 仓库编码
|
||||
@JsonProperty("cwhcode")
|
||||
private String cwhcode;
|
||||
// 仓库名称
|
||||
@JsonProperty("cwhname")
|
||||
private String cwhname;
|
||||
// 备注
|
||||
@JsonProperty("cmemo")
|
||||
private String cmemo;
|
||||
// 账套号
|
||||
@JsonProperty("cacc_id")
|
||||
private String cacc_id;
|
||||
// 子明细
|
||||
@JsonProperty("details")
|
||||
private List<CallBackErpItems> details;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.api.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class CallBackErpItems implements Serializable {
|
||||
/**
|
||||
*
|
||||
* | 方向 | 字段名 | 对应方向 | 字段名 |
|
||||
* | ------- | ------------- | -------- | --------- |
|
||||
* | ERP→WMS | lineNo | WMS→ERP | srcrowno |
|
||||
* | ERP→WMS | sourceLineId | WMS→ERP | srcids |
|
||||
* | ERP→WMS | oldProjectNo | WMS→ERP | cxmh |
|
||||
* | ERP→WMS | projectNo | WMS→ERP | cnewxmh |
|
||||
* | ERP→WMS | isBatchManage | WMS→ERP | binvbatch |
|
||||
* | ERP→WMS | lotNo | WMS→ERP | cbatch |
|
||||
*/
|
||||
|
||||
@JsonProperty("cinvcode")
|
||||
private String cinvcode;
|
||||
@JsonProperty("cinvname")
|
||||
private String cinvname;
|
||||
@JsonProperty("cinvstd")
|
||||
private String cinvstd;
|
||||
@JsonProperty("cinvm_unit")
|
||||
private String cinvm_unit;
|
||||
@JsonProperty("cposcode")
|
||||
private String cposcode;
|
||||
@JsonProperty("cposname")
|
||||
private String cposname;
|
||||
@JsonProperty("ctrayname")
|
||||
private String ctrayname;
|
||||
@JsonProperty("cbatch")
|
||||
private String cbatch;
|
||||
@JsonProperty("iquantity")
|
||||
private Integer iquantity;
|
||||
@JsonProperty("cxmh")
|
||||
private String cxmh;
|
||||
@JsonProperty("cnewxmh")
|
||||
private String cnewxmh;
|
||||
@JsonProperty("srccode")
|
||||
private String srccode;
|
||||
@JsonProperty("srcids")
|
||||
private Integer srcids;
|
||||
@JsonProperty("srcrowno")
|
||||
private String srcrowno;
|
||||
@JsonProperty("binvbatch")
|
||||
private Integer binvbatch;
|
||||
@JsonProperty("jobid")
|
||||
private String jobid;
|
||||
@JsonProperty("stg_location")
|
||||
private String stg_location;
|
||||
@JsonProperty("groupNum")
|
||||
private String groupNum;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.api.domain;
|
||||
|
||||
public class LocationDetail {
|
||||
|
||||
private String locationNo;
|
||||
|
||||
private String areaNo;
|
||||
|
||||
private String quantity;
|
||||
|
||||
private String lotNo;
|
||||
|
||||
public String getLocationNo() {
|
||||
return locationNo;
|
||||
}
|
||||
|
||||
public void setLocationNo(String locationNo) {
|
||||
this.locationNo = locationNo;
|
||||
}
|
||||
|
||||
public String getAreaNo() {
|
||||
return areaNo;
|
||||
}
|
||||
|
||||
public void setAreaNo(String areaNo) {
|
||||
this.areaNo = areaNo;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getLotNo() {
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo) {
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.api.moveMsg.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.api.moveMsg.domain.MoveMsg;
|
||||
import com.ruoyi.api.moveMsg.service.IMoveMsgService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 移库信息回传Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/moveMsg")
|
||||
public class MoveMsgController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMoveMsgService moveMsgService;
|
||||
|
||||
/**
|
||||
* 查询移库信息回传列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('api:moveMsg:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MoveMsg moveMsg)
|
||||
{
|
||||
startPage();
|
||||
List<MoveMsg> list = moveMsgService.selectMoveMsgList(moveMsg);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出移库信息回传列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('api:moveMsg:export')")
|
||||
@Log(title = "移库信息回传", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MoveMsg moveMsg)
|
||||
{
|
||||
List<MoveMsg> list = moveMsgService.selectMoveMsgList(moveMsg);
|
||||
ExcelUtil<MoveMsg> util = new ExcelUtil<MoveMsg>(MoveMsg.class);
|
||||
util.exportExcel(response, list, "移库信息回传数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取移库信息回传详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('api:moveMsg:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(moveMsgService.selectMoveMsgById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增移库信息回传
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('api:moveMsg:add')")
|
||||
@Log(title = "移库信息回传", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MoveMsg moveMsg)
|
||||
{
|
||||
return toAjax(moveMsgService.insertMoveMsg(moveMsg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改移库信息回传
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('api:moveMsg:edit')")
|
||||
@Log(title = "移库信息回传", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MoveMsg moveMsg)
|
||||
{
|
||||
return toAjax(moveMsgService.updateMoveMsg(moveMsg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除移库信息回传
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('api:moveMsg:remove')")
|
||||
@Log(title = "移库信息回传", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(moveMsgService.deleteMoveMsgByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
package com.ruoyi.api.moveMsg.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 移库信息回传对象 move_msg
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
public class MoveMsg extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 序号 */
|
||||
private String id;
|
||||
|
||||
/** 托盘条码 */
|
||||
@Excel(name = "托盘条码")
|
||||
private String trayCode;
|
||||
|
||||
/** 原货位 */
|
||||
@Excel(name = "原货位")
|
||||
private String oldSpace;
|
||||
|
||||
/** 新货位 */
|
||||
@Excel(name = "新货位")
|
||||
private String newSpace;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 发送时间 */
|
||||
@Excel(name = "发送时间")
|
||||
private String sendTime;
|
||||
|
||||
/** 信息 */
|
||||
@Excel(name = "信息")
|
||||
private String msg;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare1;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare2;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare3;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare4;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare5;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setOldSpace(String oldSpace)
|
||||
{
|
||||
this.oldSpace = oldSpace;
|
||||
}
|
||||
|
||||
public String getOldSpace()
|
||||
{
|
||||
return oldSpace;
|
||||
}
|
||||
|
||||
public void setNewSpace(String newSpace)
|
||||
{
|
||||
this.newSpace = newSpace;
|
||||
}
|
||||
|
||||
public String getNewSpace()
|
||||
{
|
||||
return newSpace;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setSendTime(String sendTime)
|
||||
{
|
||||
this.sendTime = sendTime;
|
||||
}
|
||||
|
||||
public String getSendTime()
|
||||
{
|
||||
return sendTime;
|
||||
}
|
||||
|
||||
public void setMsg(String msg)
|
||||
{
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getMsg()
|
||||
{
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("oldSpace", getOldSpace())
|
||||
.append("newSpace", getNewSpace())
|
||||
.append("status", getStatus())
|
||||
.append("sendTime", getSendTime())
|
||||
.append("msg", getMsg())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.api.moveMsg.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.api.moveMsg.domain.MoveMsg;
|
||||
|
||||
/**
|
||||
* 移库信息回传Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
public interface MoveMsgMapper
|
||||
{
|
||||
/**
|
||||
* 查询移库信息回传
|
||||
*
|
||||
* @param id 移库信息回传主键
|
||||
* @return 移库信息回传
|
||||
*/
|
||||
public MoveMsg selectMoveMsgById(String id);
|
||||
|
||||
/**
|
||||
* 查询移库信息回传列表
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 移库信息回传集合
|
||||
*/
|
||||
public List<MoveMsg> selectMoveMsgList(MoveMsg moveMsg);
|
||||
|
||||
/**
|
||||
* 新增移库信息回传
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMoveMsg(MoveMsg moveMsg);
|
||||
|
||||
/**
|
||||
* 修改移库信息回传
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMoveMsg(MoveMsg moveMsg);
|
||||
|
||||
/**
|
||||
* 删除移库信息回传
|
||||
*
|
||||
* @param id 移库信息回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMoveMsgById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除移库信息回传
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMoveMsgByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.api.moveMsg.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.api.moveMsg.domain.MoveMsg;
|
||||
|
||||
/**
|
||||
* 移库信息回传Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
public interface IMoveMsgService
|
||||
{
|
||||
/**
|
||||
* 查询移库信息回传
|
||||
*
|
||||
* @param id 移库信息回传主键
|
||||
* @return 移库信息回传
|
||||
*/
|
||||
public MoveMsg selectMoveMsgById(String id);
|
||||
|
||||
/**
|
||||
* 查询移库信息回传列表
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 移库信息回传集合
|
||||
*/
|
||||
public List<MoveMsg> selectMoveMsgList(MoveMsg moveMsg);
|
||||
|
||||
/**
|
||||
* 新增移库信息回传
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMoveMsg(MoveMsg moveMsg);
|
||||
|
||||
/**
|
||||
* 修改移库信息回传
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMoveMsg(MoveMsg moveMsg);
|
||||
|
||||
/**
|
||||
* 批量删除移库信息回传
|
||||
*
|
||||
* @param ids 需要删除的移库信息回传主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMoveMsgByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除移库信息回传信息
|
||||
*
|
||||
* @param id 移库信息回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMoveMsgById(String id);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.api.moveMsg.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.api.moveMsg.mapper.MoveMsgMapper;
|
||||
import com.ruoyi.api.moveMsg.domain.MoveMsg;
|
||||
import com.ruoyi.api.moveMsg.service.IMoveMsgService;
|
||||
|
||||
/**
|
||||
* 移库信息回传Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Service
|
||||
public class MoveMsgServiceImpl implements IMoveMsgService
|
||||
{
|
||||
@Autowired
|
||||
private MoveMsgMapper moveMsgMapper;
|
||||
|
||||
/**
|
||||
* 查询移库信息回传
|
||||
*
|
||||
* @param id 移库信息回传主键
|
||||
* @return 移库信息回传
|
||||
*/
|
||||
@Override
|
||||
public MoveMsg selectMoveMsgById(String id)
|
||||
{
|
||||
return moveMsgMapper.selectMoveMsgById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询移库信息回传列表
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 移库信息回传
|
||||
*/
|
||||
@Override
|
||||
public List<MoveMsg> selectMoveMsgList(MoveMsg moveMsg)
|
||||
{
|
||||
return moveMsgMapper.selectMoveMsgList(moveMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增移库信息回传
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMoveMsg(MoveMsg moveMsg)
|
||||
{
|
||||
return moveMsgMapper.insertMoveMsg(moveMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改移库信息回传
|
||||
*
|
||||
* @param moveMsg 移库信息回传
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMoveMsg(MoveMsg moveMsg)
|
||||
{
|
||||
return moveMsgMapper.updateMoveMsg(moveMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除移库信息回传
|
||||
*
|
||||
* @param ids 需要删除的移库信息回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMoveMsgByIds(String[] ids)
|
||||
{
|
||||
return moveMsgMapper.deleteMoveMsgByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除移库信息回传信息
|
||||
*
|
||||
* @param id 移库信息回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMoveMsgById(String id)
|
||||
{
|
||||
return moveMsgMapper.deleteMoveMsgById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.bas.agvPoint.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
|
||||
import com.ruoyi.bas.agvPoint.service.IAgvPointService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* agv站点Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bas/agvPoint")
|
||||
public class AgvPointController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAgvPointService agvPointService;
|
||||
|
||||
/**
|
||||
* 查询agv站点列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:agvPoint:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AgvPoint agvPoint)
|
||||
{
|
||||
startPage();
|
||||
List<AgvPoint> list = agvPointService.selectAgvPointList(agvPoint);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出agv站点列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:agvPoint:export')")
|
||||
@Log(title = "agv站点", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AgvPoint agvPoint)
|
||||
{
|
||||
List<AgvPoint> list = agvPointService.selectAgvPointList(agvPoint);
|
||||
ExcelUtil<AgvPoint> util = new ExcelUtil<AgvPoint>(AgvPoint.class);
|
||||
util.exportExcel(response, list, "agv站点数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取agv站点详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:agvPoint:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(agvPointService.selectAgvPointById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增agv站点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:agvPoint:add')")
|
||||
@Log(title = "agv站点", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AgvPoint agvPoint)
|
||||
{
|
||||
return toAjax(agvPointService.insertAgvPoint(agvPoint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改agv站点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:agvPoint:edit')")
|
||||
@Log(title = "agv站点", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AgvPoint agvPoint)
|
||||
{
|
||||
return toAjax(agvPointService.updateAgvPoint(agvPoint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除agv站点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:agvPoint:remove')")
|
||||
@Log(title = "agv站点", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(agvPointService.deleteAgvPointByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.ruoyi.bas.agvPoint.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* agv站点对象 agv_point
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-17
|
||||
*/
|
||||
public class AgvPoint extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 序号 */
|
||||
private String id;
|
||||
|
||||
/** 站点编号 */
|
||||
@Excel(name = "站点编号")
|
||||
private String station;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare1;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare2;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare3;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setStation(String station)
|
||||
{
|
||||
this.station = station;
|
||||
}
|
||||
|
||||
public String getStation()
|
||||
{
|
||||
return station;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("station", getStation())
|
||||
.append("type", getType())
|
||||
.append("remark", getRemark())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.bas.agvPoint.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@lombok.Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class AgvTask implements Serializable {
|
||||
|
||||
private String startPoint;
|
||||
private String endPoint;
|
||||
private String type;
|
||||
private String trayCode;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.bas.agvPoint.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
|
||||
|
||||
/**
|
||||
* agv站点Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-17
|
||||
*/
|
||||
public interface AgvPointMapper
|
||||
{
|
||||
/**
|
||||
* 查询agv站点
|
||||
*
|
||||
* @param id agv站点主键
|
||||
* @return agv站点
|
||||
*/
|
||||
public AgvPoint selectAgvPointById(String id);
|
||||
|
||||
/**
|
||||
* 查询agv站点列表
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return agv站点集合
|
||||
*/
|
||||
public List<AgvPoint> selectAgvPointList(AgvPoint agvPoint);
|
||||
|
||||
/**
|
||||
* 新增agv站点
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAgvPoint(AgvPoint agvPoint);
|
||||
|
||||
/**
|
||||
* 修改agv站点
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAgvPoint(AgvPoint agvPoint);
|
||||
|
||||
/**
|
||||
* 删除agv站点
|
||||
*
|
||||
* @param id agv站点主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAgvPointById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除agv站点
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAgvPointByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.bas.agvPoint.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
|
||||
|
||||
/**
|
||||
* agv站点Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-17
|
||||
*/
|
||||
public interface IAgvPointService
|
||||
{
|
||||
/**
|
||||
* 查询agv站点
|
||||
*
|
||||
* @param id agv站点主键
|
||||
* @return agv站点
|
||||
*/
|
||||
public AgvPoint selectAgvPointById(String id);
|
||||
|
||||
/**
|
||||
* 查询agv站点列表
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return agv站点集合
|
||||
*/
|
||||
public List<AgvPoint> selectAgvPointList(AgvPoint agvPoint);
|
||||
|
||||
/**
|
||||
* 新增agv站点
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAgvPoint(AgvPoint agvPoint);
|
||||
|
||||
/**
|
||||
* 修改agv站点
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAgvPoint(AgvPoint agvPoint);
|
||||
|
||||
/**
|
||||
* 批量删除agv站点
|
||||
*
|
||||
* @param ids 需要删除的agv站点主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAgvPointByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除agv站点信息
|
||||
*
|
||||
* @param id agv站点主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAgvPointById(String id);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.bas.agvPoint.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bas.agvPoint.mapper.AgvPointMapper;
|
||||
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
|
||||
import com.ruoyi.bas.agvPoint.service.IAgvPointService;
|
||||
|
||||
/**
|
||||
* agv站点Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-03-17
|
||||
*/
|
||||
@Service
|
||||
public class AgvPointServiceImpl implements IAgvPointService
|
||||
{
|
||||
@Autowired
|
||||
private AgvPointMapper agvPointMapper;
|
||||
|
||||
/**
|
||||
* 查询agv站点
|
||||
*
|
||||
* @param id agv站点主键
|
||||
* @return agv站点
|
||||
*/
|
||||
@Override
|
||||
public AgvPoint selectAgvPointById(String id)
|
||||
{
|
||||
return agvPointMapper.selectAgvPointById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询agv站点列表
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return agv站点
|
||||
*/
|
||||
@Override
|
||||
public List<AgvPoint> selectAgvPointList(AgvPoint agvPoint)
|
||||
{
|
||||
return agvPointMapper.selectAgvPointList(agvPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增agv站点
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAgvPoint(AgvPoint agvPoint)
|
||||
{
|
||||
return agvPointMapper.insertAgvPoint(agvPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改agv站点
|
||||
*
|
||||
* @param agvPoint agv站点
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAgvPoint(AgvPoint agvPoint)
|
||||
{
|
||||
return agvPointMapper.updateAgvPoint(agvPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除agv站点
|
||||
*
|
||||
* @param ids 需要删除的agv站点主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAgvPointByIds(String[] ids)
|
||||
{
|
||||
return agvPointMapper.deleteAgvPointByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除agv站点信息
|
||||
*
|
||||
* @param id agv站点主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAgvPointById(String id)
|
||||
{
|
||||
return agvPointMapper.deleteAgvPointById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.out.outStockoutBack.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack;
|
||||
import com.ruoyi.out.outStockoutBack.service.IOutStockoutBackService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库单据主信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/outStockoutBack")
|
||||
public class OutStockoutBackController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOutStockoutBackService outStockoutBackService;
|
||||
|
||||
/**
|
||||
* 查询出库单据主信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OutStockoutBack outStockoutBack)
|
||||
{
|
||||
startPage();
|
||||
List<OutStockoutBack> list = outStockoutBackService.selectOutStockoutBackList(outStockoutBack);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库单据主信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:export')")
|
||||
@Log(title = "出库单据主信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockoutBack outStockoutBack)
|
||||
{
|
||||
List<OutStockoutBack> list = outStockoutBackService.selectOutStockoutBackList(outStockoutBack);
|
||||
ExcelUtil<OutStockoutBack> util = new ExcelUtil<OutStockoutBack>(OutStockoutBack.class);
|
||||
util.exportExcel(response, list, "出库单据主信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单据主信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:query')")
|
||||
@GetMapping(value = "/{stockoutGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("stockoutGuid") String stockoutGuid)
|
||||
{
|
||||
return success(outStockoutBackService.selectOutStockoutBackByStockoutGuid(stockoutGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单据主信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:add')")
|
||||
@Log(title = "出库单据主信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OutStockoutBack outStockoutBack)
|
||||
{
|
||||
return toAjax(outStockoutBackService.insertOutStockoutBack(outStockoutBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单据主信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:edit')")
|
||||
@Log(title = "出库单据主信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OutStockoutBack outStockoutBack)
|
||||
{
|
||||
return toAjax(outStockoutBackService.updateOutStockoutBack(outStockoutBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单据主信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:remove')")
|
||||
@Log(title = "出库单据主信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockoutGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] stockoutGuids)
|
||||
{
|
||||
return toAjax(outStockoutBackService.deleteOutStockoutBackByStockoutGuids(stockoutGuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,464 @@
|
||||
package com.ruoyi.out.outStockoutBack.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 出库单据主信息对象 out_stockout_back
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
public class OutStockoutBack extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 546 guid */
|
||||
@Excel(name = "546 guid")
|
||||
private String stockoutGuid;
|
||||
|
||||
/** 546 单据编码 */
|
||||
@Excel(name = "546 单据编码")
|
||||
private String stockoutId;
|
||||
|
||||
/** 546 出库类型 */
|
||||
@Excel(name = "546 出库类型")
|
||||
private String outType;
|
||||
|
||||
/** 546 单据时间 */
|
||||
@Excel(name = "546 单据时间")
|
||||
private String createDate;
|
||||
|
||||
/** 项目号546 */
|
||||
@Excel(name = "项目号546")
|
||||
private String departmentNo;
|
||||
|
||||
/** 客户编码546 */
|
||||
@Excel(name = "客户编码546")
|
||||
private String customerNo;
|
||||
|
||||
/** 制单人546 */
|
||||
@Excel(name = "制单人546")
|
||||
private String createManId;
|
||||
|
||||
/** 546 单据状态 */
|
||||
@Excel(name = "546 单据状态")
|
||||
private String status;
|
||||
|
||||
/** 单据来源0自建单1接口 */
|
||||
@Excel(name = "单据来源0自建单1接口")
|
||||
private String stockoutSource;
|
||||
|
||||
/** 仓库ID546 */
|
||||
@Excel(name = "仓库ID546")
|
||||
private String warehouseId;
|
||||
|
||||
/** 客户名称546 */
|
||||
@Excel(name = "客户名称546")
|
||||
private String classNowId;
|
||||
|
||||
/** 出口 */
|
||||
@Excel(name = "出口")
|
||||
private String exitId;
|
||||
|
||||
/** 出库方式546 */
|
||||
@Excel(name = "出库方式546")
|
||||
private String carNumber;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String FID;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String erpStockoutId;
|
||||
|
||||
/** 546 */
|
||||
@Excel(name = "546")
|
||||
private String startDate;
|
||||
|
||||
/** 546 */
|
||||
@Excel(name = "546")
|
||||
private String finishDate;
|
||||
|
||||
/** 合同号546 */
|
||||
@Excel(name = "合同号546")
|
||||
private String spare1;
|
||||
|
||||
/** 销售订单号546 */
|
||||
@Excel(name = "销售订单号546")
|
||||
private String spare2;
|
||||
|
||||
/** 审核时间546 */
|
||||
@Excel(name = "审核时间546")
|
||||
private String spare3;
|
||||
|
||||
/** 审核人546 */
|
||||
@Excel(name = "审核人546")
|
||||
private String spare4;
|
||||
|
||||
/** 备注546 */
|
||||
@Excel(name = "备注546")
|
||||
private String spare5;
|
||||
|
||||
/** 配送方式546 1人工2agv */
|
||||
@Excel(name = "配送方式546 1人工2agv")
|
||||
private String spare6;
|
||||
|
||||
/** 出库配送终点546 */
|
||||
@Excel(name = "出库配送终点546")
|
||||
private String spare7;
|
||||
|
||||
/** 1缓存2线边546 */
|
||||
@Excel(name = "1缓存2线边546")
|
||||
private String spare8;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String sendStatus;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String sendTime;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String msg;
|
||||
|
||||
|
||||
|
||||
private String companyShortName;
|
||||
private String accountSetNo;
|
||||
|
||||
public String getCompanyShortName() {
|
||||
return companyShortName;
|
||||
}
|
||||
|
||||
public void setCompanyShortName(String companyShortName) {
|
||||
this.companyShortName = companyShortName;
|
||||
}
|
||||
|
||||
public String getAccountSetNo() {
|
||||
return accountSetNo;
|
||||
}
|
||||
|
||||
public void setAccountSetNo(String accountSetNo) {
|
||||
this.accountSetNo = accountSetNo;
|
||||
}
|
||||
|
||||
public void setStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
this.stockoutGuid = stockoutGuid;
|
||||
}
|
||||
|
||||
public String getStockoutGuid()
|
||||
{
|
||||
return stockoutGuid;
|
||||
}
|
||||
|
||||
public void setStockoutId(String stockoutId)
|
||||
{
|
||||
this.stockoutId = stockoutId;
|
||||
}
|
||||
|
||||
public String getStockoutId()
|
||||
{
|
||||
return stockoutId;
|
||||
}
|
||||
|
||||
public void setOutType(String outType)
|
||||
{
|
||||
this.outType = outType;
|
||||
}
|
||||
|
||||
public String getOutType()
|
||||
{
|
||||
return outType;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setDepartmentNo(String departmentNo)
|
||||
{
|
||||
this.departmentNo = departmentNo;
|
||||
}
|
||||
|
||||
public String getDepartmentNo()
|
||||
{
|
||||
return departmentNo;
|
||||
}
|
||||
|
||||
public void setCustomerNo(String customerNo)
|
||||
{
|
||||
this.customerNo = customerNo;
|
||||
}
|
||||
|
||||
public String getCustomerNo()
|
||||
{
|
||||
return customerNo;
|
||||
}
|
||||
|
||||
public void setCreateManId(String createManId)
|
||||
{
|
||||
this.createManId = createManId;
|
||||
}
|
||||
|
||||
public String getCreateManId()
|
||||
{
|
||||
return createManId;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStockoutSource(String stockoutSource)
|
||||
{
|
||||
this.stockoutSource = stockoutSource;
|
||||
}
|
||||
|
||||
public String getStockoutSource()
|
||||
{
|
||||
return stockoutSource;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setClassNowId(String classNowId)
|
||||
{
|
||||
this.classNowId = classNowId;
|
||||
}
|
||||
|
||||
public String getClassNowId()
|
||||
{
|
||||
return classNowId;
|
||||
}
|
||||
|
||||
public void setExitId(String exitId)
|
||||
{
|
||||
this.exitId = exitId;
|
||||
}
|
||||
|
||||
public String getExitId()
|
||||
{
|
||||
return exitId;
|
||||
}
|
||||
|
||||
public void setCarNumber(String carNumber)
|
||||
{
|
||||
this.carNumber = carNumber;
|
||||
}
|
||||
|
||||
public String getCarNumber()
|
||||
{
|
||||
return carNumber;
|
||||
}
|
||||
|
||||
public void setFID(String FID)
|
||||
{
|
||||
this.FID = FID;
|
||||
}
|
||||
|
||||
public String getFID()
|
||||
{
|
||||
return FID;
|
||||
}
|
||||
|
||||
public void setErpStockoutId(String erpStockoutId)
|
||||
{
|
||||
this.erpStockoutId = erpStockoutId;
|
||||
}
|
||||
|
||||
public String getErpStockoutId()
|
||||
{
|
||||
return erpStockoutId;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate)
|
||||
{
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String getStartDate()
|
||||
{
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setFinishDate(String finishDate)
|
||||
{
|
||||
this.finishDate = finishDate;
|
||||
}
|
||||
|
||||
public String getFinishDate()
|
||||
{
|
||||
return finishDate;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6)
|
||||
{
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare6()
|
||||
{
|
||||
return spare6;
|
||||
}
|
||||
|
||||
public void setSpare7(String spare7)
|
||||
{
|
||||
this.spare7 = spare7;
|
||||
}
|
||||
|
||||
public String getSpare7()
|
||||
{
|
||||
return spare7;
|
||||
}
|
||||
|
||||
public void setSpare8(String spare8)
|
||||
{
|
||||
this.spare8 = spare8;
|
||||
}
|
||||
|
||||
public String getSpare8()
|
||||
{
|
||||
return spare8;
|
||||
}
|
||||
|
||||
public void setSendStatus(String sendStatus)
|
||||
{
|
||||
this.sendStatus = sendStatus;
|
||||
}
|
||||
|
||||
public String getSendStatus()
|
||||
{
|
||||
return sendStatus;
|
||||
}
|
||||
|
||||
public void setSendTime(String sendTime)
|
||||
{
|
||||
this.sendTime = sendTime;
|
||||
}
|
||||
|
||||
public String getSendTime()
|
||||
{
|
||||
return sendTime;
|
||||
}
|
||||
|
||||
public void setMsg(String msg)
|
||||
{
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getMsg()
|
||||
{
|
||||
return msg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutGuid", getStockoutGuid())
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("outType", getOutType())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("departmentNo", getDepartmentNo())
|
||||
.append("customerNo", getCustomerNo())
|
||||
.append("createManId", getCreateManId())
|
||||
.append("status", getStatus())
|
||||
.append("stockoutSource", getStockoutSource())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("classNowId", getClassNowId())
|
||||
.append("exitId", getExitId())
|
||||
.append("carNumber", getCarNumber())
|
||||
.append("FID", getFID())
|
||||
.append("erpStockoutId", getErpStockoutId())
|
||||
.append("startDate", getStartDate())
|
||||
.append("finishDate", getFinishDate())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare6", getSpare6())
|
||||
.append("spare7", getSpare7())
|
||||
.append("spare8", getSpare8())
|
||||
.append("sendStatus", getSendStatus())
|
||||
.append("sendTime", getSendTime())
|
||||
.append("msg", getMsg())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.out.outStockoutBack.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack;
|
||||
|
||||
/**
|
||||
* 出库单据主信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
public interface OutStockoutBackMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库单据主信息
|
||||
*
|
||||
* @param stockoutGuid 出库单据主信息主键
|
||||
* @return 出库单据主信息
|
||||
*/
|
||||
public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid);
|
||||
|
||||
|
||||
public OutStockoutBack selelctTopOutStockout();
|
||||
|
||||
/**
|
||||
* 查询出库单据主信息列表
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 出库单据主信息集合
|
||||
*/
|
||||
public List<OutStockoutBack> selectOutStockoutBackList(OutStockoutBack outStockoutBack);
|
||||
|
||||
/**
|
||||
* 新增出库单据主信息
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutBack(OutStockoutBack outStockoutBack);
|
||||
|
||||
/**
|
||||
* 修改出库单据主信息
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutBack(OutStockoutBack outStockoutBack);
|
||||
|
||||
/**
|
||||
* 删除出库单据主信息
|
||||
*
|
||||
* @param stockoutGuid 出库单据主信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid);
|
||||
|
||||
/**
|
||||
* 批量删除出库单据主信息
|
||||
*
|
||||
* @param stockoutGuids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.out.outStockoutBack.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack;
|
||||
|
||||
/**
|
||||
* 出库单据主信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
public interface IOutStockoutBackService
|
||||
{
|
||||
/**
|
||||
* 查询出库单据主信息
|
||||
*
|
||||
* @param stockoutGuid 出库单据主信息主键
|
||||
* @return 出库单据主信息
|
||||
*/
|
||||
public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid);
|
||||
|
||||
|
||||
|
||||
|
||||
public OutStockoutBack selelctTopOutStockout();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询出库单据主信息列表
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 出库单据主信息集合
|
||||
*/
|
||||
public List<OutStockoutBack> selectOutStockoutBackList(OutStockoutBack outStockoutBack);
|
||||
|
||||
/**
|
||||
* 新增出库单据主信息
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutBack(OutStockoutBack outStockoutBack);
|
||||
|
||||
/**
|
||||
* 修改出库单据主信息
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutBack(OutStockoutBack outStockoutBack);
|
||||
|
||||
/**
|
||||
* 批量删除出库单据主信息
|
||||
*
|
||||
* @param stockoutGuids 需要删除的出库单据主信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids);
|
||||
|
||||
/**
|
||||
* 删除出库单据主信息信息
|
||||
*
|
||||
* @param stockoutGuid 出库单据主信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.out.outStockoutBack.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.outStockoutBack.mapper.OutStockoutBackMapper;
|
||||
import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack;
|
||||
import com.ruoyi.out.outStockoutBack.service.IOutStockoutBackService;
|
||||
|
||||
/**
|
||||
* 出库单据主信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
@Service
|
||||
public class OutStockoutBackServiceImpl implements IOutStockoutBackService
|
||||
{
|
||||
@Autowired
|
||||
private OutStockoutBackMapper outStockoutBackMapper;
|
||||
|
||||
/**
|
||||
* 查询出库单据主信息
|
||||
*
|
||||
* @param stockoutGuid 出库单据主信息主键
|
||||
* @return 出库单据主信息
|
||||
*/
|
||||
@Override
|
||||
public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
return outStockoutBackMapper.selectOutStockoutBackByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutStockoutBack selelctTopOutStockout() {
|
||||
return outStockoutBackMapper.selelctTopOutStockout();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库单据主信息列表
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 出库单据主信息
|
||||
*/
|
||||
@Override
|
||||
public List<OutStockoutBack> selectOutStockoutBackList(OutStockoutBack outStockoutBack)
|
||||
{
|
||||
return outStockoutBackMapper.selectOutStockoutBackList(outStockoutBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单据主信息
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOutStockoutBack(OutStockoutBack outStockoutBack)
|
||||
{
|
||||
return outStockoutBackMapper.insertOutStockoutBack(outStockoutBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单据主信息
|
||||
*
|
||||
* @param outStockoutBack 出库单据主信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOutStockoutBack(OutStockoutBack outStockoutBack)
|
||||
{
|
||||
return outStockoutBackMapper.updateOutStockoutBack(outStockoutBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库单据主信息
|
||||
*
|
||||
* @param stockoutGuids 需要删除的出库单据主信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids)
|
||||
{
|
||||
return outStockoutBackMapper.deleteOutStockoutBackByStockoutGuids(stockoutGuids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单据主信息信息
|
||||
*
|
||||
* @param stockoutGuid 出库单据主信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
return outStockoutBackMapper.deleteOutStockoutBackByStockoutGuid(stockoutGuid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.out.outStockoutDetailBack.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
|
||||
import com.ruoyi.out.outStockoutDetailBack.service.IOutStockoutDetailBackService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 历史出库单据子信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/outStockoutDetailBack")
|
||||
public class OutStockoutDetailBackController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOutStockoutDetailBackService outStockoutDetailBackService;
|
||||
|
||||
/**
|
||||
* 查询历史出库单据子信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OutStockoutDetailBack outStockoutDetailBack)
|
||||
{
|
||||
startPage();
|
||||
List<OutStockoutDetailBack> list = outStockoutDetailBackService.selectOutStockoutDetailBackList(outStockoutDetailBack);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出历史出库单据子信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:export')")
|
||||
@Log(title = "历史出库单据子信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockoutDetailBack outStockoutDetailBack)
|
||||
{
|
||||
List<OutStockoutDetailBack> list = outStockoutDetailBackService.selectOutStockoutDetailBackList(outStockoutDetailBack);
|
||||
ExcelUtil<OutStockoutDetailBack> util = new ExcelUtil<OutStockoutDetailBack>(OutStockoutDetailBack.class);
|
||||
util.exportExcel(response, list, "历史出库单据子信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取历史出库单据子信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:query')")
|
||||
@GetMapping(value = "/{stockoutDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("stockoutDetailId") String stockoutDetailId)
|
||||
{
|
||||
return success(outStockoutDetailBackService.selectOutStockoutDetailBackByStockoutDetailId(stockoutDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增历史出库单据子信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:add')")
|
||||
@Log(title = "历史出库单据子信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OutStockoutDetailBack outStockoutDetailBack)
|
||||
{
|
||||
return toAjax(outStockoutDetailBackService.insertOutStockoutDetailBack(outStockoutDetailBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改历史出库单据子信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:edit')")
|
||||
@Log(title = "历史出库单据子信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OutStockoutDetailBack outStockoutDetailBack)
|
||||
{
|
||||
return toAjax(outStockoutDetailBackService.updateOutStockoutDetailBack(outStockoutDetailBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除历史出库单据子信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:remove')")
|
||||
@Log(title = "历史出库单据子信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockoutDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockoutDetailIds)
|
||||
{
|
||||
return toAjax(outStockoutDetailBackService.deleteOutStockoutDetailBackByStockoutDetailIds(stockoutDetailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,645 @@
|
||||
package com.ruoyi.out.outStockoutDetailBack.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 历史出库单据子信息对象 out_stockout_detail_back
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
public class OutStockoutDetailBack extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String stockoutDetailId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String stockoutGuid;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String stockoutId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String lotNo;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String productGuid;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String productId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String quantityX;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal quantityJ;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal assignNum;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal assignNumX;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal assignNumJ;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal allotQuantity;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal allotQuantityX;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private BigDecimal allotQuantityJ;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String price;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String warehouseId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String outId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String bukechaiQuantity;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String kechaiQuantity;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String entryid;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String flatQuantity;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String fid;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String erpStockoutId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String unit;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spec;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String productName;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare1;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare2;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare3;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare4;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare5;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare6;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare7;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare8;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare9;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String sendStatus;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String sendTime;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String msg;
|
||||
|
||||
private String sourceLineId;
|
||||
private String barCode;
|
||||
private String isBatchManage;
|
||||
private String oldProjectNo;
|
||||
|
||||
public String getSourceLineId() {
|
||||
return sourceLineId;
|
||||
}
|
||||
|
||||
public void setSourceLineId(String sourceLineId) {
|
||||
this.sourceLineId = sourceLineId;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public String getIsBatchManage() {
|
||||
return isBatchManage;
|
||||
}
|
||||
|
||||
public void setIsBatchManage(String isBatchManage) {
|
||||
this.isBatchManage = isBatchManage;
|
||||
}
|
||||
|
||||
public String getOldProjectNo() {
|
||||
return oldProjectNo;
|
||||
}
|
||||
|
||||
public void setOldProjectNo(String oldProjectNo) {
|
||||
this.oldProjectNo = oldProjectNo;
|
||||
}
|
||||
|
||||
public void setStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
this.stockoutDetailId = stockoutDetailId;
|
||||
}
|
||||
|
||||
public String getStockoutDetailId()
|
||||
{
|
||||
return stockoutDetailId;
|
||||
}
|
||||
|
||||
public void setStockoutGuid(String stockoutGuid)
|
||||
{
|
||||
this.stockoutGuid = stockoutGuid;
|
||||
}
|
||||
|
||||
public String getStockoutGuid()
|
||||
{
|
||||
return stockoutGuid;
|
||||
}
|
||||
|
||||
public void setStockoutId(String stockoutId)
|
||||
{
|
||||
this.stockoutId = stockoutId;
|
||||
}
|
||||
|
||||
public String getStockoutId()
|
||||
{
|
||||
return stockoutId;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo)
|
||||
{
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getLotNo()
|
||||
{
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setProductGuid(String productGuid)
|
||||
{
|
||||
this.productGuid = productGuid;
|
||||
}
|
||||
|
||||
public String getProductGuid()
|
||||
{
|
||||
return productGuid;
|
||||
}
|
||||
|
||||
public void setProductId(String productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public String getQuantityX() {
|
||||
return quantityX;
|
||||
}
|
||||
|
||||
public void setQuantityX(String quantityX) {
|
||||
this.quantityX = quantityX;
|
||||
}
|
||||
|
||||
public void setQuantityJ(BigDecimal quantityJ)
|
||||
{
|
||||
this.quantityJ = quantityJ;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantityJ()
|
||||
{
|
||||
return quantityJ;
|
||||
}
|
||||
|
||||
public void setAssignNum(BigDecimal assignNum)
|
||||
{
|
||||
this.assignNum = assignNum;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNum()
|
||||
{
|
||||
return assignNum;
|
||||
}
|
||||
|
||||
public void setAssignNumX(BigDecimal assignNumX)
|
||||
{
|
||||
this.assignNumX = assignNumX;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNumX()
|
||||
{
|
||||
return assignNumX;
|
||||
}
|
||||
|
||||
public void setAssignNumJ(BigDecimal assignNumJ)
|
||||
{
|
||||
this.assignNumJ = assignNumJ;
|
||||
}
|
||||
|
||||
public BigDecimal getAssignNumJ()
|
||||
{
|
||||
return assignNumJ;
|
||||
}
|
||||
|
||||
public void setAllotQuantity(BigDecimal allotQuantity)
|
||||
{
|
||||
this.allotQuantity = allotQuantity;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantity()
|
||||
{
|
||||
return allotQuantity;
|
||||
}
|
||||
|
||||
public void setAllotQuantityX(BigDecimal allotQuantityX)
|
||||
{
|
||||
this.allotQuantityX = allotQuantityX;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantityX()
|
||||
{
|
||||
return allotQuantityX;
|
||||
}
|
||||
|
||||
public void setAllotQuantityJ(BigDecimal allotQuantityJ)
|
||||
{
|
||||
this.allotQuantityJ = allotQuantityJ;
|
||||
}
|
||||
|
||||
public BigDecimal getAllotQuantityJ()
|
||||
{
|
||||
return allotQuantityJ;
|
||||
}
|
||||
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId)
|
||||
{
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getWarehouseId()
|
||||
{
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setOutId(String outId)
|
||||
{
|
||||
this.outId = outId;
|
||||
}
|
||||
|
||||
public String getOutId()
|
||||
{
|
||||
return outId;
|
||||
}
|
||||
|
||||
public void setBukechaiQuantity(String bukechaiQuantity)
|
||||
{
|
||||
this.bukechaiQuantity = bukechaiQuantity;
|
||||
}
|
||||
|
||||
public String getBukechaiQuantity()
|
||||
{
|
||||
return bukechaiQuantity;
|
||||
}
|
||||
|
||||
public void setKechaiQuantity(String kechaiQuantity)
|
||||
{
|
||||
this.kechaiQuantity = kechaiQuantity;
|
||||
}
|
||||
|
||||
public String getKechaiQuantity()
|
||||
{
|
||||
return kechaiQuantity;
|
||||
}
|
||||
|
||||
public void setEntryid(String entryid)
|
||||
{
|
||||
this.entryid = entryid;
|
||||
}
|
||||
|
||||
public String getEntryid()
|
||||
{
|
||||
return entryid;
|
||||
}
|
||||
|
||||
public void setFlatQuantity(String flatQuantity)
|
||||
{
|
||||
this.flatQuantity = flatQuantity;
|
||||
}
|
||||
|
||||
public String getFlatQuantity()
|
||||
{
|
||||
return flatQuantity;
|
||||
}
|
||||
|
||||
public void setFid(String fid)
|
||||
{
|
||||
this.fid = fid;
|
||||
}
|
||||
|
||||
public String getFid()
|
||||
{
|
||||
return fid;
|
||||
}
|
||||
|
||||
public void setErpStockoutId(String erpStockoutId)
|
||||
{
|
||||
this.erpStockoutId = erpStockoutId;
|
||||
}
|
||||
|
||||
public String getErpStockoutId()
|
||||
{
|
||||
return erpStockoutId;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setSpec(String spec)
|
||||
{
|
||||
this.spec = spec;
|
||||
}
|
||||
|
||||
public String getSpec()
|
||||
{
|
||||
return spec;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
public void setSpare4(String spare4)
|
||||
{
|
||||
this.spare4 = spare4;
|
||||
}
|
||||
|
||||
public String getSpare4()
|
||||
{
|
||||
return spare4;
|
||||
}
|
||||
|
||||
public void setSpare5(String spare5)
|
||||
{
|
||||
this.spare5 = spare5;
|
||||
}
|
||||
|
||||
public String getSpare5()
|
||||
{
|
||||
return spare5;
|
||||
}
|
||||
|
||||
public void setSpare6(String spare6)
|
||||
{
|
||||
this.spare6 = spare6;
|
||||
}
|
||||
|
||||
public String getSpare6()
|
||||
{
|
||||
return spare6;
|
||||
}
|
||||
|
||||
public void setSpare7(String spare7)
|
||||
{
|
||||
this.spare7 = spare7;
|
||||
}
|
||||
|
||||
public String getSpare7()
|
||||
{
|
||||
return spare7;
|
||||
}
|
||||
|
||||
public void setSpare8(String spare8)
|
||||
{
|
||||
this.spare8 = spare8;
|
||||
}
|
||||
|
||||
public String getSpare8()
|
||||
{
|
||||
return spare8;
|
||||
}
|
||||
|
||||
public void setSpare9(String spare9)
|
||||
{
|
||||
this.spare9 = spare9;
|
||||
}
|
||||
|
||||
public String getSpare9()
|
||||
{
|
||||
return spare9;
|
||||
}
|
||||
|
||||
public void setSendStatus(String sendStatus)
|
||||
{
|
||||
this.sendStatus = sendStatus;
|
||||
}
|
||||
|
||||
public String getSendStatus()
|
||||
{
|
||||
return sendStatus;
|
||||
}
|
||||
|
||||
public void setSendTime(String sendTime)
|
||||
{
|
||||
this.sendTime = sendTime;
|
||||
}
|
||||
|
||||
public String getSendTime()
|
||||
{
|
||||
return sendTime;
|
||||
}
|
||||
|
||||
public void setMsg(String msg)
|
||||
{
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getMsg()
|
||||
{
|
||||
return msg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutDetailId", getStockoutDetailId())
|
||||
.append("stockoutGuid", getStockoutGuid())
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("lotNo", getLotNo())
|
||||
.append("productGuid", getProductGuid())
|
||||
.append("productId", getProductId())
|
||||
.append("quantity", getQuantity())
|
||||
.append("quantityX", getQuantityX())
|
||||
.append("quantityJ", getQuantityJ())
|
||||
.append("assignNum", getAssignNum())
|
||||
.append("assignNumX", getAssignNumX())
|
||||
.append("assignNumJ", getAssignNumJ())
|
||||
.append("allotQuantity", getAllotQuantity())
|
||||
.append("allotQuantityX", getAllotQuantityX())
|
||||
.append("allotQuantityJ", getAllotQuantityJ())
|
||||
.append("price", getPrice())
|
||||
.append("remark", getRemark())
|
||||
.append("warehouseId", getWarehouseId())
|
||||
.append("outId", getOutId())
|
||||
.append("bukechaiQuantity", getBukechaiQuantity())
|
||||
.append("kechaiQuantity", getKechaiQuantity())
|
||||
.append("entryid", getEntryid())
|
||||
.append("flatQuantity", getFlatQuantity())
|
||||
.append("fid", getFid())
|
||||
.append("erpStockoutId", getErpStockoutId())
|
||||
.append("unit", getUnit())
|
||||
.append("spec", getSpec())
|
||||
.append("productName", getProductName())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.append("spare5", getSpare5())
|
||||
.append("spare6", getSpare6())
|
||||
.append("spare7", getSpare7())
|
||||
.append("spare8", getSpare8())
|
||||
.append("spare9", getSpare9())
|
||||
.append("sendStatus", getSendStatus())
|
||||
.append("sendTime", getSendTime())
|
||||
.append("msg", getMsg())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.out.outStockoutDetailBack.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 历史出库单据子信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
public interface OutStockoutDetailBackMapper
|
||||
{
|
||||
/**
|
||||
* 查询历史出库单据子信息
|
||||
*
|
||||
* @param stockoutDetailId 历史出库单据子信息主键
|
||||
* @return 历史出库单据子信息
|
||||
*/
|
||||
public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 查询历史出库单据子信息列表
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 历史出库单据子信息集合
|
||||
*/
|
||||
public List<OutStockoutDetailBack> selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack);
|
||||
|
||||
/**
|
||||
* 新增历史出库单据子信息
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack);
|
||||
|
||||
/**
|
||||
* 修改历史出库单据子信息
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack);
|
||||
|
||||
/**
|
||||
* 删除历史出库单据子信息
|
||||
*
|
||||
* @param stockoutDetailId 历史出库单据子信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除历史出库单据子信息
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds);
|
||||
|
||||
void insertOutStockDetailBackFinish(@Param("list") List<OutStockoutDetailBack> outStockoutDetailBacks);
|
||||
|
||||
void deleteOutStockDetailList(@Param("list") List<OutStockoutDetailBack> outStockoutDetailBacks);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.out.outStockoutDetailBack.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
|
||||
|
||||
/**
|
||||
* 历史出库单据子信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
public interface IOutStockoutDetailBackService
|
||||
{
|
||||
/**
|
||||
* 查询历史出库单据子信息
|
||||
*
|
||||
* @param stockoutDetailId 历史出库单据子信息主键
|
||||
* @return 历史出库单据子信息
|
||||
*/
|
||||
public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
/**
|
||||
* 查询历史出库单据子信息列表
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 历史出库单据子信息集合
|
||||
*/
|
||||
public List<OutStockoutDetailBack> selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack);
|
||||
|
||||
/**
|
||||
* 新增历史出库单据子信息
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack);
|
||||
|
||||
/**
|
||||
* 修改历史出库单据子信息
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack);
|
||||
|
||||
/**
|
||||
* 批量删除历史出库单据子信息
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的历史出库单据子信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds);
|
||||
|
||||
/**
|
||||
* 删除历史出库单据子信息信息
|
||||
*
|
||||
* @param stockoutDetailId 历史出库单据子信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId);
|
||||
|
||||
void insertOutStockDetailBackFinish(List<OutStockoutDetailBack> outStockoutDetailBacks);
|
||||
|
||||
void deleteOutStockDetailList(List<OutStockoutDetailBack> outStockoutDetailBacks);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.ruoyi.out.outStockoutDetailBack.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.outStockoutDetailBack.mapper.OutStockoutDetailBackMapper;
|
||||
import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
|
||||
import com.ruoyi.out.outStockoutDetailBack.service.IOutStockoutDetailBackService;
|
||||
|
||||
/**
|
||||
* 历史出库单据子信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
@Service
|
||||
public class OutStockoutDetailBackServiceImpl implements IOutStockoutDetailBackService
|
||||
{
|
||||
@Autowired
|
||||
private OutStockoutDetailBackMapper outStockoutDetailBackMapper;
|
||||
|
||||
/**
|
||||
* 查询历史出库单据子信息
|
||||
*
|
||||
* @param stockoutDetailId 历史出库单据子信息主键
|
||||
* @return 历史出库单据子信息
|
||||
*/
|
||||
@Override
|
||||
public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
return outStockoutDetailBackMapper.selectOutStockoutDetailBackByStockoutDetailId(stockoutDetailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询历史出库单据子信息列表
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 历史出库单据子信息
|
||||
*/
|
||||
@Override
|
||||
public List<OutStockoutDetailBack> selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack)
|
||||
{
|
||||
return outStockoutDetailBackMapper.selectOutStockoutDetailBackList(outStockoutDetailBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增历史出库单据子信息
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack)
|
||||
{
|
||||
return outStockoutDetailBackMapper.insertOutStockoutDetailBack(outStockoutDetailBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改历史出库单据子信息
|
||||
*
|
||||
* @param outStockoutDetailBack 历史出库单据子信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack)
|
||||
{
|
||||
return outStockoutDetailBackMapper.updateOutStockoutDetailBack(outStockoutDetailBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除历史出库单据子信息
|
||||
*
|
||||
* @param stockoutDetailIds 需要删除的历史出库单据子信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds)
|
||||
{
|
||||
return outStockoutDetailBackMapper.deleteOutStockoutDetailBackByStockoutDetailIds(stockoutDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除历史出库单据子信息信息
|
||||
*
|
||||
* @param stockoutDetailId 历史出库单据子信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId)
|
||||
{
|
||||
return outStockoutDetailBackMapper.deleteOutStockoutDetailBackByStockoutDetailId(stockoutDetailId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertOutStockDetailBackFinish(List<OutStockoutDetailBack> outStockoutDetailBacks) {
|
||||
outStockoutDetailBackMapper.insertOutStockDetailBackFinish(outStockoutDetailBacks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOutStockDetailList(List<OutStockoutDetailBack> outStockoutDetailBacks) {
|
||||
outStockoutDetailBackMapper.deleteOutStockDetailList(outStockoutDetailBacks);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.ruoyi.web.controller.system.license;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.license.domain.SysLicense;
|
||||
import com.ruoyi.license.service.ISysLicenseService;
|
||||
import com.ruoyi.license.util.LicenseUtils;
|
||||
|
||||
/**
|
||||
* 授权码Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/license")
|
||||
public class SysLicenseController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysLicenseService sysLicenseService;
|
||||
|
||||
/**
|
||||
* 查询授权码列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:license:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysLicense sysLicense)
|
||||
{
|
||||
startPage();
|
||||
List<SysLicense> list = sysLicenseService.selectSysLicenseList(sysLicense);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增授权码
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:license:add')")
|
||||
@Log(title = "授权码", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(SysLicense sysLicense)
|
||||
{
|
||||
return toAjax(sysLicenseService.insertSysLicense(sysLicense));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改授权码
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:license:edit')")
|
||||
@Log(title = "授权码", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(SysLicense sysLicense)
|
||||
{
|
||||
return toAjax(sysLicenseService.updateSysLicense(sysLicense));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除授权码
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:license:remove')")
|
||||
@Log(title = "授权码", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/remove")
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(sysLicenseService.deleteSysLicenseByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活授权码(无需登录)
|
||||
*/
|
||||
@Log(title = "激活授权码", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/active")
|
||||
public AjaxResult active(String licenseCode)
|
||||
{
|
||||
if (!LicenseUtils.validateFormat(licenseCode))
|
||||
{
|
||||
return error("授权码格式不正确");
|
||||
}
|
||||
int result = sysLicenseService.activeLicense(licenseCode);
|
||||
if (result > 0)
|
||||
{
|
||||
return success("授权码激活成功");
|
||||
}
|
||||
return error("授权码激活失败,请检查授权码是否正确或已过期");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前授权信息
|
||||
* license 未开启或无有效授权时返回 code=200 data=null,前端静默处理
|
||||
*/
|
||||
@GetMapping("/info")
|
||||
public AjaxResult info()
|
||||
{
|
||||
SysLicense license = sysLicenseService.getActiveLicense();
|
||||
return AjaxResult.success(license);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成授权码
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:license:add')")
|
||||
@GetMapping("/generate")
|
||||
public AjaxResult generate(String type, String projectNo)
|
||||
{
|
||||
if (StringUtils.isEmpty(type) || StringUtils.isEmpty(projectNo))
|
||||
{
|
||||
return error("授权类型和项目编号不能为空");
|
||||
}
|
||||
String licenseCode = LicenseUtils.generateLicense(type, projectNo);
|
||||
if (licenseCode == null)
|
||||
{
|
||||
return error("授权码生成失败");
|
||||
}
|
||||
return AjaxResult.success("授权码生成成功", licenseCode);
|
||||
}
|
||||
}
|
||||
108
ruoyi-admin/src/main/resources/mapper/api/MoveMsgMapper.xml
Normal file
108
ruoyi-admin/src/main/resources/mapper/api/MoveMsgMapper.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?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.ruoyi.api.moveMsg.mapper.MoveMsgMapper">
|
||||
|
||||
<resultMap type="MoveMsg" id="MoveMsgResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="oldSpace" column="old_space" />
|
||||
<result property="newSpace" column="new_space" />
|
||||
<result property="status" column="status" />
|
||||
<result property="sendTime" column="send_time" />
|
||||
<result property="msg" column="msg" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMoveMsgVo">
|
||||
select id, tray_code, old_space, new_space, status, send_time, msg, spare1, spare2, spare3, spare4, spare5 from move_msg
|
||||
</sql>
|
||||
|
||||
<select id="selectMoveMsgList" parameterType="MoveMsg" resultMap="MoveMsgResult">
|
||||
<include refid="selectMoveMsgVo"/>
|
||||
<where>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="oldSpace != null and oldSpace != ''"> and old_space like concat('%', #{oldSpace}, '%')</if>
|
||||
<if test="newSpace != null and newSpace != ''"> and new_space like concat('%', #{newSpace}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
||||
<if test="sendTime != null and sendTime != ''"> and send_time like concat('%', #{sendTime}, '%')</if>
|
||||
<if test="msg != null and msg != ''"> and msg like concat('%', #{msg}, '%')</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMoveMsgById" parameterType="String" resultMap="MoveMsgResult">
|
||||
<include refid="selectMoveMsgVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMoveMsg" parameterType="MoveMsg">
|
||||
insert into move_msg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="oldSpace != null">old_space,</if>
|
||||
<if test="newSpace != null">new_space,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="sendTime != null">send_time,</if>
|
||||
<if test="msg != null">msg,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="oldSpace != null">#{oldSpace},</if>
|
||||
<if test="newSpace != null">#{newSpace},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="sendTime != null">#{sendTime},</if>
|
||||
<if test="msg != null">#{msg},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMoveMsg" parameterType="MoveMsg">
|
||||
update move_msg
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="oldSpace != null">old_space = #{oldSpace},</if>
|
||||
<if test="newSpace != null">new_space = #{newSpace},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||
<if test="msg != null">msg = #{msg},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMoveMsgById" parameterType="String">
|
||||
delete from move_msg where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMoveMsgByIds" parameterType="String">
|
||||
delete from move_msg where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
82
ruoyi-admin/src/main/resources/mapper/bas/AgvPointMapper.xml
Normal file
82
ruoyi-admin/src/main/resources/mapper/bas/AgvPointMapper.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?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.ruoyi.bas.agvPoint.mapper.AgvPointMapper">
|
||||
|
||||
<resultMap type="AgvPoint" id="AgvPointResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="station" column="station" />
|
||||
<result property="type" column="type" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAgvPointVo">
|
||||
select id, station, type, remark, spare1, spare2, spare3 from agv_point
|
||||
</sql>
|
||||
|
||||
<select id="selectAgvPointList" parameterType="AgvPoint" resultMap="AgvPointResult">
|
||||
<include refid="selectAgvPointVo"/>
|
||||
<where>
|
||||
<if test="station != null and station != ''"> and station like concat('%',#{station},'%') </if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAgvPointById" parameterType="String" resultMap="AgvPointResult">
|
||||
<include refid="selectAgvPointVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAgvPoint" parameterType="AgvPoint">
|
||||
insert into agv_point
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="station != null">station,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="station != null">#{station},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAgvPoint" parameterType="AgvPoint">
|
||||
update agv_point
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="station != null">station = #{station},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAgvPointById" parameterType="String">
|
||||
delete from agv_point where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAgvPointByIds" parameterType="String">
|
||||
delete from agv_point where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
65
ruoyi-admin/src/main/resources/mapper/bas/BasLedMapper.xml
Normal file
65
ruoyi-admin/src/main/resources/mapper/bas/BasLedMapper.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?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.ruoyi.Dzp.mapper.BasLedMapper">
|
||||
|
||||
<resultMap type="basLed" id="basLedResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="product_id" column="product_id"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="sendFlag" column="send_flag"/>
|
||||
<result property="ipAddress" column="ip_address"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="trayCode" column="tray_code"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="productName" column="product_name"/>
|
||||
<result property="errorMsg" column="error_msg"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasContainerVo">
|
||||
select id,
|
||||
product_id,
|
||||
spec,
|
||||
quantity,
|
||||
send_flag,
|
||||
ip_address,
|
||||
tray_code,
|
||||
model,
|
||||
product_name,
|
||||
error_msg
|
||||
|
||||
from bas_led
|
||||
</sql>
|
||||
|
||||
<select id="selectBasLedList" parameterType="basLed" resultMap="basLedResult">
|
||||
<include refid="selectBasContainerVo"/>
|
||||
<where>
|
||||
|
||||
<if test="sendFlag != null and sendFlag != ''">and send_flag = #{sendFlag}
|
||||
</if>
|
||||
<if test="id != null and id != ''">and id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="updateBasLed" parameterType="basLed">
|
||||
update bas_led
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="product_id != null">product_id = #{product_id},</if>
|
||||
<if test="sendFlag != null">send_flag = #{sendFlag},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,225 @@
|
||||
<?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.ruoyi.out.outStockoutBack.mapper.OutStockoutBackMapper">
|
||||
|
||||
<resultMap type="OutStockoutBack" id="OutStockoutBackResult">
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="outType" column="out_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="stockoutSource" column="stockout_source" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="classNowId" column="class_now_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="carNumber" column="car_number" />
|
||||
<result property="FID" column="FID" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="spare7" column="spare7" />
|
||||
<result property="spare8" column="spare8" />
|
||||
<result property="sendStatus" column="send_status" />
|
||||
<result property="sendTime" column="send_time" />
|
||||
<result property="msg" column="msg" />
|
||||
<result property="companyShortName" column="company_short_name" />
|
||||
<result property="accountSetNo" column="account_set_no" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutBackVo">
|
||||
select stockout_guid,
|
||||
stockout_id,
|
||||
out_type,
|
||||
create_date,
|
||||
department_no,
|
||||
customer_no,
|
||||
create_man_id,
|
||||
status,
|
||||
stockout_source,
|
||||
warehouse_id,
|
||||
class_now_id,
|
||||
exit_id,
|
||||
car_number,
|
||||
FID,
|
||||
erp_stockout_id,
|
||||
start_date,
|
||||
finish_date,
|
||||
spare1,
|
||||
spare2,
|
||||
spare3,
|
||||
spare4,
|
||||
spare5,
|
||||
spare6,
|
||||
spare7,
|
||||
spare8,
|
||||
send_status,
|
||||
send_time,
|
||||
msg,
|
||||
company_short_name,
|
||||
account_set_no
|
||||
from out_stockout_back
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutBackList" parameterType="OutStockoutBack" resultMap="OutStockoutBackResult">
|
||||
<include refid="selectOutStockoutBackVo"/>
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid like concat('%', #{stockoutGuid}, '%')</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id like concat('%', #{stockoutId}, '%')</if>
|
||||
<if test="outType != null and outType != ''"> and out_type like concat('%', #{outType}, '%')</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date like concat('%', #{createDate}, '%')</if>
|
||||
<if test="departmentNo != null and departmentNo != ''"> and department_no like concat('%', #{departmentNo}, '%')</if>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no like concat('%', #{customerNo}, '%')</if>
|
||||
<if test="createManId != null and createManId != ''"> and create_man_id like concat('%', #{createManId}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
||||
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source like concat('%', #{stockoutSource}, '%')</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
||||
<if test="classNowId != null and classNowId != ''"> and class_now_id like concat('%', #{classNowId}, '%')</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id like concat('%', #{exitId}, '%')</if>
|
||||
<if test="carNumber != null and carNumber != ''"> and car_number like concat('%', #{carNumber}, '%')</if>
|
||||
<if test="FID != null and FID != ''"> and FID like concat('%', #{FID}, '%')</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id like concat('%', #{erpStockoutId}, '%')</if>
|
||||
<if test="startDate != null and startDate != ''"> and start_date like concat('%', #{startDate}, '%')</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date like concat('%', #{finishDate}, '%')</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
|
||||
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
|
||||
<if test="sendStatus != null and sendStatus != ''"> and send_status like concat('%', #{sendStatus}, '%')</if>
|
||||
<if test="sendTime != null and sendTime != ''"> and send_time like concat('%', #{sendTime}, '%')</if>
|
||||
<if test="msg != null and msg != ''"> and msg like concat('%', #{msg}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutBackByStockoutGuid" parameterType="String" resultMap="OutStockoutBackResult">
|
||||
<include refid="selectOutStockoutBackVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
|
||||
<select id="selelctTopOutStockout" resultMap="OutStockoutBackResult">
|
||||
select top(1)* from out_stockout_back where send_status=0 and stockout_source = 1
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutBack" parameterType="OutStockoutBack">
|
||||
insert into out_stockout_back
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="outType != null and outType != ''">out_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="stockoutSource != null">stockout_source,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="classNowId != null">class_now_id,</if>
|
||||
<if test="exitId != null">exit_id,</if>
|
||||
<if test="carNumber != null">car_number,</if>
|
||||
<if test="FID != null">FID,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="startDate != null">start_date,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
<if test="spare7 != null">spare7,</if>
|
||||
<if test="spare8 != null">spare8,</if>
|
||||
<if test="sendStatus != null">send_status,</if>
|
||||
<if test="sendTime != null">send_time,</if>
|
||||
<if test="msg != null">msg,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">#{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="stockoutSource != null">#{stockoutSource},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="classNowId != null">#{classNowId},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="carNumber != null">#{carNumber},</if>
|
||||
<if test="FID != null">#{FID},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="startDate != null">#{startDate},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
<if test="spare7 != null">#{spare7},</if>
|
||||
<if test="spare8 != null">#{spare8},</if>
|
||||
<if test="sendStatus != null">#{sendStatus},</if>
|
||||
<if test="sendTime != null">#{sendTime},</if>
|
||||
<if test="msg != null">#{msg},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutBack" parameterType="OutStockoutBack">
|
||||
update out_stockout_back
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">out_type = #{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="classNowId != null">class_now_id = #{classNowId},</if>
|
||||
<if test="exitId != null">exit_id = #{exitId},</if>
|
||||
<if test="carNumber != null">car_number = #{carNumber},</if>
|
||||
<if test="FID != null">FID = #{FID},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<if test="spare7 != null">spare7 = #{spare7},</if>
|
||||
<if test="spare8 != null">spare8 = #{spare8},</if>
|
||||
<if test="sendStatus != null">send_status = #{sendStatus},</if>
|
||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||
<if test="msg != null">msg = #{msg},</if>
|
||||
</trim>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutBackByStockoutGuid" parameterType="String">
|
||||
delete from out_stockout_back where stockout_guid = #{stockoutGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutBackByStockoutGuids" parameterType="String">
|
||||
delete from out_stockout_back where stockout_guid in
|
||||
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,320 @@
|
||||
<?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.ruoyi.out.outStockoutDetailBack.mapper.OutStockoutDetailBackMapper">
|
||||
|
||||
<resultMap type="OutStockoutDetailBack" id="OutStockoutDetailBackResult">
|
||||
<result property="stockoutDetailId" column="stockout_detail_id"/>
|
||||
<result property="stockoutGuid" column="stockout_guid"/>
|
||||
<result property="stockoutId" column="stockout_id"/>
|
||||
<result property="lotNo" column="lot_no"/>
|
||||
<result property="productGuid" column="product_guid"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="quantityX" column="quantity_x"/>
|
||||
<result property="quantityJ" column="quantity_j"/>
|
||||
<result property="assignNum" column="assign_num"/>
|
||||
<result property="assignNumX" column="assign_num_x"/>
|
||||
<result property="assignNumJ" column="assign_num_j"/>
|
||||
<result property="allotQuantity" column="allot_quantity"/>
|
||||
<result property="allotQuantityX" column="allot_quantity_x"/>
|
||||
<result property="allotQuantityJ" column="allot_quantity_j"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="warehouseId" column="warehouse_id"/>
|
||||
<result property="outId" column="out_id"/>
|
||||
<result property="bukechaiQuantity" column="bukechai_quantity"/>
|
||||
<result property="kechaiQuantity" column="kechai_quantity"/>
|
||||
<result property="entryid" column="entryid"/>
|
||||
<result property="flatQuantity" column="flat_quantity"/>
|
||||
<result property="fid" column="fid"/>
|
||||
<result property="erpStockoutId" column="erp_stockout_id"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="productName" column="product_name"/>
|
||||
<result property="spare1" column="spare1"/>
|
||||
<result property="spare2" column="spare2"/>
|
||||
<result property="spare3" column="spare3"/>
|
||||
<result property="spare4" column="spare4"/>
|
||||
<result property="spare5" column="spare5"/>
|
||||
<result property="spare6" column="spare6"/>
|
||||
<result property="spare7" column="spare7"/>
|
||||
<result property="spare8" column="spare8"/>
|
||||
<result property="spare9" column="spare9"/>
|
||||
<result property="sendStatus" column="send_status"/>
|
||||
<result property="sendTime" column="send_time"/>
|
||||
<result property="msg" column="msg"/>
|
||||
<result property="sourceLineId" column="source_line_id"/>
|
||||
<result property="barCode" column="bar_code"/>
|
||||
<result property="isBatchManage" column="is_batch_manage"/>
|
||||
<result property="oldProjectNo" column="old_project_no"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailBackVo">
|
||||
select stockout_detail_id,
|
||||
stockout_guid,
|
||||
stockout_id,
|
||||
lot_no,
|
||||
product_guid,
|
||||
product_id,
|
||||
quantity,
|
||||
quantity_x,
|
||||
quantity_j,
|
||||
assign_num,
|
||||
assign_num_x,
|
||||
assign_num_j,
|
||||
allot_quantity,
|
||||
allot_quantity_x,
|
||||
allot_quantity_j,
|
||||
price,
|
||||
remark,
|
||||
warehouse_id,
|
||||
out_id,
|
||||
bukechai_quantity,
|
||||
kechai_quantity,
|
||||
entryid,
|
||||
flat_quantity,
|
||||
fid,
|
||||
erp_stockout_id,
|
||||
unit,
|
||||
spec,
|
||||
product_name,
|
||||
spare1,
|
||||
spare2,
|
||||
spare3,
|
||||
spare4,
|
||||
spare5,
|
||||
spare6,
|
||||
spare7,
|
||||
spare8,
|
||||
spare9,
|
||||
send_status,
|
||||
send_time,
|
||||
msg,
|
||||
source_line_id,
|
||||
bar_code,
|
||||
is_batch_manage,
|
||||
old_project_no
|
||||
from out_stockout_detail_back
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailBackList" parameterType="OutStockoutDetailBack"
|
||||
resultMap="OutStockoutDetailBackResult">
|
||||
<include refid="selectOutStockoutDetailBackVo"/>
|
||||
<where>
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">and stockout_detail_id like concat('%', #{stockoutDetailId}, '%')
|
||||
</if>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">and stockout_guid like concat('%', #{stockoutGuid}, '%')</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">and stockout_id like concat('%', #{stockoutId}, '%')</if>
|
||||
<if test="lotNo != null and lotNo != ''">and lot_no like concat('%', #{lotNo}, '%')</if>
|
||||
<if test="productGuid != null and productGuid != ''">and product_guid like concat('%', #{productGuid}, '%')</if>
|
||||
<if test="productId != null and productId != ''">and product_id like concat('%', #{productId}, '%')</if>
|
||||
<if test="quantity != null ">and quantity like concat('%', #{quantity}, '%')</if>
|
||||
<if test="quantityX != null ">and quantity_x like concat('%', #{quantityX}, '%')</if>
|
||||
<if test="quantityJ != null ">and quantity_j like concat('%', #{quantityJ}, '%')</if>
|
||||
<if test="assignNum != null ">and assign_num like concat('%', #{assignNum}, '%')</if>
|
||||
<if test="assignNumX != null ">and assign_num_x like concat('%', #{assignNumX}, '%')</if>
|
||||
<if test="assignNumJ != null ">and assign_num_j like concat('%', #{assignNumJ}, '%')</if>
|
||||
<if test="allotQuantity != null ">and allot_quantity like concat('%', #{allotQuantity}, '%')</if>
|
||||
<if test="allotQuantityX != null ">and allot_quantity_x like concat('%', #{allotQuantityX}, '%')</if>
|
||||
<if test="allotQuantityJ != null ">and allot_quantity_j like concat('%', #{allotQuantityJ}, '%')</if>
|
||||
<if test="price != null and price != ''">and price like concat('%', #{price}, '%')</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">and warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
||||
<if test="outId != null and outId != ''">and out_id like concat('%', #{outId}, '%')</if>
|
||||
<if test="bukechaiQuantity != null and bukechaiQuantity != ''">and bukechai_quantity like concat('%', #{bukechaiQuantity}, '%')
|
||||
</if>
|
||||
<if test="kechaiQuantity != null and kechaiQuantity != ''">and kechai_quantity like concat('%', #{kechaiQuantity}, '%')</if>
|
||||
<if test="entryid != null and entryid != ''">and entryid like concat('%', #{entryid}, '%')</if>
|
||||
<if test="flatQuantity != null and flatQuantity != ''">and flat_quantity like concat('%', #{flatQuantity}, '%')</if>
|
||||
<if test="fid != null and fid != ''">and fid like concat('%', #{fid}, '%')</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''">and erp_stockout_id like concat('%', #{erpStockoutId}, '%')</if>
|
||||
<if test="unit != null and unit != ''">and unit like concat('%', #{unit}, '%')</if>
|
||||
<if test="spec != null and spec != ''">and spec like concat('%', #{spec}, '%')</if>
|
||||
<if test="productName != null and productName != ''">and product_name like concat('%', #{productName},
|
||||
'%')
|
||||
</if>
|
||||
<if test="spare1 != null and spare1 != ''">and spare1 like concat('%', #{spare1}, '%')</if>
|
||||
<if test="spare2 != null and spare2 != ''">and spare2 like concat('%', #{spare2}, '%')</if>
|
||||
<if test="spare3 != null and spare3 != ''">and spare3 like concat('%', #{spare3}, '%')</if>
|
||||
<if test="spare4 != null and spare4 != ''">and spare4 like concat('%', #{spare4}, '%')</if>
|
||||
<if test="spare5 != null and spare5 != ''">and spare5 like concat('%', #{spare5}, '%')</if>
|
||||
<if test="spare6 != null and spare6 != ''">and spare6 like concat('%', #{spare6}, '%')</if>
|
||||
<if test="spare7 != null and spare7 != ''">and spare7 like concat('%', #{spare7}, '%')</if>
|
||||
<if test="spare8 != null and spare8 != ''">and spare8 like concat('%', #{spare8}, '%')</if>
|
||||
<if test="spare9 != null and spare9 != ''">and spare9 like concat('%', #{spare9}, '%')</if>
|
||||
<if test="sendStatus != null and sendStatus != ''">and send_status like concat('%', #{sendStatus}, '%')</if>
|
||||
<if test="sendTime != null and sendTime != ''">and send_time like concat('%', #{sendTime}, '%')</if>
|
||||
<if test="msg != null and msg != ''">and msg like concat('%', #{msg}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutDetailBackByStockoutDetailId" parameterType="String"
|
||||
resultMap="OutStockoutDetailBackResult">
|
||||
<include refid="selectOutStockoutDetailBackVo"/>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutDetailBack" parameterType="OutStockoutDetailBack">
|
||||
insert into out_stockout_detail_back
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
|
||||
<if test="stockoutGuid != null">stockout_guid,</if>
|
||||
<if test="stockoutId != null">stockout_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="allotQuantity != null">allot_quantity,</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x,</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="outId != null">out_id,</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity,</if>
|
||||
<if test="entryid != null">entryid,</if>
|
||||
<if test="flatQuantity != null">flat_quantity,</if>
|
||||
<if test="fid != null">fid,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
<if test="spare7 != null">spare7,</if>
|
||||
<if test="spare8 != null">spare8,</if>
|
||||
<if test="spare9 != null">spare9,</if>
|
||||
<if test="sendStatus != null">send_status,</if>
|
||||
<if test="sendTime != null">send_time,</if>
|
||||
<if test="msg != null">msg,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
<if test="stockoutGuid != null">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">#{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">#{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="outId != null">#{outId},</if>
|
||||
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
|
||||
<if test="entryid != null">#{entryid},</if>
|
||||
<if test="flatQuantity != null">#{flatQuantity},</if>
|
||||
<if test="fid != null">#{fid},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
<if test="spare7 != null">#{spare7},</if>
|
||||
<if test="spare8 != null">#{spare8},</if>
|
||||
<if test="spare9 != null">#{spare9},</if>
|
||||
<if test="sendStatus != null">#{sendStatus},</if>
|
||||
<if test="sendTime != null">#{sendTime},</if>
|
||||
<if test="msg != null">#{msg},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutDetailBack" parameterType="OutStockoutDetailBack">
|
||||
update out_stockout_detail_back
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="quantityX != null">quantity_x = #{quantityX},</if>
|
||||
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
|
||||
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="outId != null">out_id = #{outId},</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
|
||||
<if test="entryid != null">entryid = #{entryid},</if>
|
||||
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
|
||||
<if test="fid != null">fid = #{fid},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<if test="spare7 != null">spare7 = #{spare7},</if>
|
||||
<if test="spare8 != null">spare8 = #{spare8},</if>
|
||||
<if test="spare9 != null">spare9 = #{spare9},</if>
|
||||
<if test="sendStatus != null">send_status = #{sendStatus},</if>
|
||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||
<if test="msg != null">msg = #{msg},</if>
|
||||
</trim>
|
||||
where stockout_id = #{stockoutId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutDetailBackByStockoutDetailId" parameterType="String">
|
||||
delete
|
||||
from out_stockout_detail_back
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutDetailBackByStockoutDetailIds" parameterType="String">
|
||||
delete from out_stockout_detail_back where stockout_detail_id in
|
||||
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertOutStockDetailBackFinish" parameterType="java.util.List">
|
||||
INSERT INTO out_stockout_detail_back_finish
|
||||
<foreach collection="list" item="item" separator="UNION ALL">
|
||||
SELECT * FROM out_stockout_detail_back
|
||||
WHERE stockout_detail_id = #{item.stockoutDetailId}
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteOutStockDetailList">
|
||||
DELETE FROM out_stockout_detail_back
|
||||
WHERE stockout_detail_id IN
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item.stockoutDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user