| 
					
				 | 
			
			
				@@ -87,7 +87,7 @@ public class YbService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             response = new ResultVo(-1, "商品销售失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String id = UUID.randomUUID().toString().replaceAll("-", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /*String id = UUID.randomUUID().toString().replaceAll("-", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         selInfo.setId(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int insertSelinfo = selinfoSoldMapper.insert(selInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(insertSelinfo > 0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -95,7 +95,7 @@ public class YbService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 String itemId = UUID.randomUUID().toString().replaceAll("-", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 selinfoSoldMapper.insertSelinfoSoldDrugtrac(itemId, id, codg.getDrugTracCodg()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return response; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -104,6 +104,30 @@ public class YbService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ResultVo returnGoodsItem(SelinfoReturn selinfoReturn) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ResultVo response = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<DrugTracCodg> drugTracCodgList = selinfoReturn.getDrugtracinfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(drugTracCodgList == null || drugTracCodgList.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            response = new ResultVo(-1, "追溯码不能为空"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return response; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String drugTracCodg = drugTracCodgList.get(0).getDrugTracCodg(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String result = taobaoService.sendGet("/queryCodeDetail?codes=" + drugTracCodg); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        JSONObject resultJson = JSONObject.parseObject(result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer code = resultJson.getInteger("code"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (code == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            JSONObject data = resultJson.getJSONObject("data"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Integer dataCode = data.getInteger("code"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (dataCode == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                JSONArray content = data.getJSONArray("data"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(content != null && content.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    JSONObject item = content.getJSONObject(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    JSONArray produceInfoList = item.getJSONObject("codeProduceInfoDTO").getJSONArray("produceInfoList"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if(produceInfoList != null && produceInfoList.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        JSONObject produceInfo = produceInfoList.getJSONObject(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        selinfoReturn.setManuLotnum(produceInfo.getString("batchNo")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        selinfoReturn.setManuDate(produceInfo.getString("produceDateStr")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         selinfoReturn.setSelRetnCnt(drugTracCodgList.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         selinfoReturn.setSelRetnTime(now); 
			 |