|
|
@@ -1,12 +1,15 @@
|
|
1
|
1
|
package com.chinaitop.depot.yjbj.service.impl;
|
|
2
|
2
|
|
|
|
3
|
+import java.util.HashMap;
|
|
3
|
4
|
import java.util.List;
|
|
|
5
|
+import java.util.Map;
|
|
4
|
6
|
|
|
5
|
7
|
import javax.annotation.Resource;
|
|
6
|
8
|
|
|
7
|
9
|
import org.apache.commons.lang3.StringUtils;
|
|
8
|
10
|
import org.springframework.stereotype.Service;
|
|
9
|
11
|
|
|
|
12
|
+import com.chinaitop.depot.utils.DateUtil;
|
|
10
|
13
|
import com.chinaitop.depot.yjbj.mapper.YjbjMapper;
|
|
11
|
14
|
import com.chinaitop.depot.yjbj.model.Chbj;
|
|
12
|
15
|
import com.chinaitop.depot.yjbj.model.Dbtyj;
|
|
|
@@ -17,6 +20,7 @@ import com.chinaitop.depot.yjbj.model.Kjkcyj;
|
|
17
|
20
|
import com.chinaitop.depot.yjbj.model.Thprkyj;
|
|
18
|
21
|
import com.chinaitop.depot.yjbj.model.Zkycbj;
|
|
19
|
22
|
import com.chinaitop.depot.yjbj.model.Zlbj;
|
|
|
23
|
+import com.chinaitop.depot.yjbj.model.Zqlyj;
|
|
20
|
24
|
import com.chinaitop.depot.yjbj.service.YjbjService;
|
|
21
|
25
|
|
|
22
|
26
|
@Service
|
|
|
@@ -115,4 +119,40 @@ public class YjbjServiceImpl implements YjbjService {
|
|
115
|
119
|
return yjbjMapper.selectDbtyj(obj);
|
|
116
|
120
|
}
|
|
117
|
121
|
|
|
|
122
|
+ @Override
|
|
|
123
|
+ public List<Zqlyj> selectZqlyj(Integer orgId, String bjrq) throws Exception {
|
|
|
124
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
125
|
+ map.put("orgId", orgId);
|
|
|
126
|
+ if (StringUtils.isNotBlank(bjrq)) {
|
|
|
127
|
+ map.put("startTime", String.format("%s%s", bjrq, DateUtil.startTime));
|
|
|
128
|
+ map.put("endTime", String.format("%s%s", bjrq, DateUtil.endTime));
|
|
|
129
|
+ }
|
|
|
130
|
+ List<Zqlyj> list = yjbjMapper.selectZqlyj(map);
|
|
|
131
|
+ for (Zqlyj grainRotationAlarmVO : list) {
|
|
|
132
|
+ if(!StringUtils.isEmpty(grainRotationAlarmVO.getBjxx())){
|
|
|
133
|
+ String rkcl = "";
|
|
|
134
|
+ //String sczykdmc = "";
|
|
|
135
|
+ String pzmc = "";
|
|
|
136
|
+ String yjxx = "";
|
|
|
137
|
+ String originYjxx = grainRotationAlarmVO.getBjxx();
|
|
|
138
|
+ if (originYjxx.startsWith("车牌号")) {
|
|
|
139
|
+ rkcl = originYjxx.substring(originYjxx.indexOf("车牌号")+3,originYjxx.indexOf("车辆"));
|
|
|
140
|
+ //sczykdmc = originYjxx.substring(originYjxx.indexOf("“")+1,originYjxx.lastIndexOf("”"));
|
|
|
141
|
+ pzmc = originYjxx.substring(originYjxx.indexOf("粮食品种:")+5,originYjxx.indexOf("、"));
|
|
|
142
|
+ yjxx = "上一次入库化验不合格再入库的同号牌同品种车辆";
|
|
|
143
|
+ } else if (originYjxx.startsWith("注意:")) {
|
|
|
144
|
+ rkcl = originYjxx.substring(originYjxx.indexOf("【")+1,originYjxx.indexOf("】"));
|
|
|
145
|
+ //sczykdmc = originYjxx.substring(originYjxx.indexOf("“")+1,originYjxx.lastIndexOf("”"));
|
|
|
146
|
+ pzmc = originYjxx.substring(originYjxx.indexOf("粮食品种:")+5,originYjxx.indexOf("、"));
|
|
|
147
|
+ yjxx = "3天内上一次为出库作业同号牌同品种的车辆";
|
|
|
148
|
+ }
|
|
|
149
|
+ grainRotationAlarmVO.setRkcl(rkcl);
|
|
|
150
|
+ grainRotationAlarmVO.setPzmc(pzmc);
|
|
|
151
|
+ grainRotationAlarmVO.setBjxx(yjxx);
|
|
|
152
|
+ }
|
|
|
153
|
+
|
|
|
154
|
+ }
|
|
|
155
|
+ return list;
|
|
|
156
|
+ }
|
|
|
157
|
+
|
|
118
|
158
|
}
|