Browse Source

2023年12月15日17:46:36

纪新园 2 years ago
parent
commit
ba225e1195
16 changed files with 1698 additions and 0 deletions
  1. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/dto/AccItemsOpenblcDTO.java
  2. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/dto/AccountsDTO.java
  3. 355 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/entity/AccItemsOpenblc.java
  4. 364 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/entity/Accounts.java
  5. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/vo/AccItemsOpenblcVO.java
  6. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/vo/AccountsVO.java
  7. 126 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/controller/AccItemsOpenblcController.java
  8. 126 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/controller/AccountsController.java
  9. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/mapper/AccItemsOpenblcMapper.java
  10. 75 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/mapper/AccItemsOpenblcMapper.xml
  11. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/mapper/AccountsMapper.java
  12. 76 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/mapper/AccountsMapper.xml
  13. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/IAccItemsOpenblcService.java
  14. 55 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/IAccountsService.java
  15. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/AccItemsOpenblcServiceImpl.java
  16. 215 0
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/AccountsServiceImpl.java

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/dto/AccItemsOpenblcDTO.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.acc.dto;
+
+import org.springblade.los.basic.acc.entity.AccItemsOpenblc;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 基础资料-科目代码期初余额数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AccItemsOpenblcDTO extends AccItemsOpenblc {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/dto/AccountsDTO.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.acc.dto;
+
+import org.springblade.los.basic.acc.entity.Accounts;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 基础资料-科目代码数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AccountsDTO extends Accounts {
+	private static final long serialVersionUID = 1L;
+
+}

+ 355 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/entity/AccItemsOpenblc.java

@@ -0,0 +1,355 @@
+/*
+ *      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.acc.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 基础资料-科目代码期初余额实体类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@Data
+@TableName("los_b_acc_items_openblc")
+@ApiModel(value = "AccItemsOpenblc对象", description = "基础资料-科目代码期初余额")
+public class AccItemsOpenblc implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 分公司 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 Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 科目代码 id
+	 */
+	@ApiModelProperty(value = "科目代码 id")
+	private Long accountId;
+	/**
+	 * 科目代码
+	 */
+	@ApiModelProperty(value = "科目代码")
+	private String accountCode;
+	/**
+	 * 科目代码中文名称
+	 */
+	@ApiModelProperty(value = "科目代码中文名称")
+	private String accountCnName;
+	/**
+	 * 科目代码英文名称
+	 */
+	@ApiModelProperty(value = "科目代码英文名称")
+	private String accountEnName;
+	/**
+	 * 科目代码中文全称
+	 */
+	@ApiModelProperty(value = "科目代码中文全称")
+	private String accountFullName;
+	/**
+	 * 科目属性,资产、负债、权益等
+	 */
+	@ApiModelProperty(value = "科目属性,资产、负债、权益等")
+	private Integer accountProperty;
+	/**
+	 * 科目级次
+	 */
+	@ApiModelProperty(value = "科目级次")
+	private Integer accountLevel;
+	/**
+	 * 科目代码方向 D=借方, C=贷方
+	 */
+	@ApiModelProperty(value = "科目代码方向 D=借方, C=贷方")
+	private String dc;
+	/**
+	 * 是否外币科目(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否外币科目(0 否 1 是)")
+	private Integer isForeign;
+	/**
+	 * 是否数量科目(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否数量科目(0 否 1 是)")
+	private Integer isQuantity;
+	/**
+	 * 是否核算客户(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否核算客户(0 否 1 是)")
+	private Integer isCorp;
+	/**
+	 * 是否核算部门(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否核算部门(0 否 1 是)")
+	private Integer isDept;
+	/**
+	 * 是否核算职员(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否核算职员(0 否 1 是)")
+	private Integer isEmpl;
+	/**
+	 * 是否核算项目(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否核算项目(0 否 1 是)")
+	private Integer isItem;
+	/**
+	 * 核算客户 id
+	 */
+	@ApiModelProperty(value = "核算客户 id")
+	private Long corpId;
+	/**
+	 * 核算客户中文名称
+	 */
+	@ApiModelProperty(value = "核算客户中文名称")
+	private String corpCnName;
+	/**
+	 * 核算客户英文名称
+	 */
+	@ApiModelProperty(value = "核算客户英文名称")
+	private String corpEnName;
+	/**
+	 * 核算部门 Id
+	 */
+	@ApiModelProperty(value = "核算部门 Id")
+	private Long deptId;
+	/**
+	 * 核算部门
+	 */
+	@ApiModelProperty(value = "核算部门")
+	private String deptName;
+	/**
+	 * 核算职员 Id
+	 */
+	@ApiModelProperty(value = "核算职员 Id")
+	private Long emplId;
+	/**
+	 * 核算职员
+	 */
+	@ApiModelProperty(value = "核算职员")
+	private String emplName;
+	/**
+	 * 核算项目类别 Id
+	 */
+	@ApiModelProperty(value = "核算项目类别 Id")
+	private Long itemClassifyId;
+	/**
+	 * 核算项目类别
+	 */
+	@ApiModelProperty(value = "核算项目类别")
+	private String itemClassify;
+	/**
+	 * 核算项目 Id
+	 */
+	@ApiModelProperty(value = "核算项目 Id")
+	private Long itemId;
+	/**
+	 * 核算项目
+	 */
+	@ApiModelProperty(value = "核算项目")
+	private String itemName;
+	/**
+	 * 币种
+	 */
+	@ApiModelProperty(value = "币种")
+	private String curCode;
+	/**
+	 * 汇率,外币转为本币的汇率
+	 */
+	@ApiModelProperty(value = "汇率,外币转为本币的汇率")
+	private BigDecimal exrate;
+	/**
+	 * 单位
+	 */
+	@ApiModelProperty(value = "单位")
+	private String unitNo;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price;
+	/**
+	 * 期初本币借方金额(CNY)
+	 */
+	@ApiModelProperty(value = "期初本币借方金额(CNY)")
+	private BigDecimal amountOpenDr;
+	/**
+	 * 期初本币贷方金额(CNY)
+	 */
+	@ApiModelProperty(value = "期初本币贷方金额(CNY)")
+	private BigDecimal amountOpenCr;
+	/**
+	 * 期初本币余额(CNY)
+	 */
+	@ApiModelProperty(value = "期初本币余额(CNY)")
+	private BigDecimal amountOpenBlc;
+	/**
+	 * 本期本币借方金额(CNY)
+	 */
+	@ApiModelProperty(value = "本期本币借方金额(CNY)")
+	private BigDecimal amountDr;
+	/**
+	 * 本期本币贷方金额(CNY)
+	 */
+	@ApiModelProperty(value = "本期本币贷方金额(CNY)")
+	private BigDecimal amountCr;
+	/**
+	 * 本期本币余额(CNY)
+	 */
+	@ApiModelProperty(value = "本期本币余额(CNY)")
+	private BigDecimal amountBlc;
+	/**
+	 * 期初外币借方金额
+	 */
+	@ApiModelProperty(value = "期初外币借方金额")
+	private BigDecimal amountOpenDrUsd;
+	/**
+	 * 期初外币贷方金额
+	 */
+	@ApiModelProperty(value = "期初外币贷方金额")
+	private BigDecimal amountOpenCrUsd;
+	/**
+	 * 期初外币期初余额
+	 */
+	@ApiModelProperty(value = "期初外币期初余额")
+	private BigDecimal amountOpenUsdBlc;
+	/**
+	 * 本期外币借方金额
+	 */
+	@ApiModelProperty(value = "本期外币借方金额")
+	private BigDecimal amountDrUsd;
+	/**
+	 * 本期外币贷方金额
+	 */
+	@ApiModelProperty(value = "本期外币贷方金额")
+	private BigDecimal amountCrUsd;
+	/**
+	 * 本期外币余额
+	 */
+	@ApiModelProperty(value = "本期外币余额")
+	private BigDecimal amountUsdBlc;
+	/**
+	 * 期初借方数量
+	 */
+	@ApiModelProperty(value = "期初借方数量")
+	private BigDecimal quantityOpenDr;
+	/**
+	 * 期初贷方数量
+	 */
+	@ApiModelProperty(value = "期初贷方数量")
+	private BigDecimal quantityOpenCr;
+	/**
+	 * 期初数量期初余额
+	 */
+	@ApiModelProperty(value = "期初数量期初余额")
+	private BigDecimal quantityOpenBlc;
+	/**
+	 * 本期数量借方
+	 */
+	@ApiModelProperty(value = "本期数量借方")
+	private BigDecimal quantityDr;
+	/**
+	 * 本期数量贷方
+	 */
+	@ApiModelProperty(value = "本期数量贷方")
+	private BigDecimal quantityCr;
+	/**
+	 * 本期数量余额
+	 */
+	@ApiModelProperty(value = "本期数量余额")
+	private BigDecimal quantityBlc;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	@TableLogic(value = "0", delval = "1")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+}

