|
|
|
@ -1253,4 +1253,34 @@ public class PurchaseorderController {
|
|
|
|
|
}
|
|
|
|
|
return ActionResult.success("作废成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 归档
|
|
|
|
|
*
|
|
|
|
|
* @param id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("noadvance/{id}")
|
|
|
|
|
public ActionResult noAdvance(@PathVariable("id") String id) {
|
|
|
|
|
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
|
|
|
|
|
QueryWrapper<Purchaseorder_item0Entity> purchaseorder_item0QueryWrapper=new QueryWrapper<>();
|
|
|
|
|
purchaseorder_item0QueryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId,entity.getId());
|
|
|
|
|
purchaseorder_item0QueryWrapper.lambda().eq(Purchaseorder_item0Entity::getAdvance,0);
|
|
|
|
|
purchaseorder_item0QueryWrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId);
|
|
|
|
|
|
|
|
|
|
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0QueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
|
|
|
|
|
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
|
|
|
|
|
if (poundlistList.size()>0){
|
|
|
|
|
for (PoundlistEntity poundlistEntity: poundlistList) {
|
|
|
|
|
poundlistEntity.setIsCollection("1");
|
|
|
|
|
poundlistEntity.setPaymentDate(new Date());
|
|
|
|
|
}
|
|
|
|
|
poundlistService.updateBatchById(poundlistList);
|
|
|
|
|
return ActionResult.success("不垫资回款预收成功");
|
|
|
|
|
}else {
|
|
|
|
|
return ActionResult.success("没有不垫资回款预收");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|