Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
+9
-1
@@ -35,7 +35,15 @@ public class ExpenseAccountAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
|
|
||||||
|
|||||||
+9
-1
@@ -35,7 +35,15 @@ public class ServiceItemsManageAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
|
|
||||||
|
|||||||
+3
-8
@@ -57,18 +57,13 @@ public class ExpenseAccountApi extends BaseController{
|
|||||||
{
|
{
|
||||||
logger.info("收到查询费用科目列表请求,参数:{}", expenseAccountDTO);
|
logger.info("收到查询费用科目列表请求,参数:{}", expenseAccountDTO);
|
||||||
try {
|
try {
|
||||||
//转换实体,如果 expenseAccountDTO 为 null,创建一个新的对象
|
//转换实体(查询时不需要设置创建人和更新人信息)
|
||||||
if (expenseAccountDTO == null) {
|
if (expenseAccountDTO == null) {
|
||||||
expenseAccountDTO = new ExpenseAccountDTO();
|
expenseAccountDTO = new ExpenseAccountDTO();
|
||||||
logger.info("expenseAccountDTO 为 null,创建新对象");
|
logger.info("expenseAccountDTO 为 null,创建新对象");
|
||||||
}
|
}
|
||||||
ExpenseAccountDO expenseAccountDO = expenseAccountAssembler.toDO(expenseAccountDTO);
|
ExpenseAccountDO expenseAccountDO = new ExpenseAccountDO();
|
||||||
if(StringUtils.isBlank(expenseAccountDTO.getCreateByName())){
|
BeanUtils.copyProperties(expenseAccountDTO, expenseAccountDO);
|
||||||
expenseAccountDO.setCreateByName(null);
|
|
||||||
}
|
|
||||||
if(StringUtils.isBlank(expenseAccountDTO.getUpdateByName())){
|
|
||||||
expenseAccountDO.setUpdateByName(null);
|
|
||||||
}
|
|
||||||
logger.info("转换后的 ExpenseAccountDO:{}", expenseAccountDO);
|
logger.info("转换后的 ExpenseAccountDO:{}", expenseAccountDO);
|
||||||
startPage();
|
startPage();
|
||||||
logger.info("分页参数已设置");
|
logger.info("分页参数已设置");
|
||||||
|
|||||||
+4
-8
@@ -9,6 +9,7 @@ import com.mhd.basic.interfaces.assember.serviceItemsManage.ServiceItemsManageAs
|
|||||||
import com.mhd.basic.interfaces.dto.serviceItemsManage.ServiceItemsManageDTO;
|
import com.mhd.basic.interfaces.dto.serviceItemsManage.ServiceItemsManageDTO;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -39,14 +40,9 @@ public class ServiceItemsManageApi extends BaseController{
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(ServiceItemsManageDTO serviceItemsManageDTO)
|
public TableDataInfo list(ServiceItemsManageDTO serviceItemsManageDTO)
|
||||||
{
|
{
|
||||||
//转换实体
|
//转换实体(查询时不需要设置创建人和更新人信息)
|
||||||
ServiceItemsManageDO serviceItemsManageDO = serviceItemsManageAssembler.toDO(serviceItemsManageDTO);
|
ServiceItemsManageDO serviceItemsManageDO = new ServiceItemsManageDO();
|
||||||
if(StringUtils.isBlank(serviceItemsManageDTO.getCreateByName())){
|
BeanUtils.copyProperties(serviceItemsManageDTO, serviceItemsManageDO);
|
||||||
serviceItemsManageDO.setCreateByName(null);
|
|
||||||
}
|
|
||||||
if(StringUtils.isBlank(serviceItemsManageDTO.getUpdateByName())){
|
|
||||||
serviceItemsManageDO.setUpdateByName(null);
|
|
||||||
}
|
|
||||||
startPage();
|
startPage();
|
||||||
List<ServiceItemsManagePO> list = serviceItemsManageApplicationService.queryList(serviceItemsManageDO);
|
List<ServiceItemsManagePO> list = serviceItemsManageApplicationService.queryList(serviceItemsManageDO);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from contract_manage
|
from contract_manage
|
||||||
where
|
where
|
||||||
del_flag = 1
|
del_flag = 1
|
||||||
order by create_time desc
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="selectContractManagePo1">
|
<sql id="selectContractManagePo1">
|
||||||
@@ -116,6 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
resultType="com.mhd.basic.domain.contractManage.repository.po.ContractManagePO">
|
resultType="com.mhd.basic.domain.contractManage.repository.po.ContractManagePO">
|
||||||
<include refid="selectContractManagePo"/>
|
<include refid="selectContractManagePo"/>
|
||||||
<include refid="common_where"/>
|
<include refid="common_where"/>
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
WHERE
|
WHERE
|
||||||
a.del_flag = 1
|
a.del_flag = 1
|
||||||
<include refid="common_where"/>
|
<include refid="common_where"/>
|
||||||
order by a.update_time DESC
|
order by a.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCostSubject" parameterType="com.mhd.basic.domain.expenseAccount.repository.todo.ExpenseAccountDO"
|
<select id="selectCostSubject" parameterType="com.mhd.basic.domain.expenseAccount.repository.todo.ExpenseAccountDO"
|
||||||
resultType="com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO">
|
resultType="com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO">
|
||||||
@@ -145,7 +145,14 @@
|
|||||||
|
|
||||||
|
|
||||||
<sql id="common_where_two">
|
<sql id="common_where_two">
|
||||||
<if test="expenseAccountDO.topOrganizationId != null ">
|
<!-- 数据权限:南光组织(organizationId=2827)查全部,其他组织查自己 -->
|
||||||
|
<!-- 如果 organizationId 和 topOrganizationId 都为 null,表示查询所有组织的数据(不添加组织过滤条件) -->
|
||||||
|
<if test="expenseAccountDO.organizationId != null">
|
||||||
|
<!-- 如果设置了 organizationId,添加 organization_id 条件 -->
|
||||||
|
and organization_id = #{expenseAccountDO.organizationId}
|
||||||
|
</if>
|
||||||
|
<if test="expenseAccountDO.topOrganizationId != null and expenseAccountDO.organizationId == null">
|
||||||
|
<!-- 如果设置了 topOrganizationId 但没有设置 organizationId,添加 top_organization_id 条件 -->
|
||||||
and top_organization_id = #{expenseAccountDO.topOrganizationId}
|
and top_organization_id = #{expenseAccountDO.topOrganizationId}
|
||||||
</if>
|
</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|||||||
+8
-1
@@ -265,6 +265,13 @@ public class BillManageApplicationService {
|
|||||||
return billManageDomainService.confirmBilling(billManageDO);
|
return billManageDomainService.confirmBilling(billManageDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int editIsInvoice(String billNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber)
|
||||||
|
{
|
||||||
|
return billManageDomainService.editIsInvoice(billNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询对账详情
|
* 查询对账详情
|
||||||
*/
|
*/
|
||||||
@@ -529,4 +536,4 @@ public class BillManageApplicationService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+34
-4
@@ -38,10 +38,40 @@ public class ConditionalMappingApplicationService {
|
|||||||
|
|
||||||
public List<ConditionalMappingPO> queryList(ConditionalMappingDO conditionalMappingDO) {
|
public List<ConditionalMappingPO> queryList(ConditionalMappingDO conditionalMappingDO) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
if (loginUser != null){
|
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
Long userOrganizationId = loginUser.getUserPo().getOrganizationId();
|
||||||
if (topOrganizationId != null && topOrganizationId != 1){
|
Long frontendOrganizationId = conditionalMappingDO.getOrganizationId(); // 前端传递的 organizationId
|
||||||
conditionalMappingDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
|
||||||
|
// 当前登录用户的 organizationId 为 2827 时,可查全部组织数据;其他组织只能查自己且 topOrganizationId=2827
|
||||||
|
if (userOrganizationId != null && userOrganizationId == 2827L) {
|
||||||
|
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||||
|
if (frontendOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId(包括2827或其他组织),使用前端传递的值进行过滤
|
||||||
|
conditionalMappingDO.setOrganizationId(frontendOrganizationId);
|
||||||
|
conditionalMappingDO.setTopOrganizationId(null); // 明确设置为 null,避免使用 topOrganizationId 条件
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||||
|
conditionalMappingDO.setOrganizationId(null);
|
||||||
|
conditionalMappingDO.setTopOrganizationId(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 其他组织:设置organizationId为当前组织ID,并且设置topOrganizationId=2827
|
||||||
|
// 如果前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (frontendOrganizationId != null && userOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (!frontendOrganizationId.equals(userOrganizationId)) {
|
||||||
|
// 前端传递了其他组织的 organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||||
|
conditionalMappingDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
// 如果前端传递的 organizationId 与当前登录用户的组织ID一致,使用前端传递的值
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,使用当前登录用户的组织ID
|
||||||
|
if (userOrganizationId != null) {
|
||||||
|
conditionalMappingDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
|
conditionalMappingDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return conditionalMappingDomainService.queryList(conditionalMappingDO);
|
return conditionalMappingDomainService.queryList(conditionalMappingDO);
|
||||||
|
|||||||
+34
-4
@@ -37,10 +37,40 @@ public class MappingMethodApplicationService {
|
|||||||
|
|
||||||
public List<MappingMethodPO> queryList(MappingMethodDO mappingMethodDO) {
|
public List<MappingMethodPO> queryList(MappingMethodDO mappingMethodDO) {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
if (loginUser != null){
|
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
Long userOrganizationId = loginUser.getUserPo().getOrganizationId();
|
||||||
if (topOrganizationId != null && topOrganizationId != 1){
|
Long frontendOrganizationId = mappingMethodDO.getOrganizationId(); // 前端传递的 organizationId
|
||||||
mappingMethodDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
|
||||||
|
// 当前登录用户的 organizationId 为 2827 时,可查全部组织数据;其他组织只能查自己且 topOrganizationId=2827
|
||||||
|
if (userOrganizationId != null && userOrganizationId == 2827L) {
|
||||||
|
// 南光组织(organizationId=2827):可以查询所有组织的数据
|
||||||
|
if (frontendOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId(包括2827或其他组织),使用前端传递的值进行过滤
|
||||||
|
mappingMethodDO.setOrganizationId(frontendOrganizationId);
|
||||||
|
mappingMethodDO.setTopOrganizationId(null); // 明确设置为 null,避免使用 topOrganizationId 条件
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,清空组织过滤条件,查询所有组织的数据
|
||||||
|
mappingMethodDO.setOrganizationId(null);
|
||||||
|
mappingMethodDO.setTopOrganizationId(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 其他组织:设置organizationId为当前组织ID,并且设置topOrganizationId=2827
|
||||||
|
// 如果前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (frontendOrganizationId != null && userOrganizationId != null) {
|
||||||
|
// 前端传递了 organizationId,验证是否与当前登录用户的组织ID一致
|
||||||
|
if (!frontendOrganizationId.equals(userOrganizationId)) {
|
||||||
|
// 前端传递了其他组织的 organizationId,强制使用当前登录用户的组织ID,防止越权查询
|
||||||
|
mappingMethodDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
// 如果前端传递的 organizationId 与当前登录用户的组织ID一致,使用前端传递的值
|
||||||
|
} else {
|
||||||
|
// 前端没有传递 organizationId,使用当前登录用户的组织ID
|
||||||
|
if (userOrganizationId != null) {
|
||||||
|
mappingMethodDO.setOrganizationId(userOrganizationId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 对于非2827组织,必须设置 topOrganizationId=2827
|
||||||
|
mappingMethodDO.setTopOrganizationId(2827L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mappingMethodDomainService.queryList(mappingMethodDO);
|
return mappingMethodDomainService.queryList(mappingMethodDO);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -183,4 +184,45 @@ public class BillManage extends BaseVOEntity{
|
|||||||
|
|
||||||
@ApiModelProperty("结算单优惠金额")
|
@ApiModelProperty("结算单优惠金额")
|
||||||
private BigDecimal settlementDiscountsAmount;
|
private BigDecimal settlementDiscountsAmount;
|
||||||
}
|
|
||||||
|
@ApiModelProperty(value = "运单发票开具状态(0-未索取,1-已索取,2-已开票,3-部分索取)")
|
||||||
|
private Integer isInvoice;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "发票表ID")
|
||||||
|
private String invoiceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "开票时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date invoiceMakeTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请发票单号")
|
||||||
|
private String applyNumber;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||||
|
private Integer synchronousStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc同步时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date synchronousTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc唯一标识")
|
||||||
|
private String ncId;
|
||||||
|
|
||||||
|
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||||
|
private Integer skSynchronousStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc同步时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date skSynchronousTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc唯一标识")
|
||||||
|
private String skNcId;
|
||||||
|
}
|
||||||
+3
-1
@@ -40,4 +40,6 @@ public interface IBillManageService extends IService<BillManage>
|
|||||||
* 查询账单管理
|
* 查询账单管理
|
||||||
*/
|
*/
|
||||||
public BillManagePO getInfo(Long billManageId);
|
public BillManagePO getInfo(Long billManageId);
|
||||||
}
|
|
||||||
|
public int editIsInvoice(String billNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber);
|
||||||
|
}
|
||||||
+48
-1
@@ -1,5 +1,7 @@
|
|||||||
package com.mhd.bms.domain.billManage.repository.persistence;
|
package com.mhd.bms.domain.billManage.repository.persistence;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.mhd.bms.domain.billManage.entity.BillManage;
|
import com.mhd.bms.domain.billManage.entity.BillManage;
|
||||||
import com.mhd.bms.domain.billManage.repository.facade.IBillManageService;
|
import com.mhd.bms.domain.billManage.repository.facade.IBillManageService;
|
||||||
@@ -10,6 +12,8 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -78,4 +82,47 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
|||||||
BeanUtils.copyProperties(billManage,billManagePO);
|
BeanUtils.copyProperties(billManage,billManagePO);
|
||||||
return billManagePO;
|
return billManagePO;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public int editIsInvoice(String billNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber) {
|
||||||
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(billNumber)){
|
||||||
|
BillManage billManage= billManageMapper.selectOne(new QueryWrapper<BillManage>().lambda()
|
||||||
|
.eq(BillManage::getBillNumber,billNumber)
|
||||||
|
.eq(BillManage::getDelFlag,1));
|
||||||
|
if(ObjectUtil.isNotNull(billManage)){
|
||||||
|
billManage.setIsInvoice(isInvoice);
|
||||||
|
billManage.setInvoiceId(invoiceId);
|
||||||
|
billManage.setApplyNumber(applyNumber);
|
||||||
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(invoiceMakeTime)){
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
try {
|
||||||
|
billManage.setInvoiceMakeTime(formatter.parse(invoiceMakeTime));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return billManageMapper.updateById(billManage);
|
||||||
|
}
|
||||||
|
}else if(org.apache.commons.lang3.StringUtils.isNotBlank(invoiceId)){
|
||||||
|
BillManage billManage= billManageMapper.selectOne(new QueryWrapper<BillManage>().lambda()
|
||||||
|
.eq(BillManage::getInvoiceId,invoiceId)
|
||||||
|
.eq(BillManage::getDelFlag,1));
|
||||||
|
if(ObjectUtil.isNotNull(billManage)){
|
||||||
|
billManage.setIsInvoice(isInvoice);
|
||||||
|
billManage.setInvoiceId(invoiceId);
|
||||||
|
billManage.setApplyNumber(applyNumber);
|
||||||
|
if(org.apache.commons.lang3.StringUtils.isNotBlank(invoiceMakeTime)){
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
try {
|
||||||
|
billManage.setInvoiceMakeTime(formatter.parse(invoiceMakeTime));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return billManageMapper.updateById(billManage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
+43
-1
@@ -11,6 +11,7 @@ import java.math.BigDecimal;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -194,4 +195,45 @@ public class BillManagePO extends BaseVOEntity{
|
|||||||
|
|
||||||
@ApiModelProperty("流水ids")
|
@ApiModelProperty("流水ids")
|
||||||
private String billingStatementIds;
|
private String billingStatementIds;
|
||||||
}
|
|
||||||
|
@ApiModelProperty(value = "运单发票开具状态(0-未索取,1-已索取,2-已开票,3-部分索取)")
|
||||||
|
private Integer isInvoice;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "发票表ID")
|
||||||
|
private String invoiceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "开票时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date invoiceMakeTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请发票单号")
|
||||||
|
private String applyNumber;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||||
|
private Integer synchronousStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc同步时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date synchronousTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc唯一标识")
|
||||||
|
private String ncId;
|
||||||
|
|
||||||
|
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||||
|
private Integer skSynchronousStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc同步时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date skSynchronousTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc唯一标识")
|
||||||
|
private String skNcId;
|
||||||
|
}
|
||||||
+43
-1
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -205,4 +206,45 @@ public class BillManageDO extends BaseVOEntity{
|
|||||||
|
|
||||||
@ApiModelProperty("结算单优惠金额")
|
@ApiModelProperty("结算单优惠金额")
|
||||||
private BigDecimal settlementDiscountsAmount;
|
private BigDecimal settlementDiscountsAmount;
|
||||||
}
|
|
||||||
|
@ApiModelProperty(value = "运单发票开具状态(0-未索取,1-已索取,2-已开票,3-部分索取)")
|
||||||
|
private Integer isInvoice;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "发票表ID")
|
||||||
|
private String invoiceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "开票时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date invoiceMakeTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请发票单号")
|
||||||
|
private String applyNumber;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||||
|
private Integer synchronousStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc同步时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date synchronousTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc唯一标识")
|
||||||
|
private String ncId;
|
||||||
|
|
||||||
|
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||||
|
private Integer skSynchronousStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc同步时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date skSynchronousTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc唯一标识")
|
||||||
|
private String skNcId;
|
||||||
|
}
|
||||||
+7
-1
@@ -297,6 +297,12 @@ public class BillManageDomainService {
|
|||||||
return flag && three;
|
return flag && three;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int editIsInvoice(String billNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber)
|
||||||
|
{
|
||||||
|
return billManageService.editIsInvoice(billNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理数据
|
* 处理数据
|
||||||
*/
|
*/
|
||||||
@@ -503,4 +509,4 @@ public class BillManageDomainService {
|
|||||||
public List<BillManage> billAnalysisList(QueryWrapper<BillManage> queryWrapper) {
|
public List<BillManage> billAnalysisList(QueryWrapper<BillManage> queryWrapper) {
|
||||||
return billManageService.list(queryWrapper);
|
return billManageService.list(queryWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+9
-1
@@ -33,7 +33,15 @@ public class BillingRulesAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
if(billingRulesDTO.getBillingRulesId() != null){
|
if(billingRulesDTO.getBillingRulesId() != null){
|
||||||
|
|||||||
+18
-2
@@ -35,7 +35,15 @@ public class BillingStatementAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
if(billingStatementDTO.getBillingStatementId() != null){
|
if(billingStatementDTO.getBillingStatementId() != null){
|
||||||
@@ -72,7 +80,15 @@ public class BillingStatementAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
if(billingStatementCollectDTO.getBillingStatementId() != null){
|
if(billingStatementCollectDTO.getBillingStatementId() != null){
|
||||||
|
|||||||
+9
-1
@@ -33,7 +33,15 @@ public class ConditionalMappingAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
if(conditionalMappingDTO.getConditionalMappingId() != null){
|
if(conditionalMappingDTO.getConditionalMappingId() != null){
|
||||||
|
|||||||
+9
-1
@@ -33,7 +33,15 @@ public class DocumentTypeAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
if(documentTypeDTO.getDocumentTypeId() != null){
|
if(documentTypeDTO.getDocumentTypeId() != null){
|
||||||
|
|||||||
+9
-1
@@ -33,7 +33,15 @@ public class MappingMethodAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
if(mappingMethodDTO.getMappingMethodId() != null){
|
if(mappingMethodDTO.getMappingMethodId() != null){
|
||||||
|
|||||||
+9
-1
@@ -33,7 +33,15 @@ public class SettlementCustomersAssembler {
|
|||||||
if (ObjectUtil.isNull(loginUser)) {
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
}
|
}
|
||||||
String userName = loginUser.getUsername();
|
// 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
|
||||||
|
String userName = null;
|
||||||
|
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
|
||||||
|
userName = loginUser.getUserPo().getUserName();
|
||||||
|
} else if (loginUser.getRealname() != null) {
|
||||||
|
userName = loginUser.getRealname();
|
||||||
|
} else {
|
||||||
|
userName = loginUser.getUsername();
|
||||||
|
}
|
||||||
// 获取登录人id
|
// 获取登录人id
|
||||||
Long userId = loginUser.getUserid();
|
Long userId = loginUser.getUserid();
|
||||||
if(settlementCustomersDTO.getSettlementCustomersId() != null){
|
if(settlementCustomersDTO.getSettlementCustomersId() != null){
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -211,4 +212,45 @@ public class BillManageDTO extends BaseVOEntity{
|
|||||||
|
|
||||||
@ApiModelProperty("结算单优惠金额")
|
@ApiModelProperty("结算单优惠金额")
|
||||||
private BigDecimal settlementDiscountsAmount;
|
private BigDecimal settlementDiscountsAmount;
|
||||||
}
|
|
||||||
|
@ApiModelProperty(value = "运单发票开具状态(0-未索取,1-已索取,2-已开票,3-部分索取)")
|
||||||
|
private Integer isInvoice;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "发票表ID")
|
||||||
|
private String invoiceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "开票时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date invoiceMakeTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "申请发票单号")
|
||||||
|
private String applyNumber;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||||
|
private Integer synchronousStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc同步时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date synchronousTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc唯一标识")
|
||||||
|
private String ncId;
|
||||||
|
|
||||||
|
@ApiModelProperty("nc同步状态 0-未同步 1-已同步")
|
||||||
|
private Integer skSynchronousStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc同步时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private java.util.Date skSynchronousTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "nc唯一标识")
|
||||||
|
private String skNcId;
|
||||||
|
}
|
||||||
@@ -13,6 +13,8 @@ import com.mhd.bms.domain.billingStatement.repository.todo.BillingStatementDO;
|
|||||||
import com.mhd.bms.infrastructure.utils.UniqueKeyUtil;
|
import com.mhd.bms.infrastructure.utils.UniqueKeyUtil;
|
||||||
import com.mhd.bms.interfaces.dto.billingStatement.BillingStatementDTO;
|
import com.mhd.bms.interfaces.dto.billingStatement.BillingStatementDTO;
|
||||||
import com.mhd.common.core.exception.ServiceException;
|
import com.mhd.common.core.exception.ServiceException;
|
||||||
|
import com.mhd.common.log.annotation.Log;
|
||||||
|
import com.mhd.common.log.enums.BusinessType;
|
||||||
import com.mhd.common.redis.enums.RedisLockTypeEnum;
|
import com.mhd.common.redis.enums.RedisLockTypeEnum;
|
||||||
import com.mhd.common.redis.service.RedisLock;
|
import com.mhd.common.redis.service.RedisLock;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -22,13 +24,7 @@ import org.redisson.api.RLock;
|
|||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.mhd.bms.interfaces.dto.billManage.BillManageDTO;
|
import com.mhd.bms.interfaces.dto.billManage.BillManageDTO;
|
||||||
import com.mhd.bms.domain.billManage.repository.todo.BillManageDO;
|
import com.mhd.bms.domain.billManage.repository.todo.BillManageDO;
|
||||||
import com.mhd.bms.domain.billManage.repository.po.BillManagePO;
|
import com.mhd.bms.domain.billManage.repository.po.BillManagePO;
|
||||||
@@ -157,6 +153,23 @@ public class BillManageApi extends BaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票开票修改对账单的开票状态
|
||||||
|
*/
|
||||||
|
@Log(title = "对账单", description = "开票修改对账单的开票状态)", businessType = BusinessType.OTHER)
|
||||||
|
@ApiOperation("开票修改对账单的开票状态")
|
||||||
|
@GetMapping("/editIsInvoice")
|
||||||
|
public AjaxResult editIsInvoice(@RequestParam(name="billNumber") String billNumber,
|
||||||
|
@RequestParam(name="isInvoice") Integer isInvoice,
|
||||||
|
@RequestParam(name="invoiceId") String invoiceId,
|
||||||
|
@RequestParam(name="invoiceMakeTime") String invoiceMakeTime,
|
||||||
|
@RequestParam(name="applyNumber") String applyNumber)
|
||||||
|
{
|
||||||
|
|
||||||
|
billManageApplicationService.editIsInvoice(billNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
||||||
|
return AjaxResult.success("发票开票修改对账单的开票状态成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -281,4 +294,4 @@ public class BillManageApi extends BaseController{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.mhd.bms.application.server.conditionalMapping.ConditionalMappingApplicationService;
|
import com.mhd.bms.application.server.conditionalMapping.ConditionalMappingApplicationService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.mhd.bms.interfaces.dto.conditionalMapping.ConditionalMappingDTO;
|
import com.mhd.bms.interfaces.dto.conditionalMapping.ConditionalMappingDTO;
|
||||||
@@ -37,8 +38,9 @@ public class ConditionalMappingApi extends BaseController{
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(ConditionalMappingDTO conditionalMappingDTO)
|
public TableDataInfo list(ConditionalMappingDTO conditionalMappingDTO)
|
||||||
{
|
{
|
||||||
//转换实体
|
//转换实体(查询时不需要设置创建人和更新人信息)
|
||||||
ConditionalMappingDO conditionalMappingDO = conditionalMappingAssembler.toDO(conditionalMappingDTO);
|
ConditionalMappingDO conditionalMappingDO = new ConditionalMappingDO();
|
||||||
|
BeanUtils.copyProperties(conditionalMappingDTO, conditionalMappingDO);
|
||||||
startPage();
|
startPage();
|
||||||
List<ConditionalMappingPO> list = conditionalMappingApplicationService.queryList(conditionalMappingDO);
|
List<ConditionalMappingPO> list = conditionalMappingApplicationService.queryList(conditionalMappingDO);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|||||||
@@ -41,8 +41,9 @@ public class DocumentTypeApi extends BaseController{
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(DocumentTypeDTO documentTypeDTO)
|
public TableDataInfo list(DocumentTypeDTO documentTypeDTO)
|
||||||
{
|
{
|
||||||
//转换实体
|
//转换实体(查询时不需要设置创建人和更新人信息)
|
||||||
DocumentTypeDO documentTypeDO = documentTypeAssembler.toDO(documentTypeDTO);
|
DocumentTypeDO documentTypeDO = new DocumentTypeDO();
|
||||||
|
BeanUtils.copyProperties(documentTypeDTO, documentTypeDO);
|
||||||
startPage();
|
startPage();
|
||||||
List<DocumentTypePO> list = documentTypeApplicationService.queryList(documentTypeDO);
|
List<DocumentTypePO> list = documentTypeApplicationService.queryList(documentTypeDO);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|||||||
@@ -16,12 +16,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
WHERE
|
WHERE
|
||||||
del_flag = 1
|
del_flag = 1
|
||||||
<include refid="common_where"></include>
|
<include refid="common_where"></include>
|
||||||
|
ORDER BY create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<sql id="common_where">
|
<sql id="common_where">
|
||||||
<if test="conditionalMappingDO.topOrganizationId != null and conditionalMappingDO.topOrganizationId != ''">
|
<if test="conditionalMappingDO.topOrganizationId != null and conditionalMappingDO.topOrganizationId != ''">
|
||||||
AND top_organization_id = #{conditionalMappingDO.topOrganizationId}
|
AND top_organization_id = #{conditionalMappingDO.topOrganizationId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="conditionalMappingDO.organizationId != null">
|
||||||
|
AND organization_id = #{conditionalMappingDO.organizationId}
|
||||||
|
</if>
|
||||||
<if test="conditionalMappingDO.sourceContent != null and conditionalMappingDO.sourceContent != ''">
|
<if test="conditionalMappingDO.sourceContent != null and conditionalMappingDO.sourceContent != ''">
|
||||||
AND source_content like concat('%', #{conditionalMappingDO.sourceContent}, '%')
|
AND source_content like concat('%', #{conditionalMappingDO.sourceContent}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -14,12 +14,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from mapping_method
|
from mapping_method
|
||||||
where del_flag = 1
|
where del_flag = 1
|
||||||
<include refid="common_where"/>
|
<include refid="common_where"/>
|
||||||
|
ORDER BY create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<sql id="common_where">
|
<sql id="common_where">
|
||||||
<if test="mappingMethodDO.topOrganizationId != null and mappingMethodDO.topOrganizationId != ''">
|
<if test="mappingMethodDO.topOrganizationId != null and mappingMethodDO.topOrganizationId != ''">
|
||||||
AND top_organization_id = #{mappingMethodDO.topOrganizationId}
|
AND top_organization_id = #{mappingMethodDO.topOrganizationId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="mappingMethodDO.organizationId != null">
|
||||||
|
AND organization_id = #{mappingMethodDO.organizationId}
|
||||||
|
</if>
|
||||||
<if test="mappingMethodDO.methodName != null and mappingMethodDO.methodName != ''">
|
<if test="mappingMethodDO.methodName != null and mappingMethodDO.methodName != ''">
|
||||||
and method_name like concat('%', #{mappingMethodDO.methodName}, '%')
|
and method_name like concat('%', #{mappingMethodDO.methodName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
+43
-4
@@ -24,6 +24,10 @@ import com.mhd.wms.domain.pickingMaterialDetail.service.PickingMaterialDetailDom
|
|||||||
import com.mhd.wms.domain.pickingOrder.repository.po.PickingOrderPO;
|
import com.mhd.wms.domain.pickingOrder.repository.po.PickingOrderPO;
|
||||||
import com.mhd.wms.domain.pickingOrder.repository.todo.PickingOrderDO;
|
import com.mhd.wms.domain.pickingOrder.repository.todo.PickingOrderDO;
|
||||||
import com.mhd.wms.domain.pickingOrder.service.PickingOrderDomainService;
|
import com.mhd.wms.domain.pickingOrder.service.PickingOrderDomainService;
|
||||||
|
import com.mhd.wms.domain.outMaterialDetail.repository.facade.IOutMaterialDetailService;
|
||||||
|
import com.mhd.wms.domain.outMaterialDetail.entity.OutMaterialDetail;
|
||||||
|
import com.mhd.wms.domain.outMaterialDetail.repository.po.OutMaterialDetailPO;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -53,6 +57,8 @@ public class PickingOrderApplicationService {
|
|||||||
private UserServiceFeign userServiceFeign;
|
private UserServiceFeign userServiceFeign;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemServiceFeign systemServiceFeign;
|
private SystemServiceFeign systemServiceFeign;
|
||||||
|
@Autowired
|
||||||
|
private IOutMaterialDetailService outMaterialDetailService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -611,10 +617,43 @@ public class PickingOrderApplicationService {
|
|||||||
PickingMaterialDetailDO returnPickingMaterialDetailDO = new PickingMaterialDetailDO();
|
PickingMaterialDetailDO returnPickingMaterialDetailDO = new PickingMaterialDetailDO();
|
||||||
BeanUtils.copyProperties(pickingMaterialDetailPO, returnPickingMaterialDetailDO);
|
BeanUtils.copyProperties(pickingMaterialDetailPO, returnPickingMaterialDetailDO);
|
||||||
returnPickingMaterialDetailDO.setActualQuantity(pickingMaterialDetailDO.getActualQuantity());
|
returnPickingMaterialDetailDO.setActualQuantity(pickingMaterialDetailDO.getActualQuantity());
|
||||||
returnPickingMaterialDetailDO.setTotalArea(pickingMaterialDetailDO.getTotalArea());
|
|
||||||
returnPickingMaterialDetailDO.setTotalVolume(pickingMaterialDetailDO.getTotalVolume());
|
// 毛重、净重、面积、体积:如果前端传递了值,使用前端传递的值(允许修改);否则从出库单明细中自动带出
|
||||||
returnPickingMaterialDetailDO.setTotalGrossWeight(pickingMaterialDetailDO.getTotalGrossWeight());
|
Long outUniqueId = pickingMaterialDetailPO.getOutUniqueId();
|
||||||
returnPickingMaterialDetailDO.setTotalNetWeight(pickingMaterialDetailDO.getTotalNetWeight());
|
OutMaterialDetail outMaterialDetail = null;
|
||||||
|
if (outUniqueId != null) {
|
||||||
|
outMaterialDetail = outMaterialDetailService.getOne(new QueryWrapper<OutMaterialDetail>().lambda()
|
||||||
|
.eq(OutMaterialDetail::getUniqueId, outUniqueId)
|
||||||
|
.eq(OutMaterialDetail::getDelFlag, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总面积:优先使用前端传递的值,如果为空则从出库单明细中获取
|
||||||
|
if (pickingMaterialDetailDO.getTotalArea() != null) {
|
||||||
|
returnPickingMaterialDetailDO.setTotalArea(pickingMaterialDetailDO.getTotalArea());
|
||||||
|
} else if (outMaterialDetail != null && outMaterialDetail.getTotalArea() != null) {
|
||||||
|
returnPickingMaterialDetailDO.setTotalArea(outMaterialDetail.getTotalArea());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总体积:优先使用前端传递的值,如果为空则从出库单明细中获取
|
||||||
|
if (pickingMaterialDetailDO.getTotalVolume() != null) {
|
||||||
|
returnPickingMaterialDetailDO.setTotalVolume(pickingMaterialDetailDO.getTotalVolume());
|
||||||
|
} else if (outMaterialDetail != null && outMaterialDetail.getTotalVolume() != null) {
|
||||||
|
returnPickingMaterialDetailDO.setTotalVolume(outMaterialDetail.getTotalVolume());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总毛重:优先使用前端传递的值,如果为空则从出库单明细中获取
|
||||||
|
if (pickingMaterialDetailDO.getTotalGrossWeight() != null) {
|
||||||
|
returnPickingMaterialDetailDO.setTotalGrossWeight(pickingMaterialDetailDO.getTotalGrossWeight());
|
||||||
|
} else if (outMaterialDetail != null && outMaterialDetail.getTotalGrossWeight() != null) {
|
||||||
|
returnPickingMaterialDetailDO.setTotalGrossWeight(outMaterialDetail.getTotalGrossWeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总净重:优先使用前端传递的值,如果为空则从出库单明细中获取
|
||||||
|
if (pickingMaterialDetailDO.getTotalNetWeight() != null) {
|
||||||
|
returnPickingMaterialDetailDO.setTotalNetWeight(pickingMaterialDetailDO.getTotalNetWeight());
|
||||||
|
} else if (outMaterialDetail != null && outMaterialDetail.getTotalNetWeight() != null) {
|
||||||
|
returnPickingMaterialDetailDO.setTotalNetWeight(outMaterialDetail.getTotalNetWeight());
|
||||||
|
}
|
||||||
//是否开启了序列号管理
|
//是否开启了序列号管理
|
||||||
if (pickingMaterialDetailPO.getSerialNumberManage() == 1){
|
if (pickingMaterialDetailPO.getSerialNumberManage() == 1){
|
||||||
if (CollectionUtils.isEmpty(pickingMaterialDetailDO.getMaterialDetailSerialNumberList())){
|
if (CollectionUtils.isEmpty(pickingMaterialDetailDO.getMaterialDetailSerialNumberList())){
|
||||||
|
|||||||
+32
-28
@@ -665,18 +665,20 @@ public class StockReceiptOrderApplicationService {
|
|||||||
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOList = stockReceiptOrderDO.getMaterialDetailList();
|
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOList = stockReceiptOrderDO.getMaterialDetailList();
|
||||||
receiptMaterialDetailDOList.forEach(receiptMaterialDetailDO -> {
|
receiptMaterialDetailDOList.forEach(receiptMaterialDetailDO -> {
|
||||||
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOChildrenList1 = receiptMaterialDetailDO.getChildren();
|
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOChildrenList1 = receiptMaterialDetailDO.getChildren();
|
||||||
ReceiptMaterialDetailDO receiptMaterialDetailDOChildren = receiptMaterialDetailDOChildrenList1.stream().filter(p -> 1 == p.getLevel()).collect(Collectors.toList()).get(0);
|
if (receiptMaterialDetailDOChildrenList1 != null && receiptMaterialDetailDOChildrenList1.size() > 0) {
|
||||||
receiptMaterialDetailDO.setMaterialDetailId(receiptMaterialDetailDOChildren.getMaterialDetailId());
|
ReceiptMaterialDetailDO receiptMaterialDetailDOChildren = receiptMaterialDetailDOChildrenList1.stream().filter(p -> 1 == p.getLevel()).collect(Collectors.toList()).get(0);
|
||||||
receiptMaterialDetailDO.setReceiptQuantity(receiptMaterialDetailDOChildren.getReceiptQuantity());
|
receiptMaterialDetailDO.setMaterialDetailId(receiptMaterialDetailDOChildren.getMaterialDetailId());
|
||||||
receiptMaterialDetailDO.setMaterialStatusCode(receiptMaterialDetailDOChildren.getMaterialStatusCode());
|
receiptMaterialDetailDO.setReceiptQuantity(receiptMaterialDetailDOChildren.getReceiptQuantity());
|
||||||
receiptMaterialDetailDO.setBatchNumber(receiptMaterialDetailDOChildren.getBatchNumber());
|
receiptMaterialDetailDO.setMaterialStatusCode(receiptMaterialDetailDOChildren.getMaterialStatusCode());
|
||||||
receiptMaterialDetailDO.setContainerId(receiptMaterialDetailDOChildren.getContainerId());
|
receiptMaterialDetailDO.setBatchNumber(receiptMaterialDetailDOChildren.getBatchNumber());
|
||||||
receiptMaterialDetailDO.setLevel(receiptMaterialDetailDOChildren.getLevel());
|
receiptMaterialDetailDO.setContainerId(receiptMaterialDetailDOChildren.getContainerId());
|
||||||
receiptMaterialDetailDO.setMaterialMoreDetailList(receiptMaterialDetailDOChildren.getMaterialMoreDetailList());
|
receiptMaterialDetailDO.setLevel(receiptMaterialDetailDOChildren.getLevel());
|
||||||
receiptMaterialDetailDO.setMaterialDetailSerialNumberList(receiptMaterialDetailDOChildren.getMaterialDetailSerialNumberList());
|
receiptMaterialDetailDO.setMaterialMoreDetailList(receiptMaterialDetailDOChildren.getMaterialMoreDetailList());
|
||||||
//只留二级
|
receiptMaterialDetailDO.setMaterialDetailSerialNumberList(receiptMaterialDetailDOChildren.getMaterialDetailSerialNumberList());
|
||||||
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOChildrenList2 = receiptMaterialDetailDOChildrenList1.stream().filter(p -> 2 == p.getLevel()).collect(Collectors.toList());
|
//只留二级
|
||||||
receiptMaterialDetailDO.setChildren(receiptMaterialDetailDOChildrenList2);
|
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOChildrenList2 = receiptMaterialDetailDOChildrenList1.stream().filter(p -> 2 == p.getLevel()).collect(Collectors.toList());
|
||||||
|
receiptMaterialDetailDO.setChildren(receiptMaterialDetailDOChildrenList2);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
//收货装配参数
|
//收货装配参数
|
||||||
StockReceiptOrderDO assembleStockReceiptOrderDO = assembleParamByReceipt(stockReceiptOrderDO);
|
StockReceiptOrderDO assembleStockReceiptOrderDO = assembleParamByReceipt(stockReceiptOrderDO);
|
||||||
@@ -727,24 +729,26 @@ public class StockReceiptOrderApplicationService {
|
|||||||
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOList = stockReceiptOrderDO.getMaterialDetailList();
|
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOList = stockReceiptOrderDO.getMaterialDetailList();
|
||||||
receiptMaterialDetailDOList.forEach(receiptMaterialDetailDO -> {
|
receiptMaterialDetailDOList.forEach(receiptMaterialDetailDO -> {
|
||||||
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOChildrenList1 = receiptMaterialDetailDO.getChildren();
|
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOChildrenList1 = receiptMaterialDetailDO.getChildren();
|
||||||
ReceiptMaterialDetailDO receiptMaterialDetailDOChildren = receiptMaterialDetailDOChildrenList1.get(0);
|
if (receiptMaterialDetailDOChildrenList1 != null && receiptMaterialDetailDOChildrenList1.size() > 0) {
|
||||||
receiptMaterialDetailDO.setMaterialDetailId(receiptMaterialDetailDOChildren.getMaterialDetailId());
|
ReceiptMaterialDetailDO receiptMaterialDetailDOChildren = receiptMaterialDetailDOChildrenList1.get(0);
|
||||||
receiptMaterialDetailDO.setReceiptQuantity(receiptMaterialDetailDOChildren.getReceiptQuantity());
|
receiptMaterialDetailDO.setMaterialDetailId(receiptMaterialDetailDOChildren.getMaterialDetailId());
|
||||||
receiptMaterialDetailDO.setMaterialStatusCode(receiptMaterialDetailDOChildren.getMaterialStatusCode());
|
receiptMaterialDetailDO.setReceiptQuantity(receiptMaterialDetailDOChildren.getReceiptQuantity());
|
||||||
receiptMaterialDetailDO.setBatchNumber(receiptMaterialDetailDOChildren.getBatchNumber());
|
receiptMaterialDetailDO.setMaterialStatusCode(receiptMaterialDetailDOChildren.getMaterialStatusCode());
|
||||||
receiptMaterialDetailDO.setContainerId(receiptMaterialDetailDOChildren.getContainerId());
|
receiptMaterialDetailDO.setBatchNumber(receiptMaterialDetailDOChildren.getBatchNumber());
|
||||||
receiptMaterialDetailDO.setLevel(receiptMaterialDetailDOChildren.getLevel());
|
receiptMaterialDetailDO.setContainerId(receiptMaterialDetailDOChildren.getContainerId());
|
||||||
receiptMaterialDetailDO.setMaterialMoreDetailList(receiptMaterialDetailDOChildren.getMaterialMoreDetailList());
|
receiptMaterialDetailDO.setLevel(receiptMaterialDetailDOChildren.getLevel());
|
||||||
receiptMaterialDetailDO.setMaterialDetailSerialNumberList(receiptMaterialDetailDOChildren.getMaterialDetailSerialNumberList());
|
receiptMaterialDetailDO.setMaterialMoreDetailList(receiptMaterialDetailDOChildren.getMaterialMoreDetailList());
|
||||||
//只留二级
|
receiptMaterialDetailDO.setMaterialDetailSerialNumberList(receiptMaterialDetailDOChildren.getMaterialDetailSerialNumberList());
|
||||||
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOChildrenList2 = new ArrayList<>();
|
//只留二级
|
||||||
for (int i = 0; i < receiptMaterialDetailDOChildrenList1.size(); i++){
|
List<ReceiptMaterialDetailDO> receiptMaterialDetailDOChildrenList2 = new ArrayList<>();
|
||||||
if (i == 0){
|
for (int i = 0; i < receiptMaterialDetailDOChildrenList1.size(); i++){
|
||||||
continue;
|
if (i == 0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
receiptMaterialDetailDOChildrenList2.add(receiptMaterialDetailDOChildrenList1.get(i));
|
||||||
}
|
}
|
||||||
receiptMaterialDetailDOChildrenList2.add(receiptMaterialDetailDOChildrenList1.get(i));
|
receiptMaterialDetailDO.setChildren(receiptMaterialDetailDOChildrenList2);
|
||||||
}
|
}
|
||||||
receiptMaterialDetailDO.setChildren(receiptMaterialDetailDOChildrenList2);
|
|
||||||
});
|
});
|
||||||
NoReceiptOrderDO noReceiptOrderDO = assembleParamByNoOrderReceipt(stockReceiptOrderDO);
|
NoReceiptOrderDO noReceiptOrderDO = assembleParamByNoOrderReceipt(stockReceiptOrderDO);
|
||||||
return stockReceiptOrderDomainService.noOrderReceipt(noReceiptOrderDO);
|
return stockReceiptOrderDomainService.noOrderReceipt(noReceiptOrderDO);
|
||||||
|
|||||||
Reference in New Issue
Block a user