+ 364 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/entity/Accounts.java

@@ -0,0 +1,364 @@
+/*
+ *      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.acc.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 基础资料-科目代码实体类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@Data
+@TableName("los_b_accounts")
+@ApiModel(value = "Accounts对象", description = "基础资料-科目代码")
+public class Accounts implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 分公司 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 Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 科目代码
+	 */
+	@ApiModelProperty(value = "科目代码")
+	private String code;
+	/**
+	 * 父级科目代码
+	 */
+	@ApiModelProperty(value = "父级科目代码")
+	private String parentCode;
+	/**
+	 * 中文名称
+	 */
+	@ApiModelProperty(value = "中文名称")
+	private String cnName;
+	/**
+	 * 英文名称
+	 */
+	@ApiModelProperty(value = "英文名称")
+	private String enName;
+	/**
+	 * 全称
+	 */
+	@ApiModelProperty(value = "全称")
+	private String fullName;
+	/**
+	 * 科目属性,资产、负债、权益等
+	 */
+	@ApiModelProperty(value = "科目属性,资产、负债、权益等")
+	private Integer property;
+	/**
+	 * 科目级次
+	 */
+	@ApiModelProperty(value = "科目级次")
+	private Integer level;
+	/**
+	 * 方向,D=借方 C=贷方
+	 */
+	@ApiModelProperty(value = "方向,D=借方 C=贷方")
+	private String dc;
+	/**
+	 * 是否末级明细 0=否, 1=是
+	 */
+	@ApiModelProperty(value = "是否末级明细 0=否, 1=是")
+	private Integer isDetail;
+	/**
+	 * 明细账类型
+	 */
+	@ApiModelProperty(value = "明细账类型")
+	private String sublegType;
+	/**
+	 * 分录摘要
+	 */
+	@ApiModelProperty(value = "分录摘要")
+	private String descr;
+	/**
+	 * 是否现金科目 0=否, 1=是
+	 */
+	@ApiModelProperty(value = "是否现金科目 0=否, 1=是")
+	private Integer isCash;
+	/**
+	 * 是否现金等价物 0=否, 1=是
+	 */
+	@ApiModelProperty(value = "是否现金等价物 0=否, 1=是")
+	private Integer isCashEq;
+	/**
+	 * 是否银行科目 0=否, 1=是
+	 */
+	@ApiModelProperty(value = "是否银行科目 0=否, 1=是")
+	private Integer isBank;
+	/**
+	 * 是否出日记账 0=否, 1=是
+	 */
+	@ApiModelProperty(value = "是否出日记账 0=否, 1=是")
+	private Integer isDiary;
+	/**
+	 * 是否核算库存 0=否, 1=是
+	 */
+	@ApiModelProperty(value = "是否核算库存 0=否, 1=是")
+	private Integer isStock;
+	/**
+	 * 是否外币科目(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否外币科目(0 否 1 是)")
+	private Integer isForeign;
+	/**
+	 * 币种
+	 */
+	@ApiModelProperty(value = "币种")
+	private String curCode;
+	/**
+	 * 汇率,外币转为本币的汇率
+	 */
+	@ApiModelProperty(value = "汇率,外币转为本币的汇率")
+	private BigDecimal exrate;
+	/**
+	 * 是否数量科目(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否数量科目(0 否 1 是)")
+	private Integer isQuantity;
+	/**
+	 * 单位
+	 */
+	@ApiModelProperty(value = "单位")
+	private String unitNo;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price;
+	/**
+	 * 是否预算科目 0=否, 1=是
+	 */
+	@ApiModelProperty(value = "是否预算科目 0=否, 1=是")
+	private Integer isBudget;
+	/**
+	 * 预算金额(原币)
+	 */
+	@ApiModelProperty(value = "预算金额(原币)")
+	private BigDecimal amountBudget;
+	/**
+	 * 预算金额(CNY)
+	 */
+	@ApiModelProperty(value = "预算金额(CNY)")
+	private BigDecimal amountBudgetLoc;
+	/**
+	 * 是否核算客户(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否核算客户(0 否 1 是)")
+	private Integer isCorp;
+	/**
+	 * 是否核算部门(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否核算部门(0 否 1 是)")
+	private Integer isDept;
+	/**
+	 * 是否核算职员(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否核算职员(0 否 1 是)")
+	private Integer isEmpl;
+	/**
+	 * 是否核算项目(0 否 1 是)
+	 */
+	@ApiModelProperty(value = "是否核算项目(0 否 1 是)")
+	private Integer isItem;
+	/**
+	 * 核算项目类别 Id
+	 */
+	@ApiModelProperty(value = "核算项目类别 Id")
+	private Long itemClassifyId;
+	/**
+	 * 核算项目类别
+	 */
+	@ApiModelProperty(value = "核算项目类别")
+	private String itemClassify;
+	/**
+	 * 期初本币借方金额(CNY)
+	 */
+	@ApiModelProperty(value = "期初本币借方金额(CNY)")
+	private BigDecimal amountOpenDr;
+	/**
+	 * 期初本币贷方金额(CNY)
+	 */
+	@ApiModelProperty(value = "期初本币贷方金额(CNY)")
+	private BigDecimal amountOpenCr;
+	/**
+	 * 期初本币余额(CNY)
+	 */
+	@ApiModelProperty(value = "期初本币余额(CNY)")
+	private BigDecimal amountOpenBlc;
+	/**
+	 * 本期本币借方金额(CNY)
+	 */
+	@ApiModelProperty(value = "本期本币借方金额(CNY)")
+	private BigDecimal amountDr;
+	/**
+	 * 本期本币贷方金额(CNY)
+	 */
+	@ApiModelProperty(value = "本期本币贷方金额(CNY)")
+	private BigDecimal amountCr;
+	/**
+	 * 本期本币余额(CNY)
+	 */
+	@ApiModelProperty(value = "本期本币余额(CNY)")
+	private BigDecimal amountBlc;
+	/**
+	 * 期初外币借方金额
+	 */
+	@ApiModelProperty(value = "期初外币借方金额")
+	private BigDecimal amountOpenDrUsd;
+	/**
+	 * 期初外币贷方金额
+	 */
+	@ApiModelProperty(value = "期初外币贷方金额")
+	private BigDecimal amountOpenCrUsd;
+	/**
+	 * 期初外币期初余额
+	 */
+	@ApiModelProperty(value = "期初外币期初余额")
+	private BigDecimal amountOpenUsdBlc;
+	/**
+	 * 本期外币借方金额
+	 */
+	@ApiModelProperty(value = "本期外币借方金额")
+	private BigDecimal amountDrUsd;
+	/**
+	 * 本期外币贷方金额
+	 */
+	@ApiModelProperty(value = "本期外币贷方金额")
+	private BigDecimal amountCrUsd;
+	/**
+	 * 本期外币期初余额
+	 */
+	@ApiModelProperty(value = "本期外币期初余额")
+	private BigDecimal amountUsdBlc;
+	/**
+	 * 期初数量借方金额
+	 */
+	@ApiModelProperty(value = "期初数量借方金额")
+	private BigDecimal quantityOpenDr;
+	/**
+	 * 期初数量贷方金额
+	 */
+	@ApiModelProperty(value = "期初数量贷方金额")
+	private BigDecimal quantityOpenCr;
+	/**
+	 * 期初数量期初余额
+	 */
+	@ApiModelProperty(value = "期初数量期初余额")
+	private BigDecimal quantityOpenBlc;
+	/**
+	 * 本期数量借方金额
+	 */
+	@ApiModelProperty(value = "本期数量借方金额")
+	private BigDecimal quantityDr;
+	/**
+	 * 本期数量贷方金额
+	 */
+	@ApiModelProperty(value = "本期数量贷方金额")
+	private BigDecimal quantityCr;
+	/**
+	 * 本期数量期初余额
+	 */
+	@ApiModelProperty(value = "本期数量期初余额")
+	private BigDecimal quantityBlc;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	@TableLogic(value = "0", delval = "1")
+	private Integer status;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+	private List<AccItemsOpenblc> accItemsOpenblcList;
+
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/vo/AccItemsOpenblcVO.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.acc.vo;
+
+import org.springblade.los.basic.acc.entity.AccItemsOpenblc;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 基础资料-科目代码期初余额视图实体类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "AccItemsOpenblcVO对象", description = "基础资料-科目代码期初余额")
+public class AccItemsOpenblcVO extends AccItemsOpenblc {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/basic/acc/vo/AccountsVO.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.acc.vo;
+
+import org.springblade.los.basic.acc.entity.Accounts;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 基础资料-科目代码视图实体类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "AccountsVO对象", description = "基础资料-科目代码")
+public class AccountsVO extends Accounts {
+	private static final long serialVersionUID = 1L;
+
+}

