Эх сурвалжийг харах

feat: 结算包结算详情-字段增加2

李学松 2 жил өмнө
parent
commit
df40f791d4

+ 17 - 2
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmScorePackageSettleNoteController.java

@@ -1,6 +1,8 @@
 package com.qunzhixinxi.hnqz.admin.controller;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.OrderItem;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -91,9 +93,22 @@ public class WmScorePackageSettleNoteController {
 
 		WmScorePackage scorePackage = wmScorePackageService.getById(note.getPackageId());
 		if (PackageTypeEnum.TYPE1_SCORE_AND_TASK_PACKAGE.val().equals(scorePackage.getPackageType1())) {
-			return R.ok(wmScorePackageSettleNoteService.getWmTaskForSettlePage2(page, note));
+			IPage<WmTaskSettleNoteOutput> settlePage2 = wmScorePackageSettleNoteService.getWmTaskForSettlePage2(page, note);
+			settlePage2.getRecords().forEach(output -> {
+				if (output.getSubjectLocation() != null) {
+					output.setSubjectLocationName(output.getSubjectLocation().getDescription());
+				}
+			});
+			return R.ok(settlePage2);
 		}
-		return R.ok(wmScorePackageSettleNoteService.getWmTaskForSettlePage(page, note));
+
+		IPage<WmTaskSettleNoteOutput> settlePage = wmScorePackageSettleNoteService.getWmTaskForSettlePage(page, note);
+		settlePage.getRecords().forEach(output -> {
+			if (output.getSubjectLocation() != null) {
+				output.setSubjectLocationName(output.getSubjectLocation().getDescription());
+			}
+		});
+		return R.ok(settlePage);
 	}
 
 	/**

+ 11 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/entity/output/WmTaskSettleNoteOutput.java

@@ -17,6 +17,7 @@
 
 package com.qunzhixinxi.hnqz.admin.entity.output;
 
+import com.qunzhixinxi.hnqz.admin.enums.SubjectLocation;
 import lombok.Data;
 
 import java.math.BigDecimal;
@@ -114,6 +115,16 @@ public class WmTaskSettleNoteOutput {
 	 */
 	private String subType;
 
+	/**
+	 * 税源地
+	 */
+	private SubjectLocation subjectLocation;
+
+	/**
+	 * 税源地名称
+	 */
+	private String subjectLocationName;
+
 	/**
 	 * 发票类目名称
 	 */

+ 2 - 0
hnqz-upms/hnqz-upms-biz/src/main/resources/mapper/WmScorePackageSettleNoteMapper.xml

@@ -101,6 +101,7 @@
 		e.id noteId,
 		e.invoice_type,
 		e.sub_type,
+		e.subject_location,
 		e.category_name,
 		e.discount,
 		e.stream_id,
@@ -149,6 +150,7 @@
 		e.id noteId,
 		e.invoice_type,
 		e.sub_type,
+		e.subject_location,
 		e.category_name,
 		e.discount,
 		e.stream_id,