Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
+39
@@ -7,6 +7,7 @@ import com.mhd.bms.application.server.receiptManage.ReceiptManageApplicationServ
|
|||||||
import com.mhd.bms.domain.billManage.entity.BillDetail;
|
import com.mhd.bms.domain.billManage.entity.BillDetail;
|
||||||
import com.mhd.bms.domain.billManage.entity.BillManage;
|
import com.mhd.bms.domain.billManage.entity.BillManage;
|
||||||
import com.mhd.bms.domain.billManage.repository.facade.IBillDetailService;
|
import com.mhd.bms.domain.billManage.repository.facade.IBillDetailService;
|
||||||
|
import com.mhd.bms.domain.billManage.repository.facade.IBillManageService;
|
||||||
import com.mhd.bms.domain.billManage.repository.mapper.BillDetailMapper;
|
import com.mhd.bms.domain.billManage.repository.mapper.BillDetailMapper;
|
||||||
import com.mhd.bms.domain.billManage.repository.po.BillDetailPO;
|
import com.mhd.bms.domain.billManage.repository.po.BillDetailPO;
|
||||||
import com.mhd.bms.domain.billManage.repository.po.BillManagePO;
|
import com.mhd.bms.domain.billManage.repository.po.BillManagePO;
|
||||||
@@ -78,6 +79,8 @@ public class BillManageApplicationService {
|
|||||||
private BillDetailMapper billDetailMapper;
|
private BillDetailMapper billDetailMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private NcLogMapper ncLogMapper;
|
private NcLogMapper ncLogMapper;
|
||||||
|
@Autowired
|
||||||
|
private IBillManageService billManageService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -445,6 +448,7 @@ public class BillManageApplicationService {
|
|||||||
billManageDO.setReconciliationStatus(1);
|
billManageDO.setReconciliationStatus(1);
|
||||||
billManageDO.setCreateTime(new Date());
|
billManageDO.setCreateTime(new Date());
|
||||||
billManageDO.setCreateBy(loginUser.getUserid());
|
billManageDO.setCreateBy(loginUser.getUserid());
|
||||||
|
billManageDO.setSalesmanId(String.valueOf(loginUser.getUserid()));
|
||||||
billManageDO.setCreateByName(loginUser.getUserPo().getUserName());
|
billManageDO.setCreateByName(loginUser.getUserPo().getUserName());
|
||||||
billManageDO.setUpdateTime(new Date());
|
billManageDO.setUpdateTime(new Date());
|
||||||
billManageDO.setUpdateBy(loginUser.getUserid());
|
billManageDO.setUpdateBy(loginUser.getUserid());
|
||||||
@@ -466,6 +470,16 @@ public class BillManageApplicationService {
|
|||||||
for (BillDetailDTO billDetailDTO : billDetailDTOListNoBillingStatementId) {
|
for (BillDetailDTO billDetailDTO : billDetailDTOListNoBillingStatementId) {
|
||||||
BillingStatementDTO billingStatementDTO = new BillingStatementDTO();
|
BillingStatementDTO billingStatementDTO = new BillingStatementDTO();
|
||||||
BeanUtils.copyProperties(billDetailDTO, billingStatementDTO);
|
BeanUtils.copyProperties(billDetailDTO, billingStatementDTO);
|
||||||
|
|
||||||
|
String firstSubjectCode = billDetailDTO.getFirstSubjectCode();
|
||||||
|
Double taxRate = billDetailMapper.getTaxRate(firstSubjectCode);
|
||||||
|
BigDecimal amount = billingStatementDTO.getBillingAmount();
|
||||||
|
BigDecimal taxAmount = amount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
BigDecimal taxFreeFee = amount.subtract(taxAmount);
|
||||||
|
billingStatementDTO.setTaxAmount(taxAmount);
|
||||||
|
billingStatementDTO.setTaxFreeFee(taxFreeFee);
|
||||||
|
billingStatementDTO.setTaxRate(taxRate);
|
||||||
|
billingStatementDTO.setBillingAmount(amount);
|
||||||
billingStatementDTO.setAccountExpenseType(billDetailDTO.getBillType());
|
billingStatementDTO.setAccountExpenseType(billDetailDTO.getBillType());
|
||||||
billingStatementDTO.setBillManageId(billManageDO.getBillManageId());
|
billingStatementDTO.setBillManageId(billManageDO.getBillManageId());
|
||||||
billingStatementDTO.setBillingState(3);
|
billingStatementDTO.setBillingState(3);
|
||||||
@@ -495,6 +509,31 @@ public class BillManageApplicationService {
|
|||||||
billingStatementApplicationService.update(billingStatementDO);
|
billingStatementApplicationService.update(billingStatementDO);
|
||||||
}
|
}
|
||||||
//保存账单明细
|
//保存账单明细
|
||||||
|
double allTaxRate = 0.0d;
|
||||||
|
BigDecimal allTaxAmount = BigDecimal.ZERO;
|
||||||
|
BigDecimal allTaxFreeFee = BigDecimal.ZERO;
|
||||||
|
for (BillDetailDTO item : billDetailDTOList) {
|
||||||
|
String firstSubjectCode = item.getFirstSubjectCode();
|
||||||
|
Double taxRate = billDetailMapper.getTaxRate(firstSubjectCode);
|
||||||
|
BigDecimal amount = item.getBillingAmount();
|
||||||
|
BigDecimal taxAmount = amount.divide(BigDecimal.ONE.add(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))),10, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(taxRate).divide(BigDecimal.valueOf(100))).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
BigDecimal taxFreeFee = amount.subtract(taxAmount);
|
||||||
|
item.setTaxAmount(taxAmount);
|
||||||
|
item.setTaxFreeFee(taxFreeFee);
|
||||||
|
item.setTaxRate(taxRate);
|
||||||
|
allTaxRate += taxRate;
|
||||||
|
allTaxAmount = allTaxAmount.add(taxAmount);
|
||||||
|
allTaxFreeFee = allTaxFreeFee.add(taxFreeFee);
|
||||||
|
}
|
||||||
|
|
||||||
|
BillManage billManage = billManageService.getById(billManageDO.getBillManageId());
|
||||||
|
if (billManage != null) {
|
||||||
|
billManage.setTaxRate(allTaxRate);
|
||||||
|
billManage.setTaxAmount(allTaxAmount);
|
||||||
|
billManage.setTaxFreeFee(allTaxFreeFee);
|
||||||
|
billManage.setSalesmanId(String.valueOf(loginUser.getUserid()));
|
||||||
|
billManageService.updateById(billManage);
|
||||||
|
}
|
||||||
Boolean flagTwo = billDetailDomainService.saveBatch(billDetailDTOList);
|
Boolean flagTwo = billDetailDomainService.saveBatch(billDetailDTOList);
|
||||||
//保存操作记录
|
//保存操作记录
|
||||||
BillOperationLogDO billOperationLogDO = new BillOperationLogDO();
|
BillOperationLogDO billOperationLogDO = new BillOperationLogDO();
|
||||||
|
|||||||
+2
@@ -585,6 +585,8 @@ public class BillingStatementApplicationService {
|
|||||||
此方法只进行实体返回,并不进行数据保存
|
此方法只进行实体返回,并不进行数据保存
|
||||||
*/
|
*/
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
|
||||||
|
billingStatementDO.setAccountExpenseType(billingStatementDO.getAccountExpenseType());
|
||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -38,4 +38,6 @@ public interface IBillDetailService extends IService<BillDetail>
|
|||||||
public BillDetailPO getInfo(Long billDetailId);
|
public BillDetailPO getInfo(Long billDetailId);
|
||||||
|
|
||||||
List<BillDetailPO> getDetailsByBillManageId(Long billManageId);
|
List<BillDetailPO> getDetailsByBillManageId(Long billManageId);
|
||||||
|
|
||||||
|
List<BillDetail> getDetailsByBillManageIdAndGroup(Long billManageId);
|
||||||
}
|
}
|
||||||
+5
@@ -5,6 +5,7 @@ import com.mhd.bms.domain.billManage.entity.BillDetail;
|
|||||||
import com.mhd.bms.domain.billManage.repository.po.BillDetailPO;
|
import com.mhd.bms.domain.billManage.repository.po.BillDetailPO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,4 +18,8 @@ public interface BillDetailMapper extends BaseMapper<BillDetail>
|
|||||||
{
|
{
|
||||||
|
|
||||||
List<BillDetailPO> getDetailsByBillManageId(@Param("billManageId") Long billManageId);
|
List<BillDetailPO> getDetailsByBillManageId(@Param("billManageId") Long billManageId);
|
||||||
|
|
||||||
|
List<BillDetail> getDetailsByBillManageIdAndGroup(@Param("billManageId") Long billManageId);
|
||||||
|
|
||||||
|
Double getTaxRate(@Param("code") String code);
|
||||||
}
|
}
|
||||||
+2
@@ -44,4 +44,6 @@ public interface BillManageMapper extends BaseMapper<BillManage>
|
|||||||
String getDeptName(@Param("dictCode") String dictCode);
|
String getDeptName(@Param("dictCode") String dictCode);
|
||||||
|
|
||||||
String getOrgCodeNc(@Param("organizationId") Long organizationId);
|
String getOrgCodeNc(@Param("organizationId") Long organizationId);
|
||||||
|
|
||||||
|
Long getShipperId(@Param("userId") Long userId, @Param("organizationId") Long organizationId);
|
||||||
}
|
}
|
||||||
+5
@@ -75,4 +75,9 @@ public class BillDetailImpl extends ServiceImpl<BillDetailMapper, BillDetail> im
|
|||||||
public List<BillDetailPO> getDetailsByBillManageId(Long billManageId) {
|
public List<BillDetailPO> getDetailsByBillManageId(Long billManageId) {
|
||||||
return billDetailMapper.getDetailsByBillManageId(billManageId);
|
return billDetailMapper.getDetailsByBillManageId(billManageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BillDetail> getDetailsByBillManageIdAndGroup(Long billManageId) {
|
||||||
|
return billDetailMapper.getDetailsByBillManageIdAndGroup(billManageId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+1188
-522
File diff suppressed because it is too large
Load Diff
@@ -264,4 +264,6 @@ public class BillManageDO extends BaseVOEntity{
|
|||||||
private String paymentAccountId;
|
private String paymentAccountId;
|
||||||
@ApiModelProperty("收款帐户名称")
|
@ApiModelProperty("收款帐户名称")
|
||||||
private String paymentAccountName;
|
private String paymentAccountName;
|
||||||
|
@ApiModelProperty("业务员ID")
|
||||||
|
private String salesmanId;
|
||||||
}
|
}
|
||||||
+4
@@ -100,6 +100,10 @@ public class BillingStatementPO extends BaseVOEntity{
|
|||||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||||
private Integer accountExpenseType;
|
private Integer accountExpenseType;
|
||||||
|
|
||||||
|
@ApiModelProperty("收支类型(1-应收,2-应付)")
|
||||||
|
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||||
|
private Integer billType;
|
||||||
|
|
||||||
@ApiModelProperty("流水备注")
|
@ApiModelProperty("流水备注")
|
||||||
@Excel(name = "流水备注")
|
@Excel(name = "流水备注")
|
||||||
private String billingRemark;
|
private String billingRemark;
|
||||||
|
|||||||
+4
@@ -101,6 +101,10 @@ public class BillingStatementDO extends BaseVOEntity{
|
|||||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||||
private Integer accountExpenseType;
|
private Integer accountExpenseType;
|
||||||
|
|
||||||
|
@ApiModelProperty("收支类型(1-应收,2-应付)")
|
||||||
|
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||||
|
private Integer billType;
|
||||||
|
|
||||||
@ApiModelProperty("流水备注")
|
@ApiModelProperty("流水备注")
|
||||||
@Excel(name = "流水备注")
|
@Excel(name = "流水备注")
|
||||||
private String billingRemark;
|
private String billingRemark;
|
||||||
|
|||||||
+4
@@ -102,6 +102,10 @@ public class BillingStatementDTO extends BaseVOEntity{
|
|||||||
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||||
private Integer accountExpenseType;
|
private Integer accountExpenseType;
|
||||||
|
|
||||||
|
@ApiModelProperty("收支类型(1-应收,2-应付)")
|
||||||
|
@Excel(name = "收支类型", readConverterExp = "1=-应收,2-应付")
|
||||||
|
private Integer billType;
|
||||||
|
|
||||||
@ApiModelProperty("流水备注")
|
@ApiModelProperty("流水备注")
|
||||||
@Excel(name = "流水备注")
|
@Excel(name = "流水备注")
|
||||||
private String billingRemark;
|
private String billingRemark;
|
||||||
|
|||||||
@@ -18,15 +18,15 @@ spring:
|
|||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.30:6848
|
# server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.33.0.129:6010
|
server-addr: 10.33.0.129:6010
|
||||||
server-addr: 10.102.192.30:6848
|
# server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||||
|
|||||||
@@ -27,5 +27,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND bd.bill_manage_id = #{billManageId}
|
AND bd.bill_manage_id = #{billManageId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getDetailsByBillManageIdAndGroup" resultType="com.mhd.bms.domain.billManage.entity.BillDetail" parameterType="java.lang.Long">
|
||||||
|
SELECT
|
||||||
|
SUM(BILLING_AMOUNT) as BILLING_AMOUNT,
|
||||||
|
SUM(TAX_AMOUNT) as TAX_AMOUNT,
|
||||||
|
SUM(TAX_FREE_FEE) as TAX_FREE_FEE,
|
||||||
|
AVG(TAX_RATE) as TAX_RATE,
|
||||||
|
BILL_MANAGE_ID as BILL_MANAGE_ID,
|
||||||
|
TOP_ORGANIZATION_ID as TOP_ORGANIZATION_ID,
|
||||||
|
ORGANIZATION_NAME,
|
||||||
|
INVOICE_ITEM,
|
||||||
|
INVOICE_ITEM_NAME,
|
||||||
|
FEE_TYPE,
|
||||||
|
BILL_NUMBER
|
||||||
|
FROM
|
||||||
|
bill_detail
|
||||||
|
WHERE
|
||||||
|
del_flag = 1
|
||||||
|
AND bill_manage_id = #{billManageId} GROUP BY INVOICE_ITEM,INVOICE_ITEM_NAME,FEE_TYPE
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getTaxRate" resultType="java.lang.Double" parameterType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
rate
|
||||||
|
FROM
|
||||||
|
NGWL_TEST_SYSTEM.EXPENSE_ACCOUNT
|
||||||
|
WHERE
|
||||||
|
del_flag = 1
|
||||||
|
AND SUBJECT_CODE = #{code}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -162,4 +162,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
SELECT NC_CODE FROM NGWL_TEST_PRODUCT."SYS_ORGANIZATION" where DEL_FLAG = 1 and organization_id = #{organizationId} limit 1
|
SELECT NC_CODE FROM NGWL_TEST_PRODUCT."SYS_ORGANIZATION" where DEL_FLAG = 1 and organization_id = #{organizationId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getShipperId" resultType="java.lang.Long">
|
||||||
|
SELECT SHIPPER_ID FROM NGWL_TEST_USER."USER_SHIPPER" where DEL_FLAG = '1' and user_id = #{userId} and organization_id = #{organizationId} limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -200,10 +200,6 @@
|
|||||||
<if test="settlementCustomersDO.organizationId != null">
|
<if test="settlementCustomersDO.organizationId != null">
|
||||||
AND (
|
AND (
|
||||||
a.organization_id = #{settlementCustomersDO.organizationId}
|
a.organization_id = #{settlementCustomersDO.organizationId}
|
||||||
OR b.org_code LIKE concat('%"code":"', #{settlementCustomersDO.organizationId}, '"%')
|
|
||||||
OR b.org_code LIKE concat('%code:', #{settlementCustomersDO.organizationId}, '%')
|
|
||||||
OR b.org_code LIKE concat('%code: ', #{settlementCustomersDO.organizationId}, '%')
|
|
||||||
OR b.org_code LIKE concat('%"code":', #{settlementCustomersDO.organizationId}, '%')
|
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="settlementCustomersDO.topOrganizationId != null and settlementCustomersDO.topOrganizationId != ''">
|
<if test="settlementCustomersDO.topOrganizationId != null and settlementCustomersDO.topOrganizationId != ''">
|
||||||
|
|||||||
@@ -14,18 +14,18 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.102.192.30:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
# server-addr: 10.102.192.105:6848
|
# server-addr: 10.102.192.105:6848
|
||||||
config:
|
config:
|
||||||
# server-addr: 127.0.0.1:8848
|
# server-addr: 127.0.0.1:8848
|
||||||
server-addr: 10.33.0.129:6010
|
# server-addr: 10.33.0.129:6010
|
||||||
# 线上测试环境配置 容器名+端口号
|
# 线上测试环境配置 容器名+端口号
|
||||||
# server-addr: 10.102.192.30:6848
|
server-addr: 10.102.192.31:6848
|
||||||
username: nacos
|
username: nacos
|
||||||
password: manhuoda@2023
|
password: manhuoda@2023
|
||||||
#线上正式环境
|
#线上正式环境
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<mapper namespace="com.mhd.wms.domain.reviewOrder.repository.mapper.ReviewOrderMapper">
|
<mapper namespace="com.mhd.wms.domain.reviewOrder.repository.mapper.ReviewOrderMapper">
|
||||||
|
|
||||||
<resultMap type="com.mhd.wms.domain.reviewOrder.repository.po.ReviewOrderPO" id="ReviewOrderResult">
|
<resultMap type="com.mhd.wms.domain.reviewOrder.repository.po.ReviewOrderPO" id="ReviewOrderResult">
|
||||||
<result property="reviewOrderId" column="review_order_id"/>
|
<id property="reviewOrderId" column="review_order_id"/>
|
||||||
<result property="reviewOrderNumber" column="review_order_number"/>
|
<result property="reviewOrderNumber" column="review_order_number"/>
|
||||||
<result property="outOrderId" column="out_order_id"/>
|
<result property="outOrderId" column="out_order_id"/>
|
||||||
<result property="outOrderNumber" column="out_order_number"/>
|
<result property="outOrderNumber" column="out_order_number"/>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="reviewOrderSelectColumns">
|
<sql id="reviewOrderSelectColumns">
|
||||||
a.review_order_id,
|
a.review_order_id AS review_order_id,
|
||||||
a.review_order_number,
|
a.review_order_number,
|
||||||
a.out_order_id,
|
a.out_order_id,
|
||||||
a.out_order_number,
|
a.out_order_number,
|
||||||
|
|||||||
Reference in New Issue
Block a user