+ 126 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/controller/AccItemsOpenblcController.java

@@ -0,0 +1,126 @@
+/*
+ *      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.acc.controller;
+
+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.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.basic.acc.entity.AccItemsOpenblc;
+import org.springblade.los.basic.acc.vo.AccItemsOpenblcVO;
+import org.springblade.los.basic.acc.service.IAccItemsOpenblcService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 基础资料-科目代码期初余额 控制器
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/accitemsopenblc")
+@Api(value = "基础资料-科目代码期初余额", tags = "基础资料-科目代码期初余额接口")
+public class AccItemsOpenblcController extends BladeController {
+
+	private final IAccItemsOpenblcService accItemsOpenblcService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入accItemsOpenblc")
+	public R<AccItemsOpenblc> detail(AccItemsOpenblc accItemsOpenblc) {
+		AccItemsOpenblc detail = accItemsOpenblcService.getOne(Condition.getQueryWrapper(accItemsOpenblc));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 基础资料-科目代码期初余额
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入accItemsOpenblc")
+	public R<IPage<AccItemsOpenblc>> list(AccItemsOpenblc accItemsOpenblc, Query query) {
+		IPage<AccItemsOpenblc> pages = accItemsOpenblcService.page(Condition.getPage(query), Condition.getQueryWrapper(accItemsOpenblc));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 基础资料-科目代码期初余额
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入accItemsOpenblc")
+	public R<IPage<AccItemsOpenblcVO>> page(AccItemsOpenblcVO accItemsOpenblc, Query query) {
+		IPage<AccItemsOpenblcVO> pages = accItemsOpenblcService.selectAccItemsOpenblcPage(Condition.getPage(query), accItemsOpenblc);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 基础资料-科目代码期初余额
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入accItemsOpenblc")
+	public R save(@Valid @RequestBody AccItemsOpenblc accItemsOpenblc) {
+		return R.status(accItemsOpenblcService.save(accItemsOpenblc));
+	}
+
+	/**
+	 * 修改 基础资料-科目代码期初余额
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入accItemsOpenblc")
+	public R update(@Valid @RequestBody AccItemsOpenblc accItemsOpenblc) {
+		return R.status(accItemsOpenblcService.updateById(accItemsOpenblc));
+	}
+
+	/**
+	 * 新增或修改 基础资料-科目代码期初余额
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入accItemsOpenblc")
+	public R submit(@Valid @RequestBody AccItemsOpenblc accItemsOpenblc) {
+		return R.status(accItemsOpenblcService.saveOrUpdate(accItemsOpenblc));
+	}
+
+	
+	/**
+	 * 删除 基础资料-科目代码期初余额
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(accItemsOpenblcService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 126 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/controller/AccountsController.java

@@ -0,0 +1,126 @@
+/*
+ *      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.acc.controller;
+
+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.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.los.basic.acc.entity.Accounts;
+import org.springblade.los.basic.acc.vo.AccountsVO;
+import org.springblade.los.basic.acc.service.IAccountsService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 基础资料-科目代码 控制器
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/accounts")
+@Api(value = "基础资料-科目代码", tags = "基础资料-科目代码接口")
+public class AccountsController extends BladeController {
+
+	private final IAccountsService accountsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入accounts")
+	public R<Accounts> detail(Accounts accounts) {
+		Accounts detail = accountsService.detail(accounts);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 基础资料-科目代码
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入accounts")
+	public R<IPage<Accounts>> list(Accounts accounts, Query query) {
+		IPage<Accounts> pages = accountsService.page(Condition.getPage(query), Condition.getQueryWrapper(accounts));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 基础资料-科目代码
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入accounts")
+	public R<IPage<AccountsVO>> page(AccountsVO accounts, Query query) {
+		IPage<AccountsVO> pages = accountsService.selectAccountsPage(Condition.getPage(query), accounts);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 基础资料-科目代码
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入accounts")
+	public R save(@Valid @RequestBody Accounts accounts) {
+		return R.status(accountsService.save(accounts));
+	}
+
+	/**
+	 * 修改 基础资料-科目代码
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入accounts")
+	public R update(@Valid @RequestBody Accounts accounts) {
+		return R.status(accountsService.updateById(accounts));
+	}
+
+	/**
+	 * 新增或修改 基础资料-科目代码
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入accounts")
+	public R submit(@Valid @RequestBody Accounts accounts) {
+		return accountsService.submit(accounts);
+	}
+
+
+	/**
+	 * 删除 基础资料-科目代码
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(accountsService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/mapper/AccItemsOpenblcMapper.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.acc.mapper;
+
+import org.springblade.los.basic.acc.entity.AccItemsOpenblc;
+import org.springblade.los.basic.acc.vo.AccItemsOpenblcVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 基础资料-科目代码期初余额 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+public interface AccItemsOpenblcMapper extends BaseMapper<AccItemsOpenblc> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param accItemsOpenblc
+	 * @return
+	 */
+	List<AccItemsOpenblcVO> selectAccItemsOpenblcPage(IPage page, AccItemsOpenblcVO accItemsOpenblc);
+
+}

