|
@@ -110,6 +110,8 @@ public class WorkInvoiceAllController extends BaseController {
|
|
private ActTaskService actTaskService;
|
|
private ActTaskService actTaskService;
|
|
@Autowired
|
|
@Autowired
|
|
private ActivityService activityService;
|
|
private ActivityService activityService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkInvoiceService invoiceService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private HttpServletRequest request;
|
|
private HttpServletRequest request;
|
|
@@ -124,7 +126,7 @@ public class WorkInvoiceAllController extends BaseController {
|
|
}
|
|
}
|
|
return entity;
|
|
return entity;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 开票管理列表页面
|
|
* 开票管理列表页面
|
|
*/
|
|
*/
|
|
@@ -133,6 +135,12 @@ public class WorkInvoiceAllController extends BaseController {
|
|
public String list(WorkInvoice workInvoice, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
public String list(WorkInvoice workInvoice, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
Page<WorkInvoice> page = workInvoiceService.findPage(new Page<WorkInvoice>(request, response), workInvoice);
|
|
Page<WorkInvoice> page = workInvoiceService.findPage(new Page<WorkInvoice>(request, response), workInvoice);
|
|
List<WorkInvoice> workInvoiceList = page.getList();
|
|
List<WorkInvoice> workInvoiceList = page.getList();
|
|
|
|
+ for (WorkInvoice invoice: workInvoiceList) {
|
|
|
|
+ invoice.setWorkInvoiceProjectRelationList(invoiceService.getProjectRelation(invoice));
|
|
|
|
+ List<String> projectNameList = invoiceService.getProjectNameList(invoice);
|
|
|
|
+ String projectNameStr = String.join(",", projectNameList);
|
|
|
|
+ invoice.setProjectName(projectNameStr);
|
|
|
|
+ }
|
|
model.addAttribute("page", page);
|
|
model.addAttribute("page", page);
|
|
model.addAttribute("workInvoiceShow", workInvoice);
|
|
model.addAttribute("workInvoiceShow", workInvoice);
|
|
return "modules/workinvoice/workInvoiceAllList";
|
|
return "modules/workinvoice/workInvoiceAllList";
|
|
@@ -568,7 +576,7 @@ public class WorkInvoiceAllController extends BaseController {
|
|
addMessage(redirectAttributes, "发票收款成功");
|
|
addMessage(redirectAttributes, "发票收款成功");
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 批量删除开票管理
|
|
* 批量删除开票管理
|
|
*/
|
|
*/
|
|
@@ -582,7 +590,7 @@ public class WorkInvoiceAllController extends BaseController {
|
|
addMessage(redirectAttributes, "作废发票管理成功");
|
|
addMessage(redirectAttributes, "作废发票管理成功");
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 导出excel文件
|
|
* 导出excel文件
|
|
*/
|
|
*/
|
|
@@ -632,7 +640,7 @@ public class WorkInvoiceAllController extends BaseController {
|
|
}
|
|
}
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 下载导入开票管理数据模板
|
|
* 下载导入开票管理数据模板
|
|
*/
|
|
*/
|
|
@@ -641,7 +649,7 @@ public class WorkInvoiceAllController extends BaseController {
|
|
public String importFileTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
|
|
public String importFileTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
|
|
try {
|
|
try {
|
|
String fileName = "发票管理数据导入模板.xlsx";
|
|
String fileName = "发票管理数据导入模板.xlsx";
|
|
- List<WorkInvoice> list = Lists.newArrayList();
|
|
|
|
|
|
+ List<WorkInvoice> list = Lists.newArrayList();
|
|
new ExportExcel("发票管理数据", WorkInvoice.class, 1).setDataList(list).write(response, fileName).dispose();
|
|
new ExportExcel("发票管理数据", WorkInvoice.class, 1).setDataList(list).write(response, fileName).dispose();
|
|
return null;
|
|
return null;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -649,8 +657,8 @@ public class WorkInvoiceAllController extends BaseController {
|
|
}
|
|
}
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 选择开票单位
|
|
* 选择开票单位
|
|
*/
|
|
*/
|
|
@@ -1198,4 +1206,4 @@ public class WorkInvoiceAllController extends BaseController {
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
return "redirect:"+Global.getAdminPath()+"/workinvoiceAll/workInvoiceAll/?repage";
|
|
}
|
|
}
|
|
|
|
|
|
-}
|
|
|
|
|
|
+}
|