Browse Source

SalesReport 分组

wfg 2 months ago
parent
commit
07f29f7433

+ 10 - 5
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java

@@ -2276,22 +2276,27 @@ public class Bills implements Serializable {
 	private String strFlag;
 
 	/**
-	 * 唛头
+	 * 附页
 	 */
 	@TableField(exist = false)
-	private String attachedMark;
+	private Boolean hasLargeMarks;
 
 	/**
-	 * 货描
+	 * 唛头
 	 */
 	@TableField(exist = false)
-	private String attachedGoodsdesc;
+	private String largeMarks;
 
 	/**
 	 * 附页
 	 */
 	@TableField(exist = false)
-	private String attached;
+	private Boolean hasLargeCommodityDescr;
+	/**
+	 * 货描
+	 */
+	@TableField(exist = false)
+	private String largeCommodityDescr;
 
 	/**
 	 * 联系人

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/documentTypes/dto/BDocumentTypesDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.documentTypes.dto;
+
+import org.springblade.los.documentTypes.entity.BDocumentTypes;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 业务-单证中心分组,各分公司独立数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-08-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class BDocumentTypesDTO extends BDocumentTypes {
+	private static final long serialVersionUID = 1L;
+
+}

+ 147 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/documentTypes/entity/BDocumentTypes.java

@@ -0,0 +1,147 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.documentTypes.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 业务-单证中心分组,各分公司独立实体类
+ *
+ * @author BladeX
+ * @since 2025-08-26
+ */
+@Data
+@TableName("los_b_document_types")
+@ApiModel(value = "BDocumentTypes对象", description = "业务-单证中心分组,各分公司独立")
+public class BDocumentTypes implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+	/**
+	* 分公司 Id
+	*/
+		@ApiModelProperty(value = "分公司 Id")
+		private String branchId;
+	/**
+	* 创建人 Id
+	*/
+		@ApiModelProperty(value = "创建人 Id")
+		private Long createUser;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private String createUserName;
+	/**
+	* 创建部门 Id
+	*/
+		@ApiModelProperty(value = "创建部门 Id")
+		private String createDept;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private String createDeptName;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人 Id
+	*/
+		@ApiModelProperty(value = "修改人 Id")
+		private Long updateUser;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private String updateUserName;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 业务类型
+	*/
+		@ApiModelProperty(value = "业务类型")
+		private String businessType;
+	/**
+	* 分组名称
+	*/
+		@ApiModelProperty(value = "分组名称")
+		private String typeName;
+	/**
+	* 类别名称
+	*/
+		@ApiModelProperty(value = "类别名称")
+		private String classifyCode;
+	/**
+	* 组别名称
+	*/
+		@ApiModelProperty(value = "组别名称")
+		private String groupCode;
+	/**
+	* 参数
+	*/
+		@ApiModelProperty(value = "参数")
+		private String params;
+	/**
+	 * 行号
+	 */
+	@ApiModelProperty(value = "行号")
+	private Long lineNo;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/documentTypes/vo/BDocumentTypesVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.documentTypes.vo;
+
+import org.springblade.los.documentTypes.entity.BDocumentTypes;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 业务-单证中心分组,各分公司独立视图实体类
+ *
+ * @author BladeX
+ * @since 2025-08-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "BDocumentTypesVO对象", description = "业务-单证中心分组,各分公司独立")
+public class BDocumentTypesVO extends BDocumentTypes {
+	private static final long serialVersionUID = 1L;
+
+}

+ 57 - 2
blade-service/blade-los/src/main/java/org/springblade/los/Util/RegularUtils.java

@@ -1,6 +1,7 @@
 package org.springblade.los.Util;
 
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.sun.org.apache.xpath.internal.operations.Bool;
@@ -502,13 +503,47 @@ public class RegularUtils {
 		}
 	}
 