+ 75 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/mapper/AccItemsOpenblcMapper.xml

@@ -0,0 +1,75 @@
+<?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.acc.mapper.AccItemsOpenblcMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="accItemsOpenblcResultMap" type="org.springblade.los.basic.acc.entity.AccItemsOpenblc">
+        <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="account_id" property="accountId"/>
+        <result column="account_code" property="accountCode"/>
+        <result column="account_cn_name" property="accountCnName"/>
+        <result column="account_en_name" property="accountEnName"/>
+        <result column="account_full_name" property="accountFullName"/>
+        <result column="account_property" property="accountProperty"/>
+        <result column="account_level" property="accountLevel"/>
+        <result column="dc" property="dc"/>
+        <result column="is_foreign" property="isForeign"/>
+        <result column="is_quantity" property="isQuantity"/>
+        <result column="is_corp" property="isCorp"/>
+        <result column="is_dept" property="isDept"/>
+        <result column="is_empl" property="isEmpl"/>
+        <result column="is_item" property="isItem"/>
+        <result column="corp_id" property="corpId"/>
+        <result column="corp_cn_name" property="corpCnName"/>
+        <result column="corp_en_name" property="corpEnName"/>
+        <result column="dept_id" property="deptId"/>
+        <result column="dept_name" property="deptName"/>
+        <result column="empl_id" property="emplId"/>
+        <result column="empl_name" property="emplName"/>
+        <result column="item_classify_id" property="itemClassifyId"/>
+        <result column="item_classify" property="itemClassify"/>
+        <result column="item_id" property="itemId"/>
+        <result column="item_name" property="itemName"/>
+        <result column="cur_code" property="curCode"/>
+        <result column="exrate" property="exrate"/>
+        <result column="unit_no" property="unitNo"/>
+        <result column="price" property="price"/>
+        <result column="amount_open_dr" property="amountOpenDr"/>
+        <result column="amount_open_cr" property="amountOpenCr"/>
+        <result column="amount_open_blc" property="amountOpenBlc"/>
+        <result column="amount_dr" property="amountDr"/>
+        <result column="amount_cr" property="amountCr"/>
+        <result column="amount_blc" property="amountBlc"/>
+        <result column="amount_open_dr_usd" property="amountOpenDrUsd"/>
+        <result column="amount_open_cr_usd" property="amountOpenCrUsd"/>
+        <result column="amount_open_usd_blc" property="amountOpenUsdBlc"/>
+        <result column="amount_dr_usd" property="amountDrUsd"/>
+        <result column="amount_cr_usd" property="amountCrUsd"/>
+        <result column="amount_usd_blc" property="amountUsdBlc"/>
+        <result column="quantity_open_dr" property="quantityOpenDr"/>
+        <result column="quantity_open_cr" property="quantityOpenCr"/>
+        <result column="quantity_open_blc" property="quantityOpenBlc"/>
+        <result column="quantity_dr" property="quantityDr"/>
+        <result column="quantity_cr" property="quantityCr"/>
+        <result column="quantity_blc" property="quantityBlc"/>
+        <result column="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+    </resultMap>
+
+
+    <select id="selectAccItemsOpenblcPage" resultMap="accItemsOpenblcResultMap">
+        select * from los_b_acc_items_openblc where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/mapper/AccountsMapper.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.acc.mapper;
+
+import org.springblade.los.basic.acc.entity.Accounts;
+import org.springblade.los.basic.acc.vo.AccountsVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 基础资料-科目代码 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+public interface AccountsMapper extends BaseMapper<Accounts> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param accounts
+	 * @return
+	 */
+	List<AccountsVO> selectAccountsPage(IPage page, AccountsVO accounts);
+
+}

