-
admin
2024-05-25 a60fef88880990c61fa45072b092150c1ffec437
提交 | 用户 | 时间
e57a89 1 package com.jcdm.main.da.paramCollection.service.impl;
2
6a462f 3 import cn.hutool.core.collection.CollUtil;
b64ed2 4 import cn.hutool.core.date.DateUtil;
6a462f 5 import cn.hutool.core.util.StrUtil;
8f0f8d 6 import cn.hutool.db.Db;
6a462f 7 import cn.hutool.http.HttpRequest;
W 8 import cn.hutool.http.HttpResponse;
9 import cn.hutool.json.JSONUtil;
7bee80 10 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
0ce25f 11 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
e57a89 12 import com.jcdm.common.utils.DateUtils;
a60fef 13 import com.jcdm.common.utils.StringUtils;
7bee80 14 import com.jcdm.main.bs.formula.service.IBsFormulaInfoService;
15 import com.jcdm.main.bs.formula.service.impl.BsFormulaInfoServiceImpl;
b77c7b 16 import com.jcdm.main.bs.formulaChild.domain.BsFormulaChildInfo;
17 import com.jcdm.main.bs.formulaChild.mapper.BsFormulaChildInfoMapper;
7bee80 18 import com.jcdm.main.bs.formulaChild.service.IBsFormulaChildInfoService;
6a462f 19 import com.jcdm.main.constant.Constants;
b64ed2 20 import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf;
21 import com.jcdm.main.da.collectionParamConf.mapper.DaCollectionParamConfMapper;
5966d6 22 import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService;
e57a89 23 import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
24 import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper;
25 import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService;
32483a 26 import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection;
27 import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper;
28 import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService;
054a69 29 import com.jcdm.main.plcserver.sub.OPCUaSubscription;
6a462f 30 import com.jcdm.main.restful.qingYan.doman.ChildVO;
W 31 import com.jcdm.main.restful.qingYan.doman.ParentVO;
32483a 32 import com.kangaroohy.milo.model.ReadWriteEntity;
33 import com.kangaroohy.milo.service.MiloService;
054a69 34 import org.apache.ibatis.session.ExecutorType;
35 import org.apache.ibatis.session.SqlSession;
36 import org.apache.ibatis.session.SqlSessionFactory;
e57a89 37 import org.springframework.beans.factory.annotation.Autowired;
5966d6 38 import org.springframework.security.core.parameters.P;
e57a89 39 import org.springframework.stereotype.Service;
40
054a69 41 import javax.annotation.Resource;
5966d6 42 import java.text.SimpleDateFormat;
A 43 import java.time.Instant;
b64ed2 44 import java.util.*;
6a462f 45 import java.util.stream.Collectors;
e57a89 46
47 /**
48  * 设备产品过程参数采集Service业务层处理
49  * 
50  * @author yyt
51  * @date 2023-12-13
52  */
53 @Service
0ce25f 54 public class DaParamCollectionServiceImpl extends ServiceImpl<DaParamCollectionMapper,DaParamCollection> implements IDaParamCollectionService
e57a89 55 {
56     @Autowired
57     private DaParamCollectionMapper daParamCollectionMapper;
b64ed2 58
59     @Autowired
60     private DaCollectionParamConfMapper daCollectionParamConfMapper;
b77c7b 61
62     @Autowired
63     private BsFormulaChildInfoMapper bsFormulaChildInfoMapper;
7bee80 64
65     @Autowired
66     private IBsFormulaChildInfoService bsFormulaChildInfoService;
32483a 67
68     @Autowired
69     private MiloService miloService;
70
71     @Autowired
72     private DaPassingStationCollectionMapper daPassingStationCollectionMapper;
e57a89 73
054a69 74     @Resource
75     private SqlSessionFactory sqlSessionFactory;
76
ddb300 77     @Autowired
A 78     private IDaParamCollectionService daParamCollectionService;
5966d6 79
A 80     @Autowired
81     private IDaCollectionParamConfService daCollectionParamConfService;
ddb300 82
e57a89 83     /**
84      * 查询设备产品过程参数采集
85      * 
86      * @param id 设备产品过程参数采集主键
87      * @return 设备产品过程参数采集
88      */
89     @Override
90     public DaParamCollection selectDaParamCollectionById(Long id)
91     {
92         return daParamCollectionMapper.selectDaParamCollectionById(id);
93     }
94
95     /**
96      * 查询设备产品过程参数采集列表
97      * 
98      * @param daParamCollection 设备产品过程参数采集
99      * @return 设备产品过程参数采集
100      */
101     @Override
102     public List<DaParamCollection> selectDaParamCollectionList(DaParamCollection daParamCollection)
103     {
104         return daParamCollectionMapper.selectDaParamCollectionList(daParamCollection);
054a69 105     }
106
107     @Override
108     public void saveBeachDaParamCollection(List<DaParamCollection> list) {
109         // ExecutorType.SIMPLE: 这个执行器类型不做特殊的事情。它为每个语句的执行创建一个新的预处理语句。
110         // ExecutorType.REUSE: 这个执行器类型会复用预处理语句。
111         // ExecutorType.BATCH: 这个执行器会批量执行所有更新语句,如果 SELECT 在它们中间执行还会标定它们是 必须的,来保证一个简单并易于理解的行为。
112
113         // 关闭session的自动提交
114         SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
115         try {
116             DaParamCollectionMapper userMapper = sqlSession.getMapper(DaParamCollectionMapper.class);
117             list.stream().forEach(DaParamCollection -> userMapper.insertDaParamCollection(DaParamCollection));
118             // 提交数据
119             sqlSession.commit();
120             sqlSession.rollback();
121         } catch (Exception e) {
122             sqlSession.rollback();
123         } finally {
124             sqlSession.close();
125         }
e57a89 126     }
127
128     /**
129      * 新增设备产品过程参数采集
130      * 
131      * @param daParamCollection 设备产品过程参数采集
132      * @return 结果
133      */
134     @Override
135     public int insertDaParamCollection(DaParamCollection daParamCollection)
136     {
137         daParamCollection.setCreateTime(DateUtils.getNowDate());
138         return daParamCollectionMapper.insertDaParamCollection(daParamCollection);
139     }
140
141     /**
142      * 修改设备产品过程参数采集
143      * 
144      * @param daParamCollection 设备产品过程参数采集
145      * @return 结果
146      */
147     @Override
148     public int updateDaParamCollection(DaParamCollection daParamCollection)
149     {
150         daParamCollection.setUpdateTime(DateUtils.getNowDate());
151         return daParamCollectionMapper.updateDaParamCollection(daParamCollection);
152     }
153
154     /**
155      * 批量删除设备产品过程参数采集
156      * 
157      * @param ids 需要删除的设备产品过程参数采集主键
158      * @return 结果
159      */
160     @Override
161     public int deleteDaParamCollectionByIds(Long[] ids)
162     {
163         return daParamCollectionMapper.deleteDaParamCollectionByIds(ids);
164     }
165
166     /**
167      * 删除设备产品过程参数采集信息
168      * 
169      * @param id 设备产品过程参数采集主键
170      * @return 结果
171      */
172     @Override
173     public int deleteDaParamCollectionById(Long id)
174     {
175         return daParamCollectionMapper.deleteDaParamCollectionById(id);
176     }
b64ed2 177
178     @Override
179     public void addBasicParameters(DaParamCollection daParamCollection) {
180         // 假设这是从数据库或其他地方获取的参数数据
181         Map<String, String> map = new HashMap<>();
182         map.put("GC", "南浔工厂");
183         map.put("CXBH", "Pack线");
184         map.put("SBBH", "设备001");
185         map.put("YGBH", "员工001");
186         map.put("GDBH", daParamCollection.getWorkOrderNo());
187         map.put("CPXH", daParamCollection.getModel());
188         map.put("INT", DateUtil.formatDateTime(new Date()));
189
190         map.forEach((key, value) -> {
191             DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf();
192             daCollectionParamConf.setProcessesCode(daParamCollection.getLocationCode());
193             daCollectionParamConf.setCollectParameterId(key);
194             List<DaCollectionParamConf> daCollectionParamConfs = daCollectionParamConfMapper.selectDaCollectionParamConfList(daCollectionParamConf);
195             DaParamCollection saveData = new DaParamCollection();
196             saveData.setWorkOrderNo(daParamCollection.getWorkOrderNo());
197             saveData.setProductCode(daParamCollection.getProductCode());
198             saveData.setLocationCode(daParamCollection.getLocationCode());
3c2299 199             saveData.setSfcCode(daParamCollection.getProductBarcode());
b64ed2 200             saveData.setParamCode(daCollectionParamConfs.get(0).getCollectParameterId());
201             saveData.setParamName(daCollectionParamConfs.get(0).getCollectParameterName());
202             saveData.setCollectionTime(new Date());
203             saveData.setParamValue(value);
204             daParamCollectionMapper.insertDaParamCollection(saveData);
205         });
206     }
49c784 207
208     @Override
209     public void addTighteningParameters(DaParamCollection daParamCollection) {
b77c7b 210         String paramCode = daParamCollection.getParamCode();
a60fef 211         String tightenData = daParamCollection.getTightenTheArray();
A 212         if(StringUtils.isNotBlank(paramCode)&&StringUtils.isNotBlank(tightenData)){
213             tightenData = tightenData.replace("[", "").replace("]", "").replace(" ", "");
214             String[] tightenDataParts = tightenData.split(",");
215             String[] paramCodeParts = paramCode.split(",");
216             for (int i = 0; i < paramCodeParts.length; i++) {
217                 daParamCollection.setParamValue(tightenDataParts[i]);
218                 daParamCollection.setParamCode(paramCodeParts[i]);
219                 daParamCollection.setCollectionTime(new Date());
220                 daParamCollection.setSfcCode(daParamCollection.getProductBarcode());
221                 daParamCollectionMapper.insertDaParamCollection(daParamCollection);
222             }
b77c7b 223         }
49c784 224     }
32483a 225
226     @Override
227     public void saveCampaignTimeParameters(DaParamCollection daParamCollection) {
7bee80 228         List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>()
229                 .eq(BsFormulaChildInfo::getProcessesCode, daParamCollection.getLocationCode())
230                 .eq(BsFormulaChildInfo::getSpareField4, "1")
231         );
232         if(!list.get(0).getResults().equals("OK")){
233             try {
234                 miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+daParamCollection.getLocationCode()+".RecordDataDone").value(22).build());
235             } catch (Exception e) {
236                 throw new RuntimeException(e);
237             }
238             return;
239         }
32483a 240         BsFormulaChildInfo bsFormulaChildInfo = new BsFormulaChildInfo();
241         bsFormulaChildInfo.setProcessesCode(daParamCollection.getLocationCode());
242         bsFormulaChildInfo.setProductCode(daParamCollection.getProductCode());
243         bsFormulaChildInfo.setSpareField4("1");
244         List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(bsFormulaChildInfo);
245         String result = bsFormulaChildInfos.get(0).getResults();
246         if(result != null && !result.isEmpty()){
247             try {
248                 //过站参数采集记录出站时间
249                 DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf();
250                 daCollectionParamConf.setProcessesCode(daParamCollection.getLocationCode());
251                 daCollectionParamConf.setCollectParameterId("OUTT");
252                 List<DaCollectionParamConf> daCollectionParamConfs = daCollectionParamConfMapper.selectDaCollectionParamConfList(daCollectionParamConf);
253                 DaParamCollection saveData = new DaParamCollection();
254                 saveData.setWorkOrderNo(daParamCollection.getWorkOrderNo());
255                 saveData.setProductCode(daParamCollection.getProductCode());
256                 saveData.setLocationCode(daParamCollection.getLocationCode());
257                 saveData.setSfcCode(daParamCollection.getProductBarcode());
258                 saveData.setParamCode(daCollectionParamConfs.get(0).getCollectParameterId());
259                 saveData.setParamName(daCollectionParamConfs.get(0).getCollectParameterName());
260                 saveData.setCollectionTime(new Date());
261                 saveData.setParamValue(DateUtil.formatDateTime(new Date()));
262                 daParamCollectionMapper.insertDaParamCollection(saveData);
263
264                 //更新过站记录表出站时间
265                 DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
266                 daPassingStationCollection.setWorkOrderNo(daParamCollection.getWorkOrderNo());
1df825 267                 daPassingStationCollection.setLocationCode(daParamCollection.getLocationCode());
32483a 268                 List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
269                 daPassingStationCollections.get(0).setOutboundTime(new Date());
270                 int i = daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
271
8f0f8d 272 //                OPCUaSubscription.SaveParamData(daParamCollection.getProductBarcode(),"OP",daParamCollection.getLocationCode(),daParamCollection.getWorkOrderNo(),daParamCollection.getProductCode());
054a69 273
32483a 274                 //给opc发21
7bee80 275                 miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build());
32483a 276             } catch (Exception e) {
277                 throw new RuntimeException(e);
278             }
279         }
280     }
8f0f8d 281
282     @Override
283     public void insertBatch(List<DaParamCollection> confList){
284         try{
285             this.saveBatch(confList);
286         }catch (Exception e){
287             return;
288         }
289
290     }
ddb300 291
A 292     @Override
293     public void replaceAssemblyCode(DaParamCollection daParamCollection) {
294         List<DaParamCollection> list = daParamCollectionService.list(new LambdaQueryWrapper<DaParamCollection>()
2c7661 295                 .eq(DaParamCollection::getSfcCode, daParamCollection.getYzSfcCode())
ddb300 296         );
A 297         if(list.size() > 0){
298             for (DaParamCollection paramCollection : list) {
2c7661 299                 paramCollection.setSfcCode(daParamCollection.getSfcCode());
ddb300 300                 daParamCollectionService.saveOrUpdate(paramCollection);
A 301             }
302         }
303
304     }
4a5f2a 305
A 306     @Override
307     public void yzAddBasicParameters(DaParamCollection daParamCollection) {
308         // 假设这是从数据库或其他地方获取的参数数据
309         Map<String, String> map = new HashMap<>();
310 //        map.put("GC", "南浔工厂");
311 //        map.put("CXBH", "Pack线");
312 //        map.put("SBBH", "设备001");
313 //        map.put("YGBH", "员工001");
314 //        map.put("GDBH", daParamCollection.getWorkOrderNo());
315 //        map.put("CPXH", daParamCollection.getModel());
316         map.put("INT", DateUtil.formatDateTime(new Date()));
317
318         map.forEach((key, value) -> {
319             DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf();
320             daCollectionParamConf.setProcessesCode(daParamCollection.getLocationCode());
321             daCollectionParamConf.setCollectParameterId(key);
322             List<DaCollectionParamConf> daCollectionParamConfs = daCollectionParamConfMapper.selectDaCollectionParamConfList(daCollectionParamConf);
323             DaParamCollection saveData = new DaParamCollection();
324             saveData.setWorkOrderNo(daParamCollection.getWorkOrderNo());
325             saveData.setProductCode(daParamCollection.getProductCode());
326             saveData.setLocationCode(daParamCollection.getLocationCode());
327             saveData.setSfcCode(daParamCollection.getProductBarcode());
328             saveData.setParamCode(daCollectionParamConfs.get(0).getCollectParameterId());
329             saveData.setParamName(daCollectionParamConfs.get(0).getCollectParameterName());
330             saveData.setCollectionTime(new Date());
331             saveData.setParamValue(value);
332             daParamCollectionMapper.insertDaParamCollection(saveData);
333         });
334     }
1c84ae 335
A 336     @Override
337     public void jrmSaveCampaignTimeParameters(DaParamCollection daParamCollection) {
338         DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf();
339         daCollectionParamConf.setProcessesCode(daParamCollection.getLocationCode());
340         daCollectionParamConf.setCollectParameterId("OUTT");
341         List<DaCollectionParamConf> daCollectionParamConfs = daCollectionParamConfMapper.selectDaCollectionParamConfList(daCollectionParamConf);
342         DaParamCollection saveData = new DaParamCollection();
343         saveData.setWorkOrderNo(daParamCollection.getWorkOrderNo());
344         saveData.setProductCode(daParamCollection.getProductCode());
345         saveData.setLocationCode(daParamCollection.getLocationCode());
346         saveData.setSfcCode(daParamCollection.getProductBarcode());
347         saveData.setParamCode(daCollectionParamConfs.get(0).getCollectParameterId());
348         saveData.setParamName(daCollectionParamConfs.get(0).getCollectParameterName());
349         saveData.setCollectionTime(new Date());
350         saveData.setParamValue(DateUtil.formatDateTime(new Date()));
351         daParamCollectionMapper.insertDaParamCollection(saveData);
352
353         //更新过站记录表出站时间
354         DaPassingStationCollection daPassingStationCollection = new DaPassingStationCollection();
355         daPassingStationCollection.setWorkOrderNo(daParamCollection.getWorkOrderNo());
356         daPassingStationCollection.setLocationCode(daParamCollection.getLocationCode());
357         List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection);
358         daPassingStationCollections.get(0).setOutboundTime(new Date());
359         int i = daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0));
360
361 //                OPCUaSubscription.SaveParamData(daParamCollection.getProductBarcode(),"OP",daParamCollection.getLocationCode(),daParamCollection.getWorkOrderNo(),daParamCollection.getProductCode());
362
363         //给opc发21
364         try {
365 //            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+daParamCollection.getLocationCode()+".RecordDataDone").value(21).build());
1ccd69 366             String strA = daParamCollection.getLocationCode();
1c84ae 367             miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strA+".RecordDataDone").value(21).build());
A 368         } catch (Exception e) {
369             throw new RuntimeException(e);
370         }
371     }
6a462f 372
W 373
374     public void sendToFactoryMes(String stationCode,String productNum ){
375         String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
982c84 376 //        String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
6a462f 377         ParentVO vo =new ParentVO();
W 378         List<ChildVO> checkList = new ArrayList<>();
379         List<DaParamCollection> list = this.list(new LambdaQueryWrapper<DaParamCollection>()
380                 .eq(DaParamCollection::getSfcCode, productNum)
381                 .eq(DaParamCollection::getLocationCode, stationCode));
382         vo.setTotalResult("1");
383         String string = new Random(10).toString();
384         vo.setRecordId(string);
385         vo.setProductNum(productNum);
386         vo.setSiteCode("3983");
387         vo.setStationCode(stationCode);
388         if (CollUtil.isNotEmpty(list)){
389             List<DaParamCollection> collect = list.stream().filter(x -> Constants.NG.equals(x.getParamValue())).collect(Collectors.toList());
390             if (CollUtil.isNotEmpty(collect)){
391                 vo.setTotalResult("0");
392             }
393             List<BsFormulaChildInfo> bsFormulaChildInfoList = bsFormulaChildInfoService.list();
394             for (DaParamCollection daParamCollection : list) {
395                 ChildVO childVO = new ChildVO();
396                 childVO.setItemCode(daParamCollection.getParamCode());
397                 String time = daParamCollection.getCollectionTime() != null ? daParamCollection.getCollectionTime().toString() : "";
398                 childVO.setCheckResult("1");
399                 if (StrUtil.isNotBlank(daParamCollection.getParamValue())){
400                     if (Constants.NG.equals(daParamCollection.getParamValue())){
401                         childVO.setCheckResult("0");
402                     }
403                 }
404                 childVO.setCheckTime(time);
405                 childVO.setItemValue(daParamCollection.getParamValue());
406                 childVO.setItemType("3");
407                 childVO.setItemText(daParamCollection.getParamName());
408                 if (StrUtil.isNotBlank(daParamCollection.getParamCode())){
409                     List<BsFormulaChildInfo> collect1 = bsFormulaChildInfoList.stream().filter(x -> daParamCollection.getParamCode().equals(x.getParamCode())).collect(Collectors.toList());
410                     if (CollUtil.isNotEmpty(collect1)){
411                         BsFormulaChildInfo bsFormulaChildInfo = collect1.get(0);
412                         childVO.setItemType(bsFormulaChildInfo.getOperationType());
413                     }
414                 }
415
416                 checkList.add(childVO);
417             }
418         }
419         vo.setCheckList(checkList);
420         HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(vo)).execute();
421
422     }
5966d6 423
A 424     @Override
425     public void pushGeelycvMesFeedback(String packID, String stationCode) {
426         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
427         String url = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
982c84 428 //        String url = "https://imes-group.geelycv.com/api/mom-open/restful/aMesSysIntegration/deviceResultFeedback";
5966d6 429         String totalResult = "0";
A 430         List<DaParamCollection> paramList = daParamCollectionService.list(new LambdaQueryWrapper<DaParamCollection>().eq(DaParamCollection::getSfcCode, packID).eq(DaParamCollection::getLocationCode, stationCode));
431         if(paramList.size() > 0){
432             ParentVO parentVO = new ParentVO();
433             parentVO.setSiteCode("3983");
434             parentVO.setRecordId(String.valueOf(Instant.now().toEpochMilli()));
435             parentVO.setStationCode(stationCode);
436             parentVO.setProductNum(packID);
437             parentVO.setTotalResult("1");
438             List<ChildVO> listChildVo = new ArrayList<>();
439
440             for (DaParamCollection daParamCollection : paramList) {
441                 ChildVO childVO = new ChildVO();
442                 childVO.setItemCode(daParamCollection.getParamCode());
443                 BsFormulaChildInfo childOne = bsFormulaChildInfoService.getOne(new LambdaQueryWrapper<BsFormulaChildInfo>().eq(BsFormulaChildInfo::getParamCode, daParamCollection.getParamCode()));
444                 DaCollectionParamConf paramConfOne = daCollectionParamConfService.getOne(new LambdaQueryWrapper<DaCollectionParamConf>().eq(DaCollectionParamConf::getCollectParameterId, daParamCollection.getParamCode()));
445                 if(childOne!=null){
446                     String operationType = childOne.getOperationType();
447                     if(operationType.equals("1")){
448                         childVO.setItemType("2");
449                     }else if(operationType.equals("2")){
450                         childVO.setItemType("1");
451                     }
452                 }else {
453                     childVO.setItemType("3");
454                 }
455                 if(paramConfOne!=null){
456                     childVO.setItemText(paramConfOne.getCollectParameterName());
457                 }else {
458                     childVO.setItemText("");
459                 }
460                 childVO.setItemValue(daParamCollection.getParamValue());
461
462                 if(daParamCollection.getParamValue().equals("1")){
463                     childVO.setCheckResult("1");
464                 }else if(daParamCollection.getParamValue().equals("2")){
465                     childVO.setCheckResult("0");
466                     parentVO.setTotalResult("0");
467                     totalResult = "1";
468                 }else {
469                     childVO.setCheckResult("1");
470                 }
471                 childVO.setCheckTime(format.format(daParamCollection.getCollectionTime()));
472                 listChildVo.add(childVO);
473             }
474             parentVO.setCheckList(listChildVo);
475             HttpResponse execute = HttpRequest.post(url).body(JSONUtil.toJsonStr(parentVO)).execute();
476             System.out.println(execute.body());
477             System.out.println("-----------------------"+totalResult);
478         }
479
480     }
616f98 481
e57a89 482 }