|
@@ -36,6 +36,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.io.IOException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
@Controller
|
|
@@ -241,6 +242,95 @@ public class FinanciaReceController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * to修改回款页面
|
|
|
+ * @return
|
|
|
+ * @author
|
|
|
+ * @date
|
|
|
+ */
|
|
|
+ @RequiresPermissions("dm:financialReceipt:list")
|
|
|
+ @RequestMapping("/download_fIle_fr")
|
|
|
+ public ModelAndView downloadFIleFr(HttpServletRequest request,FinancialReceipt fr) {
|
|
|
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
|
|
+
|
|
|
+ List<FinancialReceipt> frList = financialReceiptService.getFinancialReceiptList(fr);
|
|
|
+ // 准备model
|
|
|
+ Map<String, Object> model = new HashMap<String, Object>();
|
|
|
+ model.put("fileName", "财务列表"); // 下载文件名称
|
|
|
+
|
|
|
+ // 标题
|
|
|
+ List<String> titles = new ArrayList<String>();
|
|
|
+ titles.add("编号");
|
|
|
+ titles.add("认领状态");
|
|
|
+ titles.add("认领人");
|
|
|
+ titles.add("认领时间");
|
|
|
+ titles.add("所属客户");
|
|
|
+ titles.add("来源");
|
|
|
+ titles.add("付款金额");
|
|
|
+ titles.add("付款备注");
|
|
|
+ titles.add("付款时间");
|
|
|
+ titles.add("录入日期");
|
|
|
+ model.put("titles", titles);
|
|
|
+ PtsBatch ptsBatch = new PtsBatch();
|
|
|
+ List<List<Object>> countexts = new ArrayList<List<Object>>();
|
|
|
+ if(frList != null && frList.size() >0){
|
|
|
+ for (FinancialReceipt financialReceipt : frList) {
|
|
|
+ List<Object> row = new ArrayList<Object>();
|
|
|
+
|
|
|
+ row.add(financialReceipt.getFrId() == null ? null:financialReceipt.getFrId());
|
|
|
+
|
|
|
+ if(financialReceipt.getFrClaimStatus() == null){ //frClaimStatus
|
|
|
+ row.add("未认领");
|
|
|
+ }else if(financialReceipt.getFrClaimStatus() == 1){
|
|
|
+ row.add("已认领");
|
|
|
+ }else if(financialReceipt.getFrClaimStatus() == 2){
|
|
|
+ row.add("未认领");
|
|
|
+ }else if(financialReceipt.getFrClaimStatus() == 3){
|
|
|
+ row.add("已绑定订单");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(financialReceipt.getFrClaimStatus() == 1 || financialReceipt.getFrClaimStatus() == 3){
|
|
|
+ row.add(financialReceipt.getFrClaimAdminName() == null ? null:financialReceipt.getFrClaimAdminName());
|
|
|
+ }else{
|
|
|
+ row.add("");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(financialReceipt.getFrClaimStatus() == 1 || financialReceipt.getFrClaimStatus() == 3){
|
|
|
+ //frClaimDate
|
|
|
+ row.add(financialReceipt.getFrClaimDate() == null ? null:formatter.format(financialReceipt.getFrClaimDate()));
|
|
|
+ }else{
|
|
|
+ row.add("");
|
|
|
+ }
|
|
|
+
|
|
|
+ if(financialReceipt.getFrClaimStatus() == 1 || financialReceipt.getFrClaimStatus() == 3){
|
|
|
+ //frClaimDate
|
|
|
+ row.add(financialReceipt.getDealerName() == null ? null:financialReceipt.getDealerName());
|
|
|
+ }else{
|
|
|
+ row.add("");
|
|
|
+ }
|
|
|
+ row.add(financialReceipt.getFrBank() == null ? null:financialReceipt.getFrBank());
|
|
|
+
|
|
|
+ if(financialReceipt.getFrAmount()!=null){
|
|
|
+ Double amount = Double.valueOf(financialReceipt.getFrAmount());
|
|
|
+ amount = amount/100;
|
|
|
+ row.add(amount);
|
|
|
+ }else{
|
|
|
+ row.add(0);
|
|
|
+ }
|
|
|
+
|
|
|
+ row.add(financialReceipt.getFrRemake() == null ? null:financialReceipt.getFrRemake());
|
|
|
+
|
|
|
+ row.add(financialReceipt.getFrDate() == null ? null:formatter.format(financialReceipt.getFrDate()));
|
|
|
+ row.add(financialReceipt.getCreateDate() == null ? null:formatter.format(financialReceipt.getCreateDate()));
|
|
|
+ countexts.add(row);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ model.put("varList", countexts);
|
|
|
+ ObjectExcelView erv = new ObjectExcelView();
|
|
|
+ ModelAndView mv = new ModelAndView(erv,model);
|
|
|
+ return mv;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 修改回款信息
|
|
|
* @param request
|
|
|
* @return
|