| | |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.purchaseApplyUser.IPurchaseApplyUserInnerServiceSMO; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodePurchaseApplyConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private IPurchaseApplyBMO purchaseApplyBMOImpl; |
| | | @Autowired |
| | | private IPurchaseApplyUserInnerServiceSMO iPurchaseApplyUserInnerServiceSMO; |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "resourceStores", "必填,请填写申请采购的物资"); |
| | |
| | | |
| | | ResponseEntity<String> responseEntity = purchaseApplyBMOImpl.callService(context, service.getServiceCode(), businesses); |
| | | |
| | | //开始流程 |
| | | // if(HttpStatus.OK == responseEntity.getStatusCode()){ |
| | | // PurchaseApplyDto purchaseApplyDto = BeanConvertUtil.covertBean(reqJson, PurchaseApplyDto.class); |
| | | // purchaseApplyDto.setCurrentUserId(reqJson.getString("userId")); |
| | | // iPurchaseApplyUserInnerServiceSMO.startProcess(purchaseApplyDto); |
| | | // } |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |