正在显示
10 个修改的文件
包含
136 行增加
和
310 行删除
1 | #登录账号 | 1 | #登录账号 |
2 | -loginname = KAOR | 2 | +loginname = KKW1 |
3 | #登录密码 | 3 | #登录密码 |
4 | -loginpass = KAOR | 4 | +loginpass = KKW1 |
5 | #发送报文目录,相对程序目录 | 5 | #发送报文目录,相对程序目录 |
6 | -readDirectory = sendDirectory | 6 | +readDirectory = D:/bw/sendDirectory |
7 | #接收存储报文目录 | 7 | #接收存储报文目录 |
8 | -bakDirectory = receiveDirectory | 8 | +bakDirectory = D:/bw/receiveDirectory |
9 | 9 | ||
10 | #IMF MEAT报头配置 | 10 | #IMF MEAT报头配置 |
11 | RCVR= | 11 | RCVR= |
@@ -13,4 +13,7 @@ TYPE=KAKO | @@ -13,4 +13,7 @@ TYPE=KAKO | ||
13 | STYP=CARM | 13 | STYP=CARM |
14 | 14 | ||
15 | #载重与称重的可控范围 ?% | 15 | #载重与称重的可控范围 ?% |
16 | -grossWt=1% | ||
16 | +grossWt=15% | ||
17 | + | ||
18 | +#二维码存放路径,项目启动时设置,后期不能更改。 | ||
19 | +barCode = barcode/ |
@@ -4,6 +4,7 @@ import com.sy.bwAssist.Message; | @@ -4,6 +4,7 @@ import com.sy.bwAssist.Message; | ||
4 | import com.sy.logic.LogicOperation; | 4 | import com.sy.logic.LogicOperation; |
5 | import com.sy.model.*; | 5 | import com.sy.model.*; |
6 | import com.sy.service.*; | 6 | import com.sy.service.*; |
7 | +import org.apache.log4j.Logger; | ||
7 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
8 | import org.springframework.stereotype.Component; | 9 | import org.springframework.stereotype.Component; |
9 | 10 | ||
@@ -35,6 +36,8 @@ public class AnalysisRoute { | @@ -35,6 +36,8 @@ public class AnalysisRoute { | ||
35 | @Autowired | 36 | @Autowired |
36 | private LandBusListService listService; | 37 | private LandBusListService listService; |
37 | 38 | ||
39 | + protected static final Logger logger = Logger.getLogger(AnalysisRoute.class); | ||
40 | + | ||
38 | private static AnalysisRoute route; | 41 | private static AnalysisRoute route; |
39 | 42 | ||
40 | private static MessageAnalysis analysis = new MessageAnalysis(); | 43 | private static MessageAnalysis analysis = new MessageAnalysis(); |
@@ -67,6 +70,7 @@ public class AnalysisRoute { | @@ -67,6 +70,7 @@ public class AnalysisRoute { | ||
67 | }else{ | 70 | }else{ |
68 | GatherInfo info = gatherInfoAnalysis.toJavaBean(message); | 71 | GatherInfo info = gatherInfoAnalysis.toJavaBean(message); |
69 | if(LogicOperation.operation(info)){ | 72 | if(LogicOperation.operation(info)){ |
73 | + logger.info("进出站业务申请成功"); | ||
70 | } | 74 | } |
71 | route.infoService.save(info); | 75 | route.infoService.save(info); |
72 | } | 76 | } |
@@ -13,9 +13,6 @@ public class MessageAnalysis { | @@ -13,9 +13,6 @@ public class MessageAnalysis { | ||
13 | return getMessage(str); | 13 | return getMessage(str); |
14 | } | 14 | } |
15 | 15 | ||
16 | - | ||
17 | - | ||
18 | - | ||
19 | static Message getMessage(String str) { | 16 | static Message getMessage(String str) { |
20 | XStream xstream = new XStream(new DomDriver("UTF-8", new XmlFriendlyNameCoder("_-", "_"))); | 17 | XStream xstream = new XStream(new DomDriver("UTF-8", new XmlFriendlyNameCoder("_-", "_"))); |
21 | xstream.processAnnotations(Message.class); | 18 | xstream.processAnnotations(Message.class); |
@@ -24,7 +21,5 @@ public class MessageAnalysis { | @@ -24,7 +21,5 @@ public class MessageAnalysis { | ||
24 | return msg; | 21 | return msg; |
25 | } | 22 | } |
26 | 23 | ||
27 | - public String getStype() { | ||
28 | - return msg.getMeta().getSmType(); | ||
29 | - } | 24 | + |
30 | } | 25 | } |
@@ -63,24 +63,27 @@ public class buildBarCode { | @@ -63,24 +63,27 @@ public class buildBarCode { | ||
63 | public static Map jsonFormat(String json) { | 63 | public static Map jsonFormat(String json) { |
64 | JSONObject jsonObject = JSONObject.parseObject(json); | 64 | JSONObject jsonObject = JSONObject.parseObject(json); |
65 | Object data = jsonObject.get("data"); | 65 | Object data = jsonObject.get("data"); |
66 | - String content = "[" + data.toString() + "]"; | ||
67 | - JSONArray jsonArray = JSONArray.parseArray(content); | ||
68 | - Map map = JSON.parseObject(jsonArray.getString(0)); | 66 | + Map map =null; |
67 | + if(data!=null) { | ||
68 | + String content = "[" + data.toString() + "]"; | ||
69 | + JSONArray jsonArray = JSONArray.parseArray(content); | ||
70 | + map= JSON.parseObject(jsonArray.getString(0)); | ||
71 | + } | ||
69 | return map; | 72 | return map; |
70 | } | 73 | } |
71 | 74 | ||
72 | // 生成二维码 | 75 | // 生成二维码 |
73 | public static String CreateBarCode(String carCode,String carColor,String mainifist) { | 76 | public static String CreateBarCode(String carCode,String carColor,String mainifist) { |
74 | - String json = "{\"token\":\"samples\",\"data\":{\"vehicle_no\":\""+carCode+"\",\"vehicle_no_color\":\"" | ||
75 | - +carColor+"\",\"vehicle_rela_id\":\""+mainifist+"\"}}"; | 77 | + String json = "{\"token\":\"samples\",\"data\":{\"vehicle_no\":\""+carCode+"\"," + |
78 | + "\"vehicle_no_color\":\"黄\",\"vehicle_rela_id\":\""+mainifist+"\"}}"; | ||
76 | String content = buildBarCode.sendData(CREATEBARCODE, json); | 79 | String content = buildBarCode.sendData(CREATEBARCODE, json); |
77 | Map map = buildBarCode.jsonFormat(content); | 80 | Map map = buildBarCode.jsonFormat(content); |
78 | return map.get("vehicle_bar_code").toString(); | 81 | return map.get("vehicle_bar_code").toString(); |
79 | } | 82 | } |
80 | 83 | ||
81 | // 取消二维码 | 84 | // 取消二维码 |
82 | - public static void cancleBarCode(String carCode,String carColor) { | ||
83 | - String json = "{\"token\":\"samples\",\"data\":{\"vehicle_no\":\""+carCode+"\",\"vehicle_no_color\":\""+carColor+"\"}}"; | 85 | + public static void cancleBarCode(String frameNo) { |
86 | + String json = "{\"token\":\"samples\",\"data\":{\"vehicle_no\":\""+frameNo+"\",\"vehicle_no_color\":\"黄\"}}"; | ||
84 | buildBarCode.sendData(CANCLEBARCODE, json); | 87 | buildBarCode.sendData(CANCLEBARCODE, json); |
85 | } | 88 | } |
86 | 89 |
@@ -3,6 +3,7 @@ package com.sy.logic; | @@ -3,6 +3,7 @@ package com.sy.logic; | ||
3 | 3 | ||
4 | import com.alibaba.fastjson.JSON; | 4 | import com.alibaba.fastjson.JSON; |
5 | import com.alibaba.fastjson.JSONArray; | 5 | import com.alibaba.fastjson.JSONArray; |
6 | +import com.sy.crossDomain.buildBarCode; | ||
6 | import com.sy.model.GatherInfo; | 7 | import com.sy.model.GatherInfo; |
7 | import com.sy.model.LandBusinessTypeList; | 8 | import com.sy.model.LandBusinessTypeList; |
8 | import com.sy.model.LandRoadVe; | 9 | import com.sy.model.LandRoadVe; |
@@ -22,6 +23,7 @@ import java.math.BigDecimal; | @@ -22,6 +23,7 @@ import java.math.BigDecimal; | ||
22 | import java.net.MalformedURLException; | 23 | import java.net.MalformedURLException; |
23 | import java.net.URL; | 24 | import java.net.URL; |
24 | import java.net.URLConnection; | 25 | import java.net.URLConnection; |
26 | +import java.text.DecimalFormat; | ||
25 | import java.text.NumberFormat; | 27 | import java.text.NumberFormat; |
26 | import java.text.ParseException; | 28 | import java.text.ParseException; |
27 | import java.util.List; | 29 | import java.util.List; |
@@ -49,6 +51,7 @@ public class LogicOperation { | @@ -49,6 +51,7 @@ public class LogicOperation { | ||
49 | private static String NORECORD = "车辆未备案"; | 51 | private static String NORECORD = "车辆未备案"; |
50 | private static String INPUTSTATION = "此车辆未做进站申请"; | 52 | private static String INPUTSTATION = "此车辆未做进站申请"; |
51 | private static String ENTERSTATION = "此车辆未做出站申请"; | 53 | private static String ENTERSTATION = "此车辆未做出站申请"; |
54 | + private static String ISVALID = "二维码已失效或者此车辆未做出入申请"; | ||
52 | 55 | ||
53 | @PostConstruct | 56 | @PostConstruct |
54 | public void init() { | 57 | public void init() { |
@@ -63,30 +66,59 @@ public class LogicOperation { | @@ -63,30 +66,59 @@ public class LogicOperation { | ||
63 | */ | 66 | */ |
64 | public static boolean operation(GatherInfo info) { | 67 | public static boolean operation(GatherInfo info) { |
65 | boolean result = false; | 68 | boolean result = false; |
69 | + if(info.getBarcode()==null || info.getBarcode().length()<=0 ){ | ||
70 | + return result; | ||
71 | + } | ||
66 | BigDecimal grosswt = info.getGrosswt(); | 72 | BigDecimal grosswt = info.getGrosswt(); |
67 | //转为double类型 | 73 | //转为double类型 |
68 | double growssWt = grosswt.doubleValue(); | 74 | double growssWt = grosswt.doubleValue(); |
69 | String ietype = info.getIetype(); | 75 | String ietype = info.getIetype(); |
70 | List<LandBusinessTypeList> lists = null; | 76 | List<LandBusinessTypeList> lists = null; |
71 | String vaName = info.getVename(); | 77 | String vaName = info.getVename(); |
78 | + if(vaName==null || vaName.length()<=0 ){ | ||
79 | + return result; | ||
80 | + } | ||
72 | LandRoadVe ve = logic.veService.selectByFrameNo(vaName); | 81 | LandRoadVe ve = logic.veService.selectByFrameNo(vaName); |
73 | - if(ve ==null) return result; | ||
74 | LandBusinessTypeList list = logic.listService.selectForOne(info.getVename(),info.getBarcode(),info.getAreaid | 82 | LandBusinessTypeList list = logic.listService.selectForOne(info.getVename(),info.getBarcode(),info.getAreaid |
75 | (),info.getChnlno(),info.getIetype()); | 83 | (),info.getChnlno(),info.getIetype()); |
76 | - double goodsWt = 0.0; | ||
77 | - if (list.getMasterList().length() > 0) { | ||
78 | - goodsWt = GoodsWt(list.getMasterList(), info.getIetype()); | ||
79 | - } | ||
80 | - double selfWt = Double.parseDouble(ve.getSelfWt()); | ||
81 | - if (sendBw(info, growssWt, selfWt, goodsWt)) { | ||
82 | - if ("I".equals(info.getIetype())) { | ||
83 | - list.setContrastflag("已进站"); | ||
84 | - } else { | ||
85 | - list.setContrastflag("已出站"); | 84 | + if("0".equals(list.getIsvalid())){ |
85 | + double goodsWt = 0.0; | ||
86 | + if (list.getMasterList()!=null || list.getMasterList().length()>0 ) { | ||
87 | + goodsWt = GoodsWt(list.getMasterList(), info.getIetype()); | ||
86 | } | 88 | } |
87 | - logic.listService.updateById(list); | ||
88 | - result = true; | 89 | + double selfWt = Double.parseDouble(ve.getSelfWt()); |
90 | + if (sendBw(info, growssWt, selfWt, goodsWt)) { | ||
91 | + if ("I".equals(info.getIetype())) { | ||
92 | + list.setContrastflag("已进站"); | ||
93 | + } else { | ||
94 | + list.setContrastflag("已出站"); | ||
95 | + } | ||
96 | + logic.listService.updateById(list); | ||
97 | + List<LandBusinessTypeList> businessTypeLists = logic.listService.selectByBarcode(info.getBarcode()); | ||
98 | + int count = 0; | ||
99 | + for(int i=0; i<businessTypeLists.size(); i++){ | ||
100 | + String flag1 = businessTypeLists.get(i).getContrastflag(); | ||
101 | + if(flag1 != null){ | ||
102 | + count++; | ||
103 | + } | ||
104 | + } | ||
105 | + if("货物流转".equals(list.getBusinesstype())){ | ||
106 | + if(count==4){ | ||
107 | + buildBarCode.cancleBarCode(vaName); | ||
108 | + logic.listService.updateByBarcode(info.getBarcode()); | ||
109 | + } | ||
110 | + }else{ | ||
111 | + if(count==2){ | ||
112 | + buildBarCode.cancleBarCode(vaName); | ||
113 | + logic.listService.updateByBarcode(info.getBarcode()); | ||
114 | + } | ||
115 | + } | ||
116 | + result = true; | ||
117 | + } | ||
118 | + }else{ | ||
119 | + CommandClient.Client(info, ISVALID); | ||
89 | } | 120 | } |
121 | + | ||
90 | return result; | 122 | return result; |
91 | } | 123 | } |
92 | 124 | ||
@@ -111,20 +143,15 @@ public class LogicOperation { | @@ -111,20 +143,15 @@ public class LogicOperation { | ||
111 | */ | 143 | */ |
112 | //校验载重和称重是否在合理的范围 | 144 | //校验载重和称重是否在合理的范围 |
113 | public static boolean checkResult(double grossWt, double wt, double goodsWt) { | 145 | public static boolean checkResult(double grossWt, double wt, double goodsWt) { |
146 | + DecimalFormat df=new DecimalFormat("0.00"); | ||
114 | boolean flag = false; | 147 | boolean flag = false; |
115 | double result = 0.0; | 148 | double result = 0.0; |
116 | if (goodsWt > 0) { | 149 | if (goodsWt > 0) { |
117 | - result = (grossWt - wt) / goodsWt; | ||
118 | - if (result > 1) { | ||
119 | - result = result - 1; | ||
120 | - } else { | ||
121 | - result = 1 - result; | ||
122 | - } | 150 | + result = Double.parseDouble(df.format(Math.abs((goodsWt+wt-grossWt)/grossWt))); |
123 | } else { | 151 | } else { |
124 | - result = (grossWt - wt); | 152 | + result = Double.parseDouble(df.format(Math.abs((grossWt - wt)/grossWt))); |
125 | } | 153 | } |
126 | - BigDecimal bd = new BigDecimal(result); | ||
127 | - if (bd.setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue() <= valueDob()) { | 154 | + if (result <= valueDob()) { |
128 | flag = true; | 155 | flag = true; |
129 | } | 156 | } |
130 | return flag; | 157 | return flag; |
@@ -2,9 +2,11 @@ package com.sy.mapper; | @@ -2,9 +2,11 @@ package com.sy.mapper; | ||
2 | 2 | ||
3 | import com.sy.model.LandBusinessTypeList; | 3 | import com.sy.model.LandBusinessTypeList; |
4 | import org.apache.ibatis.annotations.Param; | 4 | import org.apache.ibatis.annotations.Param; |
5 | +import org.springframework.stereotype.Component; | ||
5 | 6 | ||
6 | import java.util.List; | 7 | import java.util.List; |
7 | 8 | ||
9 | +@Component | ||
8 | public interface LandBusinessTypeListMapper { | 10 | public interface LandBusinessTypeListMapper { |
9 | int deleteByPrimaryKey(String id); | 11 | int deleteByPrimaryKey(String id); |
10 | 12 | ||
@@ -17,6 +19,7 @@ public interface LandBusinessTypeListMapper { | @@ -17,6 +19,7 @@ public interface LandBusinessTypeListMapper { | ||
17 | int updateByPrimaryKeySelective(LandBusinessTypeList record); | 19 | int updateByPrimaryKeySelective(LandBusinessTypeList record); |
18 | 20 | ||
19 | int updateByPrimaryKey(LandBusinessTypeList record); | 21 | int updateByPrimaryKey(LandBusinessTypeList record); |
22 | + | ||
20 | //根据车牌号和进出场标志查询 | 23 | //根据车牌号和进出场标志查询 |
21 | List<LandBusinessTypeList> selectFrameNoAndType(@Param("trailerFrameNo") String frameNo, | 24 | List<LandBusinessTypeList> selectFrameNoAndType(@Param("trailerFrameNo") String frameNo, |
22 | @Param("turnoverflag") String flag); | 25 | @Param("turnoverflag") String flag); |
@@ -24,4 +27,8 @@ public interface LandBusinessTypeListMapper { | @@ -24,4 +27,8 @@ public interface LandBusinessTypeListMapper { | ||
24 | LandBusinessTypeList selectForOne(@Param("trailerFrameNo") String trailerFrameNo, @Param("barcode") String barcode, | 27 | LandBusinessTypeList selectForOne(@Param("trailerFrameNo") String trailerFrameNo, @Param("barcode") String barcode, |
25 | @Param("endstation") String endstation, @Param("aisle") String aisle, | 28 | @Param("endstation") String endstation, @Param("aisle") String aisle, |
26 | @Param("turnoverflag") String turnoverflag); | 29 | @Param("turnoverflag") String turnoverflag); |
30 | + | ||
31 | + List<LandBusinessTypeList> selectByBarcode(@Param("barcode")String barcode); | ||
32 | + | ||
33 | + int updateByBarCode(@Param("barcode")String barcode); | ||
27 | } | 34 | } |
1 | -package com.sy.model; | ||
2 | - | ||
3 | -import java.util.Date; | ||
4 | - | ||
5 | -public class LandBusinessTypeList { | ||
6 | - private String id; | ||
7 | - | ||
8 | - private String massageId; | ||
9 | - | ||
10 | - private String trailerFrameNo; | ||
11 | - | ||
12 | - private String trailerLicenseNo; | ||
13 | - | ||
14 | - private String masterList; | ||
15 | - | ||
16 | - private Date prodectTime; | ||
17 | - | ||
18 | - private String returnmessage; | ||
19 | - | ||
20 | - private String agentno; | ||
21 | - | ||
22 | - private String agentname; | ||
23 | - | ||
24 | - private String cocode; | ||
25 | - | ||
26 | - private String drivername; | ||
27 | - | ||
28 | - private String driverid; | ||
29 | - | ||
30 | - private String startport; | ||
31 | - | ||
32 | - private String endport; | ||
33 | - | ||
34 | - private String startsatation; | ||
35 | - | ||
36 | - private String endstation; | ||
37 | - | ||
38 | - private String aisle; | ||
39 | - | ||
40 | - private String businesstype; | ||
41 | - | ||
42 | - private String turnoverflag; | ||
43 | - | ||
44 | - private String barcode; | ||
45 | - | ||
46 | - private String contrastflag; | ||
47 | - | ||
48 | - private String createBy; | ||
49 | - | ||
50 | - private Date createDate; | ||
51 | - | ||
52 | - private String updateBy; | ||
53 | - | ||
54 | - private Date updateDate; | ||
55 | - | ||
56 | - public String getId() { | ||
57 | - return id; | ||
58 | - } | ||
59 | - | ||
60 | - public void setId(String id) { | ||
61 | - this.id = id == null ? null : id.trim(); | ||
62 | - } | ||
63 | - | ||
64 | - public String getMassageId() { | ||
65 | - return massageId; | ||
66 | - } | ||
67 | - | ||
68 | - public void setMassageId(String massageId) { | ||
69 | - this.massageId = massageId == null ? null : massageId.trim(); | ||
70 | - } | ||
71 | - | ||
72 | - public String getTrailerFrameNo() { | ||
73 | - return trailerFrameNo; | ||
74 | - } | ||
75 | - | ||
76 | - public void setTrailerFrameNo(String trailerFrameNo) { | ||
77 | - this.trailerFrameNo = trailerFrameNo == null ? null : trailerFrameNo.trim(); | ||
78 | - } | ||
79 | - | ||
80 | - public String getTrailerLicenseNo() { | ||
81 | - return trailerLicenseNo; | ||
82 | - } | ||
83 | - | ||
84 | - public void setTrailerLicenseNo(String trailerLicenseNo) { | ||
85 | - this.trailerLicenseNo = trailerLicenseNo == null ? null : trailerLicenseNo.trim(); | ||
86 | - } | ||
87 | - | ||
88 | - public String getMasterList() { | ||
89 | - return masterList; | ||
90 | - } | ||
91 | - | ||
92 | - public void setMasterList(String masterList) { | ||
93 | - this.masterList = masterList == null ? null : masterList.trim(); | ||
94 | - } | ||
95 | - | ||
96 | - public Date getProdectTime() { | ||
97 | - return prodectTime; | ||
98 | - } | ||
99 | - | ||
100 | - public void setProdectTime(Date prodectTime) { | ||
101 | - this.prodectTime = prodectTime; | ||
102 | - } | ||
103 | - | ||
104 | - public String getReturnmessage() { | ||
105 | - return returnmessage; | ||
106 | - } | ||
107 | - | ||
108 | - public void setReturnmessage(String returnmessage) { | ||
109 | - this.returnmessage = returnmessage == null ? null : returnmessage.trim(); | ||
110 | - } | ||
111 | - | ||
112 | - public String getAgentno() { | ||
113 | - return agentno; | ||
114 | - } | ||
115 | - | ||
116 | - public void setAgentno(String agentno) { | ||
117 | - this.agentno = agentno == null ? null : agentno.trim(); | ||
118 | - } | ||
119 | - | ||
120 | - public String getAgentname() { | ||
121 | - return agentname; | ||
122 | - } | ||
123 | - | ||
124 | - public void setAgentname(String agentname) { | ||
125 | - this.agentname = agentname == null ? null : agentname.trim(); | ||
126 | - } | ||
127 | - | ||
128 | - public String getCocode() { | ||
129 | - return cocode; | ||
130 | - } | ||
131 | - | ||
132 | - public void setCocode(String cocode) { | ||
133 | - this.cocode = cocode == null ? null : cocode.trim(); | ||
134 | - } | ||
135 | - | ||
136 | - public String getDrivername() { | ||
137 | - return drivername; | ||
138 | - } | ||
139 | - | ||
140 | - public void setDrivername(String drivername) { | ||
141 | - this.drivername = drivername == null ? null : drivername.trim(); | ||
142 | - } | ||
143 | - | ||
144 | - public String getDriverid() { | ||
145 | - return driverid; | ||
146 | - } | ||
147 | - | ||
148 | - public void setDriverid(String driverid) { | ||
149 | - this.driverid = driverid == null ? null : driverid.trim(); | ||
150 | - } | ||
151 | - | ||
152 | - public String getStartport() { | ||
153 | - return startport; | ||
154 | - } | ||
155 | - | ||
156 | - public void setStartport(String startport) { | ||
157 | - this.startport = startport == null ? null : startport.trim(); | ||
158 | - } | ||
159 | - | ||
160 | - public String getEndport() { | ||
161 | - return endport; | ||
162 | - } | ||
163 | - | ||
164 | - public void setEndport(String endport) { | ||
165 | - this.endport = endport == null ? null : endport.trim(); | ||
166 | - } | ||
167 | - | ||
168 | - public String getStartsatation() { | ||
169 | - return startsatation; | ||
170 | - } | ||
171 | - | ||
172 | - public void setStartsatation(String startsatation) { | ||
173 | - this.startsatation = startsatation == null ? null : startsatation.trim(); | ||
174 | - } | ||
175 | - | ||
176 | - public String getEndstation() { | ||
177 | - return endstation; | ||
178 | - } | ||
179 | - | ||
180 | - public void setEndstation(String endstation) { | ||
181 | - this.endstation = endstation == null ? null : endstation.trim(); | ||
182 | - } | ||
183 | - | ||
184 | - public String getAisle() { | ||
185 | - return aisle; | ||
186 | - } | ||
187 | - | ||
188 | - public void setAisle(String aisle) { | ||
189 | - this.aisle = aisle == null ? null : aisle.trim(); | ||
190 | - } | ||
191 | - | ||
192 | - public String getBusinesstype() { | ||
193 | - return businesstype; | ||
194 | - } | ||
195 | - | ||
196 | - public void setBusinesstype(String businesstype) { | ||
197 | - this.businesstype = businesstype == null ? null : businesstype.trim(); | ||
198 | - } | ||
199 | - | ||
200 | - public String getTurnoverflag() { | ||
201 | - return turnoverflag; | ||
202 | - } | ||
203 | - | ||
204 | - public void setTurnoverflag(String turnoverflag) { | ||
205 | - this.turnoverflag = turnoverflag == null ? null : turnoverflag.trim(); | ||
206 | - } | ||
207 | - | ||
208 | - public String getBarcode() { | ||
209 | - return barcode; | ||
210 | - } | ||
211 | - | ||
212 | - public void setBarcode(String barcode) { | ||
213 | - this.barcode = barcode == null ? null : barcode.trim(); | ||
214 | - } | ||
215 | - | ||
216 | - public String getContrastflag() { | ||
217 | - return contrastflag; | ||
218 | - } | ||
219 | - | ||
220 | - public void setContrastflag(String contrastflag) { | ||
221 | - this.contrastflag = contrastflag == null ? null : contrastflag.trim(); | ||
222 | - } | ||
223 | - | ||
224 | - public String getCreateBy() { | ||
225 | - return createBy; | ||
226 | - } | ||
227 | - | ||
228 | - public void setCreateBy(String createBy) { | ||
229 | - this.createBy = createBy == null ? null : createBy.trim(); | ||
230 | - } | ||
231 | - | ||
232 | - public Date getCreateDate() { | ||
233 | - return createDate; | ||
234 | - } | ||
235 | - | ||
236 | - public void setCreateDate(Date createDate) { | ||
237 | - this.createDate = createDate; | ||
238 | - } | ||
239 | - | ||
240 | - public String getUpdateBy() { | ||
241 | - return updateBy; | ||
242 | - } | ||
243 | - | ||
244 | - public void setUpdateBy(String updateBy) { | ||
245 | - this.updateBy = updateBy == null ? null : updateBy.trim(); | ||
246 | - } | ||
247 | - | ||
248 | - public Date getUpdateDate() { | ||
249 | - return updateDate; | ||
250 | - } | ||
251 | - | ||
252 | - public void setUpdateDate(Date updateDate) { | ||
253 | - this.updateDate = updateDate; | ||
254 | - } | ||
255 | -} |
@@ -14,4 +14,8 @@ public interface LandBusListService { | @@ -14,4 +14,8 @@ public interface LandBusListService { | ||
14 | int saveList(LandBusinessTypeList list); | 14 | int saveList(LandBusinessTypeList list); |
15 | 15 | ||
16 | LandBusinessTypeList selectForOne(String frameNo, String barcode, String station, String aisle, String flag); | 16 | LandBusinessTypeList selectForOne(String frameNo, String barcode, String station, String aisle, String flag); |
17 | + | ||
18 | + List<LandBusinessTypeList> selectByBarcode(String barcode); | ||
19 | + | ||
20 | + int updateByBarcode(String barcode); | ||
17 | } | 21 | } |
@@ -53,4 +53,20 @@ public class LandBusListServiceImpl implements LandBusListService { | @@ -53,4 +53,20 @@ public class LandBusListServiceImpl implements LandBusListService { | ||
53 | } | 53 | } |
54 | return list; | 54 | return list; |
55 | } | 55 | } |
56 | + | ||
57 | + @Override | ||
58 | + public List<LandBusinessTypeList> selectByBarcode(String barcode){ | ||
59 | + List<LandBusinessTypeList> list= null; | ||
60 | + try{ | ||
61 | + list = listMapper.selectByBarcode(barcode); | ||
62 | + }catch (Exception e){ | ||
63 | + System.out.println(e.getMessage()); | ||
64 | + } | ||
65 | + return list; | ||
66 | + } | ||
67 | + | ||
68 | + @Override | ||
69 | + public int updateByBarcode(String barcode) { | ||
70 | + return listMapper.updateByBarCode(barcode); | ||
71 | + } | ||
56 | } | 72 | } |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <result column="TRAILER_LICENSE_NO" jdbcType="VARCHAR" property="trailerLicenseNo" /> | 8 | <result column="TRAILER_LICENSE_NO" jdbcType="VARCHAR" property="trailerLicenseNo" /> |
9 | <result column="MASTER_LIST" jdbcType="VARCHAR" property="masterList" /> | 9 | <result column="MASTER_LIST" jdbcType="VARCHAR" property="masterList" /> |
10 | <result column="PRODECT_TIME" jdbcType="TIMESTAMP" property="prodectTime" /> | 10 | <result column="PRODECT_TIME" jdbcType="TIMESTAMP" property="prodectTime" /> |
11 | - <result column="RETURNMESSAGE" jdbcType="VARCHAR" property="returnmessage" /> | 11 | + <result column="IS_DELETE" jdbcType="VARCHAR" property="isDelete" /> |
12 | <result column="AGENTNO" jdbcType="VARCHAR" property="agentno" /> | 12 | <result column="AGENTNO" jdbcType="VARCHAR" property="agentno" /> |
13 | <result column="AGENTNAME" jdbcType="VARCHAR" property="agentname" /> | 13 | <result column="AGENTNAME" jdbcType="VARCHAR" property="agentname" /> |
14 | <result column="COCODE" jdbcType="VARCHAR" property="cocode" /> | 14 | <result column="COCODE" jdbcType="VARCHAR" property="cocode" /> |
@@ -27,12 +27,13 @@ | @@ -27,12 +27,13 @@ | ||
27 | <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> | 27 | <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" /> |
28 | <result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy" /> | 28 | <result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy" /> |
29 | <result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate" /> | 29 | <result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate" /> |
30 | + <result column="ISVALID" jdbcType="VARCHAR" property="isvalid" /> | ||
30 | </resultMap> | 31 | </resultMap> |
31 | <sql id="Base_Column_List"> | 32 | <sql id="Base_Column_List"> |
32 | id, MASSAGE_ID, TRAILER_FRAME_NO, TRAILER_LICENSE_NO, MASTER_LIST, PRODECT_TIME, | 33 | id, MASSAGE_ID, TRAILER_FRAME_NO, TRAILER_LICENSE_NO, MASTER_LIST, PRODECT_TIME, |
33 | - RETURNMESSAGE, AGENTNO, AGENTNAME, COCODE, DRIVERNAME, DRIVERID, STARTPORT, ENDPORT, | 34 | + IS_DELETE, AGENTNO, AGENTNAME, COCODE, DRIVERNAME, DRIVERID, STARTPORT, ENDPORT, |
34 | STARTSATATION, ENDSTATION, AISLE, BUSINESSTYPE, TURNOVERFLAG, BARCODE, CONTRASTFLAG, | 35 | STARTSATATION, ENDSTATION, AISLE, BUSINESSTYPE, TURNOVERFLAG, BARCODE, CONTRASTFLAG, |
35 | - CREATE_BY, CREATE_DATE, UPDATE_BY, UPDATE_DATE | 36 | + CREATE_BY, CREATE_DATE, UPDATE_BY, UPDATE_DATE, ISVALID |
36 | </sql> | 37 | </sql> |
37 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 38 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
38 | select | 39 | select |
@@ -58,29 +59,40 @@ | @@ -58,29 +59,40 @@ | ||
58 | and AISLE = #{aisle,jdbcType=VARCHAR} | 59 | and AISLE = #{aisle,jdbcType=VARCHAR} |
59 | and TURNOVERFLAG = #{turnoverflag,jdbcType=VARCHAR} | 60 | and TURNOVERFLAG = #{turnoverflag,jdbcType=VARCHAR} |
60 | </select> | 61 | </select> |
62 | + | ||
63 | + <select id="selectByBarcode" parameterType="java.lang.String" resultMap="BaseResultMap"> | ||
64 | + select | ||
65 | + <include refid="Base_Column_List" /> | ||
66 | + from land_businesstype_list | ||
67 | + where BARCODE = #{barcode,jdbcType=VARCHAR} | ||
68 | + </select> | ||
61 | <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> | 69 | <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
62 | delete from land_businesstype_list | 70 | delete from land_businesstype_list |
63 | where id = #{id,jdbcType=VARCHAR} | 71 | where id = #{id,jdbcType=VARCHAR} |
64 | </delete> | 72 | </delete> |
73 | + | ||
74 | + <update id="updateByBarCode" parameterType="java.lang.String"> | ||
75 | + update land_businesstype_list set ISVALID = "1" where BARCODE=#{barcode,jdbcType=VARCHAR}; | ||
76 | + </update> | ||
65 | <insert id="insert" parameterType="com.sy.model.LandBusinessTypeList"> | 77 | <insert id="insert" parameterType="com.sy.model.LandBusinessTypeList"> |
66 | insert into land_businesstype_list (id, MASSAGE_ID, TRAILER_FRAME_NO, | 78 | insert into land_businesstype_list (id, MASSAGE_ID, TRAILER_FRAME_NO, |
67 | TRAILER_LICENSE_NO, MASTER_LIST, PRODECT_TIME, | 79 | TRAILER_LICENSE_NO, MASTER_LIST, PRODECT_TIME, |
68 | - RETURNMESSAGE, AGENTNO, AGENTNAME, | 80 | + IS_DELETE, AGENTNO, AGENTNAME, |
69 | COCODE, DRIVERNAME, DRIVERID, | 81 | COCODE, DRIVERNAME, DRIVERID, |
70 | STARTPORT, ENDPORT, STARTSATATION, | 82 | STARTPORT, ENDPORT, STARTSATATION, |
71 | ENDSTATION, AISLE, BUSINESSTYPE, | 83 | ENDSTATION, AISLE, BUSINESSTYPE, |
72 | TURNOVERFLAG, BARCODE, CONTRASTFLAG, | 84 | TURNOVERFLAG, BARCODE, CONTRASTFLAG, |
73 | CREATE_BY, CREATE_DATE, UPDATE_BY, | 85 | CREATE_BY, CREATE_DATE, UPDATE_BY, |
74 | - UPDATE_DATE) | 86 | + UPDATE_DATE, ISVALID) |
75 | values (#{id,jdbcType=VARCHAR}, #{massageId,jdbcType=VARCHAR}, #{trailerFrameNo,jdbcType=VARCHAR}, | 87 | values (#{id,jdbcType=VARCHAR}, #{massageId,jdbcType=VARCHAR}, #{trailerFrameNo,jdbcType=VARCHAR}, |
76 | #{trailerLicenseNo,jdbcType=VARCHAR}, #{masterList,jdbcType=VARCHAR}, #{prodectTime,jdbcType=TIMESTAMP}, | 88 | #{trailerLicenseNo,jdbcType=VARCHAR}, #{masterList,jdbcType=VARCHAR}, #{prodectTime,jdbcType=TIMESTAMP}, |
77 | - #{returnmessage,jdbcType=VARCHAR}, #{agentno,jdbcType=VARCHAR}, #{agentname,jdbcType=VARCHAR}, | 89 | + #{isDelete,jdbcType=VARCHAR}, #{agentno,jdbcType=VARCHAR}, #{agentname,jdbcType=VARCHAR}, |
78 | #{cocode,jdbcType=VARCHAR}, #{drivername,jdbcType=VARCHAR}, #{driverid,jdbcType=VARCHAR}, | 90 | #{cocode,jdbcType=VARCHAR}, #{drivername,jdbcType=VARCHAR}, #{driverid,jdbcType=VARCHAR}, |
79 | #{startport,jdbcType=VARCHAR}, #{endport,jdbcType=VARCHAR}, #{startsatation,jdbcType=VARCHAR}, | 91 | #{startport,jdbcType=VARCHAR}, #{endport,jdbcType=VARCHAR}, #{startsatation,jdbcType=VARCHAR}, |
80 | #{endstation,jdbcType=VARCHAR}, #{aisle,jdbcType=VARCHAR}, #{businesstype,jdbcType=VARCHAR}, | 92 | #{endstation,jdbcType=VARCHAR}, #{aisle,jdbcType=VARCHAR}, #{businesstype,jdbcType=VARCHAR}, |
81 | #{turnoverflag,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR}, #{contrastflag,jdbcType=VARCHAR}, | 93 | #{turnoverflag,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR}, #{contrastflag,jdbcType=VARCHAR}, |
82 | #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, | 94 | #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, |
83 | - #{updateDate,jdbcType=TIMESTAMP}) | 95 | + #{updateDate,jdbcType=TIMESTAMP}, #{isvalid,jdbcType=VARCHAR}) |
84 | </insert> | 96 | </insert> |
85 | <insert id="insertSelective" parameterType="com.sy.model.LandBusinessTypeList"> | 97 | <insert id="insertSelective" parameterType="com.sy.model.LandBusinessTypeList"> |
86 | insert into land_businesstype_list | 98 | insert into land_businesstype_list |
@@ -103,8 +115,8 @@ | @@ -103,8 +115,8 @@ | ||
103 | <if test="prodectTime != null"> | 115 | <if test="prodectTime != null"> |
104 | PRODECT_TIME, | 116 | PRODECT_TIME, |
105 | </if> | 117 | </if> |
106 | - <if test="returnmessage != null"> | ||
107 | - RETURNMESSAGE, | 118 | + <if test="isDelete != null"> |
119 | + IS_DELETE, | ||
108 | </if> | 120 | </if> |
109 | <if test="agentno != null"> | 121 | <if test="agentno != null"> |
110 | AGENTNO, | 122 | AGENTNO, |
@@ -160,6 +172,9 @@ | @@ -160,6 +172,9 @@ | ||
160 | <if test="updateDate != null"> | 172 | <if test="updateDate != null"> |
161 | UPDATE_DATE, | 173 | UPDATE_DATE, |
162 | </if> | 174 | </if> |
175 | + <if test="isvalid != null"> | ||
176 | + ISVALID, | ||
177 | + </if> | ||
163 | </trim> | 178 | </trim> |
164 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 179 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
165 | <if test="id != null"> | 180 | <if test="id != null"> |
@@ -180,8 +195,8 @@ | @@ -180,8 +195,8 @@ | ||
180 | <if test="prodectTime != null"> | 195 | <if test="prodectTime != null"> |
181 | #{prodectTime,jdbcType=TIMESTAMP}, | 196 | #{prodectTime,jdbcType=TIMESTAMP}, |
182 | </if> | 197 | </if> |
183 | - <if test="returnmessage != null"> | ||
184 | - #{returnmessage,jdbcType=VARCHAR}, | 198 | + <if test="isDelete != null"> |
199 | + #{isDelete,jdbcType=VARCHAR}, | ||
185 | </if> | 200 | </if> |
186 | <if test="agentno != null"> | 201 | <if test="agentno != null"> |
187 | #{agentno,jdbcType=VARCHAR}, | 202 | #{agentno,jdbcType=VARCHAR}, |
@@ -237,6 +252,9 @@ | @@ -237,6 +252,9 @@ | ||
237 | <if test="updateDate != null"> | 252 | <if test="updateDate != null"> |
238 | #{updateDate,jdbcType=TIMESTAMP}, | 253 | #{updateDate,jdbcType=TIMESTAMP}, |
239 | </if> | 254 | </if> |
255 | + <if test="isvalid != null"> | ||
256 | + #{isvalid,jdbcType=VARCHAR}, | ||
257 | + </if> | ||
240 | </trim> | 258 | </trim> |
241 | </insert> | 259 | </insert> |
242 | <update id="updateByPrimaryKeySelective" parameterType="com.sy.model.LandBusinessTypeList"> | 260 | <update id="updateByPrimaryKeySelective" parameterType="com.sy.model.LandBusinessTypeList"> |
@@ -257,8 +275,8 @@ | @@ -257,8 +275,8 @@ | ||
257 | <if test="prodectTime != null"> | 275 | <if test="prodectTime != null"> |
258 | PRODECT_TIME = #{prodectTime,jdbcType=TIMESTAMP}, | 276 | PRODECT_TIME = #{prodectTime,jdbcType=TIMESTAMP}, |
259 | </if> | 277 | </if> |
260 | - <if test="returnmessage != null"> | ||
261 | - RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR}, | 278 | + <if test="isDelete != null"> |
279 | + IS_DELETE = #{isDelete,jdbcType=VARCHAR}, | ||
262 | </if> | 280 | </if> |
263 | <if test="agentno != null"> | 281 | <if test="agentno != null"> |
264 | AGENTNO = #{agentno,jdbcType=VARCHAR}, | 282 | AGENTNO = #{agentno,jdbcType=VARCHAR}, |
@@ -314,6 +332,9 @@ | @@ -314,6 +332,9 @@ | ||
314 | <if test="updateDate != null"> | 332 | <if test="updateDate != null"> |
315 | UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP}, | 333 | UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP}, |
316 | </if> | 334 | </if> |
335 | + <if test="isvalid != null"> | ||
336 | + ISVALID = #{isvalid,jdbcType=VARCHAR}, | ||
337 | + </if> | ||
317 | </set> | 338 | </set> |
318 | where id = #{id,jdbcType=VARCHAR} | 339 | where id = #{id,jdbcType=VARCHAR} |
319 | </update> | 340 | </update> |
@@ -324,7 +345,7 @@ | @@ -324,7 +345,7 @@ | ||
324 | TRAILER_LICENSE_NO = #{trailerLicenseNo,jdbcType=VARCHAR}, | 345 | TRAILER_LICENSE_NO = #{trailerLicenseNo,jdbcType=VARCHAR}, |
325 | MASTER_LIST = #{masterList,jdbcType=VARCHAR}, | 346 | MASTER_LIST = #{masterList,jdbcType=VARCHAR}, |
326 | PRODECT_TIME = #{prodectTime,jdbcType=TIMESTAMP}, | 347 | PRODECT_TIME = #{prodectTime,jdbcType=TIMESTAMP}, |
327 | - RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR}, | 348 | + IS_DELETE = #{isDelete,jdbcType=VARCHAR}, |
328 | AGENTNO = #{agentno,jdbcType=VARCHAR}, | 349 | AGENTNO = #{agentno,jdbcType=VARCHAR}, |
329 | AGENTNAME = #{agentname,jdbcType=VARCHAR}, | 350 | AGENTNAME = #{agentname,jdbcType=VARCHAR}, |
330 | COCODE = #{cocode,jdbcType=VARCHAR}, | 351 | COCODE = #{cocode,jdbcType=VARCHAR}, |
@@ -342,7 +363,8 @@ | @@ -342,7 +363,8 @@ | ||
342 | CREATE_BY = #{createBy,jdbcType=VARCHAR}, | 363 | CREATE_BY = #{createBy,jdbcType=VARCHAR}, |
343 | CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, | 364 | CREATE_DATE = #{createDate,jdbcType=TIMESTAMP}, |
344 | UPDATE_BY = #{updateBy,jdbcType=VARCHAR}, | 365 | UPDATE_BY = #{updateBy,jdbcType=VARCHAR}, |
345 | - UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP} | 366 | + UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP}, |
367 | + ISVALID = #{isvalid,jdbcType=VARCHAR} | ||
346 | where id = #{id,jdbcType=VARCHAR} | 368 | where id = #{id,jdbcType=VARCHAR} |
347 | </update> | 369 | </update> |
348 | </mapper> | 370 | </mapper> |
-
请 注册 或 登录 后发表评论