+ 76 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/mapper/AccountsMapper.xml

@@ -0,0 +1,76 @@
+<?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.acc.mapper.AccountsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="accountsResultMap" type="org.springblade.los.basic.acc.entity.Accounts">
+        <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="code" property="code"/>
+        <result column="parent_code" property="parentCode"/>
+        <result column="cn_name" property="cnName"/>
+        <result column="en_name" property="enName"/>
+        <result column="full_name" property="fullName"/>
+        <result column="property" property="property"/>
+        <result column="level" property="level"/>
+        <result column="dc" property="dc"/>
+        <result column="is_detail" property="isDetail"/>
+        <result column="subleg_type" property="sublegType"/>
+        <result column="descr" property="descr"/>
+        <result column="is_cash" property="isCash"/>
+        <result column="is_cash_eq" property="isCashEq"/>
+        <result column="is_bank" property="isBank"/>
+        <result column="is_diary" property="isDiary"/>
+        <result column="is_stock" property="isStock"/>
+        <result column="is_foreign" property="isForeign"/>
+        <result column="cur_code" property="curCode"/>
+        <result column="exrate" property="exrate"/>
+        <result column="is_quantity" property="isQuantity"/>
+        <result column="unit_no" property="unitNo"/>
+        <result column="price" property="price"/>
+        <result column="is_budget" property="isBudget"/>
+        <result column="amount_budget" property="amountBudget"/>
+        <result column="amount_budget_loc" property="amountBudgetLoc"/>
+        <result column="is_corp" property="isCorp"/>
+        <result column="is_dept" property="isDept"/>
+        <result column="is_empl" property="isEmpl"/>
+        <result column="is_item" property="isItem"/>
+        <result column="item_classify_id" property="itemClassifyId"/>
+        <result column="item_classify" property="itemClassify"/>
+        <result column="amount_open_dr" property="amountOpenDr"/>
+        <result column="amount_open_cr" property="amountOpenCr"/>
+        <result column="amount_open_blc" property="amountOpenBlc"/>
+        <result column="amount_dr" property="amountDr"/>
+        <result column="amount_cr" property="amountCr"/>
+        <result column="amount_blc" property="amountBlc"/>
+        <result column="amount_open_dr_usd" property="amountOpenDrUsd"/>
+        <result column="amount_open_cr_usd" property="amountOpenCrUsd"/>
+        <result column="amount_open_usd_blc" property="amountOpenUsdBlc"/>
+        <result column="amount_dr_usd" property="amountDrUsd"/>
+        <result column="amount_cr_usd" property="amountCrUsd"/>
+        <result column="amount_usd_blc" property="amountUsdBlc"/>
+        <result column="quantity_open_dr_usd" property="quantityOpenDr"/>
+        <result column="quantity_open_cr_usd" property="quantityOpenCr"/>
+        <result column="quantity_open_usd_blc" property="quantityOpenBlc"/>
+        <result column="quantity_dr_usd" property="quantityDr"/>
+        <result column="quantity_cr_usd" property="quantityCr"/>
+        <result column="quantity_usd_blc" property="quantityBlc"/>
+        <result column="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="remarks" property="remarks"/>
+    </resultMap>
+
+
+    <select id="selectAccountsPage" resultMap="accountsResultMap">
+        select * from los_b_accounts where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/IAccItemsOpenblcService.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.basic.acc.service;
+
+import org.springblade.los.basic.acc.entity.AccItemsOpenblc;
+import org.springblade.los.basic.acc.vo.AccItemsOpenblcVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 基础资料-科目代码期初余额 服务类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+public interface IAccItemsOpenblcService extends IService<AccItemsOpenblc> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param accItemsOpenblc
+	 * @return
+	 */
+	IPage<AccItemsOpenblcVO> selectAccItemsOpenblcPage(IPage<AccItemsOpenblcVO> page, AccItemsOpenblcVO accItemsOpenblc);
+
+}

