gaodd 5 年 前
コミット
e352dbf1d5

+ 12 - 5
pom.xml

@@ -159,11 +159,18 @@
159 159
             <artifactId>spring-cloud-starter-config</artifactId>
160 160
         </dependency>
161 161
         
162
-        <!-- <dependency>
163
-          <groupId>org.springframework.cloud</groupId>
164
-        	   <artifactId>spring-cloud-starter-openfeign</artifactId>
165
-        </dependency> -->
166
-
162
+       <!-- feign -->
163
+		<dependency>
164
+			<groupId>org.springframework.cloud</groupId>
165
+			<artifactId>spring-cloud-starter-openfeign</artifactId>
166
+		</dependency> 
167
+        
168
+		<!-- <dependency>
169
+			<groupId>org.apache.poi</groupId>
170
+			<artifactId>poi-ooxml</artifactId>
171
+			<version>3.9</version>
172
+		</dependency> -->
173
+		
167 174
 		<dependency>
168 175
 			<groupId>org.apache.commons</groupId>
169 176
 			<artifactId>commons-lang3</artifactId>

+ 2 - 0
src/main/java/com/chinaitop/depot/DepotBusinessApplication.java

@@ -9,6 +9,7 @@ import org.springframework.boot.web.servlet.ServletRegistrationBean;
9 9
 import org.springframework.cache.annotation.EnableCaching;
10 10
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
11 11
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
12
+import org.springframework.cloud.openfeign.EnableFeignClients;
12 13
 import org.springframework.context.annotation.Bean;
13 14
 import org.springframework.context.annotation.ComponentScan;
14 15
 import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
@@ -21,6 +22,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
21 22
 
22 23
 @EnableEurekaClient
23 24
 @EnableDiscoveryClient
25
+@EnableFeignClients
24 26
 @EnableCaching
25 27
 @EnableRedisHttpSession
26 28
 @EnableSwagger2

+ 32 - 2
src/main/java/com/chinaitop/depot/business/controller/BusinessDeliveryStorageNoticeController.java

@@ -1,6 +1,7 @@
1 1
 package com.chinaitop.depot.business.controller;
2 2
 
3 3
 
4
+import com.chinaitop.depot.utils.NoticeImportServiceImpl;
4 5
 import com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice;
5 6
 import com.chinaitop.depot.business.model.BusinessStoreWareDetail;
6 7
 import com.chinaitop.depot.business.model.enums.AuditType;
@@ -18,6 +19,7 @@ import io.swagger.annotations.ApiImplicitParam;
18 19
 import io.swagger.annotations.ApiImplicitParams;
19 20
 import io.swagger.annotations.ApiOperation;
20 21
 import org.apache.commons.lang3.StringUtils;
22
+import org.springframework.beans.factory.annotation.Value;
21 23
 import org.springframework.http.MediaType;
22 24
 import org.springframework.web.bind.annotation.RequestMapping;
