解决创建出入库单问题
This commit is contained in:
parent
36b559c7e8
commit
41282b37ba
|
|
@ -26,6 +26,4 @@ public interface CustomerTransactionMapper extends BaseMapper<CustomerTransactio
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateDelFlagByIds(@Param("ids") Long[] ids);
|
int updateDelFlagByIds(@Param("ids") Long[] ids);
|
||||||
|
|
||||||
List<CustomerTransaction> selectList(CustomerTransactionQuery customerTransactionQuery);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,4 @@ public interface SupplierTransactionMapper extends BaseMapper<SupplierTransactio
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateDelFlagByIds(@Param("ids") Long[] ids);
|
int updateDelFlagByIds(@Param("ids") Long[] ids);
|
||||||
|
|
||||||
List<SupplierTransaction> selectList(SupplierTransactionQuery supplierTransactionQuery);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,12 @@ import java.time.LocalDateTime;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.cyl.wms.domain.Customer;
|
import com.cyl.wms.domain.Customer;
|
||||||
|
import com.cyl.wms.domain.SupplierTransaction;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
@ -53,7 +55,23 @@ public class CustomerTransactionService {
|
||||||
if (page != null) {
|
if (page != null) {
|
||||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||||
}
|
}
|
||||||
return customerTransactionMapper.selectList(query);
|
LambdaQueryWrapper<CustomerTransaction> qw = new LambdaQueryWrapper<>();
|
||||||
|
if (!StringUtils.isEmpty(query.getCustomerId())){
|
||||||
|
qw.eq(CustomerTransaction::getCustomerId, query.getCustomerId());
|
||||||
|
}
|
||||||
|
if (!StringUtils.isEmpty(query.getTransactionCode())){
|
||||||
|
qw.eq(CustomerTransaction::getTransactionCode, query.getTransactionCode());
|
||||||
|
}
|
||||||
|
if (!StringUtils.isEmpty(query.getTransactionType())){
|
||||||
|
qw.eq(CustomerTransaction::getTransactionType, query.getTransactionType());
|
||||||
|
}
|
||||||
|
Optional.ofNullable(query.getStartTime()).ifPresent(
|
||||||
|
startTime -> qw.ge(CustomerTransaction::getCreateTime, query.getStartTime())
|
||||||
|
);
|
||||||
|
Optional.ofNullable(query.getEndTime()).ifPresent(
|
||||||
|
startTime -> qw.le(CustomerTransaction::getCreateTime, query.getEndTime())
|
||||||
|
);
|
||||||
|
return customerTransactionMapper.selectList(qw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import java.time.LocalDateTime;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
|
@ -53,7 +54,23 @@ public class SupplierTransactionService {
|
||||||
if (page != null) {
|
if (page != null) {
|
||||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||||
}
|
}
|
||||||
return supplierTransactionMapper.selectList(query);
|
LambdaQueryWrapper<SupplierTransaction> qw = new LambdaQueryWrapper<>();
|
||||||
|
if (!StringUtils.isEmpty(query.getSupplierId())){
|
||||||
|
qw.eq(SupplierTransaction::getSupplierId, query.getSupplierId());
|
||||||
|
}
|
||||||
|
if (!StringUtils.isEmpty(query.getTransactionCode())){
|
||||||
|
qw.eq(SupplierTransaction::getTransactionCode, query.getTransactionCode());
|
||||||
|
}
|
||||||
|
if (!StringUtils.isEmpty(query.getTransactionType())){
|
||||||
|
qw.eq(SupplierTransaction::getTransactionType, query.getTransactionType());
|
||||||
|
}
|
||||||
|
Optional.ofNullable(query.getStartTime()).ifPresent(
|
||||||
|
startTime -> qw.ge(SupplierTransaction::getCreateTime, query.getStartTime())
|
||||||
|
);
|
||||||
|
Optional.ofNullable(query.getEndTime()).ifPresent(
|
||||||
|
startTime -> qw.le(SupplierTransaction::getCreateTime, query.getEndTime())
|
||||||
|
);
|
||||||
|
return supplierTransactionMapper.selectList(qw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -36,23 +36,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectList" resultMap="CustomerTransactionResult">
|
|
||||||
<include refid="selectCustomerTransactionVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="customerId != null and customerId != ''">
|
|
||||||
customer_id=#{customerId}
|
|
||||||
</if>
|
|
||||||
<if test="transactionCode != null and transactionCode != ''">
|
|
||||||
and transaction_code=#{transactionCode}
|
|
||||||
</if>
|
|
||||||
<if test="transactionType != null and transactionType != ''">
|
|
||||||
and transaction_type=#{transactionType}
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and endTime != null ">
|
|
||||||
and create_time between #{startTime} and #{endTime}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateDelFlagByIds">
|
<update id="updateDelFlagByIds">
|
||||||
update wms_customer_transaction set del_flag=1
|
update wms_customer_transaction set del_flag=1
|
||||||
|
|
|
||||||
|
|
@ -36,23 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectList" resultMap="SupplierTransactionResult">
|
|
||||||
<include refid="selectSupplierTransactionVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="supplierId != null and supplierId != ''">
|
|
||||||
supplier_id=#{supplierId}
|
|
||||||
</if>
|
|
||||||
<if test="transactionCode != null and transactionCode != ''">
|
|
||||||
and transaction_code=#{transactionCode}
|
|
||||||
</if>
|
|
||||||
<if test="transactionType != null and transactionType != ''">
|
|
||||||
and transaction_type=#{transactionType}
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null and endTime != null ">
|
|
||||||
and create_time between #{startTime} and #{endTime}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<update id="updateDelFlagByIds">
|
<update id="updateDelFlagByIds">
|
||||||
update wms_supplier_transaction set del_flag=1
|
update wms_supplier_transaction set del_flag=1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue