汇总代码提交

pro
郑明梁 2 years ago
parent 269ddea831
commit 847de9c01b

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import javax.validation.Valid;
import java.math.BigDecimal;
@Data
@ -182,4 +183,7 @@ public class IoOrderDetailResultEntity {
@TableField(value = "remark5")
private String remark5;
@TableField(exist = false)
private String deptCode;
}

@ -163,4 +163,10 @@ public class IoStatDayEntity {
@TableField(value = "updateTime")
private Date updateTime;
@TableField(value = "deptCode")
private String deptCode;
@TableField(exist = false)
private String deptName;
}

@ -157,4 +157,9 @@ public class IoStatMonthEntity {
@TableField(value = "updateTime")
private Date updateTime;
@TableField(value = "deptCode")
private String deptCode;
@TableField(exist = false)
private String deptName;
}

@ -151,4 +151,7 @@ public class IoStatQuarterEntity {
@TableField(value = "updateTime")
private Date updateTime;
@TableField(value = "deptCode")
private String deptCode;
}

@ -145,4 +145,8 @@ public class IoStatYearEntity {
@TableField(value = "updateTime")
private Date updateTime;
@TableField(value = "deptCode")
private String deptCode;
}

@ -69,7 +69,7 @@ public class IoStatDayServiceImpl implements IoStatDayService {
IoStatDayEntity statData = getStatData(dataList, orderDetailResultEntity, yesterday);
//查询此单是出库还是入库
IoOrderEntity order = orderDao.selectOne(new QueryWrapper<IoOrderEntity>().select("mainAction").eq("billNo", orderDetailResultEntity.getOrderIdFk()));
IoOrderEntity order = orderDao.selectOne(new QueryWrapper<IoOrderEntity>().select("mainAction").eq("billNo", orderDetailResultEntity.getOrderIdFk()).eq("deptCode",orderDetailResultEntity.getDeptCode()));
if (order.getMainAction().equals(ConstantType.TYPE_PUT)) {
//入库
statData.setInCount(orderDetailResultEntity.getReCount() + statData.getInCount());
@ -129,7 +129,7 @@ public class IoStatDayServiceImpl implements IoStatDayService {
private IoStatDayEntity getStatData(List<IoStatDayEntity> dataList, IoOrderDetailResultEntity orderDetailResultEntity, DateTime yesterday) {
if (CollUtil.isNotEmpty(dataList)) {
for (IoStatDayEntity statDayEntity : dataList) {
if (Long.valueOf(statDayEntity.getRelIdFk()).equals(orderDetailResultEntity.getBindRlFk())) {
if (Long.valueOf(statDayEntity.getRelIdFk()).equals(orderDetailResultEntity.getBindRlFk()) && statDayEntity.getDeptCode().equals(orderDetailResultEntity.getDeptCode())) {
if ((StrUtil.isNotBlank(statDayEntity.getBatchNo()) && StrUtil.isNotBlank(orderDetailResultEntity.getBatchNo())) && statDayEntity.getBatchNo().equals(orderDetailResultEntity.getBatchNo())) {
return statDayEntity;
} else if (StrUtil.isBlank(statDayEntity.getBatchNo()) && StrUtil.isBlank(orderDetailResultEntity.getBatchNo())) {
@ -140,6 +140,7 @@ public class IoStatDayServiceImpl implements IoStatDayService {
}
IoStatDayEntity statData = new IoStatDayEntity();
statData.setDeptCode(orderDetailResultEntity.getDeptCode());
statData.setYear(yesterday.year());
statData.setQuarter(yesterday.quarter());
statData.setMonth(yesterday.monthBaseOne());

@ -74,7 +74,7 @@ public class IoStatMonthServiceImpl implements IoStatMonthService {
IoStatMonthEntity statData = getStatData(dataList, orderDetailResultEntity, lastMonth);
//查询此单是出库还是入库
IoOrderEntity order = orderDao.selectOne(new QueryWrapper<IoOrderEntity>().select("mainAction").eq("billNo", orderDetailResultEntity.getOrderIdFk()));
IoOrderEntity order = orderDao.selectOne(new QueryWrapper<IoOrderEntity>().select("mainAction").eq("billNo", orderDetailResultEntity.getOrderIdFk()).eq("deptCode",orderDetailResultEntity.getDeptCode()));
if (order.getMainAction().equals(ConstantType.TYPE_PUT)) {
//入库
statData.setInCount(orderDetailResultEntity.getReCount() + statData.getInCount());
@ -175,7 +175,7 @@ public class IoStatMonthServiceImpl implements IoStatMonthService {
if (CollUtil.isNotEmpty(dataList)) {
for (IoStatMonthEntity statDayEntity : dataList) {
if (Long.valueOf(statDayEntity.getRelIdFk()).equals(orderDetailResultEntity.getBindRlFk())) {
if (Long.valueOf(statDayEntity.getRelIdFk()).equals(orderDetailResultEntity.getBindRlFk()) && statDayEntity.getDeptCode().equals(orderDetailResultEntity.getDeptCode())) {
if ((StrUtil.isNotBlank(statDayEntity.getBatchNo()) && StrUtil.isNotBlank(orderDetailResultEntity.getBatchNo())) && statDayEntity.getBatchNo().equals(orderDetailResultEntity.getBatchNo())) {
return statDayEntity;
} else if (StrUtil.isBlank(statDayEntity.getBatchNo()) && StrUtil.isBlank(orderDetailResultEntity.getBatchNo())) {
@ -187,6 +187,7 @@ public class IoStatMonthServiceImpl implements IoStatMonthService {
IoStatMonthEntity statData = new IoStatMonthEntity();
statData.setYear(lastMonth.year());
statData.setDeptCode(orderDetailResultEntity.getDeptCode());
statData.setQuarter(lastMonth.quarter());
statData.setMonth(lastMonth.monthBaseOne());
statData.setRelIdFk(String.valueOf(orderDetailResultEntity.getBindRlFk()));
@ -268,7 +269,8 @@ public class IoStatMonthServiceImpl implements IoStatMonthService {
.filter(notComment -> {
List<IoStatMonthEntity> filtered = newIoStatDayEntity.stream().filter(all ->
Objects.equals(all.getBatchNo(), notComment.getBatchNo()) // 使用 Objects.equals 来进行非空判断
&& Objects.equals(all.getRelIdFk(), notComment.getRelIdFk()))
&& Objects.equals(all.getRelIdFk(), notComment.getRelIdFk())
&& Objects.equals(all.getDeptCode(), notComment.getDeptCode()))
.collect(Collectors.toList());
return filtered.isEmpty();
}).collect(Collectors.toList());

@ -84,8 +84,10 @@
coName,
spec,
price,
reCount
reCount,
io_order.deptCode
from io_order_detail_result
left JOIN io_order on io_order.billNo=io_order_detail_result.orderIdFk
<where>
<if test="list != null and list.size() > 0 ">
orderIdFk in

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.inout.IoStatDayDao">
<select id="filterList" resultType="com.glxp.api.entity.inout.IoStatDayEntity">
select *
select *, ( SELECT NAME FROM auth_dept WHERE io_stat_day.deptCode = auth_dept.CODE ) deptName
from io_stat_day
<where>
<if test="recordKey != null and recordKey != ''">

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.inout.IoStatMonthDao">
<select id="filterList" resultType="com.glxp.api.entity.inout.IoStatMonthEntity">
select *
select *, ( SELECT NAME FROM auth_dept WHERE io_stat_month.deptCode = auth_dept.CODE ) deptName
from io_stat_month
<where>
<if test="recordKey != null and recordKey != ''">

Loading…
Cancel
Save