Browse Source

修改 calendar 表相关字段 部分关联

daili 3 years ago
parent
commit
876eb24621

+ 11 - 10
application-facade/src/main/java/com/factory/aspect/LogAspect.java

@@ -51,17 +51,18 @@ public class LogAspect {
         Map param = null;
         boolean flag = false;
         try {
-        	ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
-            HttpServletRequest request = requestAttributes.getRequest();
+			ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+			HttpServletRequest request = requestAttributes.getRequest();
 
-            userId = request.getAttribute("UserId");
-            url = request.getRequestURL().toString();      
-         
-            param = getArgs(thisJoinPoint,((MethodSignature)thisJoinPoint.getSignature()).getParameterNames());
-            log.info("\033[1;32m[访问地址:{}] [方法:{}] [{}] [userId:{}] [参数:{}]\033[0m",url,method,uuid,userId,param);
-            r = thisJoinPoint.proceed ();//被代理对象执行结果
-           
-        } catch (Throwable e) {
+			userId = request.getAttribute("UserId");
+			url = request.getRequestURL().toString();
+			if (((MethodSignature) thisJoinPoint.getSignature()).getParameterNames() != null) {
+				param = getArgs(thisJoinPoint, ((MethodSignature) thisJoinPoint.getSignature()).getParameterNames());
+				log.info("\033[1;32m[访问地址:{}] [方法:{}] [{}] [userId:{}] [参数:{}]\033[0m", url, method, uuid, userId, param);
+			}
+			r = thisJoinPoint.proceed();//被代理对象执行结果
+
+		} catch (Throwable e) {
         	flag = true;
             throw e;//异常信息有统一异常处理器处理
         }

+ 2 - 1
application-facade/src/main/java/com/factory/controller/web/FirstArticleController.java

@@ -205,6 +205,7 @@ public class FirstArticleController {
 	public ResponseBean<FaCheckRecordListRes> getFaCheckRecordList(@RequestBody SearchFaCheckRecordListReq req) {
 		return firstArticleService.getFaCheckRecordList(req);
 	}
+
 	@ApiOperation(value = "导出检查记录列表")
 	@ApiOperationSupport(order = 18)
 	@PostMapping("/exportFaCheckRecordList")
@@ -212,7 +213,7 @@ public class FirstArticleController {
 		return firstArticleService.exportFaCheckRecordList(req);
 	}
 
-	@ApiOperation(value = "首件导出计划信息Excel")
+	@ApiOperation(value = "首件受控文件Excel")
 	@PostMapping("/exportInitialPlanDetails")
 	public ResponseBean<FileRes> exportInitialPlanDetails(@RequestBody exportInitialPlanDetailsReq req) {
 		return firstArticleService.exportInitialPlanDetails(req);

+ 4 - 1
application-facade/src/main/java/com/factory/web/entity/fa/req/AddFaPlanReq.java

@@ -63,12 +63,15 @@ public class AddFaPlanReq {
     @ApiModelProperty(value = "200件最晚提交时间")
     private String twoHundredSubmitTime;
 
-    @ApiModelProperty(value="首件、200件、中断类型")
+    @ApiModelProperty(value = "首件、200件、中断类型")
     private String typeFlag;
 
     @ApiModelProperty(value = "表头信息")
     private FirstArticleTitle firstArticleTitle;
 
+    @ApiModelProperty(value = "指导文件")
+    private Long url;
+
     @ApiModelProperty(value = "工作站及巡检内容")
     private List<FirstArticleWorkshopReq> firstArticleWorkshopList;
 }

+ 2 - 2
application-facade/src/main/java/com/factory/web/service/impl/fa/FirstArticleServiceImpl.java

@@ -196,6 +196,7 @@ public class FirstArticleServiceImpl extends ServiceImpl<FirstArticleMapper, Ben
                     .pauseFlag(false)
                     .effectiveDate(req.getEffectiveDate())
                     .status(PlanStatus.WAIT_APPROVAL.value)
+                    .fileId(req.getUrl().intValue())
                     .build();
             planService.save(plan);
             // 添加首件、200件点检规则
@@ -1123,7 +1124,6 @@ public class FirstArticleServiceImpl extends ServiceImpl<FirstArticleMapper, Ben
                         .eq(BentelerPlan::getPlanType, plan.getPlanType())
                         .eq(BentelerPlan::getOriginalId, plan.getOriginalId())
                         .in(BentelerPlan::getStatus, PlanStatus.APPROVAL_PASS.value, PlanStatus.APPROVAL_FORMAL.value, PlanStatus.HISTORY.value)
-                        .orderByDesc(BentelerPlan::getId)
                 );
             }
 //            List<PlanBind> bindList = planBindService.list(Wrappers.<PlanBind>lambdaQuery().eq(PlanBind::getOldBentelerPlanId, req.getId())
@@ -1473,7 +1473,7 @@ public class FirstArticleServiceImpl extends ServiceImpl<FirstArticleMapper, Ben
         });
 
         // 模板注意 用{} 来表示你要用的变量 如果本来就有"{","}" 特殊字符 用"\{","\}"代替
