提交 0162d6a2 authored 作者: huyufan's avatar huyufan

处理BUG

上级 9be6c577
...@@ -18,7 +18,15 @@ public interface OwnerRunningWaterRecordDao extends BaseDao<OwnerRunningWaterRec ...@@ -18,7 +18,15 @@ public interface OwnerRunningWaterRecordDao extends BaseDao<OwnerRunningWaterRec
IPage<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountPageList(PagePlatformPrepaidFreightAccountParam param); IPage<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountPageList(PagePlatformPrepaidFreightAccountParam param);
List<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountList(PagePlatformPrepaidFreightAccountParam param);
IPage<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterPageList(PageOwnerAccountRunningWaterParam param); IPage<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterPageList(PageOwnerAccountRunningWaterParam param);
List<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterList(PageOwnerAccountRunningWaterParam param);
List<OwnerRunningWaterRecord> getOwnerRunningWaterRecord(String orderNo); List<OwnerRunningWaterRecord> getOwnerRunningWaterRecord(String orderNo);
List<OwnerAccountRunningWaterRecordVO> marginAccountList(PagePlatformMarginAccountParam param);
} }
...@@ -30,12 +30,22 @@ public class OwnerRunningWaterRecordDaoImpl extends BaseDaoImpl<OwnerRunningWate ...@@ -30,12 +30,22 @@ public class OwnerRunningWaterRecordDaoImpl extends BaseDaoImpl<OwnerRunningWate
return baseMapper.prepaidFreightAccountPageList(page, param); return baseMapper.prepaidFreightAccountPageList(page, param);
} }
@Override
public List<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountList(PagePlatformPrepaidFreightAccountParam param) {
return baseMapper.prepaidFreightAccountList(param);
}
@Override @Override
public IPage<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterPageList(PageOwnerAccountRunningWaterParam param) { public IPage<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterPageList(PageOwnerAccountRunningWaterParam param) {
Page<OwnerAccountRunningWaterRecordVO> page = Page.of(param.getPage(), param.getPageSize()); Page<OwnerAccountRunningWaterRecordVO> page = Page.of(param.getPage(), param.getPageSize());
return baseMapper.ownerAccountRunningWaterPageList(page, param); return baseMapper.ownerAccountRunningWaterPageList(page, param);
} }
@Override
public List<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterList(PageOwnerAccountRunningWaterParam param) {
return baseMapper.ownerAccountRunningWaterList(param);
}
@Override @Override
public List<OwnerRunningWaterRecord> getOwnerRunningWaterRecord(String orderNo) { public List<OwnerRunningWaterRecord> getOwnerRunningWaterRecord(String orderNo) {
return baseMapper.selectList(lQrWrapper().eq(OwnerRunningWaterRecord::getOrderNo, orderNo) return baseMapper.selectList(lQrWrapper().eq(OwnerRunningWaterRecord::getOrderNo, orderNo)
...@@ -43,4 +53,9 @@ public class OwnerRunningWaterRecordDaoImpl extends BaseDaoImpl<OwnerRunningWate ...@@ -43,4 +53,9 @@ public class OwnerRunningWaterRecordDaoImpl extends BaseDaoImpl<OwnerRunningWate
.isNull(OwnerRunningWaterRecord::getOrderChildNo) .isNull(OwnerRunningWaterRecord::getOrderChildNo)
); );
} }
@Override
public List<OwnerAccountRunningWaterRecordVO> marginAccountList(PagePlatformMarginAccountParam param) {
return baseMapper.marginAccountList(param);
}
} }
...@@ -12,6 +12,8 @@ import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO; ...@@ -12,6 +12,8 @@ import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider; import org.apache.ibatis.annotations.SelectProvider;
import java.util.List;
/** /**
* 货主流水记录 * 货主流水记录
*/ */
...@@ -26,4 +28,14 @@ public interface OwnerRunningWaterRecordMapper extends BaseMapper<OwnerRunningWa ...@@ -26,4 +28,14 @@ public interface OwnerRunningWaterRecordMapper extends BaseMapper<OwnerRunningWa
@SelectProvider(type = OwnerRunningWaterRecordSqlProvider.class, method = "ownerAccountRunningWaterPageList") @SelectProvider(type = OwnerRunningWaterRecordSqlProvider.class, method = "ownerAccountRunningWaterPageList")
IPage<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterPageList(Page<OwnerAccountRunningWaterRecordVO> page, PageOwnerAccountRunningWaterParam param); IPage<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterPageList(Page<OwnerAccountRunningWaterRecordVO> page, PageOwnerAccountRunningWaterParam param);
@SelectProvider(type = OwnerRunningWaterRecordSqlProvider.class, method = "ownerAccountRunningWaterList")
List<OwnerAccountRunningWaterRecordVO> ownerAccountRunningWaterList(PageOwnerAccountRunningWaterParam param);
@SelectProvider(type = OwnerRunningWaterRecordSqlProvider.class, method = "prepaidFreightAccountList")
List<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountList(PagePlatformPrepaidFreightAccountParam param);
@SelectProvider(type = OwnerRunningWaterRecordSqlProvider.class, method = "marginAccountList")
List<OwnerAccountRunningWaterRecordVO> marginAccountList(PagePlatformMarginAccountParam param);
} }
\ No newline at end of file
...@@ -185,7 +185,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -185,7 +185,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
//冻结金额 //冻结金额
runningWaterRecord.setFrozenBalance(caseOutBalance); runningWaterRecord.setFrozenBalance(caseOutBalance);
//扣除金额 //扣除金额
runningWaterRecord.setTakeOutBalance(BigDecimal.ZERO); runningWaterRecord.setTakeOutBalance(caseOutBalance);
runningWaterRecord.setOwnerUserNo(param.getOwnerUserNo()); runningWaterRecord.setOwnerUserNo(param.getOwnerUserNo());
runningWaterRecord.setAccountType(param.getAccountType()); runningWaterRecord.setAccountType(param.getAccountType());
...@@ -405,8 +405,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -405,8 +405,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
@Override @Override
public SXSSFWorkbook exportMarginAccountPageList(PagePlatformMarginAccountParam param) { public SXSSFWorkbook exportMarginAccountPageList(PagePlatformMarginAccountParam param) {
IPage<OwnerAccountRunningWaterRecordVO> page = ownerRunningWaterRecordDao.marginAccountPageList(param); List<OwnerAccountRunningWaterRecordVO> list = ownerRunningWaterRecordDao.marginAccountList(param);
List<OwnerAccountRunningWaterRecordVO> list = page.getRecords();
// 组装表头 // 组装表头
List<ExcelField> fieldList = new ArrayList<>(); List<ExcelField> fieldList = new ArrayList<>();
fieldList.add(new ExcelField(0, "序号", "index", 2000)); fieldList.add(new ExcelField(0, "序号", "index", 2000));
...@@ -460,8 +459,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -460,8 +459,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
@Override @Override
public SXSSFWorkbook exportPrepaidFreightAccountPageList(PagePlatformPrepaidFreightAccountParam param) { public SXSSFWorkbook exportPrepaidFreightAccountPageList(PagePlatformPrepaidFreightAccountParam param) {
IPage<OwnerAccountRunningWaterRecordVO> page = ownerRunningWaterRecordDao.prepaidFreightAccountPageList(param); List<OwnerAccountRunningWaterRecordVO> list = ownerRunningWaterRecordDao.prepaidFreightAccountList(param);
List<OwnerAccountRunningWaterRecordVO> list = page.getRecords();
// 组装表头 // 组装表头
List<ExcelField> fieldList = new ArrayList<>(); List<ExcelField> fieldList = new ArrayList<>();
fieldList.add(new ExcelField(0, "序号", "index", 2000)); fieldList.add(new ExcelField(0, "序号", "index", 2000));
......
...@@ -39,8 +39,7 @@ public class OwnerRunningWaterRecordServiceImpl implements OwnerRunningWaterReco ...@@ -39,8 +39,7 @@ public class OwnerRunningWaterRecordServiceImpl implements OwnerRunningWaterReco
public SXSSFWorkbook exportOwnerAccountRunningWaterPageList(PageOwnerAccountRunningWaterParam param) { public SXSSFWorkbook exportOwnerAccountRunningWaterPageList(PageOwnerAccountRunningWaterParam param) {
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo(); UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
param.setOwnerUserNo(loginUserInfo.getUserNo()); param.setOwnerUserNo(loginUserInfo.getUserNo());
IPage<OwnerAccountRunningWaterRecordVO> page = ownerRunningWaterRecordDao.ownerAccountRunningWaterPageList(param); List<OwnerAccountRunningWaterRecordVO> list = ownerRunningWaterRecordDao.ownerAccountRunningWaterList(param);
List<OwnerAccountRunningWaterRecordVO> list = page.getRecords();
// 组装表头 // 组装表头
List<ExcelField> fieldList = new ArrayList<>(); List<ExcelField> fieldList = new ArrayList<>();
fieldList.add(new ExcelField(0, "序号", "index", 2000)); fieldList.add(new ExcelField(0, "序号", "index", 2000));
......
...@@ -34,6 +34,30 @@ public class OwnerRunningWaterRecordSqlProvider { ...@@ -34,6 +34,30 @@ public class OwnerRunningWaterRecordSqlProvider {
return sql; return sql;
} }
public String marginAccountList(@Param("param") PagePlatformMarginAccountParam param) {
String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," +
" a.owner_user_name,a.running_water_no, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance," +
" a.account_balance,a.usable_balance, a.frozen_balance,a.take_out_balance,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time");
FROM("owner_running_water_record a");
WHERE("a.account_type =" + OwnerAccountEnum.AccountTypeStatus.MARGIN_ACCOUNT.getCode());
WHERE("a.owner_user_no = #{param.ownerUserNo}");
if (StringUtils.isNotBlank(param.getBeginTime()) && StringUtils.isNotBlank(param.getEndTime())) {
WHERE("a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}");
}
if (ObjectUtil.isNotNull(param.getRunningWaterType())) {
WHERE("a.running_water_type = #{param.runningWaterType}");
}
if (StringUtils.isNotBlank(param.getRunningWaterNo())) {
WHERE("a.running_water_no = #{param.runningWaterNo}");
}
ORDER_BY("a.create_time desc");
}}.toString();
return sql;
}
public String prepaidFreightAccountPageList(@Param("param") PagePlatformPrepaidFreightAccountParam param) { public String prepaidFreightAccountPageList(@Param("param") PagePlatformPrepaidFreightAccountParam param) {
String sql = new SQL() {{ String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," + SELECT("a.id, a.owner_user_no," +
...@@ -60,6 +84,33 @@ public class OwnerRunningWaterRecordSqlProvider { ...@@ -60,6 +84,33 @@ public class OwnerRunningWaterRecordSqlProvider {
return sql; return sql;
} }
public String prepaidFreightAccountList(@Param("param") PagePlatformPrepaidFreightAccountParam param) {
String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," +
" a.owner_user_name,a.running_water_no, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance," +
" a.account_balance,a.usable_balance, a.frozen_balance,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time");
FROM("owner_running_water_record a");
WHERE("a.account_type =" + OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode());
WHERE("a.owner_user_no = #{param.ownerUserNo}");
if (StringUtils.isNotBlank(param.getBeginTime()) && StringUtils.isNotBlank(param.getEndTime())) {
WHERE("a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}");
}
if (ObjectUtil.isNotNull(param.getRunningWaterType())) {
WHERE("a.running_water_type = #{param.runningWaterType}");
}
if (StringUtils.isNotBlank(param.getOrderNo())) {
WHERE("a.order_no = #{param.orderNo}");
}
if (StringUtils.isNotBlank(param.getOrderChildNo())) {
WHERE("a.order_child_no = #{param.orderChildNo}");
}
ORDER_BY("a.create_time desc");
}}.toString();
return sql;
}
public String ownerAccountRunningWaterPageList(@Param("param") PageOwnerAccountRunningWaterParam param) { public String ownerAccountRunningWaterPageList(@Param("param") PageOwnerAccountRunningWaterParam param) {
String sql = new SQL() {{ String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," + SELECT("a.id, a.owner_user_no," +
...@@ -83,4 +134,28 @@ public class OwnerRunningWaterRecordSqlProvider { ...@@ -83,4 +134,28 @@ public class OwnerRunningWaterRecordSqlProvider {
return sql; return sql;
} }
public String ownerAccountRunningWaterList(@Param("param") PageOwnerAccountRunningWaterParam param) {
String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," +
" a.owner_user_name, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance," +
" a.account_balance,a.usable_balance, a.frozen_balance,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time");
FROM("owner_running_water_record a");
WHERE("a.owner_user_no = #{param.ownerUserNo}");
if (ObjectUtil.isNotNull(param.getAccountType())) {
WHERE("a.account_type = #{param.accountType}");
}
if (StringUtils.isNotBlank(param.getBeginTime()) && StringUtils.isNotBlank(param.getEndTime())) {
WHERE("a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}");
}
if (ObjectUtil.isNotNull(param.getRunningWaterType())) {
WHERE("a.running_water_type = #{param.runningWaterType}");
}
ORDER_BY("a.create_time desc");
}}.toString();
return sql;
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论