+ 55 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/IAccountsService.java

@@ -0,0 +1,55 @@
+/*
+ *      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.acc.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.los.basic.acc.entity.Accounts;
+import org.springblade.los.basic.acc.vo.AccountsVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 基础资料-科目代码 服务类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+public interface IAccountsService extends IService<Accounts> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param accounts
+	 * @return
+	 */
+	IPage<AccountsVO> selectAccountsPage(IPage<AccountsVO> page, AccountsVO accounts);
+
+	/**
+	 * 详情
+	 * @param accounts
+	 * @return
+	 */
+	Accounts detail(Accounts accounts);
+
+	/**
+	 * 新增或修改 基础资料-科目代码
+	 * @param accounts
+	 * @return
+	 */
+	R submit(Accounts accounts);
+}

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/AccItemsOpenblcServiceImpl.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.basic.acc.service.impl;
+
+import org.springblade.los.basic.acc.entity.AccItemsOpenblc;
+import org.springblade.los.basic.acc.vo.AccItemsOpenblcVO;
+import org.springblade.los.basic.acc.mapper.AccItemsOpenblcMapper;
+import org.springblade.los.basic.acc.service.IAccItemsOpenblcService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 基础资料-科目代码期初余额 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@Service
+public class AccItemsOpenblcServiceImpl extends ServiceImpl<AccItemsOpenblcMapper, AccItemsOpenblc> implements IAccItemsOpenblcService {
+
+	@Override
+	public IPage<AccItemsOpenblcVO> selectAccItemsOpenblcPage(IPage<AccItemsOpenblcVO> page, AccItemsOpenblcVO accItemsOpenblc) {
+		return page.setRecords(baseMapper.selectAccItemsOpenblcPage(page, accItemsOpenblc));
+	}
+
+}

