Browse Source

Merge branch 'feat-dingcategory-20210916' of googol/YY_BE_2 into master

屈桐 3 năm trước cách đây
mục cha
commit
789ff3d981

+ 14 - 2
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmPayOffController.java

@@ -195,8 +195,20 @@ public class WmPayOffController {
 			export.setCreateTime(settleOutput.getCreateTime());
 			export.setPackageFinishStatus(PackageFinishStatusEnum.resolve(settleOutput.getPackageFinishStatus()).getName());
 			export.setScore(settleOutput.getScore());
-			export.setSubType(SubjectTypeEnum.resolve(settleOutput.getSubType()).getDesc());
-			export.setInvoiceCategory(WmScorePackageSettleExcelModel.CategoryEnum.resolve(settleOutput.getInvoiceCategory()).getDesc());
+
+			SubjectTypeEnum subjectTypeEnum = SubjectTypeEnum.resolve(settleOutput.getSubType());
+			export.setSubType(subjectTypeEnum.getDesc());
+			switch (subjectTypeEnum){
+				case TYPE_RENLIJIA:
+					export.setInvoiceCategory(WmScorePackageSettleExcelModel.DingCategoryEnum.resolve(settleOutput.getInvoiceCategory()).getDesc());
+					break;
+				case TYPE_SHUIBANGYUN:
+					export.setInvoiceCategory(WmScorePackageSettleExcelModel.CategoryEnum.resolve(settleOutput.getInvoiceCategory()).getDesc());
+					break;
+				case TYPE_NULL:
+					export.setInvoiceCategory(WmScorePackageSettleExcelModel.CategoryEnum.CATEGORY_NULL.getDesc());
+					break;
+			}
 			export.setUserNames(settleOutput.getUserNames());
 			export.setSettleAmount(settleOutput.getSettleAmount());
 			export.setSettleStatus(SettleStatusEnum.resolve(settleOutput.getSettleStatus()).getName());

+ 39 - 4
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/entity/model/excel/WmScorePackageSettleExcelModel.java

@@ -118,25 +118,60 @@ public class WmScorePackageSettleExcelModel {
 		CATEGORY_3(3, "信息服务费"),
 		CATEGORY_4(4, "专业技术服务"),
 		CATEGORY_12(12, "健康咨询服务费"),
+		CATEGORY_NULL(-1, ""),
+		;
+
+		/**
+		 * 类型
+		 */
+		private final Integer code;
+
+		/**
+		 * 描述
+		 */
+		private final String desc;
+
+		public static CategoryEnum resolve(Integer val) {
+			for (CategoryEnum categoryEnum: CategoryEnum.values()){
+				if (categoryEnum.code.equals(val)){
+					return categoryEnum;
+				}
+			}
+			return CATEGORY_NULL;
+		}
+
+	}
+
+	/**
+	 *  结算渠道
+	 */
+	@Getter
+	@AllArgsConstructor
+	public enum DingCategoryEnum {
+
 		CATEGORY_30(30, "市场推广服务"),
 		CATEGORY_70(70, "其他咨询服务"),
 		CATEGORY_77(77, "技术咨询划服务"),
 		CATEGORY_203(203, "现场辅助服务"),
+		CATEGORY_3(3, "现代服务*技术咨询服务费"),
+		CATEGORY_4(4, "现代服务*其他咨询服务费"),
+		CATEGORY_5(5, "现代服务*现场辅助服务费"),
+		CATEGORY_7(7, "现代服务*推广服务费"),
 		CATEGORY_NULL(-1, ""),
 		;
 
 		/**
 		 * 类型
 		 */
-		private Integer code;
+		private final Integer code;
 
 		/**
 		 * 描述
 		 */
-		private String desc;
+		private final String desc;
 
-		public static CategoryEnum resolve(Integer val) {
-			for (CategoryEnum categoryEnum: CategoryEnum.values()){
+		public static DingCategoryEnum resolve(Integer val) {
+			for (DingCategoryEnum categoryEnum: DingCategoryEnum.values()){
 				if (categoryEnum.code.equals(val)){
 					return categoryEnum;
 				}