23 25
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -48,8 +50,10 @@ public class BusinessDeliveryStorageNoticeController {
48 50
     private BusinessDeliveryStorageNoticeService deliveryStorageNoticeService;
49 51
     @Resource
50 52
     private BusinessStoreWareDetailService businessStoreWareDetailService;
51
-   /* @Resource
52
-    private BasicCodeRuleService basicCodeRuleService;*/
53
+    @Resource
54
+	private NoticeImportServiceImpl importService;
55
+    @Value("${noticeTemplate.upload-path}")
56
+	private String templatePath;
53 57
     
54 58
     /**
55 59
      * 申请列表.
@@ -496,4 +500,30 @@ public class BusinessDeliveryStorageNoticeController {
496 500
         return modelMap;
497 501
     }
498 502
     
503
+    
504
+    /**
505
+	 * 导出
506
+	 * @return
507
+	 */
508
+	@RequestMapping(value="/getNoticeExport", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
509
+	@ApiOperation(value="通知单详情导出", notes = "通知单详情导出")
510
+	@ApiImplicitParams({
511
+			@ApiImplicitParam(name = "orgId", value = "组织机构id", paramType = "query"),
512
+			@ApiImplicitParam(name = "houseId", value = "仓房名称", paramType = "query"),
513
+			@ApiImplicitParam(name = "pz", value = "粮食品种", paramType = "query")
514
+	})
515
+	public Map<String,Object> getNoticeExport(String deliveryStorageNotice, String addedDetail, HttpServletRequest request) throws Exception{
516
+		Map<String, Object> modelMap = new HashMap<>();
517
+		// JSON字符串转对象
518
+        ObjectMapper mapper = new ObjectMapper();
519
+        BusinessDeliveryStorageNotice businessDeliveryStorageNotice = (BusinessDeliveryStorageNotice)mapper.readValue(deliveryStorageNotice, BusinessDeliveryStorageNotice.class);
520
+		List<BusinessStoreWareDetail> storeWareDetailList = null;
521
+        if (addedDetail != null) {
522
+        	storeWareDetailList = (List<BusinessStoreWareDetail>)mapper.readValue(addedDetail, new TypeReference<List<BusinessStoreWareDetail>>(){});
523
+			modelMap = importService.temperData(templatePath, request, businessDeliveryStorageNotice, storeWareDetailList);
524
+        }
525
+		
526
+		return modelMap;
527
+	}
528
+    
499 529
 }

+ 31 - 0
src/main/java/com/chinaitop/depot/feign/BasicEnumFeignService.java

@@ -0,0 +1,31 @@
1
+package com.chinaitop.depot.feign;
2
+
3
+import org.springframework.cloud.openfeign.FeignClient;
4
+import org.springframework.http.MediaType;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RequestMethod;
7
+import org.springframework.web.bind.annotation.RequestParam;
8
+
9
+import java.util.Map;
10
+
11
+@FeignClient(value = "depot-basic")
12
+public interface BasicEnumFeignService {
13
+
14
+	/**
15
+	 * 获取一条字典数据
16
+	 * @param username
17
+	 * @param password
18
+	 * @return
19
+	 */
20
+	@RequestMapping(value = "/Enum/getEnumName", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
21
+	String getEnumName(@RequestParam("id") Integer id);
22
+
23
+	/**
24
+	 * 根据单位查找单位下的所有仓房信息(统一对外接口)
25
+	 *
26
+	 * @param unitId 单位ID
27
+	 * @return
28
+	 */
29
+	@RequestMapping(value = "/Storehouse/getStorehouseList", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
30
+	Map<String, Object> getStorehouseList(@RequestParam("unitId") Integer unitId, @RequestParam("libraryType") String libraryType);
31
+}

+ 25 - 0
src/main/java/com/chinaitop/depot/feign/OrgFeignService.java

@@ -0,0 +1,25 @@
1
+package com.chinaitop.depot.feign;
2
+
3
+import org.springframework.cloud.openfeign.FeignClient;
4
+import org.springframework.http.MediaType;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RequestMethod;
7
+import org.springframework.web.bind.annotation.RequestParam;
8
+
9
+import java.util.Map;
10
+
11
+@FeignClient(value = "depot-system")
12
+public interface OrgFeignService {
13
+
14
+	/**
15
+	 * 获取orgName
16
+	 * @param username
17
+	 * @param password
18
+	 * @return
19
+	 */
20
+	@RequestMapping(value = "/orgInfo/getOrgName", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
21
+	String getOrgName(@RequestParam("state") Integer state);
22
+
23
+
24
+	
25
+}

+ 360 - 0
src/main/java/com/chinaitop/depot/utils/NoticeImportServiceImpl.java

@@ -0,0 +1,360 @@
1
+package com.chinaitop.depot.utils;
2
+
3
+import org.apache.poi.hssf.usermodel.HSSFCell;
4
+import org.apache.poi.hssf.usermodel.HSSFCellStyle;
5
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
6
+import org.apache.poi.hssf.util.HSSFColor;
7
+import org.apache.poi.ss.usermodel.*;
8
+import org.apache.poi.xssf.usermodel.XSSFRow;
9
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
10
+import org.springframework.stereotype.Service;
11
+import org.springframework.util.StringUtils;
12
+import org.springframework.web.multipart.MultipartFile;
13
+
14
+import com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice;
15
+import com.chinaitop.depot.business.model.BusinessStoreWareDetail;
16
+import com.chinaitop.depot.common.util.ExcelImportUtils;
17
+import com.chinaitop.depot.feign.BasicEnumFeignService;
18
+import com.chinaitop.depot.feign.OrgFeignService;
19
+
20
+import javax.annotation.Resource;
21
+import javax.servlet.http.HttpServletRequest;
22
+import java.io.*;
23
+import java.math.BigDecimal;
24
+import java.text.SimpleDateFormat;
25
+import java.util.ArrayList;
26
+import java.util.HashMap;
27
+import java.util.List;
28
+import java.util.Map;
29
+
30
+/**
31
+ * 
32
+ * @author My Sunshine
33
+ *
34
+ */
35
+@Service
36
+public class NoticeImportServiceImpl {
37
+	
38
+	@Resource
39
+    private BasicEnumFeignService basicEnumFeignService;
40
+	@Resource
41
+	private OrgFeignService orgFeignService;
42
+
43
+	public Map<String, Object> temperData(String templatePath, HttpServletRequest request,
44
+			BusinessDeliveryStorageNotice deliveryStorageNotice, List<BusinessStoreWareDetail> storeWareDetailList) throws Exception {
45
+		// TODO Auto-generated method stub
46
+		Map<String, Object> modelMap = new HashMap<String, Object>();
47
+        // 服务器路径
48
+        String rootPath = request.getSession().getServletContext().getRealPath("");
49
+        //String rootPath = "D:\\eclipse_workspace\\work\\depot-yunnan\\depot-web-yunnan\\src\\main\\resources\\static\\app\\business";
50
+        
51
+        // 文件相对路径
52
+        String relativePath = "/通知单详情导出模板.xlsx";
53
+        //读取临时文件,并且返回错误信息
54
+        String fileAllpath = rootPath+relativePath;
55
+        //创建临时文件
56
+        createTemp(templatePath,fileAllpath);
57
+//        String fileAllpath = "E:\\粮食品种统计模板.xlsx";
58
+        //获取File
59
+        File tempFile = new File(fileAllpath);
60
+        //获取第四行数据
61
+        Workbook workbook = getWorkbook(tempFile,fileAllpath);
62
+        //向临时模板写入数据
63
+        setFileName(workbook,deliveryStorageNotice,storeWareDetailList);
64
+
65
+        // 首先要创建一个原始Excel文件的输出流对象!
66
+        FileOutputStream excelFileOutPutStream = new FileOutputStream(fileAllpath);
67
+        // 将最新的 Excel 文件写入到文件输出流中,更新文件信息!
68
+        workbook.write(excelFileOutPutStream);
69
+        // 执行 flush 操作, 将缓存区内的信息更新到文件上
70
+        excelFileOutPutStream.flush();
71
+        // 使用后,及时关闭这个输出流对象, 好习惯,再强调一遍!
72
+        excelFileOutPutStream.close();
73
+        modelMap.put("fileAllpath",fileAllpath);
74
+        return modelMap;
75
+		
76
+	}
77
+
78
+	
79
+	/**
80
+    * 创建临时文件
81
+    * @param oldPath 老的文件目录
82
+    * @param newPath 新的文件目录
83
+    * @throws Exception
84
+    */
85
+   public void createTemp(String oldPath, String newPath) throws Exception{
86
+       File oldFile = new File(oldPath);
87
+       File file = new File(newPath);
88
+       FileInputStream in = new FileInputStream(oldFile);
89
+       FileOutputStream out = new FileOutputStream(file);;
90
+
91
+       byte[] buffer=new byte[2097152];
92
+       int readByte = 0;
93
+       while((readByte = in.read(buffer)) != -1){
94
+           out.write(buffer, 0, readByte);
95
+       }
96
+
97
+       in.close();
98
+       out.close();
99
+   }
100
+
101
+   //获取workbook
102
+   private Workbook getWorkbook(File file ,String FileName){
103
+       Workbook wb = null;
104
+       try {
105
+           InputStream is = new FileInputStream(file);
106
+           if(ExcelImportUtils.isExcel2007(FileName)) {
107
+               wb = new XSSFWorkbook(is);
108
+           }
109
+           else {
110
+               wb = new HSSFWorkbook(is);
111
+           }
112
+       } catch (IOException e) {
113
+           e.printStackTrace();
114
+       }
115
+       return wb;
116
+   }
117
+   
118
+
119
+
120
+    //向临时模板写入数据
121
+    private void setFileName(Workbook workbook,BusinessDeliveryStorageNotice deliveryStorageNotice, List<BusinessStoreWareDetail> storeWareDetailList){
122
+
123
+        CellStyle cellStyle = workbook.createCellStyle();
124
+        cellStyle.setAlignment(CellStyle.ALIGN_CENTER);
125
+        //cellStyle.setBorderBottom(HSSFCellStyle.BORDER_THICK);
126
+        //cellStyle.setBottomBorderColor(HSSFColor.RED.index);
127
+        Sheet sheetX = workbook.getSheetAt(0);
128
+        Row row = sheetX.getRow(2);
129
+        
130
+        //写数据
131
+       // row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getBillNumber());//通知单编号
132
+        //通知单编号
133
+        Cell cell= row.createCell(1);
134
+        cell.setCellValue(deliveryStorageNotice.getBillNumber());
135
+        CellStyle style= workbook.createCellStyle();
136
+        style.setBorderTop(CellStyle.BORDER_THIN);//上边框
137
+        style.setBorderBottom(CellStyle.BORDER_THIN);//下边框
138
+        cell.setCellStyle(style);
139
+        //计划编号
140
+        if(null != deliveryStorageNotice.getPlanNumber()){
141
+        	Cell cell1= row.createCell(6);
142
+            cell1.setCellValue(deliveryStorageNotice.getPlanNumber());
143
+            CellStyle style1= workbook.createCellStyle();
144
+            style1.setBorderTop(CellStyle.BORDER_THIN);//上边框
145
+            style1.setBorderBottom(CellStyle.BORDER_THIN);//下边框
146
+            cell1.setCellStyle(style1);
147
+        }
148
+      //合同编号
149
+        if(null != deliveryStorageNotice.getContract()){
150
+            Cell cell2= row.createCell(10);
151
+            cell2.setCellValue(deliveryStorageNotice.getContract());
152
+            CellStyle style2= workbook.createCellStyle();
153
+            style2.setBorderTop(CellStyle.BORDER_THIN);//上边框
154
+            style2.setBorderBottom(CellStyle.BORDER_THIN);//下边框
155
+            cell2.setCellStyle(style2);
156
+        }
157
+        
158
+        
159
+        
160
+        //row.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getPlanNumber());//计划编号
161
+        //row.createCell(10, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getContract());//合同编号
162
+        Row row1 = sheetX.getRow(3);
163
+        //创建时间
164
+        SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd hh:MM:ss");
165
+        Cell cell3= row1.createCell(6);
166
+        cell3.setCellValue(sf.format(deliveryStorageNotice.getCreateTime()));
167
+        CellStyle style3= workbook.createCellStyle();
168
+        style3.setBorderTop(CellStyle.BORDER_THIN);//上边框
169
+        style3.setBorderBottom(CellStyle.BORDER_THIN);//下边框
170
+        style3.setBorderLeft(CellStyle.BORDER_THIN);//左边框
171
+        cell3.setCellStyle(style3);
172
+        row1.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getCreater());//申请人
173
+        
174
+       // row1.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(sf.format(deliveryStorageNotice.getCreateTime()));//创建时间
175
+        //根据字典id 获取名称
176
+        String  ysfs = basicEnumFeignService.getEnumName(Integer.valueOf(deliveryStorageNotice.getQualityStandard()));//运输方式
177
+        row1.createCell(10, Cell.CELL_TYPE_STRING).setCellValue(ysfs);
178
+        
179
+        int currentLastRowIndex = 7;
180
+        
181
+        for (int i = 0; i < storeWareDetailList.size(); i++) {
182
+        	if(i!=0){
183
+        		currentLastRowIndex = currentLastRowIndex+1;
184
+	         }
185
+        	Row row2 = sheetX.getRow(currentLastRowIndex);
186
+        	 String  grainKind = basicEnumFeignService.getEnumName(Integer.valueOf(storeWareDetailList.get(i).getGrainKind()));
187
+	         String  grainDetailKind = basicEnumFeignService.getEnumName(Integer.valueOf(storeWareDetailList.get(i).getGrainDetailKind()));
188
+	         String  grainGrade = basicEnumFeignService.getEnumName(Integer.valueOf(storeWareDetailList.get(i).getGrainGrade()));
189
+	         String  grainAttribute = basicEnumFeignService.getEnumName(Integer.valueOf(storeWareDetailList.get(i).getGrainAttribute()));
190
+	         
191
+			//row2.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(i+1);
192
+	       //根据orgId获取orgName
193
+			String  orgName = orgFeignService.getOrgName(storeWareDetailList.get(i).getState());
194
+			Cell cell11= row2.createCell(0);
195
+	        cell11.setCellValue(orgName);
196
+	        CellStyle style11= workbook.createCellStyle();
197
+	        style11.setBorderLeft(CellStyle.BORDER_THIN);//左边框
198
+	        style11.setAlignment(CellStyle.ALIGN_LEFT);//居左
199
+	        cell11.setCellStyle(style11);
200
+	        
201
+			
202
+			//row2.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(orgName);
203
+			row2.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getHouseName());
204
+			row2.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getWarehouseName());
205
+			row2.createCell(4, Cell.CELL_TYPE_STRING).setCellValue(grainKind);
206
+			row2.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(grainDetailKind);
207
+			row2.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(grainAttribute);
208
+			row2.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(grainGrade);
209
+			if(deliveryStorageNotice.getBillType().equals("1")){//入库
210
+				row2.createCell(8, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getInCount());
211
+				if(storeWareDetailList.get(i).getPlanRemainingNumber()!=null){
212
+					row2.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getPlanRemainingNumber());
213
+				}
214
+				if(storeWareDetailList.get(i).getPlanRemainingNumber()==null && storeWareDetailList.get(i).getRemainingNumber()!=null){
215
+					row2.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getRemainingNumber());
216
+				}
217
+				row2.createCell(10, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getInPrice());
218
+				//金额
219
+				Cell cell4= row2.createCell(11);
220
+		        cell4.setCellValue(storeWareDetailList.get(i).getInDetailTotalPrice());
221
+		        CellStyle style4= workbook.createCellStyle();
222
+		        style4.setBorderRight(CellStyle.BORDER_THIN);//右边框
223
+		        cell4.setCellStyle(style4);
224
+				//row2.createCell(11, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getInDetailTotalPrice());
225
+	         }else if(deliveryStorageNotice.getBillType().equals("3")){//出库
226
+	        	row2.createCell(8, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getOutCount());
227
+	        	if(storeWareDetailList.get(i).getPlanOutRemainingNumber()!=null){
228
+					row2.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getPlanOutRemainingNumber());
229
+				}
230
+				if(storeWareDetailList.get(i).getPlanOutRemainingNumber()==null && storeWareDetailList.get(i).getOutRemainingNumber()!=null){
231
+					row2.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getOutRemainingNumber());
232
+				}
233
+			    row2.createCell(10, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getOutPrice());
234
+			   //金额
235
+				Cell cell4= row2.createCell(11);
236
+		        cell4.setCellValue(storeWareDetailList.get(i).getOutDetailTotalPrice());
237
+		        CellStyle style4= workbook.createCellStyle();
238
+		        style4.setBorderRight(CellStyle.BORDER_THIN);//右边框
239
+		        cell4.setCellStyle(style4);
240
+				//row2.createCell(11, Cell.CELL_TYPE_STRING).setCellValue(storeWareDetailList.get(i).getOutDetailTotalPrice());
241
+	         }
242
+		}
243
+        //int currentLastRowIndex1 = sheetX.getLastRowNum() + 1;
244
+        
245
+        //总价
246
+        Row row3 = sheetX.getRow(14);
247
+        Cell cell4= row3.createCell(2);
248
+        cell4.setCellValue(deliveryStorageNotice.getShipingCount());
249
+        CellStyle style4= workbook.createCellStyle();
250
+        style4.setBorderTop(CellStyle.BORDER_THIN);//上边框
251
+        style4.setBorderBottom(CellStyle.BORDER_THIN);//下边框
252
+        style4.setBorderRight(CellStyle.BORDER_THIN);//右边框
253
+        style4.setBorderLeft(CellStyle.BORDER_THIN);//左边框
254
+        cell4.setCellStyle(style4);
255
+        Cell cell5= row3.createCell(9);
256
+        cell5.setCellValue(deliveryStorageNotice.getMoneyQuantity());
257
+        CellStyle style5= workbook.createCellStyle();
258
+        style5.setBorderTop(CellStyle.BORDER_THIN);//上边框
259
+        style5.setBorderBottom(CellStyle.BORDER_THIN);//下边框
260
+        style5.setBorderRight(CellStyle.BORDER_THIN);//右边框
261
+        style5.setBorderLeft(CellStyle.BORDER_THIN);//左边框
262
+        cell5.setCellStyle(style5);
263
+        
264
+		//row3.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getShipingCount());
265
+		//row3.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getMoneyQuantity());
266
+		//客户信息
267
+		Row row4 = sheetX.getRow(17);
268
+		Cell cell6= row4.createCell(2);
269
+        cell6.setCellValue(deliveryStorageNotice.getDeliveryCustomer());
270
+        CellStyle style6= workbook.createCellStyle();
271
+        style6.setBorderTop(CellStyle.BORDER_THIN);//上边框
272
+        style6.setBorderBottom(CellStyle.BORDER_THIN);//下边框
273
+        style6.setBorderRight(CellStyle.BORDER_THIN);//右边框
274
+        cell6.setCellStyle(style6);
275
+        
276
+		//row4.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getDeliveryCustomer());
277
+		row4.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getIdentification());
278
+		Cell cell7= row4.createCell(11);
279
+        cell7.setCellValue(deliveryStorageNotice.getMobile());
280
+        CellStyle style7= workbook.createCellStyle();
281
+        style7.setBorderRight(CellStyle.BORDER_THIN);//右边框
282
+        cell7.setCellStyle(style7);
283
+		
284
+		//row4.createCell(11, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getMobile());
285
+		//备注
286
+		Row row5 = sheetX.getRow(18);
287
+		row5.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getBillMemo());
288
+		//创建信息
289
+		Row row6 = sheetX.getRow(19);
290
+		Cell cell8= row6.createCell(2);
291
+        cell8.setCellValue(sf.format(deliveryStorageNotice.getBillDate()));
292
+        CellStyle style8= workbook.createCellStyle();
293
+        style8.setBorderTop(CellStyle.BORDER_THIN);//上边框
294
+        style8.setBorderBottom(CellStyle.BORDER_THIN);//下边框
295
+        style8.setBorderRight(CellStyle.BORDER_THIN);//右边框
296
+        cell8.setCellStyle(style8);
297
+        Cell cell9= row6.createCell(7);
298
+        cell9.setCellValue(deliveryStorageNotice.getBillMan());
299
+        CellStyle style9= workbook.createCellStyle();
300
+        style9.setBorderTop(CellStyle.BORDER_THIN);//上边框
301
+        style9.setBorderBottom(CellStyle.BORDER_THIN);//下边框
302
+        style9.setBorderRight(CellStyle.BORDER_THIN);//右边框
303
+        cell9.setCellStyle(style9);
304
+		//row6.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(sf.format(deliveryStorageNotice.getBillDate()));
305
+		//row6.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(deliveryStorageNotice.getBillMan());
306
+
307
+
308
+        /*// ------ 创建一行新的数据 ----------//
309
+        // 指定行索引,创建一行数据, 行索引为当前最后一行的行索引 + 1
310
+        
311
+
312
+        //获取仓房名称转换用数据
313
+        Map<String,Object> basicEnumFeign = basicEnumFeignService.getStorehouseList(Integer.parseInt(orgId),"0");
314
+        Map<Integer, Object> storehouseObj = (Map<Integer, Object>) basicEnumFeign.get("houseObj");
315
+        for (DataKcglKcswDefault kcswData:listNumberTotal ) {
316
+            int newRowIndex = currentLastRowIndex ++;
317
+            Row newRow = sheetX.createRow(newRowIndex);
318
+
319
+            // 开始创建并设置该行每一单元格的信息,该行单元格的索引从 0 开始
320
+            int cellIndex = 0;
321
+
322
+            // 创建一个单元格,设置其内的数据格式为字符串,并填充内容,其余单元格类同
323
+            //仓房名称
324
+            Cell cfmc = newRow.createCell(cellIndex++, Cell.CELL_TYPE_STRING);
325
+            Map<String,String> houseData = (HashMap<String, String>) storehouseObj.get(kcswData.getCh().toString());
326
+            cfmc.setCellValue(houseData.get("storehouseName"));
327
+            Cell xm = newRow.createCell(cellIndex++, Cell.CELL_TYPE_STRING);
328
+            //小麦
329
+            if(ParameterUtil.isequal(kcswData.getPz(),"3164")){
330
+                xm.setCellValue(kcswData.getKcsl());
331
+            }else{
332
+                xm.setCellValue("");
333
+            }
334
+            Cell dgxj = newRow.createCell(cellIndex++, Cell.CELL_TYPE_STRING);
335
+            dgxj.setCellValue("");
336
+            Cell zwxd = newRow.createCell(cellIndex++, Cell.CELL_TYPE_STRING);
337
+            //中晚籼稻
338
+            if(ParameterUtil.isequal(kcswData.getPz(),"3218") || ParameterUtil.isequal(kcswData.getPz(),"3219")){
339
+                zwxd.setCellValue(kcswData.getKcsl());
340
+            }else{
341
+                zwxd.setCellValue("");
342
+            }
343
+            Cell jd = newRow.createCell(cellIndex++, Cell.CELL_TYPE_STRING);
344
+            //粳稻
345
+            if(ParameterUtil.isequal(kcswData.getPz(),"3220") || ParameterUtil.isequal(kcswData.getPz(),"3221")){
346
+                jd.setCellValue(kcswData.getKcsl());
347
+            }else{
348
+                jd.setCellValue("");
349
+            }
350
+            Cell ym = newRow.createCell(cellIndex++, Cell.CELL_TYPE_STRING);
351
+            //玉米
352
+            if(ParameterUtil.isequal(kcswData.getPz(),"3165")){
353
+                ym.setCellValue(kcswData.getKcsl());
354
+            }else{
355
+                ym.setCellValue("");
356
+            }
357
+        }*/
358
+    }
359
+}
360
+