-        String templateFileName = "systemLib/template/首件计划受控.xlsx";
+        String templateFileName = "systemLib/template/首件计划受控文件.xlsx";
         File tempFile = null;
         ExcelWriter excelWriter = null;
         try {

+ 1 - 1
application-facade/src/main/resources/application-uat.yml

@@ -10,7 +10,7 @@ spring:
     database: 13
     lettuce:
       pool:
-        max-active: 5
+        maxTotal: 5
   datasource:
     dynamic:
       primary: self #设置默认的数据源或者数据源组,默认值即为master

+ 1 - 0
application-facade/src/main/resources/mapper/FirstArticleMapper.xml

@@ -127,6 +127,7 @@
         AND ((DATE_FORMAT(now(), '%w') = 1  and fai.prefix = 'W')  or fai.prefix != 'W')
     </select>
 
+
     <!--取得Pad端巡检项目列表 -->
     <select id="getFaItemListForPad" resultType="com.factory.web.entity.fa.res.FaItemListForPadRes">
         SELECT

+ 4 - 7
application-file/src/main/java/com/factory/file/controller/FileController.java

@@ -7,10 +7,7 @@ import com.factory.file.entity.vo.FileRes;
 import com.factory.file.service.FileInfoService;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
@@ -43,10 +40,10 @@ public class FileController {
         return FileInfo.uploadTwo(file);
     }
 
-    @ApiOperation(value = "获取文件信息")
-    @PostMapping(value = "/getInfo")
+    @ApiOperation(value = "获取文件信息11111")
+    @PostMapping(value = "/getInfo/{id}")
     @ResponseBody
-    public ResponseBean<FileRes> getInfo(@RequestBody Long id) {
+    public ResponseBean<FileRes> getInfo(@PathVariable Long id) {
         return FileInfo.getByid(id);
     }
 

+ 3 - 3
application-file/src/main/resources/application-uat.yml

@@ -1,5 +1,5 @@
 server:
-  port: 30045
+  port: 40045
 spring:
   application:
     name: application-file
@@ -10,7 +10,7 @@ spring:
     database: 13
     lettuce:
       pool:
-        max-active: 5
+        maxTotal: 5
   datasource:
     dynamic:
       primary: self #设置默认的数据源或者数据源组,默认值即为master
@@ -34,7 +34,7 @@ cn:
     file:
       file-store-dir: download
       zip-out-dir: zip
-      download-prefix: https:///s2.jihengcc.cn/file/
+      download-prefix: https:///s2t.jihengcc.cn/file/
 
 jetcache:
   statIntervalMinutes: 15

+ 2 - 2
application-file/src/main/resources/application.yml

@@ -1,6 +1,6 @@
 server:
   servlet:
-    context-path: /file/
+    context-path: /file
 spring:
   profiles:
     active: uat
@@ -13,7 +13,7 @@ swagger:
   docket:
     apis:
       title: "文件上传"
-      base-package: com.factory.file.interfaces.facade
+      base-package: com.factory.file
   authorization:
     key-name: Authorization
   ui-config:

+ 1 - 1
common-base/src/main/java/com/factory/base/config/swagger/SwaggerConfig.java

@@ -29,7 +29,7 @@ public class SwaggerConfig implements ApplicationListener<WebServerInitializedEv
             int port = event.getWebServer().getPort();
             //获取应用名
             String applicationName = event.getApplicationContext().getApplicationName();
-            log.info("项目启动启动成功!接口文档地址: http://" + hostAddress + ":" + port + applicationName + "/doc.html");
+            log.info("项目启动成功!接口文档地址: http://" + hostAddress + ":" + port + applicationName + "/doc.html");
         } catch (UnknownHostException e) {
             e.printStackTrace();
         }

+ 3 - 0
common-base/src/main/java/com/factory/base/entity/po/benteler/BentelerPlan.java

@@ -44,6 +44,9 @@ public class BentelerPlan implements Serializable {
     @ApiModelProperty(value = "生效日期")
     private LocalDate effectiveDate;
 
+    @ApiModelProperty(value = "指导文件")
+    private Integer fileId;
+
     @TableField(fill = FieldFill.INSERT)
     @ApiModelProperty(value = "逻辑删除", hidden = true)
     private Integer deleted;

+ 2 - 1
common-user/src/main/java/com/factory/user/service/impl/CommonServiceImpl.java

@@ -195,8 +195,9 @@ public class CommonServiceImpl implements CommonService {
         HashMap<String, Object> fileUploadMap = new HashMap<>();
         fileUploadMap.put("file", tempFile);
         try {
-            HttpResponse response = HttpRequest.post("http://127.0.0.1:30045/file/file/uploadOne")
+            HttpResponse response = HttpRequest.post("https://127.0.0.1:40045/file/file/uploadOne")
                     .form(fileUploadMap)
+                    .header("content-type", "multipart/form-data")
                     .header(authenticationProperties.getHeaderName(), "")
                     .execute();
             if (response.getStatus() == HttpStatus.HTTP_OK) {