|
|
@@ -525,4 +525,38 @@ public class PushServiceImpl implements PushsService{
|
|
525
|
525
|
|
|
526
|
526
|
return map.toString();
|
|
527
|
527
|
}
|
|
|
528
|
+
|
|
|
529
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
530
|
+ @Override
|
|
|
531
|
+ public String uploadNoticeUnwind(String orgId, String houseId) {
|
|
|
532
|
+
|
|
|
533
|
+ //先根据仓房id从通知单子表查出来相关联的通知单id集合
|
|
|
534
|
+ BusinessStoreWareDetailExample businessStoreWareDetailExample = new BusinessStoreWareDetailExample();
|
|
|
535
|
+ BusinessStoreWareDetailExample.Criteria criteria = businessStoreWareDetailExample.createCriteria();
|
|
|
536
|
+ criteria.andHouseIdEqualTo(Integer.parseInt(houseId));
|
|
|
537
|
+ criteria.andOrgIdEqualTo(Integer.parseInt(orgId));
|
|
|
538
|
+ criteria.andTypeEqualTo("notice");//默认查询通知单类型数据
|
|
|
539
|
+ List<BusinessStoreWareDetail> json = businessStoreWareDetailMapper.selectByExample(businessStoreWareDetailExample);
|
|
|
540
|
+
|
|
|
541
|
+ List<String> noticeIds = new ArrayList<>();
|
|
|
542
|
+ if (!ParameterUtil.isequal(0,json.size())) {
|
|
|
543
|
+ for (int i = 0; i < json.size(); i++) {
|
|
|
544
|
+ noticeIds.add(json.get(i).getZid().toString());
|
|
|
545
|
+ }
|
|
|
546
|
+
|
|
|
547
|
+ //查出数据
|
|
|
548
|
+ Map<String,Object> mapCondition = new HashMap<String, Object>();
|
|
|
549
|
+ if(ParameterUtil.isnotnull(noticeIds)){
|
|
|
550
|
+ mapCondition.put("ids",noticeIds);
|
|
|
551
|
+ }
|
|
|
552
|
+ if(ParameterUtil.isnotnull(orgId)){
|
|
|
553
|
+ mapCondition.put("orgId",orgId);
|
|
|
554
|
+ }
|
|
|
555
|
+ businessDeliveryStorageNoticeMapper.uploadNoticeUnwind(mapCondition);
|
|
|
556
|
+ }
|
|
|
557
|
+
|
|
|
558
|
+ Map<String,Object> mapData = new HashMap<String, Object>();
|
|
|
559
|
+ mapData.put("status", "success");
|
|
|
560
|
+ return JSON.toJSONString(ResponseEntity.ok(mapData));
|
|
|
561
|
+ }
|
|
528
|
562
|
}
|