+	public static String trimRight(String str) {
+		if (str == null || str.isEmpty()) return str;
+
+		int length = str.length();
+		int end = length;
+
+		// Find the last non-whitespace character
+		while (end > 0 && Character.isWhitespace(str.charAt(end - 1))) {
+			end--;
+		}
+
+		return end < length ? str.substring(0, end) : str;
+	}
+
+	public static JsonNode readJSONNode(JsonNode json, String keyName) {
+		if (ObjectUtils.isNotNull(json) && ObjectUtils.isNotNull(keyName)) {
+			try {
+				String[] kns = keyName.split(",");
+				for (String kn : kns) {
+					if(!kn.isEmpty()) {
+						JsonNode js = json.findValue(kn);
+						if (ObjectUtils.isNotNull(js)) {
+							return js;
+						}
+					}
+				}
+			} catch (Exception ignored) {
+
+			}
+		}
+
+		return null;
+	}
+
 	public static String readJSONStringValue(JsonNode json, String keyName, String defaultValue) {
 		String res = defaultValue;
 		if (ObjectUtils.isNotNull(json)) {
 			try {
 				JsonNode js = json.findValue(keyName);
 				if (ObjectUtils.isNotNull(js) && js.isValueNode()) {
-					res = js.asText().trim();
+					res = js.asText(defaultValue).trim();
 					if (ObjectUtils.isNull(res)) {
 						res = defaultValue;
 					}
@@ -527,7 +562,7 @@ public class RegularUtils {
 			try {
 				JsonNode js = json.findValue(keyName);
 				if (ObjectUtils.isNotNull(js) && js.isBoolean()) {
-					res = js.asBoolean();
+					res = js.asBoolean(defaultValue);
 				}
 			} catch (Exception ignored) {
 
@@ -537,6 +572,26 @@ public class RegularUtils {
 		return res;
 	}
 
+	public static int readJSONIntValue(JsonNode json, String keyName, int defaultValue) {
+		JsonNode js = readJSONNode(json, keyName);
+
+		if (ObjectUtils.isNotNull(js)) {
+			return js.asInt(defaultValue);
+		} else {
+			return defaultValue;
+		}
+	}
+
+	public static JsonNode readJSONObject(JsonNode json, String keyName) {
+		JsonNode js = readJSONNode(json, keyName);
+		return (ObjectUtils.isNotNull(js) && js.isObject()) ? js : null;
+	}
+
+	public static JsonNode readJSONArray(JsonNode json, String keyName) {
+		JsonNode js = readJSONNode(json, keyName);
+		return (ObjectUtils.isNotNull(js) && js.isArray()) ? js : null;
+	}
+
 	public static String translateEngMonthDate(Date d){
 		if(ObjectUtils.isNotNull(d)){
 			int y = d.getYear() + 1900;

+ 35 - 4
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java

@@ -1796,7 +1796,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					preContainersList = new ArrayList<>();
 				}
 
-				PrepareBills(bills, preContainersList);
+				PrepareBills(bills, preContainersList, reportParams);
 
 //				bills.setFM(MagicValues.FM);
 				if("1".equals(bills.getCapitalLettersRule())){
@@ -1900,7 +1900,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					String ventilation = preContainersList.stream().map(PreContainers::getVentilation).filter(Objects::nonNull).collect(Collectors.joining(","));
 					bills.setVentilation(ventilation);
 				}
-				PrepareBills(bills, preContainersList);
+				PrepareBills(bills, preContainersList, reportParams);
 
 				bills.setVesselCnName(bills.getVesselEnName() + "/" + bills.getVoyageNo());
 				bills.setDept(dept);
@@ -1933,7 +1933,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					.eq(PreContainers::getTenantId, AuthUtil.getTenantId())
 					.eq(PreContainers::getIsDeleted, 0)
 					.eq(PreContainers::getPid, bills.getId()));
-				PrepareBills(bills, preContainersList);
+				PrepareBills(bills, preContainersList, reportParams);
 
 				// 提取应收海运费
 				List<FeeCenter> feeCenters = feeCenterService.list(new LambdaQueryWrapper<FeeCenter>()
@@ -7575,8 +7575,19 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 		return bills;
 	}
 
-	private Bills PrepareBills(Bills bill, List<PreContainers> preContainersList){
+	private Bills PrepareBills(Bills bill, List<PreContainers> preContainersList, JsonNode reportParams){
 		if(ObjectUtils.isNotNull(bill)){
+			if(ObjectUtils.isNull(bill.getMarks())){
+				bill.setMarks("N/M");
+			}
+			if(ObjectUtils.isNull(bill.getCommodityDescr())){
+				bill.setCommodityDescr("");
+			}
+			bill.setHasLargeMarks(false);
+			bill.setLargeMarks(bill.getMarks());
+			bill.setHasLargeCommodityDescr(false);
+			bill.setLargeCommodityDescr(bill.getCommodityDescr());
+
 			List<PreContainers> preCntrs = ObjectUtils.isNotNull(preContainersList) ? preContainersList : bill.getPreContainersList();
 			if(ObjectUtils.isNotNull(preCntrs)){
 				StringBuilder cntrQtys = new StringBuilder();
@@ -7603,6 +7614,26 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 					bill.setQuantityCntrTypesDescr("");
 				}
 			}
+
+			// 处理大唛头和大货描
+			/*
+			JsonNode jsMarks = RegularUtils.readJSONObject(reportParams, "marks");
+			if(ObjectUtils.isNotNull(jsMarks) && RegularUtils.readJSONBooleanValue(jsMarks, "enabled", false)){
+				String marks = ObjectUtils.isNotNull(bill.getMarks()) ? RegularUtils.trimRight(bill.getMarks()) : "";
+				List<String> marksList = null;
+				int lineLength = RegularUtils.readJSONIntValue(jsMarks, "lineLength", 0);
+				if(lineLength>0){
+					marksList = RegularUtils.reformatEDIText(marks, lineLength, false);
+				}else{
+					marksList = new ArrayList<>(Arrays.asList(marks.split("\n")));
+				}
+				int lineCount = RegularUtils.readJSONIntValue(jsMarks, "lineCount", 0);
+
+			}
+			JsonNode jsGoodsDesc = RegularUtils.readJSONObject(reportParams, "goodsDesc,goodsDescr,CommodityDesc,CommodityDescr");
+
+			// bill.getCommodityDescr()
+			*/
 		}
 
 		return bill;

+ 8 - 4
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java

@@ -4414,8 +4414,14 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		Bills copyBills = new Bills();
 		copyBills.setDetail(seaBillsDetail);
 		copyBills.setSeaType(detail.getSeaType());
-		copyBills.setMasterId(detail.getId());
-		copyBills.setMasterBillNo(detail.getBillNo());
+		if (MagicValues.MM.equals(detail.getBillType())) {
+			copyBills.setMasterId(detail.getId());
+			copyBills.setMasterBillNo(detail.getBillNo());
+		};
+		if (MagicValues.MH.equals(detail.getBillType())) {
+			copyBills.setMasterId(detail.getMasterId());
+			copyBills.setMasterBillNo(detail.getMasterBillNo());
+		};
 		copyBills.setTeamId(detail.getTeamId());
 		copyBills.setTeamName(detail.getTeamName());
 		copyBills.setHpaymode(detail.getHpaymode());
@@ -4513,8 +4519,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		copyBills.setCfsQuantity(detail.getCfsQuantity());
 		copyBills.setCfsMeasurement(detail.getCfsMeasurement());
 		copyBills.setCfsGrossWeight(detail.getCfsGrossWeight());
-		copyBills.setMasterId(detail.getMasterId());
-		copyBills.setMasterBillNo(detail.getMasterBillNo());
 		copyBills.setFeeCenterListC(new ArrayList<>());
 		copyBills.setFeeCenterListD(new ArrayList<>());
 		copyBills.setCfsQuantity(new BigDecimal("0.00"));

+ 152 - 0
blade-service/blade-los/src/main/java/org/springblade/los/documentTypes/controller/BDocumentTypesController.java

@@ -0,0 +1,152 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.documentTypes.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.los.basic.fees.entity.BFees;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.documentTypes.entity.BDocumentTypes;
+import org.springblade.los.documentTypes.vo.BDocumentTypesVO;
+import org.springblade.los.documentTypes.service.IBDocumentTypesService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+
+/**
+ * 业务-单证中心分组,各分公司独立 控制器
+ *
+ * @author BladeX
+ * @since 2025-08-26
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/bdocumenttypes")
+@Api(value = "业务-单证中心分组,各分公司独立", tags = "业务-单证中心分组,各分公司独立接口")
+public class BDocumentTypesController extends BladeController {
+
+	private final IBDocumentTypesService bDocumentTypesService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入bDocumentTypes")
+	public R<BDocumentTypes> detail(BDocumentTypes bDocumentTypes) {
+		BDocumentTypes detail = bDocumentTypesService.getOne(Condition.getQueryWrapper(bDocumentTypes));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 业务-单证中心分组,各分公司独立
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入bDocumentTypes")
+	public R<IPage<BDocumentTypes>> list(BDocumentTypes bDocumentTypes, Query query) {
+		IPage<BDocumentTypes> pages = bDocumentTypesService.page(Condition.getPage(query), Condition.getQueryWrapper(bDocumentTypes));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 业务-单证中心分组,各分公司独立
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入bDocumentTypes")
+	public R<IPage<BDocumentTypesVO>> page(BDocumentTypesVO bDocumentTypes, Query query) {
+		IPage<BDocumentTypesVO> pages = bDocumentTypesService.selectBDocumentTypesPage(Condition.getPage(query), bDocumentTypes);
+		return R.data(pages);
+	}
+
+	/**
+	 * 分页 业务-单证中心分组,各分公司独立
+	 */
+	@GetMapping("/listAll")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = "分页", notes = "传入bDocumentTypes")
+	public R<List<BDocumentTypes>> listAll(BDocumentTypes doc) {
+		LambdaQueryWrapper<BDocumentTypes> lqw = new LambdaQueryWrapper<>(); // Condition.getQueryWrapper(bDocumentTypes)
+		lqw.eq(BDocumentTypes::getTenantId, AuthUtil.getTenantId())
+			.eq(BDocumentTypes::getIsDeleted, 0)
+			.eq(ObjectUtils.isNotNull(doc.getBusinessType()), BDocumentTypes::getBusinessType, doc.getBusinessType())
+			.eq(ObjectUtils.isNotNull(doc.getClassifyCode()), BDocumentTypes::getClassifyCode, doc.getClassifyCode())
+			.eq(ObjectUtils.isNotNull(doc.getTypeName()), BDocumentTypes::getTypeName, doc.getTypeName())
+			.eq(ObjectUtils.isNotNull(doc.getGroupCode()), BDocumentTypes::getGroupCode, doc.getGroupCode());
+		lqw.orderByAsc(BDocumentTypes::getLineNo);
+
+		List<BDocumentTypes> pages = bDocumentTypesService.list(lqw);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 业务-单证中心分组,各分公司独立
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入bDocumentTypes")
+	public R save(@Valid @RequestBody BDocumentTypes bDocumentTypes) {
+		return R.status(bDocumentTypesService.save(bDocumentTypes));
+	}
+
+	/**
+	 * 修改 业务-单证中心分组,各分公司独立
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入bDocumentTypes")
+	public R update(@Valid @RequestBody BDocumentTypes bDocumentTypes) {
+		return R.status(bDocumentTypesService.updateById(bDocumentTypes));
+	}
+
+	/**
+	 * 新增或修改 业务-单证中心分组,各分公司独立
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入bDocumentTypes")
+	public R submit(@Valid @RequestBody BDocumentTypes bDocumentTypes) {
+		return R.status(bDocumentTypesService.saveOrUpdate(bDocumentTypes));
+	}
+
+
+	/**
+	 * 删除 业务-单证中心分组,各分公司独立
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(bDocumentTypesService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/documentTypes/mapper/BDocumentTypesMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.documentTypes.mapper;
+
+import org.springblade.los.documentTypes.entity.BDocumentTypes;
+import org.springblade.los.documentTypes.vo.BDocumentTypesVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 业务-单证中心分组,各分公司独立 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-08-26
+ */
+public interface BDocumentTypesMapper extends BaseMapper<BDocumentTypes> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param bDocumentTypes
+	 * @return
+	 */
+	List<BDocumentTypesVO> selectBDocumentTypesPage(IPage page, BDocumentTypesVO bDocumentTypes);
+
+}

+ 34 - 0
blade-service/blade-los/src/main/java/org/springblade/los/documentTypes/mapper/BDocumentTypesMapper.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.los.documenttypes.mapper.BDocumentTypesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="bDocumentTypesResultMap" type="org.springblade.los.documenttypes.entity.BDocumentTypes">
+        <id column="id" property="id"/>
+        <result column="branch_id" property="branchId"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_dept_name" property="createDeptName"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_user_name" property="updateUserName"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="business_type" property="businessType"/>
+        <result column="type_name" property="typeName"/>
+        <result column="classify_code" property="classifyCode"/>
+        <result column="group_code" property="groupCode"/>
+        <result column="params" property="params"/>
+        <result column="line_no" property="lineNo"/>
+        <result column="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+    </resultMap>
+
+
+    <select id="selectBDocumentTypesPage" resultMap="bDocumentTypesResultMap">
+        select * from los_b_document_types where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/documentTypes/service/IBDocumentTypesService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.documentTypes.service;
+
+import org.springblade.los.documentTypes.entity.BDocumentTypes;
+import org.springblade.los.documentTypes.vo.BDocumentTypesVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 业务-单证中心分组,各分公司独立 服务类
+ *
+ * @author BladeX
+ * @since 2025-08-26
+ */
+public interface IBDocumentTypesService extends IService<BDocumentTypes> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param bDocumentTypes
+	 * @return
+	 */
+	IPage<BDocumentTypesVO> selectBDocumentTypesPage(IPage<BDocumentTypesVO> page, BDocumentTypesVO bDocumentTypes);
+
+}

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/documentTypes/service/impl/BDocumentTypesServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.documentTypes.service.impl;
+
+import org.springblade.los.documentTypes.entity.BDocumentTypes;
+import org.springblade.los.documentTypes.vo.BDocumentTypesVO;
+import org.springblade.los.documentTypes.mapper.BDocumentTypesMapper;
+import org.springblade.los.documentTypes.service.IBDocumentTypesService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 业务-单证中心分组,各分公司独立 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-08-26
+ */
+@Service
+public class BDocumentTypesServiceImpl extends ServiceImpl<BDocumentTypesMapper, BDocumentTypes> implements IBDocumentTypesService {
+
+	@Override
+	public IPage<BDocumentTypesVO> selectBDocumentTypesPage(IPage<BDocumentTypesVO> page, BDocumentTypesVO bDocumentTypes) {
+		return page.setRecords(baseMapper.selectBDocumentTypesPage(page, bDocumentTypes));
+	}
+
+}