|
@@ -697,15 +697,22 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
PushPurchaseOrderResponse response = JsonUtils.jsonToModel(responseStr,PushPurchaseOrderResponse.class);
|
|
|
LongYanPurchaseOrder order = new LongYanPurchaseOrder();
|
|
|
order.setId(id);
|
|
|
+ LongYanPurchaseDetail detail = new LongYanPurchaseDetail();
|
|
|
if (response.getResult()){
|
|
|
order.setStatus(3);
|
|
|
order.setYongYouId(response.getData());
|
|
|
- longYanPurchaseOrderMapper.updateByPrimaryKeySelective(order);
|
|
|
- return response.getMsg();
|
|
|
+// detail.setLongYangPurchaseOrderId(order.getId());
|
|
|
+ detail.setDetailStatus(9);
|
|
|
+ }else {
|
|
|
+ order.setStatus(8);
|
|
|
+ detail.setDetailStatus(10);
|
|
|
}
|
|
|
- order.setStatus(8);
|
|
|
longYanPurchaseOrderMapper.updateByPrimaryKeySelective(order);
|
|
|
- throw new BusinessException("采购单申请失败,请联系管理员!");
|
|
|
+ Weekend<LongYanPurchaseDetail> weekend = new Weekend<>(LongYanPurchaseDetail.class);
|
|
|
+ WeekendCriteria<LongYanPurchaseDetail,Object> weekendCriteria = weekend.weekendCriteria();
|
|
|
+ weekendCriteria.andEqualTo(LongYanPurchaseDetail::getLongYangPurchaseOrderId,order.getId());
|
|
|
+ longYanPurchaseDetailMapper.updateByExampleSelective(detail,weekend);
|
|
|
+ return response.getMsg();
|
|
|
}
|
|
|
|
|
|
|