|  |  |  | 
|---|
|  |  |  | import com.zy.asrs.entity.Order; | 
|---|
|  |  |  | import com.zy.asrs.service.ApiLogService; | 
|---|
|  |  |  | import com.zy.asrs.service.DocTypeService; | 
|---|
|  |  |  | import com.zy.asrs.service.OrderDetlService; | 
|---|
|  |  |  | import com.zy.asrs.service.OrderService; | 
|---|
|  |  |  | import com.zy.asrs.task.AbstractHandler; | 
|---|
|  |  |  | import com.zy.asrs.task.core.ReturnT; | 
|---|
|  |  |  | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Value; | 
|---|
|  |  |  | import org.springframework.jdbc.core.JdbcTemplate; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import java.util.Set; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Created by vincent on 2020/7/7 | 
|---|
|  |  |  | * Created by vincent on 2023/10/21 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @Service | 
|---|
|  |  |  | 
|---|
|  |  |  | //端口 | 
|---|
|  |  |  | private String URL; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Value("${erp.address.outaddress}") | 
|---|
|  |  |  | @Value("${erp.address.outaddressAudit}") | 
|---|
|  |  |  | //审核地址 | 
|---|
|  |  |  | private String outaddress; | 
|---|
|  |  |  | private String outaddressAudit; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private JdbcTemplate jdbcTemplate; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private OrderService orderService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private OrderDetlService orderDetlService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ApiLogService apiLogService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | response = new HttpHandler.Builder() | 
|---|
|  |  |  | .setHeaders(headers) | 
|---|
|  |  |  | .setUri(URL) | 
|---|
|  |  |  | .setPath(outaddress) | 
|---|
|  |  |  | .setPath(outaddressAudit) | 
|---|
|  |  |  | .setJson(add) | 
|---|
|  |  |  | .build() | 
|---|
|  |  |  | .doPost(); | 
|---|
|  |  |  | JSONObject data = JSON.parseObject(response); | 
|---|
|  |  |  | Object IsSuccess = findValueByKey(JSON.parseObject(response), "IsSuccess"); | 
|---|
|  |  |  | String bool=IsSuccess.toString(); | 
|---|
|  |  |  | //上报完成订单4转6 | 
|---|
|  |  |  | //审核完成原订单4转8  8.审核完成 | 
|---|
|  |  |  | if(bool.equals("true")){ | 
|---|
|  |  |  | success = true; | 
|---|
|  |  |  | order.setSettle(6L); | 
|---|
|  |  |  | order.setSettle(8L); | 
|---|
|  |  |  | orderService.update(order,new EntityWrapper<Order>().eq("order_no",order.getOrderNo())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | 
|---|
|  |  |  | // 保存接口日志 | 
|---|
|  |  |  | apiLogService.save( | 
|---|
|  |  |  | "审核", | 
|---|
|  |  |  | URL+ outaddress, | 
|---|
|  |  |  | URL+ outaddressAudit, | 
|---|
|  |  |  | null, | 
|---|
|  |  |  | "127.0.0.1", | 
|---|
|  |  |  | add, | 
|---|