|
@@ -1,14 +1,17 @@
|
|
|
package com.factory.controller.web;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.factory.base.entity.aggregates.ResponseBean;
|
|
|
import com.factory.base.util.res.ResponseBeanBuilder;
|
|
|
import com.factory.web.entity.excel.Utility;
|
|
|
import com.factory.web.entity.fa.FirstArticleTitle;
|
|
|
+import com.factory.web.entity.fa.FirstArticleTitleBlob;
|
|
|
import com.factory.web.entity.pm.OnsiteTitle;
|
|
|
import com.factory.web.entity.pm.OnsiteTitleBlob;
|
|
|
import com.factory.web.service.FileService;
|
|
|
import com.factory.web.service.fa.FirstArticleService;
|
|
|
+import com.factory.web.service.fa.FirstArticleTitleBlobService;
|
|
|
import com.factory.web.service.impl.DownLoadParam;
|
|
|
import com.factory.web.service.impl.FileEntry;
|
|
|
import com.factory.web.service.impl.FileResultInfo;
|
|
@@ -17,6 +20,7 @@ import com.factory.web.service.pm.OnsiteTitleBlobService;
|
|
|
import com.factory.web.service.pm.PreventMistakeService;
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
import org.apache.poi.ss.usermodel.Cell;
|
|
@@ -58,7 +62,8 @@ public class FileBlobController {
|
|
|
private FileService fileService;
|
|
|
@Autowired
|
|
|
private OnsiteTitleBlobService blobService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private FirstArticleTitleBlobService blobService2;
|
|
|
@Autowired
|
|
|
private PreventMistakeService preventMistakeService;
|
|
|
|
|
@@ -142,6 +147,11 @@ public class FileBlobController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * demo 测试
|
|
|
+ * @param args
|
|
|
+ * @throws IOException
|
|
|
+ */
|
|
|
public static void main(String[] args) throws IOException {
|
|
|
// System.out.println(LocalDate.now().getDayOfMonth());
|
|
|
|
|
@@ -345,19 +355,40 @@ public class FileBlobController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// @GetMapping("/addIniPlan")
|
|
|
-// public void addIniPlan(HttpServletRequest request) {
|
|
|
+ @GetMapping("/addIniPlan")
|
|
|
+ public void addIniPlan(HttpServletRequest request) {
|
|
|
+// @ApiModelProperty(value = "issueDate")
|
|
|
+// private String issueDate;
|
|
|
//
|
|
|
-// String data = "\n" +
|
|
|
-// "{\n" +
|
|
|
-// " \"uploadAttachmentId\" : 17,\n" +
|
|
|
-// " \"test\":11111111\n" +
|
|
|
-// "}";
|
|
|
-// OnsiteTitleBlob testEntry = OnsiteTitleBlob.builder().bentelerPlanId(Long.parseLong("1"))
|
|
|
-// .titleContent(data.getBytes(StandardCharsets.UTF_8)).build();
|
|
|
-// blobService.save(testEntry);
|
|
|
-// System.out.println("11111111111111111111111111111111111111111");
|
|
|
-// }
|
|
|
+// @ApiModelProperty(value = "issureLevel")
|
|
|
+// private String issureLevel;
|
|
|
+//
|
|
|
+// @ApiModelProperty(value = "department")
|
|
|
+// private String department;
|
|
|
+//
|
|
|
+// @ApiModelProperty(value = "replace")
|
|
|
+// private String replace;
|
|
|
+//
|
|
|
+// @ApiModelProperty(value = "productionLine")
|
|
|
+// private String productionLine;
|
|
|
+//
|
|
|
+// @ApiModelProperty(value = "附件id")
|
|
|
+// private String uploadAttachmentId;
|
|
|
+ // FirstArticleTitle ;
|
|
|
+ OnsiteTitle title= OnsiteTitle.builder().department("1111").issueDate("2020-01-01").issureLevel("hjgsajhasd")
|
|
|
+ .productionLine("12r3y12t3").replace("jsadhgas").uploadAttachmentId("17").build();
|
|
|
+ OnsiteTitleBlob testEntry = OnsiteTitleBlob.builder().bentelerPlanId(Long.parseLong("27"))//设置机会id
|
|
|
+ .titleContent(JSON.toJSONString(title).getBytes(StandardCharsets.UTF_8)).build();
|
|
|
+ blobService.save(testEntry);
|
|
|
+
|
|
|
+ FirstArticleTitle ftitle= FirstArticleTitle.builder().project("1").partname("1").partNoOem("2").productgroup("1")
|
|
|
+ .gpin("asdasd").language("asd").oem("asdas").statusDoc("asdasd").version("asdas")
|
|
|
+ .batMaterial("asdasd").lastChange("asdasd").dmbA("asbdjasd").uploadAttachmentId("17").build();
|
|
|
+ FirstArticleTitleBlob testEntry2 = FirstArticleTitleBlob.builder().bentelerPlanId(Long.parseLong("40"))//设置机会id
|
|
|
+ .titleContent(JSON.toJSONString(title).getBytes(StandardCharsets.UTF_8)).build();
|
|
|
+ blobService2.save(testEntry2);
|
|
|
+ System.out.println("11111111111111111111111111111111111111111");
|
|
|
+ }
|
|
|
|
|
|
// @GetMapping("/getIniPlan")
|
|
|
// public void getIniPlan(HttpServletRequest request) {
|