|
@@ -10,6 +10,7 @@ import com.diagbot.entity.OpenedProductsIndex;
|
|
|
import com.diagbot.entity.OrderDetails;
|
|
|
import com.diagbot.entity.OrderDetailsIndex;
|
|
|
import com.diagbot.entity.ProductOrderIndex;
|
|
|
+import com.diagbot.entity.ServiceInfo;
|
|
|
import com.diagbot.entity.wrapper.LantoneProductWrapper;
|
|
|
import com.diagbot.entity.wrapper.OpendProductWrapper;
|
|
|
import com.diagbot.entity.wrapper.OrderDetailsWapper;
|
|
@@ -24,6 +25,8 @@ import com.diagbot.vo.AuditStatusVO;
|
|
|
import com.diagbot.vo.OppendedProductVO;
|
|
|
import com.diagbot.vo.OrderDetialsVO;
|
|
|
import com.diagbot.vo.ProductOrderVO;
|
|
|
+import com.diagbot.vo.ProductServiceSaveVO;
|
|
|
+import com.diagbot.vo.ServiceSaveVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -47,6 +50,10 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
|
|
|
private UserServiceClient userServiceClient;
|
|
|
@Autowired
|
|
|
private OrderDetailsFacade orderDetailsFacade;
|
|
|
+ @Autowired
|
|
|
+ private ServiceInfoFacade serviceInfoFacade;
|
|
|
+ @Autowired
|
|
|
+ private ProductServiceFacade productServiceFacade;
|
|
|
/**
|
|
|
* @Description: 添加产品业务逻辑
|
|
|
* @Author: wangyu
|
|
@@ -271,9 +278,22 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
|
|
|
orderDetails.setId(auditStatusVO.getId());
|
|
|
orderDetails.setGmtModified(DateUtil.now());
|
|
|
orderDetails.setModifier(UserUtils.getCurrentPrincipleID());
|
|
|
- if(orderDetailsFacade.updateById(orderDetails)){
|
|
|
+ orderDetails.setAuditStatus(1);
|
|
|
+ if(!orderDetailsFacade.updateById(orderDetails)){
|
|
|
return CommonErrorCode.FAIL;
|
|
|
}
|
|
|
+ LantoneProduct lantoneProduct =new LantoneProduct();
|
|
|
+ lantoneProduct.setId(auditStatusVO.getId());
|
|
|
+ ServiceSaveVO serviceSaveVO =new ServiceSaveVO();
|
|
|
+ ProductServiceSaveVO productServiceSaveVO =new ProductServiceSaveVO();
|
|
|
+ serviceSaveVO.setDescription(lantoneProduct.getDecription());
|
|
|
+ serviceSaveVO.setName(lantoneProduct.getName());
|
|
|
+ serviceSaveVO.setType(1);
|
|
|
+ ServiceInfo serviceInfo = serviceInfoFacade.createService(serviceSaveVO);
|
|
|
+ productServiceSaveVO.setProductId(auditStatusVO.getId());
|
|
|
+ productServiceSaveVO.setServiceId(serviceInfo.getId());
|
|
|
+ productServiceSaveVO.setType(1);
|
|
|
+ productServiceFacade.genProductService(productServiceSaveVO);
|
|
|
return CommonErrorCode.OK;
|
|
|
}
|
|
|
}
|