Browse Source

2024年4月29日17:31:32

纪新园 1 year ago
parent
commit
51c8767926
22 changed files with 740 additions and 79 deletions
  1. 7 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/corps/entity/BCorpsTypeDefine.java
  2. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/general/dto/GeneralDatasDTO.java
  3. 169 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/general/entity/GeneralDatas.java
  4. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/general/vo/GeneralDatasVO.java
  5. 1 1
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/genleg/dto/FinPeriodDTO.java
  6. 2 2
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/genleg/entity/FinPeriod.java
  7. 2 2
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/genleg/vo/FinPeriodVO.java
  8. 15 4
      blade-service/blade-land/src/main/java/org/springblade/land/service/impl/TrackLogServiceImpl.java
  9. 18 15
      blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/controller/BCorpsTypeDefineController.java
  10. 14 2
      blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/service/impl/BCorpsServiceImpl.java
  11. 67 34
      blade-service/blade-los/src/main/java/org/springblade/los/basic/cur/service/impl/BCurrencyServiceImpl.java
  12. 147 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/general/controller/GeneralDatasController.java
  13. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/general/mapper/GeneralDatasMapper.java
  14. 38 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/general/mapper/GeneralDatasMapper.xml
  15. 43 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/general/service/IGeneralDatasService.java
  16. 82 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/general/service/impl/GeneralDatasServiceImpl.java
  17. 10 10
      blade-service/blade-los/src/main/java/org/springblade/los/finance/genleg/controller/FinPeriodController.java
  18. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/finance/genleg/mapper/FinPeriodMapper.java
  19. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/finance/genleg/service/IFinPeriodService.java
  20. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/finance/genleg/service/impl/FinPeriodServiceImpl.java
  21. 4 2
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/mapper/OrderItemsMapper.xml
  22. 6 4
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/statistics/service/impl/StatisticsServiceImpl.java

+ 7 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/corps/entity/BCorpsTypeDefine.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.los.basic.corps.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModel;
@@ -140,5 +141,11 @@ public class BCorpsTypeDefine implements Serializable {
 	@ApiModelProperty(value = "租户")
 	private String tenantId;
 
+	/**
+	 * 是否ps客户 0否1是
+	 */
+	@TableField(exist = false)
+	private String type;
+
 
 }

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/general/dto/GeneralDatasDTO.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.basic.general.dto;
+
+import org.springblade.los.basic.general.entity.GeneralDatas;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 基础资料-统一JSON数据管理数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-04-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GeneralDatasDTO extends GeneralDatas {
+	private static final long serialVersionUID = 1L;
+
+}

+ 169 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/general/entity/GeneralDatas.java

@@ -0,0 +1,169 @@
+/*
+ *      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.basic.general.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 基础资料-统一JSON数据管理实体类
+ *
+ * @author BladeX
+ * @since 2024-04-29
+ */
+@Data
+@TableName("los_b_general_datas")
+@ApiModel(value = "GeneralDatas对象", description = "基础资料-统一JSON数据管理")
+public class GeneralDatas implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 分公司 Id
+	*/
+		@ApiModelProperty(value = "分公司 Id")
+		private String branchId;
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+	/**
+	* 创建人 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 Date createTime;
+	/**
+	* 修改人 Id
+	*/
+		@ApiModelProperty(value = "修改人 Id")
+		private Long updateUser;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private String updateUserName;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 业务类型
+	*/
+		@ApiModelProperty(value = "业务类型")
+		private String businessType;
+	/**
+	* 类别
+	*/
+		@ApiModelProperty(value = "类别")
+		private String classifyCode;
+	/**
+	* 组别
+	*/
+		@ApiModelProperty(value = "组别")
+		private String groupCode;
+	/**
+	* 数据编码,用于识别唯一数据
+	*/
+		@ApiModelProperty(value = "数据编码,用于识别唯一数据")
+		private String code;
+	/**
+	* 中文名称
+	*/
+		@ApiModelProperty(value = "中文名称")
+		private String cnName;
+	/**
+	* 英文名称
+	*/
+		@ApiModelProperty(value = "英文名称")
+		private String enName;
+	/**
+	* JSON 数据
+	*/
+		@ApiModelProperty(value = "JSON 数据")
+		private String content;
+	/**
+	* 授权用户
+	*/
+		@ApiModelProperty(value = "授权用户")
+		private String authorizedUsers;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+	/**
+	* 文件地址
+	*/
+		@ApiModelProperty(value = "文件地址")
+		private String url;
+	/**
+	* 授权用户id
+	*/
+		@ApiModelProperty(value = "授权用户id")
+		private String authorizedUsersId;
+
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/general/vo/GeneralDatasVO.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.basic.general.vo;
+
+import org.springblade.los.basic.general.entity.GeneralDatas;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 基础资料-统一JSON数据管理视图实体类
+ *
+ * @author BladeX
+ * @since 2024-04-29
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GeneralDatasVO对象", description = "基础资料-统一JSON数据管理")
+public class GeneralDatasVO extends GeneralDatas {
+	private static final long serialVersionUID = 1L;
+
+}

+ 1 - 1
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/genleg/dto/FinPeriodDTO.java

