|
|
@ -90,26 +90,26 @@ public class PurchasebackController {
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/getList")
|
|
|
|
@PostMapping("/getList")
|
|
|
|
public ActionResult list(@RequestBody PurchasebackPagination purchasebackPagination)throws IOException{
|
|
|
|
public ActionResult list(@RequestBody PurchasebackPagination purchasebackPagination) throws IOException {
|
|
|
|
List<PurchasebackEntity> list= purchasebackService.getList(purchasebackPagination);
|
|
|
|
List<PurchasebackEntity> list = purchasebackService.getList(purchasebackPagination);
|
|
|
|
//处理id字段转名称,若无需转或者为空可删除
|
|
|
|
//处理id字段转名称,若无需转或者为空可删除
|
|
|
|
for(PurchasebackEntity entity:list){
|
|
|
|
for (PurchasebackEntity entity : list) {
|
|
|
|
Map<String,Object> purchaseOrderIdMap = new HashMap<>();
|
|
|
|
Map<String, Object> purchaseOrderIdMap = new HashMap<>();
|
|
|
|
entity.setPurchaseOrderId(generaterSwapUtil.getPopupSelectValue("383149471917185157","id","document_no",entity.getPurchaseOrderId(),purchaseOrderIdMap));
|
|
|
|
entity.setPurchaseOrderId(generaterSwapUtil.getPopupSelectValue("383149471917185157", "id", "document_no", entity.getPurchaseOrderId(), purchaseOrderIdMap));
|
|
|
|
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
|
|
|
|
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<PurchasebackListVO> listVO=JsonUtil.getJsonToList(list,PurchasebackListVO.class);
|
|
|
|
List<PurchasebackListVO> listVO = JsonUtil.getJsonToList(list, PurchasebackListVO.class);
|
|
|
|
for(PurchasebackListVO purchasebackVO:listVO){
|
|
|
|
for (PurchasebackListVO purchasebackVO : listVO) {
|
|
|
|
PurchaseorderEntity purchaseorderEntity = purchasebackService.getPurchaseorder(purchasebackVO.getPurchaseOrderId());
|
|
|
|
PurchaseorderEntity purchaseorderEntity = purchasebackService.getPurchaseorder(purchasebackVO.getPurchaseOrderId());
|
|
|
|
if(ObjectUtil.isNotEmpty(purchaseorderEntity)){
|
|
|
|
if (ObjectUtil.isNotEmpty(purchaseorderEntity)) {
|
|
|
|
purchasebackVO.setJg_purchaseorder(JsonUtil.getJsonToBean(purchaseorderEntity,PurchaseorderListVO.class));
|
|
|
|
purchasebackVO.setJg_purchaseorder(JsonUtil.getJsonToBean(purchaseorderEntity, PurchaseorderListVO.class));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PageListVO vo=new PageListVO();
|
|
|
|
PageListVO vo = new PageListVO();
|
|
|
|
vo.setList(listVO);
|
|
|
|
vo.setList(listVO);
|
|
|
|
PaginationVO page=JsonUtil.getJsonToBean(purchasebackPagination,PaginationVO.class);
|
|
|
|
PaginationVO page = JsonUtil.getJsonToBean(purchasebackPagination, PaginationVO.class);
|
|
|
|
vo.setPagination(page);
|
|
|
|
vo.setPagination(page);
|
|
|
|
return ActionResult.success(vo);
|
|
|
|
return ActionResult.success(vo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|