提交 1bccd4e0 作者: zhangqiliang

退货,收货,发货的优化

父级 fb43503c
......@@ -71,7 +71,7 @@ public class ReceivedNoteController {
@ApiOperation(value = "收货列表查询")
public BaseResponse<List<Delivery>> queryReceivednote(Delivery delivery){
//return new BaseResponse<>(this.receivednoteMapper.selectReceivedNoteList(receivednote));
List<String> list= Arrays.asList("已发货","已收货");
List<String> list= Arrays.asList("已发货","已收货","退货已申请","退货已驳回","退货已通过","退货完成");
delivery.setLogisticStatusList(list);
return new BaseResponse(this.deliveryMapper.selectDeliveryList(delivery));
}
......@@ -99,10 +99,7 @@ public class ReceivedNoteController {
@ApiOperation("确认收货接口")
@ParamsValidate
public BaseResponse<DeliveryUpdateDTO> confirmReceipt(@RequestBody @Validated(UpdateEntityGroup.class) DeliveryUpdateDTO deliveryUpdateDTO, BindingResult bindingResult){
Delivery before=this.deliveryMapper.selectByPrimaryKey(deliveryUpdateDTO.getId());
if (!LogisticStatus.已发货.name().equals(before.getLogisticStatus())){
throw new ServiceException("只有已发货的状态才能确认收货");
}
deliveryUpdateDTO.setLogisticStatus(LogisticStatus.已收货.name());
this.commonUpdateService.UpdateColumns(deliveryUpdateDTO,false);
return new BaseResponse(this.deliveryMapper.updateByPrimaryKeySelective(deliveryUpdateDTO));
}
......
......@@ -31,9 +31,9 @@ import lombok.extern.slf4j.Slf4j;
import lombok.var;
import org.apache.http.Header;
import org.apache.http.HeaderElement;
import org.apache.http.HttpHeaders;
import org.apache.http.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -120,7 +120,7 @@ public class RejectController {
this.commonUpdateService.UpdateColumns(deliveryUpdateDTO,false);
return new BaseResponse(this.deliveryMapper.updateByPrimaryKeySelective(deliveryUpdateDTO));
}
@PostMapping("/confirmReject")
/*@PostMapping("/confirmReject")
@ApiOperation("确认退货接口")
@ParamsValidate
public BaseResponse<DeliveryUpdateDTO> confirmReject(@RequestBody @Validated(UpdateEntityGroup.class) DeliveryUpdateDTO deliveryUpdateDTO, BindingResult bindingResult){
......@@ -130,11 +130,13 @@ public class RejectController {
params.put("warehouseId",before.getArrivalWarehouseId());
params.put("materialsCode",before.getMaterialCode());
String token = SpringContextUtil.getToken();
String jsonStr = HttpClientUtils.post("http://192.168.1.106:9061/api/api/reject/restoreInventoryQuantity", params, "UTF-8","UTF-8");
org.springframework.http.HttpHeaders headers = new HttpHeaders();
headers.add("token",token);
String jsonStr = HttpClientUtils.post("http://192.168.1.106:9061/api/api/reject/restoreInventoryQuantity", params, "UTF-8","UTF-8", (Header) headers);
System.out.println("获取分支的数据"+jsonStr);
this.commonUpdateService.UpdateColumns(deliveryUpdateDTO,false);
return new BaseResponse(this.deliveryMapper.updateByPrimaryKeySelective(deliveryUpdateDTO));
}
}*/
/*@PostMapping("/export")
@ApiOperation(value = "导出退货单列表")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论