Просмотр исходного кода

财务订单特批相关修改

anderx 1 год назад
Родитель
Сommit
83a0df8093

+ 2 - 1
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -2165,7 +2165,8 @@
     b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,a.examine_type examineType,
     a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,a.approval approvalType,
     a.commodity_quantity commodityQuantity,a.task_comment taskComment,a.picture_url pictureUrl,
-    e.service_life serviceLife ,e.service_year serviceYear,e.year_sum yearSum,e.contract_term contractTerm
+    e.service_life serviceLife ,e.service_year serviceYear,e.year_sum yearSum,e.contract_term contractTerm,
+    toa.type,toa.type_explain typeExplain
     from t_order_task a left join t_order_new b on a.order_no =b.order_no
     left join t_order_mid c on a.order_no =c.order_no
     left join t_task_member e on a.id=e.tid

+ 3 - 1
src/main/java/com/goafanti/order/bo/OrderListBo.java

@@ -71,6 +71,8 @@ public class OrderListBo {
 	private Integer processStatus;
 	@Excel(name="是否特批" ,readConverterExp = "0=非特批,1=待审核,2=通过,3=驳回")
 	private Integer approval;
+	@Excel(name = "特批类型")
+	private String type;
 	/** 订单类型 **/
 	private Integer orderType;
 	@Excel(name="会员" ,readConverterExp = "0=否,1=是")
@@ -152,7 +154,7 @@ public class OrderListBo {
 
 	private Integer myExamine;
 
-	private String type;
+
 	private String typeExplain;
 
 	public String getTypeExplain() {

+ 20 - 0
src/main/java/com/goafanti/order/bo/OutMemberList.java

@@ -15,6 +15,10 @@ public class OutMemberList {
     private String orderNo;
     @Excel(name = "特批状态",readConverterExp = "0=非特批,1=待审核,2=通过,3=驳回",width = MINWIDTH)
     private Integer approval;
+    @Excel(name = "特批类型")
+    private String type;
+    private String typeExplain;
+
     @Excel(name = "订单部门",width = 20)
     private String depName;
     @Excel(name = "订单负责人")
@@ -59,6 +63,22 @@ public class OutMemberList {
     private Integer myExamine;
     private Integer examineType;
 
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getTypeExplain() {
+        return typeExplain;
+    }
+
+    public void setTypeExplain(String typeExplain) {
+        this.typeExplain = typeExplain;
+    }
+
     public Integer getApprovalType() {
         return approvalType;
     }

+ 30 - 20
src/main/java/com/goafanti/order/controller/AdminOrderReceivablesApiController.java

@@ -1,26 +1,6 @@
 package com.goafanti.order.controller;
 
 
-
-
-
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
 import com.goafanti.admin.service.AttachmentService;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.Result;
@@ -37,10 +17,25 @@ import com.goafanti.order.bo.OrderListBo;
 import com.goafanti.order.bo.ReceivablesListBo;
 import com.goafanti.order.bo.TOrderInvoiceBo;
 import com.goafanti.order.bo.TemporaryReceivablesBo;
+import com.goafanti.order.enums.ApprovalTypeEnums;
 import com.goafanti.order.service.FundManageOrderService;
 import com.goafanti.order.service.OrderBillService;
 import com.goafanti.order.service.OrderInvoiceService;
 import com.goafanti.order.service.OrderReceivablesService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @RestController
 @RequestMapping(value = "/api/admin/receivables")
@@ -217,6 +212,21 @@ public class AdminOrderReceivablesApiController extends CertifyApiController {
     	Pagination<OrderListBo> p=(Pagination<OrderListBo>) fundManageOrderService.financeList(o, pageNo, pageSize).get("pagination");
 		@SuppressWarnings("unchecked")
 		List<OrderListBo> list=(List<OrderListBo>)p.getList() ;
+		for (OrderListBo e : list) {
+			if (e.getType()!=null){
+				String[] split = e.getType().split(",");
+				StringBuffer str=new StringBuffer();
+				for (String s : split) {
+					if (s.equals("0")){
+						str.append(e.getTypeExplain()).append(",");
+					}else {
+						String desc = ApprovalTypeEnums.getDesc(Integer.parseInt(s));
+						str.append(desc).append(",");
+					}
+				}
+				e.setType(str.substring(0,str.length()-1));
+			}
+		}
     	NewExcelUtil<OrderListBo>excel=new NewExcelUtil<>(OrderListBo.class);
 		 return  excel.exportExcel(list,"订单回款列表",uploadPath);
     }

+ 66 - 0
src/main/java/com/goafanti/order/enums/ApprovalTypeEnums.java

@@ -0,0 +1,66 @@
+package com.goafanti.order.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 特批类型 0其他,1=无前期款,2=暂无合同款,3=含高风险条款,4=新产品首单,5=通过率低于80%,6=3万以下会员,7=认证首期5K以下
+ */
+public enum ApprovalTypeEnums {
+
+    QT(0,"其他"),
+    WQQK(1,"无前期款"),
+    ZWHTK(2,"暂无合同款"),
+    HGFXTK(3,"含高风险条款"),
+    XCPSD(4,"新产品首单"),
+    TGLDY(5,"通过率低于80%"),
+    HY3WYX(6,"3万以下会员"),
+    RZSQ5KYX(7,"认证首期5K以下");
+
+    private Integer code;
+    private String desc;
+
+    private ApprovalTypeEnums(Integer code, String desc) {
+        this.code = code;
+        this.desc = desc;
+    }
+    private static Map<Integer, ApprovalTypeEnums> status = new HashMap<Integer, ApprovalTypeEnums>();
+
+    static {
+        for (ApprovalTypeEnums value : ApprovalTypeEnums.values()) {
+            status.put(value.getCode(), value);
+        }
+    }
+    public static ApprovalTypeEnums getStatus(Integer code) {
+        if (containsType(code)) {
+            return status.get(code);
+        }
+        return QT;
+    }
+    public static String getDesc(Integer code) {
+        if (containsType(code)) {
+            return status.get(code).getDesc();
+        }
+        return QT.getDesc();
+    }
+
+    public static boolean containsType(Integer code) {
+        return status.containsKey(code);
+    }
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public void setCode(Integer code) {
+        this.code = code;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+    }
+}

+ 14 - 0
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1365,6 +1365,20 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 						out.getDeleteSign()==2?"锁定":"未知");
 				out.setDeleteSignStr(str.toString());
 			}
+			if (out.getType()!=null){
+				String[] split = out.getType().split(",");
+				StringBuffer str=new StringBuffer();
+				for (String s : split) {
+					if (s.equals("0")){
+						str.append(out.getTypeExplain()).append(",");
+					}else {
+						String desc = ApprovalTypeEnums.getDesc(Integer.parseInt(s));
+						str.append(desc).append(",");
+					}
+				}
+				out.setType(str.substring(0,str.length()-1));
+			}
+
 		}
 		NewExcelUtil<OutMemberList> excelUtil=new NewExcelUtil<>(OutMemberList.class);
 		return excelUtil.exportExcel(list,"会员审核列表",uploadPath);