| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.OrderMapper; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.common.constant.MesConstant; |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class GhjtHandler { |
| | | |
| | | @Resource |
| | | private OrderMapper orderMapper; |
| | | |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | |
| | | |
| | | // 获取请求头 |
| | | Map<String, Object> headers = new HashMap<>(); |
| | | headers.put("digi-type", "sync "); |
| | | headers.put("digi-protocol", "raw"); |
| | | headers.put("Content-Type", "application/json;charset=UTF-8"); |
| | | |
| | | // 构造请求体 |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | .build() |
| | | .doPost(); |
| | | if (!Cools.isEmpty(response)) { |
| | | order.setSettle(6L); |
| | | orderMapper.updateById(order); |
| | | success = true; |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL + MesConstant.PAKIN_URL, body, response); |