|  | @@ -3,10 +3,8 @@ package org.jeecg.modules.documents.shippingDetails.controller;
 | 
	
		
			
				|  |  |  import java.io.*;
 | 
	
		
			
				|  |  |  import java.lang.reflect.Field;
 | 
	
		
			
				|  |  |  import java.math.BigDecimal;
 | 
	
		
			
				|  |  | -import java.text.DateFormat;
 | 
	
		
			
				|  |  |  import java.text.SimpleDateFormat;
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  | -import java.net.URLDecoder;
 | 
	
		
			
				|  |  |  import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  import javax.servlet.ServletOutputStream;
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletRequest;
 | 
	
	
		
			
				|  | @@ -21,7 +19,6 @@ import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  |  import com.google.gson.Gson;
 | 
	
		
			
				|  |  |  import com.google.gson.GsonBuilder;
 | 
	
		
			
				|  |  |  //import org.apache.shiro.SecurityUtils;
 | 
	
		
			
				|  |  | -import org.apache.poi.hssf.util.HSSFColor;
 | 
	
		
			
				|  |  |  import org.apache.poi.ss.usermodel.*;
 | 
	
		
			
				|  |  |  import org.apache.poi.ss.util.CellRangeAddressList;
 | 
	
		
			
				|  |  |  import org.apache.poi.xssf.usermodel.XSSFDataValidation;
 | 
	
	
		
			
				|  | @@ -29,13 +26,10 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 | 
	
		
			
				|  |  |  import org.apache.shiro.SecurityUtils;
 | 
	
		
			
				|  |  |  import org.jeecg.common.api.vo.Result;
 | 
	
		
			
				|  |  |  import org.jeecg.common.exception.JeecgBootException;
 | 
	
		
			
				|  |  | -import org.jeecg.common.system.query.QueryGenerator;
 | 
	
		
			
				|  |  |  import org.jeecg.common.aspect.annotation.AutoLog;
 | 
	
		
			
				|  |  |  import org.jeecg.common.system.vo.LoginUser;
 | 
	
		
			
				|  |  |  //import org.jeecg.common.util.oConvertUtils;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.cost.vo.SyCostAllocationPage;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.documents.orderData.entity.SyOrderDataVO;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.documents.orderData.service.ISyGetOrderService;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.documents.orderData.service.impl.SyGetOrderServiceImpl;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElements;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationElementsItem;
 | 
	
	
		
			
				|  | @@ -48,22 +42,16 @@ import org.jeecg.modules.documents.shippingDetails.mapper.SyShippingDetailsMappe
 | 
	
		
			
				|  |  |  import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsItemService;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import java.util.logging.SimpleFormatter;
 | 
	
		
			
				|  |  |  import java.util.regex.Matcher;
 | 
	
		
			
				|  |  |  import java.util.regex.Pattern;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.monitor.service.impl.RedisServiceImpl;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.spapl.entity.SizeTable;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.spapl.entity.SyPreAssembledPackingList;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.spapl.entity.SyPreAssembledPackingListItem;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.spapl.mapper.SyPreAssembledPackingListItemMapper;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.spapl.service.impl.SyPreAssembledPackingListItemServiceImpl;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.spapl.vo.SyPreAssembledPackingListPage;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.splfi.entity.SyPackingListFabricItem;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.splfi.service.impl.SyPackingListFabricItemServiceImpl;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.splt.service.impl.SyPackingListTailoringItemServiceImpl;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.system.util.oConvertUtils;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.metadata.IPage;
 | 
	
	
		
			
				|  | @@ -72,24 +60,12 @@ import lombok.extern.slf4j.Slf4j;
 | 
	
		
			
				|  |  |  import org.jeecg.common.system.base.controller.JeecgController;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.openApi.entity.DxpDataPlan;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.openApi.service.IDxpDataPlanService;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.system.entity.SysUser;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.system.util.InterfaceConnUtils;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.system.util.JsonChangeUtils;
 | 
	
		
			
				|  |  | -import org.jeecg.modules.system.util.SecurityUtil;
 | 
	
		
			
				|  |  |  import org.jeecgframework.poi.excel.ExcelExportUtil;
 | 
	
		
			
				|  |  | -import org.jeecgframework.poi.excel.ExcelImportUtil;
 | 
	
		
			
				|  |  | -import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 | 
	
		
			
				|  |  | -import org.jeecgframework.poi.excel.entity.ExportParams;
 | 
	
		
			
				|  |  | -import org.jeecgframework.poi.excel.entity.ImportParams;
 | 
	
		
			
				|  |  | -import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
 | 
	
		
			
				|  |  | -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import org.springframework.beans.BeanUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  | -import org.springframework.web.multipart.MultipartFile;
 | 
	
		
			
				|  |  | -import org.springframework.web.multipart.MultipartHttpServletRequest;
 | 
	
		
			
				|  |  | -import org.springframework.web.servlet.ModelAndView;
 | 
	
		
			
				|  |  | -import com.alibaba.fastjson.JSON;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -125,8 +101,9 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	 @Autowired
 | 
	
		
			
				|  |  |  	 private SyPreAssembledPackingListItemMapper syPreAssembledPackingListItemMapper;
 | 
	
		
			
				|  |  | -	
 | 
	
		
			
				|  |  | -	/**
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	 /**
 | 
	
		
			
				|  |  |  	 * 分页列表查询
 | 
	
		
			
				|  |  |  	 *
 | 
	
		
			
				|  |  |  	 * @param syShippingDetails
 | 
	
	
		
			
				|  | @@ -138,11 +115,11 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 | 
	
		
			
				|  |  |  	@AutoLog(value = "发运明细主表-分页列表查询")
 | 
	
		
			
				|  |  |  	@ApiOperation(value="发运明细主表-分页列表查询", notes="发运明细主表-分页列表查询")
 | 
	
		
			
				|  |  |  	@GetMapping(value = "/list")
 | 
	
		
			
				|  |  | -	public Result<IPage<SyShippingDetailsVo>> queryPageList(SyShippingDetailsVo syShippingDetails,String startTime,String endTime,String flourOrGarment,
 | 
	
		
			
				|  |  | -								   String refer,String preDeliveryDateB,String preDeliveryDateE,String supplier,String isElement,
 | 
	
		
			
				|  |  | -								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 | 
	
		
			
				|  |  | -								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 | 
	
		
			
				|  |  | -								   HttpServletRequest req) {
 | 
	
		
			
				|  |  | +	public Result<IPage<SyShippingDetailsVo>> queryPageList(SyShippingDetailsVo syShippingDetails, String startTime, String endTime, String flourOrGarment,
 | 
	
		
			
				|  |  | +														String refer, String preDeliveryDateB, String preDeliveryDateE, String supplier, String isElement,
 | 
	
		
			
				|  |  | +														@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 | 
	
		
			
				|  |  | +														@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 | 
	
		
			
				|  |  | +														HttpServletRequest req) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		Result<IPage<SyShippingDetailsVo>> result = new Result<IPage<SyShippingDetailsVo>>();
 | 
	
		
			
				|  |  |           //列表合计
 | 
	
	
		
			
				|  | @@ -232,15 +209,25 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 | 
	
		
			
				|  |  |  			queryWrapper.eq("1", 1);
 | 
	
		
			
				|  |  |  			pageList = syShippingDetailsService.queryShippingDetails(page, queryWrapper);
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |           // 计算总合计数量
 | 
	
		
			
				|  |  |  		amountTo = pageList.getRecords().stream().mapToDouble(SyShippingDetailsVo::getShipmentQuantity).sum();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 对查询结果按 createTime 逆序排序
 | 
	
		
			
				|  |  |  		pageList.setRecords(pageList.getRecords().stream().sorted(Comparator.comparing(SyShippingDetailsVo::getCreateTime).reversed()).collect(Collectors.toList()));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		result.setSuccess(true);
 | 
	
		
			
				|  |  | +//		List<QueryShippingVo> voList = new ArrayList<>();
 | 
	
		
			
				|  |  | +//		for(SyShippingDetailsVo vo:pageList.getRecords()){
 | 
	
		
			
				|  |  | +//			QueryShippingVo entity = new QueryShippingVo();
 | 
	
		
			
				|  |  | +//			BeanUtils.copyProperties(vo,entity);
 | 
	
		
			
				|  |  | +//			voList.add(entity);
 | 
	
		
			
				|  |  | +//		}
 | 
	
		
			
				|  |  | +		Page<QueryShippingVo> page1 = new Page<QueryShippingVo>(1, -1);
 | 
	
		
			
				|  |  | +		//IPage<QueryShippingVo> voList1 = new I;
 | 
	
		
			
				|  |  | +		//voList1.setRecords(voList);
 | 
	
		
			
				|  |  | +		//page1.setRecords(voList);
 | 
	
		
			
				|  |  |  		result.setResult(pageList);
 | 
	
		
			
				|  |  | +		result.setSuccess(true);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  		result.setMessage(amountTo.toString());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		return result;
 | 
	
	
		
			
				|  | @@ -386,30 +373,44 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 | 
	
		
			
				|  |  |  	@AutoLog(value = "发运明细主表-批量删除")
 | 
	
		
			
				|  |  |  	//@ApiOperation(value="发运明细主表-批量删除", notes="发运明细主表-批量删除")
 | 
	
		
			
				|  |  |  	@PostMapping(value = "/deleteBatch")
 | 
	
		
			
				|  |  | -	public Result<Integer> deleteBatch(String ids,String itemId) {
 | 
	
		
			
				|  |  | +	public Result<Integer> deleteBatch(@RequestBody SyShippingDetails syShippingDetails) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		Result<Integer> result = new Result<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		if(oConvertUtils.isEmpty(ids)){
 | 
	
		
			
				|  |  | +		if(oConvertUtils.isEmpty(syShippingDetails.getIds())){
 | 
	
		
			
				|  |  |  			throw new JeecgBootException("为获取到勾选数据ID!");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		String idsSplit[] = ids.split(",");
 | 
	
		
			
				|  |  | -		for(String str :idsSplit){
 | 
	
		
			
				|  |  | -			List<String> strList = new ArrayList<>();
 | 
	
		
			
				|  |  | +		//获取子表ID
 | 
	
		
			
				|  |  | +        List<String> itemIds = new ArrayList<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -			String itemIdSplit[] = itemId.split(",");
 | 
	
		
			
				|  |  | -			for(String str1 :itemIdSplit){
 | 
	
		
			
				|  |  | -				SyShippingDetailsItem shippingDetails = syShippingDetailsItemService.getById(str1);
 | 
	
		
			
				|  |  | -				//判断是否已提交
 | 
	
		
			
				|  |  | -				if(shippingDetails.getSubmitStatus() == 1){
 | 
	
		
			
				|  |  | -					throw new JeecgBootException("部分单据已提交,不允许删除!");
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | -				strList.add(str1);
 | 
	
		
			
				|  |  | +		for(String li:syShippingDetails.getItemId()){
 | 
	
		
			
				|  |  | +			String idsSplit[] = li.split(",");
 | 
	
		
			
				|  |  | +			for(String id :idsSplit){
 | 
	
		
			
				|  |  | +				itemIds.add(id);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		//查询是否已提交
 | 
	
		
			
				|  |  | +        QueryWrapper<SyShippingDetailsItem> queryWrapper = new QueryWrapper();
 | 
	
		
			
				|  |  | +		queryWrapper.in("id",itemIds).eq("submit_status","1");
 | 
	
		
			
				|  |  | +        int count = syShippingDetailsItemService.count(queryWrapper);
 | 
	
		
			
				|  |  | +		if(count > 0){
 | 
	
		
			
				|  |  | +			throw new JeecgBootException("部分单据已提交,不允许删除!");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		int ii = 0;
 | 
	
		
			
				|  |  | +		for(String str :syShippingDetails.getIds()){
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -			syShippingDetailsService.syShippingDetailsDelete(str,strList);
 | 
	
		
			
				|  |  | +			List<String> itenIdList = new ArrayList<>();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +			List<String> strList = syShippingDetails.getItemId();
 | 
	
		
			
				|  |  | +			String idIndex = strList.get(ii);
 | 
	
		
			
				|  |  | +			String split[] = idIndex.split(",");
 | 
	
		
			
				|  |  | +			for(String sr : split){
 | 
	
		
			
				|  |  | +				itenIdList.add(sr);
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			syShippingDetailsService.syShippingDetailsDelete(str,itenIdList);
 | 
	
		
			
				|  |  | +			ii++;
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		result.setSuccess(true);
 | 
	
		
			
				|  |  |  		result.setMessage("删除成功");
 | 
	
	
		
			
				|  | @@ -1005,82 +1006,38 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  					  count++;
 | 
	
		
			
				|  |  |  				  }
 | 
	
		
			
				|  |  | -//				  for(String str:syShippingDetails.getGrouyIdList()) {
 | 
	
		
			
				|  |  | -//					  QueryWrapper<SyShippingDetailsItem> queryWrapper = new QueryWrapper<>();
 | 
	
		
			
				|  |  | -//					  queryWrapper.in("group_id", str).eq("del_flag", 0);
 | 
	
		
			
				|  |  | -//					  List<SyShippingDetailsItem> groupList = syShippingDetailsItemService.list(queryWrapper);
 | 
	
		
			
				|  |  | -//					  for (int i = 0; i < groupList.size(); i++) {
 | 
	
		
			
				|  |  | -//						  SyShippingDetailsItem tableRow = groupList.get(i);
 | 
	
		
			
				|  |  | -//						  for (int j = i+1; j < groupList.size(); j++) {
 | 
	
		
			
				|  |  | -//							  SyShippingDetailsItem nextData = groupList.get(j);
 | 
	
		
			
				|  |  | -//							  if (tableRow.getSmallPo().equals(nextData.getSmallPo()) && tableRow.getOrderNumber().equals(nextData.getOrderNumber()) &&
 | 
	
		
			
				|  |  | -//									  tableRow.getPreDeliveryDate().equals(nextData.getPreDeliveryDate()) && tableRow.getPreCompletionDate().equals(nextData.getPreCompletionDate()) &&
 | 
	
		
			
				|  |  | -//									  tableRow.getItemNumber().equals(nextData.getItemNumber()) && tableRow.getInventoryCode().equals(nextData.getInventoryCode()) &&
 | 
	
		
			
				|  |  | -//									  tableRow.getColour().equals(nextData.getColour()) && tableRow.getSize().equals(nextData.getSize())&&
 | 
	
		
			
				|  |  | -//									  tableRow.getGuangpeiGateWidth().equals(nextData.getGuangpeiGateWidth()) && tableRow.getWeight().equals(nextData.getWeight())&&
 | 
	
		
			
				|  |  | -//							          tableRow.getCodingRules().equals(nextData.getCodingRules())) {
 | 
	
		
			
				|  |  | -//								  result.setSuccess(false);
 | 
	
		
			
				|  |  | -//								  result.setMessage("第"+count+"条里面的第"+(i+1)+"行和第"+(j+1)+"行数据相同,无法提交");
 | 
	
		
			
				|  |  | -//								  return result;
 | 
	
		
			
				|  |  | -//							  }
 | 
	
		
			
				|  |  | -//						  }
 | 
	
		
			
				|  |  | -//
 | 
	
		
			
				|  |  | -//					  }
 | 
	
		
			
				|  |  | -//					  count++;
 | 
	
		
			
				|  |  | -//				  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  			  }else{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			  	  List<String> taId = new ArrayList<>();
 | 
	
		
			
				|  |  |  				  // 查询是否已提交
 | 
	
		
			
				|  |  |  				  QueryWrapper<SyShippingDetailsItem> itemQueryWrapper1 = new QueryWrapper<>();
 | 
	
		
			
				|  |  |  				  itemQueryWrapper1.in("group_id", idsList).eq("submit_status", "1");
 | 
	
		
			
				|  |  |  				  List<SyShippingDetailsItem> list1 = syShippingDetailsItemService.list(itemQueryWrapper1);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  				  for (SyShippingDetailsItem li : list1) {
 | 
	
		
			
				|  |  | -					  // 判断下游是否有预装箱单-成衣单据和装箱单-面辅料单据
 | 
	
		
			
				|  |  | -					  QueryWrapper<SyPreAssembledPackingListItem> queryWrapper = new QueryWrapper<>();
 | 
	
		
			
				|  |  | -					  queryWrapper.eq("sy_declaration_elements_item_id", li.getId()).eq("del_flag", 0);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -					  // 使用LEFT JOIN连接装箱单表,并筛选出符合条件的行数
 | 
	
		
			
				|  |  | -					  queryWrapper.apply("NOT EXISTS (SELECT 1 FROM sy_packing_list_fabric_item WHERE sy_shipping_details_item_id = {0} AND del_flag = 0)", li.getId());
 | 
	
		
			
				|  |  | +					  taId.add(li.getId());
 | 
	
		
			
				|  |  | +				  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -					  // 使用LEFT JOIN连接预装箱单表,并筛选出符合条件的行数
 | 
	
		
			
				|  |  | -					  queryWrapper.apply("NOT EXISTS (SELECT 1 FROM sy_pre_assembled_packing_list_item WHERE sy_declaration_elements_item_id = {0} AND del_flag = 0)", li.getId());
 | 
	
		
			
				|  |  | +				      QueryWrapper<SyPreAssembledPackingListItem> queryWrapper = new QueryWrapper<SyPreAssembledPackingListItem>();
 | 
	
		
			
				|  |  | +					  queryWrapper.in("sy_declaration_elements_item_id",taId).eq("del_flag",0);
 | 
	
		
			
				|  |  | +                      int count1 = syPreAssembledPackingListItemService.count(queryWrapper);
 | 
	
		
			
				|  |  | +                      if(count1>0){
 | 
	
		
			
				|  |  | +						  result.setSuccess(false);
 | 
	
		
			
				|  |  | +						  result.setMessage("该单据被下游参照,不允许取消提交!");
 | 
	
		
			
				|  |  | +						  return result;
 | 
	
		
			
				|  |  | +					  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -					  int count1 = syPreAssembledPackingListItemService.count(queryWrapper);
 | 
	
		
			
				|  |  | -					  if (count1 > 0) {
 | 
	
		
			
				|  |  | +				  //判断下游是否有装箱单-面辅料单据
 | 
	
		
			
				|  |  | +					  QueryWrapper<SyPackingListFabricItem> queryWrapper1 = new QueryWrapper<SyPackingListFabricItem>();
 | 
	
		
			
				|  |  | +					  queryWrapper1.in("sy_shipping_details_item_id",taId).eq("del_flag",0);
 | 
	
		
			
				|  |  | +				      int count2 = syPackingListFabricItemService.count(queryWrapper1);
 | 
	
		
			
				|  |  | +					  if(count2>0){
 | 
	
		
			
				|  |  |  						  result.setSuccess(false);
 | 
	
		
			
				|  |  |  						  result.setMessage("该单据被下游参照,不允许取消提交!");
 | 
	
		
			
				|  |  |  						  return result;
 | 
	
		
			
				|  |  |  					  }
 | 
	
		
			
				|  |  | -				  }
 | 
	
		
			
				|  |  | -//				  //查询是否已提交
 | 
	
		
			
				|  |  | -//				  QueryWrapper<SyShippingDetailsItem> itemQueryWrapper1 = new QueryWrapper<>();
 | 
	
		
			
				|  |  | -//				  itemQueryWrapper1.in("id",idsList).eq("submit_status","1");
 | 
	
		
			
				|  |  | -//				  List<SyShippingDetailsItem> list1 = syShippingDetailsItemService.list(itemQueryWrapper1);
 | 
	
		
			
				|  |  | -//				  for (SyShippingDetailsItem li : list1) {
 | 
	
		
			
				|  |  | -////					  if (li.getSubmitStatus() == 0) {
 | 
	
		
			
				|  |  | -////						  result.setSuccess(false);
 | 
	
		
			
				|  |  | -////						  result.setMessage("部分单据已取消提交,请勿重复取消提交!");
 | 
	
		
			
				|  |  | -////						  return result;
 | 
	
		
			
				|  |  | -////					  }
 | 
	
		
			
				|  |  | -//					  //判断下游是否有预装箱单-成衣单据
 | 
	
		
			
				|  |  | -//					  QueryWrapper<SyPreAssembledPackingListItem> queryWrapper = new QueryWrapper<SyPreAssembledPackingListItem>();
 | 
	
		
			
				|  |  | -//					  queryWrapper.eq("sy_declaration_elements_item_id",li.getId()).eq("del_flag",0);
 | 
	
		
			
				|  |  | -//                      List<SyPreAssembledPackingListItem> packingListItems = syPreAssembledPackingListItemService.list(queryWrapper);
 | 
	
		
			
				|  |  | -//                      if(packingListItems.size()!=0){
 | 
	
		
			
				|  |  | -//						  result.setSuccess(false);
 | 
	
		
			
				|  |  | -//						  result.setMessage("该单据被下游参照,不允许取消提交!");
 | 
	
		
			
				|  |  | -//						  return result;
 | 
	
		
			
				|  |  | -//					  }
 | 
	
		
			
				|  |  | -//					  //判断下游是否有装箱单-面辅料单据
 | 
	
		
			
				|  |  | -//					  QueryWrapper<SyPackingListFabricItem> queryWrapper1 = new QueryWrapper<SyPackingListFabricItem>();
 | 
	
		
			
				|  |  | -//					  queryWrapper1.eq("sy_shipping_details_item_id",li.getId()).eq("del_flag",0);
 | 
	
		
			
				|  |  | -//					  List<SyPackingListFabricItem> packingListFabricItem = syPackingListFabricItemService.list(queryWrapper1);
 | 
	
		
			
				|  |  | -//					  if(packingListFabricItem.size()!=0){
 | 
	
		
			
				|  |  | -//						  result.setSuccess(false);
 | 
	
		
			
				|  |  | -//						  result.setMessage("该单据被下游参照,不允许取消提交!");
 | 
	
		
			
				|  |  | -//						  return result;
 | 
	
		
			
				|  |  | -//					  }
 | 
	
		
			
				|  |  | -//				  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  			  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 |