+ 215 - 0
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/AccountsServiceImpl.java

@@ -0,0 +1,215 @@
+/*
+ *      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.acc.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.los.basic.acc.entity.AccItemsOpenblc;
+import org.springblade.los.basic.acc.entity.Accounts;
+import org.springblade.los.basic.acc.mapper.AccountsMapper;
+import org.springblade.los.basic.acc.service.IAccItemsOpenblcService;
+import org.springblade.los.basic.acc.service.IAccountsService;
+import org.springblade.los.basic.acc.vo.AccountsVO;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 基础资料-科目代码 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-12-15
+ */
+@Service
+@AllArgsConstructor
+public class AccountsServiceImpl extends ServiceImpl<AccountsMapper, Accounts> implements IAccountsService {
+
+	private final ISysClient sysClient;
+
+	private final IAccItemsOpenblcService accItemsOpenblcService;
+
+	@Override
+	public IPage<AccountsVO> selectAccountsPage(IPage<AccountsVO> page, AccountsVO accounts) {
+		return page.setRecords(baseMapper.selectAccountsPage(page, accounts));
+	}
+
+	@Override
+	public Accounts detail(Accounts accounts) {
+		Accounts detail = baseMapper.selectById(accounts.getId());
+		detail.setAccItemsOpenblcList(accItemsOpenblcService.list(new LambdaQueryWrapper<AccItemsOpenblc>()
+			.eq(AccItemsOpenblc::getAccountCode, detail.getCode())
+			.eq(AccItemsOpenblc::getAccountId, detail.getId())
+			.eq(AccItemsOpenblc::getTenantId, AuthUtil.getTenantId())));
+		return detail;
+	}
+
+	@Override
+	public R submit(Accounts accounts) {
+		String deptId = "";
+		String deptName = "";
+		//获取部门ids对应中文名
+		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			deptId = AuthUtil.getDeptId();
+			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
+				deptName = String.join(",", res.getData());
+			}
+		}
+		if (accounts.getId() == null) {
+			accounts.setCreateTime(new Date());
+			accounts.setCreateUser(AuthUtil.getUserId());
+			accounts.setCreateUserName(AuthUtil.getUserName());
+			//获取部门ids对应中文名
+			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+				accounts.setCreateDept(AuthUtil.getDeptId());
+				accounts.setBranchId(AuthUtil.getDeptId());
+				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
+					accounts.setCreateDeptName(deptName);
+				}
+			}
+		} else {
+			accounts.setUpdateUser(AuthUtil.getUserId());
+			accounts.setUpdateTime(new Date());
+			accounts.setUpdateUserName(AuthUtil.getUserName());
+		}
+		if (ObjectUtils.isNotNull(accounts.getParentCode())) {
+			accounts = selectSuperiorCode(accounts, accounts.getParentCode());
+		} else {
+			accounts.setIsDetail(1);
+		}
+		this.saveOrUpdate(accounts);
+		if (ObjectUtils.isNotNull(accounts.getAccItemsOpenblcList())) {
+			for (AccItemsOpenblc item : accounts.getAccItemsOpenblcList()) {
+				item.setAccountCode(accounts.getCode());
+				item.setAccountId(accounts.getId());
+				item.setAccountCnName(accounts.getCnName());
+				item.setAccountEnName(accounts.getEnName());
+				item.setAccountFullName(accounts.getFullName());
+				item.setAccountProperty(accounts.getProperty());
+				item.setAccountLevel(accounts.getLevel());
+				item.setDc(accounts.getDc());
+				item.setIsForeign(accounts.getIsForeign());
+				item.setIsQuantity(accounts.getIsQuantity());
+				item.setIsCorp(accounts.getIsCorp());
+				item.setIsDept(accounts.getIsDept());
+				item.setIsEmpl(accounts.getIsEmpl());
+				item.setIsItem(accounts.getIsItem());
+				item.setCurCode(accounts.getCurCode());
+				item.setExrate(accounts.getExrate());
+				item.setUnitNo(accounts.getUnitNo());
+				item.setPrice(accounts.getPrice());
+				if (item.getId() == null) {
+					item.setCreateTime(new Date());
+					item.setCreateUser(AuthUtil.getUserId());
+					item.setCreateUserName(AuthUtil.getUserName());
+					if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+						item.setCreateDept(deptId);
+						item.setBranchId(AuthUtil.getDeptId());
+						item.setCreateDeptName(deptName);
+					}
+				} else {
+					item.setUpdateUser(AuthUtil.getUserId());
+					item.setUpdateTime(new Date());
+					item.setUpdateUserName(AuthUtil.getUserName());
+				}
+			}
+			accItemsOpenblcService.saveOrUpdateBatch(accounts.getAccItemsOpenblcList());
+			// 期初本币借方金额(CNY)
+			accounts.setAmountOpenDr(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountOpenDr)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//期初本币贷方金额(CNY)
+			accounts.setAmountOpenCr(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountOpenCr)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			// 期初本币余额(CNY)
+			accounts.setAmountOpenBlc(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountOpenBlc)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			// 本期本币借方金额(CNY)
+			accounts.setAmountDr(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountDr)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//本期本币贷方金额(CNY)
+			accounts.setAmountCr(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountCr)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//本期本币余额(CNY)
+			accounts.setAmountBlc(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountBlc)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//期初外币借方金额
+			accounts.setAmountOpenDrUsd(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountOpenDrUsd)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//期初外币贷方金额
+			accounts.setAmountOpenCrUsd(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountOpenCrUsd)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//期初外币期初余额
+			accounts.setAmountOpenUsdBlc(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountOpenUsdBlc)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//本期外币借方金额
+			accounts.setAmountDrUsd(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountDrUsd)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//本期外币贷方金额
+			accounts.setAmountCrUsd(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountCrUsd)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//本期外币期初余额
+			accounts.setAmountUsdBlc(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getAmountUsdBlc)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//期初数量借方金额
+			accounts.setQuantityOpenDr(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getQuantityOpenDr)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//期初数量贷方金额
+			accounts.setQuantityOpenCr(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getQuantityOpenCr)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//期初数量期初余额
+			accounts.setQuantityOpenBlc(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getQuantityOpenBlc)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//本期数量借方金额
+			accounts.setQuantityDr(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getQuantityDr)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			//本期数量贷方金额
+			accounts.setQuantityCr(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getQuantityCr)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+			// 本期数量期初余额
+			accounts.setQuantityBlc(accounts.getAccItemsOpenblcList().stream().map(AccItemsOpenblc::getQuantityBlc)
+				.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+		}
+		this.saveOrUpdate(accounts);
+		return R.data(accounts);
+	}
+
+	private Accounts selectSuperiorCode(Accounts accounts, String parentCode) {
+		Accounts accounts1 = baseMapper.selectOne(new LambdaQueryWrapper<Accounts>()
+			.eq(Accounts::getTenantId, AuthUtil.getTenantId())
+			.eq(Accounts::getCode, parentCode));
+		if (accounts1 != null) {
+			accounts.setFullName(accounts1.getCnName() + "/" + accounts.getFullName());
+			accounts.setIsDetail(0);
+			if (ObjectUtils.isNotNull(accounts1.getParentCode())) {
+				this.selectSuperiorCode(accounts, accounts1.getParentCode());
+			}
+		}
+		return accounts;
+	}
+
+
+}