@@ -21,7 +21,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 /**
- * 业务-财务期间,各分公司独立数据传输对象实体类
+ * 业务-财务期间数据传输对象实体类
  *
  * @author BladeX
  * @since 2024-02-29

+ 2 - 2
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/genleg/entity/FinPeriod.java

@@ -26,14 +26,14 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
 /**
- * 业务-财务期间,各分公司独立实体类
+ * 业务-财务期间实体类
  *
  * @author BladeX
  * @since 2024-02-29
  */
 @Data
 @TableName("los_fin_period")
-@ApiModel(value = "FinPeriod对象", description = "业务-财务期间,各分公司独立")
+@ApiModel(value = "FinPeriod对象", description = "业务-财务期间")
 public class FinPeriod implements Serializable {
 
 	private static final long serialVersionUID = 1L;

+ 2 - 2
blade-service-api/blade-los-api/src/main/java/org/springblade/los/finance/genleg/vo/FinPeriodVO.java

@@ -22,14 +22,14 @@ import lombok.EqualsAndHashCode;
 import io.swagger.annotations.ApiModel;
 
 /**
- * 业务-财务期间,各分公司独立视图实体类
+ * 业务-财务期间视图实体类
  *
  * @author BladeX
  * @since 2024-02-29
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "FinPeriodVO对象", description = "业务-财务期间,各分公司独立")
+@ApiModel(value = "FinPeriodVO对象", description = "业务-财务期间")
 public class FinPeriodVO extends FinPeriod {
 	private static final long serialVersionUID = 1L;
 

+ 15 - 4
blade-service/blade-land/src/main/java/org/springblade/land/service/impl/TrackLogServiceImpl.java

@@ -67,8 +67,19 @@ public class TrackLogServiceImpl extends ServiceImpl<TrackLogMapper, TrackLog> i
 		if (ObjectUtil.isEmpty(key)) {
 			throw new RuntimeException("获取请求token失败");
 		}
-
 		Map<String, Object> data = new HashMap<>();
+		/*
+		List<Double> location = new ArrayList<>();
+		location.add(36.015307);
+		location.add(120.185495);
+
+
+		data.put("location", location);
+		data.put("address", "山东省青岛市城阳区入口,东南方向,157.0米");
+		data.put("time", "1714353322000");
+		data.put("speed", "25.4");
+		data.put("mileage", "137420.8");
+		data.put("distance", "");*/
 		try {
 			Map<String, String> map = new HashMap<>(5);
 			map.put("token", key.getToken());
@@ -113,14 +124,14 @@ public class TrackLogServiceImpl extends ServiceImpl<TrackLogMapper, TrackLog> i
 	 */
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public Map<String, Object> realtimeData(TrackLog trackLog){
+	public Map<String, Object> realtimeData(TrackLog trackLog) {
 		TrackKey key = CacheUtil.get(LandConst.LAND_CACHE, LandConst.TRACK_TOKEN, trackLog.getTenantId(), TrackKey.class, false);
 		if (ObjectUtil.isEmpty(key)) {
 			throw new RuntimeException("获取请求token失败");
 		}
 		//获得车辆信息
 		LandVehicle landVehicle = vehicleClient.selectByPlateNo(trackLog.getPlateNo());
-		if (ObjectUtil.isEmpty(landVehicle)){
+		if (ObjectUtil.isEmpty(landVehicle)) {
 			throw new SecurityException("车辆信息异常");
 		}
 
@@ -167,7 +178,7 @@ public class TrackLogServiceImpl extends ServiceImpl<TrackLogMapper, TrackLog> i
 	 */
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public Map<String, Object> queryTrackData(TrackLog trackLog){
+	public Map<String, Object> queryTrackData(TrackLog trackLog) {
 		TrackKey key = CacheUtil.get(LandConst.LAND_CACHE, LandConst.TRACK_TOKEN, trackLog.getTenantId(), TrackKey.class, false);
 		if (ObjectUtil.isEmpty(key)) {
 			throw new RuntimeException("获取请求token失败");

+ 18 - 15
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/controller/BCorpsTypeDefineController.java

@@ -17,18 +17,16 @@
 package org.springblade.los.basic.corps.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 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.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
+import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
@@ -38,15 +36,15 @@ import org.springblade.core.secure.utils.SecureUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.los.excel.BCorpsTypeDefineExcel;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.los.basic.corps.entity.BCorpsTypeDefine;
-import org.springblade.los.basic.corps.vo.BCorpsTypeDefineVO;
 import org.springblade.los.basic.corps.service.IBCorpsTypeDefineService;
-import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.los.basic.corps.vo.BCorpsTypeDefineVO;
+import org.springblade.los.excel.BCorpsTypeDefineExcel;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -84,11 +82,16 @@ public class BCorpsTypeDefineController extends BladeController {
 	public R<IPage<BCorpsTypeDefine>> list(BCorpsTypeDefine bCorpsTypeDefine, Query query) {
 		LambdaQueryWrapper<BCorpsTypeDefine> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(BCorpsTypeDefine::getTenantId, AuthUtil.getTenantId())
-			.eq(BCorpsTypeDefine::getIsDeleted, 0)
-			.like(ObjectUtils.isNotNull(bCorpsTypeDefine.getCnName()), BCorpsTypeDefine::getCnName, bCorpsTypeDefine.getCnName())
-			.like(ObjectUtils.isNotNull(bCorpsTypeDefine.getCorpType()), BCorpsTypeDefine::getCorpType, bCorpsTypeDefine.getCorpType())
-			.eq(ObjectUtils.isNotNull(bCorpsTypeDefine.getParentId()), BCorpsTypeDefine::getParentId, bCorpsTypeDefine.getParentId())
-			.eq(ObjectUtils.isNotNull(bCorpsTypeDefine.getStatus()), BCorpsTypeDefine::getStatus, bCorpsTypeDefine.getStatus());
+			.eq(BCorpsTypeDefine::getIsDeleted, 0);
+		if ("0".equals(bCorpsTypeDefine.getType())) {
+			lambdaQueryWrapper.ne(BCorpsTypeDefine::getCorpType, "PS客户");
+			lambdaQueryWrapper.like(ObjectUtils.isNotNull(bCorpsTypeDefine.getCnName()), BCorpsTypeDefine::getCnName, bCorpsTypeDefine.getCnName())
+				.like(ObjectUtils.isNotNull(bCorpsTypeDefine.getCorpType()), BCorpsTypeDefine::getCorpType, bCorpsTypeDefine.getCorpType())
+				.eq(ObjectUtils.isNotNull(bCorpsTypeDefine.getParentId()), BCorpsTypeDefine::getParentId, bCorpsTypeDefine.getParentId())
+				.eq(ObjectUtils.isNotNull(bCorpsTypeDefine.getStatus()), BCorpsTypeDefine::getStatus, bCorpsTypeDefine.getStatus());
+		} else {
+			lambdaQueryWrapper.eq(BCorpsTypeDefine::getCorpType, "PS客户");
+		}
 		IPage<BCorpsTypeDefine> pages = bCorpsTypeDefineService.page(Condition.getPage(query), lambdaQueryWrapper);
 		return R.data(pages);
 	}

+ 14 - 2
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/service/impl/BCorpsServiceImpl.java

@@ -112,6 +112,11 @@ public class BCorpsServiceImpl extends ServiceImpl<CorpsMapper, BCorps> implemen
 			.eq(BCorps::getTenantId, AuthUtil.getTenantId())
 			.eq(BCorps::getBranchId, deptUtils.getDeptPid())
 			.eq(BCorps::getIsDeleted, 0));
+		List<BCorps> shortName = baseMapper.selectList(new LambdaQueryWrapper<BCorps>()
+			.eq(BCorps::getCnName, bCorps.getShortName())
+			.eq(BCorps::getTenantId, AuthUtil.getTenantId())
+			.eq(BCorps::getBranchId, deptUtils.getDeptPid())
+			.eq(BCorps::getIsDeleted, 0));
 		List<BCorps> uscc = baseMapper.selectList(new LambdaQueryWrapper<BCorps>()
 			.eq(BCorps::getUscc, bCorps.getUscc())
 			.eq(BCorps::getTenantId, AuthUtil.getTenantId())
@@ -130,6 +135,9 @@ public class BCorpsServiceImpl extends ServiceImpl<CorpsMapper, BCorps> implemen
 			if (!uscc.isEmpty()) {
 				throw new RuntimeException("统一社会信用代码不允许重复");
 			}
+			if (!shortName.isEmpty()) {
+				throw new RuntimeException("简称不允许重复");
+			}
 			bCorps.setCreateTime(new Date());
 			bCorps.setCreateUser(AuthUtil.getUserId());
 			bCorps.setCreateUserName(AuthUtil.getUserName());
@@ -143,11 +151,15 @@ public class BCorpsServiceImpl extends ServiceImpl<CorpsMapper, BCorps> implemen
 		} else {
 			List<Long> ids = cname.stream().map(BCorps::getId).distinct().collect(Collectors.toList());
 			List<Long> ids1 = uscc.stream().map(BCorps::getId).distinct().collect(Collectors.toList());
+			List<Long> ids2 = shortName.stream().map(BCorps::getId).distinct().collect(Collectors.toList());
 			if (!cname.isEmpty() && !ids.contains(bCorps.getId())) {
 				throw new RuntimeException("中文名称不允许重复");
 			}
-			if (!uscc.isEmpty() && !ids1.contains(bCorps.getId())) {
-				throw new RuntimeException("统一社会信用代码不允许重复");
+			if (!shortName.isEmpty() && !ids.contains(bCorps.getId())) {
+				throw new RuntimeException("中文名称不允许重复");
+			}
+			if (!uscc.isEmpty() && !ids2.contains(bCorps.getId())) {
+				throw new RuntimeException("简称不允许重复");
 			}
 			BCorps bCorps1 = baseMapper.selectById(bCorps.getId());
 			if (bCorps1 != null){

+ 67 - 34
blade-service/blade-los/src/main/java/org/springblade/los/basic/cur/service/impl/BCurrencyServiceImpl.java

@@ -101,6 +101,7 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 		this.saveOrUpdate(bCurrency);
 		if (ObjectUtils.isNotNull(bCurrency.getCurExrateList())) {
 			for (BCurExrate item : bCurrency.getCurExrateList()) {
+				item.setType(bCurrency.getParitiesType());
 				item.setCode(bCurrency.getCode());
 				if (item.getId() == null) {
 					item.setCreateTime(new Date());
@@ -213,23 +214,31 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 			BigDecimal CNY;
 			if ("D".equals(dc)) {
 				if (ObjectUtils.isNull(bCurExrate)) {
-					throw new RuntimeException("未找到" + year + "年,币别为" + curCode + "汇率信息");
+					throw new RuntimeException("请维护" + year + "年," + curCode + "汇率");
 				}
 				if (ObjectUtils.isNull(bCurExrate.getExrateReceipts()) &&
 					new BigDecimal("0.00").compareTo(bCurExrate.getExrateReceipts()) == 0) {
-					throw new RuntimeException("未找到" + year + "年,币别为" + curCode + "实收汇率信息");
+					throw new RuntimeException("请维护" + year + "年," + curCode + "实收汇率");
 				} else {
-					CNY = amount.multiply(bCurExrate.getExrateReceipts());
+					if ("1".equals(type)) {
+						CNY = amount.multiply(bCurExrate.getExrateReceivable());
+					}else{
+						CNY = amount.multiply(bCurExrate.getExrateReceipts());
+					}
 				}
 			} else if ("C".equals(dc)) {
 				if (ObjectUtils.isNull(bCurExrate)) {
-					throw new RuntimeException("未找到" + year + "年,币别为" + curCode + "汇率信息");
+					throw new RuntimeException("请维护" + year + "年," + curCode + "汇率");
 				}
 				if (ObjectUtils.isNull(bCurExrate.getExratePayment()) &&
 					new BigDecimal("0.00").compareTo(bCurExrate.getExratePayment()) == 0) {
-					throw new RuntimeException("未找到" + year + "年,币别为" + curCode + "实付汇率信息");
+					throw new RuntimeException("请维护" + year + "年," + curCode + "实付汇率");
 				} else {
-					CNY = amount.multiply(bCurExrate.getExratePayment());
+					if ("1".equals(type)) {
+						CNY = amount.multiply(bCurExrate.getExratePayable());
+					}else{
+						CNY = amount.multiply(bCurExrate.getExratePayment());
+					}
 				}
 			} else {
 				CNY = amount.multiply(bCurrency.getExrate());
@@ -251,32 +260,40 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 				BCurExrate bCurExrateUsd = bCurExrateService.getOne(lambdaQueryWrapperUsd);
 				if ("D".equals(dc)) {
 					if (ObjectUtils.isNull(bCurExrateUsd)) {
-						throw new RuntimeException("未找到" + year + "年,币别为USD汇率信息");
+						throw new RuntimeException("请维护" + year + "年,USD汇率");
 					}
 					if (ObjectUtils.isNull(bCurExrateUsd.getExrateReceipts()) &&
 						new BigDecimal("0.00").compareTo(bCurExrateUsd.getExrateReceipts()) == 0) {
-						throw new RuntimeException("未找到" + year + "年,币别为" + curCode + "实收汇率信息");
+						throw new RuntimeException("请维护" + year + "年," + curCode + "实收汇率");
 					} else {
-						USD = CNY.divide(bCurExrateUsd.getExrateReceipts(), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);
+						if ("1".equals(type)) {
+							USD = CNY.divide(bCurExrateUsd.getExrateReceivable(), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);
+						}else{
+							USD = CNY.divide(bCurExrateUsd.getExrateReceipts(), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);
+						}
 					}
 				} else if ("C".equals(dc)) {
 					if (ObjectUtils.isNull(bCurExrateUsd)) {
-						throw new RuntimeException("未找到" + year + "年,币别为USD汇率信息");
+						throw new RuntimeException("请维护" + year + "年,USD汇率");
 					}
 					if (ObjectUtils.isNull(bCurExrateUsd.getExratePayment()) &&
 						new BigDecimal("0.00").compareTo(bCurExrateUsd.getExratePayment()) == 0) {
-						throw new RuntimeException("未找到" + year + "年,币别为" + curCode + "实付汇率信息");
+						throw new RuntimeException("请维护" + year + "年," + curCode + "实付汇率");
 					} else {
-						USD = CNY.divide(bCurExrateUsd.getExratePayment(), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);
+						if ("1".equals(type)) {
+							USD = CNY.divide(bCurExrateUsd.getExratePayable(), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);
+						}else{
+							USD = CNY.divide(bCurExrateUsd.getExratePayment(), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);
+						}
 					}
 				} else {
 					USD = CNY.divide(bCurrencyUsd.getExrate(), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP);
 				}
 			} else {
-				throw new RuntimeException("未找到币别汇率信息");
+				throw new RuntimeException("请维护币别汇率");
 			}
 		} else {
-			throw new RuntimeException("未找到币别汇率信息");
+			throw new RuntimeException("请维护币别汇率");
 		}
 		return USD;
 	}
@@ -322,30 +339,38 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 			BCurExrate bCurExrate = bCurExrateService.getOne(lambdaQueryWrapper);
 			if ("D".equals(dc)) {
 				if (ObjectUtils.isNull(bCurExrate)) {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为USD汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月,USD汇率");
 				}
 				if (ObjectUtils.isNull(bCurExrate.getExrateReceipts()) &&
 					new BigDecimal("0.00").compareTo(bCurExrate.getExrateReceipts()) == 0) {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为" + curCode + "实收汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月," + curCode + "实收汇率");
 				} else {
-					CNY = amount.multiply(bCurExrate.getExrateReceipts());
+					if ("1".equals(type)) {
+						CNY = amount.multiply(bCurExrate.getExrateReceivable());
+					}else{
+						CNY = amount.multiply(bCurExrate.getExrateReceipts());
+					}
 				}
 			} else if ("C".equals(dc)) {
 				if (ObjectUtils.isNull(bCurExrate)) {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为USD汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月,USD汇率");
 				}
 				if (ObjectUtils.isNull(bCurExrate.getExratePayment()) &&
 					new BigDecimal("0.00").compareTo(bCurExrate.getExratePayment()) == 0) {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为" + curCode + "实付汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月," + curCode + "实付汇率");
 				} else {
-					CNY = amount.multiply(bCurExrate.getExratePayment());
+					if ("1".equals(type)) {
+						CNY = amount.multiply(bCurExrate.getExratePayable());
+					}else{
+						CNY = amount.multiply(bCurExrate.getExratePayment());
+					}
 				}
 			} else {
 				CNY = amount.multiply(bCurrency.getExrate());
 			}
 
 		} else {
-			throw new RuntimeException("未找到币别汇率信息");
+			throw new RuntimeException("请维护币别汇率");
 		}
 		return CNY;
 	}
@@ -391,30 +416,38 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 			BCurExrate bCurExrate = bCurExrateService.getOne(lambdaQueryWrapper);
 			if ("D".equals(dc)) {
 				if (ObjectUtils.isNull(bCurExrate)) {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为USD汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月,USD汇率");
 				}
 				if (ObjectUtils.isNull(bCurExrate.getExrateReceipts()) &&
 					new BigDecimal("0.00").compareTo(bCurExrate.getExrateReceipts()) == 0) {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为" + curCode + "实收汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月," + curCode + "实收汇率");
 				} else {
-					CNY = bCurExrate.getExrateReceipts();
+					if ("1".equals(type)) {
+						CNY = bCurExrate.getExrateReceivable();
+					}else{
+						CNY = bCurExrate.getExrateReceipts();
+					}
 				}
 			} else if ("C".equals(dc)) {
 				if (ObjectUtils.isNull(bCurExrate)) {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为USD汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月,USD汇率");
 				}
 				if (ObjectUtils.isNull(bCurExrate.getExratePayment()) &&
 					new BigDecimal("0.00").compareTo(bCurExrate.getExratePayment()) == 0) {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为" + curCode + "实付汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月," + curCode + "实付汇率");
 				} else {
-					CNY = bCurExrate.getExratePayment();
+					if ("1".equals(type)) {
+						CNY = bCurExrate.getExratePayable();
+					}else{
+						CNY = bCurExrate.getExratePayment();
+					}
 				}
 			} else {
 				CNY = bCurrency.getExrate();
 			}
 
 		} else {
-			throw new RuntimeException("未找到币别汇率信息");
+			throw new RuntimeException("请维护币别汇率");
 		}
 		return CNY;
 	}
@@ -452,30 +485,30 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 				BCurExrate bCurExrate = bCurExrateService.getOne(lambdaQueryWrapper);
 				if ("D".equals(bCurrency.getDc())) {
 					if (ObjectUtils.isNull(bCurExrate)) {
-						throw new RuntimeException("未找到" + year + "年" + month + "月,币别为USD汇率信息");
+						throw new RuntimeException("请维护" + year + "年" + month + "月,"+details.getCode()+"汇率");
 					}
 					if (ObjectUtils.isNull(bCurExrate.getExrateReceipts()) &&
 						new BigDecimal("0.00").compareTo(bCurExrate.getExrateReceipts()) == 0) {
-						throw new RuntimeException("未找到" + year + "年" + month + "月,币别为" + bCurrency.getCode() + "实收汇率信息");
+						throw new RuntimeException("请维护" + year + "年" + month + "月," + details.getCode() + "实收汇率");
 					} else {
 						details.setExrate(bCurExrate.getExrateReceipts());
 					}
 				} else if ("C".equals(bCurrency.getDc())) {
 					if (ObjectUtils.isNull(bCurExrate)) {
-						throw new RuntimeException("未找到" + year + "年" + month + "月,币别为USD汇率信息");
+						throw new RuntimeException("请维护" + year + "年" + month + "月,"+details.getCode()+"汇率");
 					}
 					if (ObjectUtils.isNull(bCurExrate.getExratePayment()) &&
 						new BigDecimal("0.00").compareTo(bCurExrate.getExratePayment()) == 0) {
-						throw new RuntimeException("未找到" + year + "年" + month + "月,币别为" + bCurrency.getCode() + "实付汇率信息");
+						throw new RuntimeException("请维护" + year + "年" + month + "月," + details.getCode() + "实付汇率");
 					} else {
 						details.setExrate(bCurExrate.getExratePayment());
 					}
 				} else {
-					throw new RuntimeException("未找到" + year + "年" + month + "月,币别为USD汇率信息");
+					throw new RuntimeException("请维护" + year + "年" + month + "月," + details.getCode() + "汇率");
 				}
 
 			} else {
-				throw new RuntimeException("未找到币别汇率信息");
+				throw new RuntimeException("请维护币别汇率");
 			}
 		}
 		return bCurrencyList;

+ 147 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/general/controller/GeneralDatasController.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.basic.general.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.Util.IDeptUtils;
+import org.springblade.los.basic.cur.entity.BCurExrate;
+import org.springblade.los.basic.reports.entity.Reports;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.basic.general.entity.GeneralDatas;
+import org.springblade.los.basic.general.vo.GeneralDatasVO;
+import org.springblade.los.basic.general.service.IGeneralDatasService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 基础资料-统一JSON数据管理 控制器
+ *
+ * @author BladeX
+ * @since 2024-04-29
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/generaldatas")
+@Api(value = "基础资料-统一JSON数据管理", tags = "基础资料-统一JSON数据管理接口")
+public class GeneralDatasController extends BladeController {
+
+	private final IGeneralDatasService generalDatasService;
+
+	private final IDeptUtils deptUtils;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入generalDatas")
+	public R<GeneralDatas> detail(GeneralDatas generalDatas) {
+		GeneralDatas detail = generalDatasService.getOne(Condition.getQueryWrapper(generalDatas));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 基础资料-统一JSON数据管理
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入generalDatas")
+	public R<IPage<GeneralDatas>> list(GeneralDatas generalDatas, Query query) {
+		LambdaQueryWrapper<GeneralDatas> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(GeneralDatas::getTenantId, AuthUtil.getTenantId())
+			.eq(GeneralDatas::getIsDeleted, 0)
+			.eq(GeneralDatas::getBranchId, deptUtils.getDeptPid())
+			.like(ObjectUtils.isNotNull(generalDatas.getCnName()),GeneralDatas::getCnName, generalDatas.getCnName())
+			.apply(ObjectUtils.isNotNull(generalDatas.getCode()), "find_in_set(code,'" + generalDatas.getCode() + "')")
+			.apply(ObjectUtils.isNotNull(generalDatas.getGroupCode()), "find_in_set(group_code,'" + generalDatas.getGroupCode() + "')")
+			.eq(ObjectUtils.isNotNull(generalDatas.getBusinessType()), GeneralDatas::getBusinessType, generalDatas.getBusinessType());
+		if ("AMEND".equals(generalDatas.getBusinessType())) {
+			lambdaQueryWrapper.apply(ObjectUtils.isNotNull(generalDatas.getClassifyCode()), "find_in_set(classify_code,'" + generalDatas.getClassifyCode() + "')");
+		} else {
+			lambdaQueryWrapper.eq(ObjectUtils.isNotNull(generalDatas.getClassifyCode()), GeneralDatas::getClassifyCode, generalDatas.getClassifyCode());
+		}
+		IPage<GeneralDatas> pages = generalDatasService.page(Condition.getPage(query), Condition.getQueryWrapper(generalDatas));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 基础资料-统一JSON数据管理
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入generalDatas")
+	public R<IPage<GeneralDatasVO>> page(GeneralDatasVO generalDatas, Query query) {
+		IPage<GeneralDatasVO> pages = generalDatasService.selectGeneralDatasPage(Condition.getPage(query), generalDatas);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 基础资料-统一JSON数据管理
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入generalDatas")
+	public R save(@Valid @RequestBody GeneralDatas generalDatas) {
+		return R.status(generalDatasService.save(generalDatas));
+	}
+
+	/**
+	 * 修改 基础资料-统一JSON数据管理
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入generalDatas")
+	public R update(@Valid @RequestBody GeneralDatas generalDatas) {
+		return R.status(generalDatasService.updateById(generalDatas));
+	}
+
+	/**
+	 * 新增或修改 基础资料-统一JSON数据管理
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入generalDatas")
+	public R submit(@Valid @RequestBody GeneralDatas generalDatas) {
+		return generalDatasService.submit(generalDatas);
+	}
+
+
+	/**
+	 * 删除 基础资料-统一JSON数据管理
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(generalDatasService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/general/mapper/GeneralDatasMapper.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.basic.general.mapper;
+
+import org.springblade.los.basic.general.entity.GeneralDatas;
+import org.springblade.los.basic.general.vo.GeneralDatasVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 基础资料-统一JSON数据管理 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-04-29
+ */
+public interface GeneralDatasMapper extends BaseMapper<GeneralDatas> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param generalDatas
+	 * @return
+	 */
+	List<GeneralDatasVO> selectGeneralDatasPage(IPage page, GeneralDatasVO generalDatas);
+
+}

+ 38 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/general/mapper/GeneralDatasMapper.xml

@@ -0,0 +1,38 @@
+<?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.basic.general.mapper.GeneralDatasMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="generalDatasResultMap" type="org.springblade.los.basic.general.entity.GeneralDatas">
+        <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="classify_code" property="classifyCode"/>
+        <result column="group_code" property="groupCode"/>
+        <result column="code" property="code"/>
+        <result column="cn_name" property="cnName"/>
+        <result column="en_name" property="enName"/>
+        <result column="content" property="content"/>
+        <result column="authorized_users" property="authorizedUsers"/>
+        <result column="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="remarks" property="remarks"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="url" property="url"/>
+        <result column="authorized_users_id" property="authorizedUsersId"/>
+    </resultMap>
+
+
+    <select id="selectGeneralDatasPage" resultMap="generalDatasResultMap">
+        select * from los_b_general_datas where is_deleted = 0
+    </select>
+
+</mapper>

+ 43 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/general/service/IGeneralDatasService.java

@@ -0,0 +1,43 @@
+/*
+ *      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.basic.general.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.los.basic.general.entity.GeneralDatas;
+import org.springblade.los.basic.general.vo.GeneralDatasVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 基础资料-统一JSON数据管理 服务类
+ *
+ * @author BladeX
+ * @since 2024-04-29
+ */
+public interface IGeneralDatasService extends IService<GeneralDatas> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param generalDatas
+	 * @return
+	 */
+	IPage<GeneralDatasVO> selectGeneralDatasPage(IPage<GeneralDatasVO> page, GeneralDatasVO generalDatas);
+
+	R submit(GeneralDatas generalDatas);
+}

+ 82 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/general/service/impl/GeneralDatasServiceImpl.java

@@ -0,0 +1,82 @@
+/*
+ *      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.basic.general.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.los.Util.IDeptUtils;
+import org.springblade.los.basic.general.entity.GeneralDatas;
+import org.springblade.los.basic.general.vo.GeneralDatasVO;
+import org.springblade.los.basic.general.mapper.GeneralDatasMapper;
+import org.springblade.los.basic.general.service.IGeneralDatasService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.los.basic.units.entity.BUnits;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 基础资料-统一JSON数据管理 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-04-29
+ */
+@Service
+@AllArgsConstructor
+public class GeneralDatasServiceImpl extends ServiceImpl<GeneralDatasMapper, GeneralDatas> implements IGeneralDatasService {
+
+
+	private final ISysClient sysClient;
+
+	private final IDeptUtils deptUtils;
+
+	@Override
+	public IPage<GeneralDatasVO> selectGeneralDatasPage(IPage<GeneralDatasVO> page, GeneralDatasVO generalDatas) {
+		return page.setRecords(baseMapper.selectGeneralDatasPage(page, generalDatas));
+	}
+
+	@Override
+	public R submit(GeneralDatas generalDatas) {
+		if (generalDatas.getId() == null) {
+			generalDatas.setCreateTime(new Date());
+			generalDatas.setCreateUser(AuthUtil.getUserId());
+			generalDatas.setCreateUserName(AuthUtil.getUserName());
+			//获取部门ids对应中文名
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid() + "")) {
+				generalDatas.setCreateDept(AuthUtil.getDeptId());
+				generalDatas.setBranchId(deptUtils.getDeptPid() + "");
+				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
+					generalDatas.setCreateDeptName(String.join(",", res.getData()));
+				}
+			}
+		} else {
+			generalDatas.setUpdateUser(AuthUtil.getUserId());
+			generalDatas.setUpdateTime(new Date());
+			generalDatas.setUpdateUserName(AuthUtil.getUserName());
+		}
+		this.saveOrUpdate(generalDatas);
+		return R.data(generalDatas);
+	}
+
+}

+ 10 - 10
blade-service/blade-los/src/main/java/org/springblade/los/finance/genleg/controller/FinPeriodController.java

@@ -35,7 +35,7 @@ import org.springblade.los.finance.genleg.service.IFinPeriodService;
 import org.springblade.core.boot.ctrl.BladeController;
 
 /**
- * 业务-财务期间,各分公司独立 控制器
+ * 业务-财务期间 控制器
  *
  * @author BladeX
  * @since 2024-02-29
@@ -43,7 +43,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 @RestController
 @AllArgsConstructor
 @RequestMapping("/finperiod")
-@Api(value = "业务-财务期间,各分公司独立", tags = "业务-财务期间,各分公司独立接口")
+@Api(value = "业务-财务期间", tags = "业务-财务期间接口")
 public class FinPeriodController extends BladeController {
 
 	private final IFinPeriodService finPeriodService;
@@ -60,7 +60,7 @@ public class FinPeriodController extends BladeController {
 	}
 
 	/**
-	 * 分页 业务-财务期间,各分公司独立
+	 * 分页 业务-财务期间
 	 */
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
@@ -71,7 +71,7 @@ public class FinPeriodController extends BladeController {
 	}
 
 	/**
-	 * 自定义分页 业务-财务期间,各分公司独立
+	 * 自定义分页 业务-财务期间
 	 */
 	@GetMapping("/page")
 	@ApiOperationSupport(order = 3)
@@ -82,7 +82,7 @@ public class FinPeriodController extends BladeController {
 	}
 
 	/**
-	 * 新增 业务-财务期间,各分公司独立
+	 * 新增 业务-财务期间
 	 */
 	@PostMapping("/save")
 	@ApiOperationSupport(order = 4)
@@ -92,7 +92,7 @@ public class FinPeriodController extends BladeController {
 	}
 
 	/**
-	 * 修改 业务-财务期间,各分公司独立
+	 * 修改 业务-财务期间
 	 */
 	@PostMapping("/update")
 	@ApiOperationSupport(order = 5)
@@ -102,7 +102,7 @@ public class FinPeriodController extends BladeController {
 	}
 
 	/**
-	 * 新增或修改 业务-财务期间,各分公司独立
+	 * 新增或修改 业务-财务期间
 	 */
 	@PostMapping("/submit")
 	@ApiOperationSupport(order = 6)
@@ -111,9 +111,9 @@ public class FinPeriodController extends BladeController {
 		return R.status(finPeriodService.saveOrUpdate(finPeriod));
 	}
 
-	
+
 	/**
-	 * 删除 业务-财务期间,各分公司独立
+	 * 删除 业务-财务期间
 	 */
 	@PostMapping("/remove")
 	@ApiOperationSupport(order = 8)
@@ -122,5 +122,5 @@ public class FinPeriodController extends BladeController {
 		return R.status(finPeriodService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/finance/genleg/mapper/FinPeriodMapper.java

@@ -23,7 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import java.util.List;
 
 /**
- * 业务-财务期间,各分公司独立 Mapper 接口
+ * 业务-财务期间 Mapper 接口
  *
  * @author BladeX
  * @since 2024-02-29

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/finance/genleg/service/IFinPeriodService.java

@@ -22,7 +22,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
 /**
- * 业务-财务期间,各分公司独立 服务类
+ * 业务-财务期间 服务类
  *
  * @author BladeX
  * @since 2024-02-29

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/finance/genleg/service/impl/FinPeriodServiceImpl.java

@@ -25,7 +25,7 @@ import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
 /**
- * 业务-财务期间,各分公司独立 服务实现类
+ * 业务-财务期间 服务实现类
  *
  * @author BladeX
  * @since 2024-02-29

+ 4 - 2
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/mapper/OrderItemsMapper.xml

@@ -45,7 +45,7 @@
         SELECT
         po.customer_name AS customerName,
         bu.real_name AS salerName,
-        po.storage_name AS storageName,
+        psd.cname AS storageName,
         poi.goods_no AS code,
         po.ord_no AS ordNo,
         po.freight AS freight,
@@ -82,6 +82,7 @@
         `pjpf_order_items` poi
         LEFT JOIN pjpf_order po ON poi.pid = po.id
         LEFT JOIN blade_user bu ON po.saler_id = bu.id
+        LEFT JOIN pjpf_storage_desc psd on  po.storage_id = psd.id
         WHERE
         poi.is_deleted = '0'
         AND po.is_deleted = '0'
@@ -126,7 +127,7 @@
         SELECT
         po.customer_name AS customerName,
         po.saler_name AS salerName,
-        po.storage_name AS storageName,
+        psd.cname AS storageName,
         poi.goods_no AS code,
         po.ord_no AS ordNo,
         po.freight AS freight,
@@ -163,6 +164,7 @@
         FROM
         `pjpf_order_items` poi
         LEFT JOIN pjpf_order po ON poi.pid = po.id
+        LEFT JOIN pjpf_storage_desc psd on  po.storage_id = psd.id
         WHERE
         poi.is_deleted = '0'
         AND po.is_deleted = '0'

+ 6 - 4
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/statistics/service/impl/StatisticsServiceImpl.java

@@ -502,8 +502,9 @@ public class StatisticsServiceImpl implements IStatisticsService {
 					.filter(e -> e.getOrdNo().equals(item.getOrdNo())).collect(Collectors.toList());
 				if (!saleDetailDtoList.isEmpty()) {
 					BigDecimal amount = item.getPaymentAmountTl();
+					BigDecimal number = saleDetailDtoList.stream().map(SaleDetailDto::getGoodsNum).reduce(BigDecimal.ZERO, BigDecimal::add);
 					for (SaleDetailDto items : saleDetailDtoList) {
-						if (saleDetailDtoList.size() == 1) {
+						if (saleDetailDtoList.size() == 1 && number.compareTo(new BigDecimal(1)) <= 0) {
 							items.setSubTotalMoney(items.getSubTotalMoney().add(new BigDecimal("5.00")));
 						}
 						if (amount.compareTo(items.getSubTotalMoney()) >= 0) {
@@ -572,7 +573,7 @@ public class StatisticsServiceImpl implements IStatisticsService {
 		if (!saleDetailDtoIPage.isEmpty()) {
 			String billNo = saleDetailDtoIPage.stream().map(SaleDetailDto::getOrdNo).distinct().collect(Collectors.joining(","));
 			List<PjOrder> pjOrderList = orderService.list(new LambdaQueryWrapper<PjOrder>()
-				.eq(PjOrder::getTenantId, AuthUtil.getDeptId())
+				.eq(PjOrder::getTenantId, AuthUtil.getTenantId())
 				.eq(PjOrder::getIsDeleted, 0)
 				.eq(PjOrder::getSalesCompanyId, AuthUtil.getDeptId())
 				.apply("find_in_set(ord_no,'" + billNo + "')"));
@@ -581,8 +582,9 @@ public class StatisticsServiceImpl implements IStatisticsService {
 					.filter(e -> e.getOrdNo().equals(item.getOrdNo())).collect(Collectors.toList());
 				if (!saleDetailDtoList.isEmpty()) {
 					BigDecimal amount = item.getPaymentAmountTl();
+					BigDecimal number = saleDetailDtoList.stream().map(SaleDetailDto::getGoodsNum).reduce(BigDecimal.ZERO, BigDecimal::add);
 					for (SaleDetailDto items : saleDetailDtoList) {
-						if (saleDetailDtoList.size() == 1) {
+						if (saleDetailDtoList.size() == 1 && number.compareTo(new BigDecimal(1)) <= 0) {
 							items.setSubTotalMoney(items.getSubTotalMoney().add(new BigDecimal("5.00")));
 						}
 						if (amount.compareTo(items.getSubTotalMoney()) >= 0) {
@@ -596,6 +598,6 @@ public class StatisticsServiceImpl implements IStatisticsService {
 				}
 			}
 		}
-		return orderItemsService.saleDetailList(saleDetailDto);
+		return saleDetailDtoIPage;
 	}
 }