Browse Source

代码整理

rengb 5 năm trước cách đây
mục cha
commit
b25ec8cc36

+ 6 - 8
aipt-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -1,10 +1,5 @@
 package com.diagbot.facade;
 
-import com.diagbot.enums.LexiconTypeEnum;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestBody;
-
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.RespDTO;
@@ -13,6 +8,9 @@ import com.diagbot.enums.LexiconTypeEnum;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.vo.ConceptBaseVO;
 import com.diagbot.vo.GetTopPatientInfoVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
 
 /**
  * @Description: 患者业务逻辑
@@ -22,7 +20,7 @@ import com.diagbot.vo.GetTopPatientInfoVO;
 @Component
 public class PatientInfoFacade {
 
-	@Autowired
+    @Autowired
     private ConceptFacade conceptFacade;
     @Autowired
     TranServiceClient tranServiceClient;
@@ -38,13 +36,13 @@ public class PatientInfoFacade {
         RespDTOUtil.respNGDealCover(respDTO, "获取页面顶部病人医生科室信息失败");
 
         GetTopPatientInfoDTO getTopPatientInfoDTO = respDTO.data;
-        
+
         ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
         conceptBaseVO.setLibType(LexiconTypeEnum.DEPARTMENT.getKey());
         conceptBaseVO.setName(getTopPatientInfoDTO.getSelfDeptName());
         Concept concept = conceptFacade.exist(conceptBaseVO);
         getTopPatientInfoDTO.setSelfDeptId(concept.getId());
-        
+
         return getTopPatientInfoDTO;
     }
 

+ 7 - 9
aipt-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -1,23 +1,21 @@
 package com.diagbot.web;
 
-import javax.validation.Valid;
-
-import org.springframework.beans.factory.annotation.Autowired;
-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.RestController;
-
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.GetTopPatientInfoDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.PatientInfoFacade;
 import com.diagbot.vo.GetTopPatientInfoVO;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
+import javax.validation.Valid;
+
 /**
  * <p>
  * 患者信息表 前端控制器

+ 29 - 30
diagbotman-service/src/main/java/com/diagbot/web/ProductOrderController.java

@@ -1,16 +1,5 @@
 package com.diagbot.web;
 
-import java.util.List;
-
-import javax.validation.Valid;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-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.RestController;
-
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.EnShowOptionDTO;
@@ -36,11 +25,19 @@ import com.diagbot.vo.OpenProductCheckVO;
 import com.diagbot.vo.OpenUpOnTrialVO;
 import com.diagbot.vo.ProductOrderVO;
 import com.diagbot.vo.StartAndendByUserIdVO;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+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.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
+import javax.validation.Valid;
+import java.util.List;
+
 /**
  * @author rgb
  * @Description 订单产品相关的操作
@@ -104,7 +101,7 @@ public class ProductOrderController {
     public RespDTO<WaitExamOrderCouDTO> waitExamOrderCou() {
         return RespDTO.onSuc(productOrderFacade.waitExamOrderCou());
     }
-    
+
     @ApiOperation(value = "控制台-已开通产品状态校验[by:rengb]", notes = "控制台-已开通产品状态校验")
     @PostMapping("/openProductCheck")
     @SysLogger("openProductCheck")
@@ -137,8 +134,8 @@ public class ProductOrderController {
     @SysLogger("delInformationAvailable")
     @Transactional
     public RespDTO delInformationAvailable(@RequestBody OpenedProducts openedProduct) {
-    	long userId = openedProduct.getUserId(); 
-    	long productId = openedProduct.getProductId();
+        long userId = openedProduct.getUserId();
+        long productId = openedProduct.getProductId();
         return openedProductsFacade.delInformationAvailables(userId, productId);
     }
 
@@ -173,28 +170,30 @@ public class ProductOrderController {
     @PostMapping("/getInformationAvailableAll")
     @SysLogger("getInformationAvailableAll")
     @ApiIgnore
-    public RespDTO<List<UserAndProdutDTO>>  getInformationAvailableByUserIds(@RequestBody List<Long> userIds){
-    	List<UserAndProdutDTO> UserAndProdutData = openedProductsFacade.getInformationAvailableByUserIds(userIds);
-    	return RespDTO.onSuc(UserAndProdutData);
+    public RespDTO<List<UserAndProdutDTO>> getInformationAvailableByUserIds(@RequestBody List<Long> userIds) {
+        List<UserAndProdutDTO> UserAndProdutData = openedProductsFacade.getInformationAvailableByUserIds(userIds);
+        return RespDTO.onSuc(UserAndProdutData);
     }
+
     @ApiOperation(value = "客户中心-查询用户是否有待审核的产品数量[by:wangfeng]", notes = "用户已开通信息")
     @PostMapping("/getOrderByUserToAudit")
     @SysLogger("getOrderByUserToAudit")
-   
-    public RespDTO<Integer> getOrderByUserToAudit(@RequestBody Long userId){
-    	OrderDetailsWapper rderDetails =new OrderDetailsWapper();
-    	rderDetails.setUserId(userId);
-    	int sums = orderDetailsFacade.getOrderByUserToAudit(rderDetails);
-    	return RespDTO.onSuc(sums);	
+
+    public RespDTO<Integer> getOrderByUserToAudit(@RequestBody Long userId) {
+        OrderDetailsWapper rderDetails = new OrderDetailsWapper();
+        rderDetails.setUserId(userId);
+        int sums = orderDetailsFacade.getOrderByUserToAudit(rderDetails);
+        return RespDTO.onSuc(sums);
     }
+
     @ApiOperation(value = "客户中心-查询用户续费数量[by:wangfeng]", notes = "用户已开通信息")
     @PostMapping("/getUserWaitingRenewal")
     @SysLogger("getUserWaitingRenewal")
-    
-    public RespDTO<Integer> getUserWaitingRenewal(@RequestBody Long userId){
-    	UserRenewals userRenewals = new UserRenewals();
-    	userRenewals.setUserId(userId);
-    	int userIdSum = userRenewalsFacade.getUserWaitingRenewal(userRenewals);
-    	return RespDTO.onSuc(userIdSum);	
+
+    public RespDTO<Integer> getUserWaitingRenewal(@RequestBody Long userId) {
+        UserRenewals userRenewals = new UserRenewals();
+        userRenewals.setUserId(userId);
+        int userIdSum = userRenewalsFacade.getUserWaitingRenewal(userRenewals);
+        return RespDTO.onSuc(userIdSum);
     }
 }