库存详情新增入库数量与出库数量,方便后续分组统计查询

master
anthonywj 2 years ago
parent 411499358d
commit 0cda57721b

@ -95,6 +95,13 @@ public class InvPreInProductDetailEntity {
@TableField(value = "reCount")
private int reCount;
@TableField(value = "inCount")
private int inCount;
@TableField(value = "outCount")
private int outCount;
/**
*
*/
@ -126,7 +133,6 @@ public class InvPreInProductDetailEntity {
private Date updateTime;
public static final String COL_ID = "id";
public static final String COL_CODE = "code";

@ -89,12 +89,21 @@ public class InvPreProductDetailEntity {
@TableField(value = "`count`")
private int count;
@TableField(value = "inCount")
private int inCount;
@TableField(value = "outCount")
private int outCount;
/**
*
*/
@TableField(value = "reCount")
private int reCount;
/**
*
*/
@ -126,7 +135,6 @@ public class InvPreProductDetailEntity {
private Date updateTime;
public static final String COL_ID = "id";
public static final String COL_CODE = "code";

@ -80,6 +80,13 @@ public class InvProductDetailEntity {
@TableField(value = "reCount")
private int reCount;
@TableField(value = "inCount")
private int inCount;
@TableField(value = "outCount")
private int outCount;
/**
*
*/

@ -102,6 +102,12 @@ public class IoGenInvService {
invProductDetailEntity.setRelId(codeEntity.getRelId());
invProductDetailEntity.setUpdateTime(new Date());
invProductDetailEntity.setPurchaseType(ConstantStatus.PRUCHASE_COMMON);
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invProductDetailEntity.setInCount(invProductDetailEntity.getReCount());
} else if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invProductDetailEntity.setOutCount(invProductDetailEntity.getReCount());
}
invProductDetailEntities.add(invProductDetailEntity);
}
BasicBusTypePreEntity basicBusTypePreEntity = basicBusTypePreService.findByOriginAction(orderEntity.getAction());
@ -166,6 +172,12 @@ public class IoGenInvService {
invProductDetailEntity.setRelId(codeEntity.getRelId());
invProductDetailEntity.setUpdateTime(new Date());
invProductDetailEntity.setPurchaseType(ConstantStatus.PRUCHASE_COMMON);
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invProductDetailEntity.setInCount(invProductDetailEntity.getReCount());
} else if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invProductDetailEntity.setOutCount(invProductDetailEntity.getReCount());
}
invProductDetailEntities.add(invProductDetailEntity);
}
invPreProductDetailService.insertList(invProductDetailEntities);
@ -241,6 +253,12 @@ public class IoGenInvService {
invProductDetailEntity.setRelId(codeEntity.getRelId());
invProductDetailEntity.setUpdateTime(new Date());
invProductDetailEntity.setPurchaseType(ConstantStatus.PRUCHASE_COMMON);
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invProductDetailEntity.setInCount(invProductDetailEntity.getReCount());
} else if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invProductDetailEntity.setOutCount(invProductDetailEntity.getReCount());
}
invProductDetailEntities.add(invProductDetailEntity);
}
invPreinProductDetailService.insertList(invProductDetailEntities);

@ -45,6 +45,11 @@ public class InvPreInProductDetailServiceImpl implements InvPreinProductDetailSe
@Override
public int insert(InvPreInProductDetailEntity invPreInProductDetailEntity) {
if (invPreInProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invPreInProductDetailEntity.setInCount(invPreInProductDetailEntity.getReCount());
} else if (invPreInProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invPreInProductDetailEntity.setOutCount(invPreInProductDetailEntity.getReCount());
}
return invPreInProductDetailDao.insert(invPreInProductDetailEntity);
}
@ -79,6 +84,11 @@ public class InvPreInProductDetailServiceImpl implements InvPreinProductDetailSe
@Override
public boolean update(InvPreInProductDetailEntity invPreInProductDetailEntity) {
if (invPreInProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invPreInProductDetailEntity.setInCount(invPreInProductDetailEntity.getReCount());
} else if (invPreInProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invPreInProductDetailEntity.setOutCount(invPreInProductDetailEntity.getReCount());
}
return invPreInProductDetailDao.updateById(invPreInProductDetailEntity) == 1 ? true : false;
}

@ -45,6 +45,11 @@ public class InvPreProductDetailServiceImpl implements InvPreProductDetailServic
@Override
public int insert(InvPreProductDetailEntity invPreProductDetailEntity) {
if (invPreProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invPreProductDetailEntity.setInCount(invPreProductDetailEntity.getReCount());
} else if (invPreProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invPreProductDetailEntity.setOutCount(invPreProductDetailEntity.getReCount());
}
return invPreProductDetailDao.insert(invPreProductDetailEntity);
}
@ -73,6 +78,11 @@ public class InvPreProductDetailServiceImpl implements InvPreProductDetailServic
@Override
public boolean update(InvPreProductDetailEntity invPreProductDetailEntity) {
if (invPreProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invPreProductDetailEntity.setInCount(invPreProductDetailEntity.getReCount());
} else if (invPreProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invPreProductDetailEntity.setOutCount(invPreProductDetailEntity.getReCount());
}
return invPreProductDetailDao.updateById(invPreProductDetailEntity) == 1 ? true : false;
}

@ -40,6 +40,11 @@ public class InvProductDetailServiceImpl implements InvProductDetailService {
@Override
public int insert(InvProductDetailEntity invProductDetailEntity) {
invProductDetailEntity.setId(null);
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invProductDetailEntity.setInCount(invProductDetailEntity.getReCount());
} else if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invProductDetailEntity.setOutCount(invProductDetailEntity.getReCount());
}
return invProductDetailDao.insert(invProductDetailEntity);
}
@ -73,6 +78,12 @@ public class InvProductDetailServiceImpl implements InvProductDetailService {
@Override
public int update(InvProductDetailEntity invProductDetailEntity) {
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
invProductDetailEntity.setInCount(invProductDetailEntity.getReCount());
} else if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
invProductDetailEntity.setOutCount(invProductDetailEntity.getReCount());
}
return invProductDetailDao.updateById(invProductDetailEntity);
}

@ -316,13 +316,13 @@
ip.deptCode,
ip.invCode
from inv_product ip
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join inv_product_detail ipd on ip.invCode = ipd.invCode and ip.relIdFk = ipd.relId and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
inner join basic_udirel on ip.relIdFk = basic_udirel.id
inner join basic_products bp on basic_udirel.uuid = bp.uuid
left join basic_corp on ip.supId = basic_corp.erpId
left join auth_dept on auth_dept.code = ip.deptCode
left join auth_warehouse on auth_warehouse.code = ip.invCode
left join inv_product_detail ipd on ip.invCode = ipd.invCode and ip.relIdFk = ipd.relId and
ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')
<where>
bp.diType = 1
<if test="cpmctymc != null and cpmctymc != ''">

@ -1,9 +1,13 @@
# 字段新增 表名字段名字段类型修改方式1新增2修改3删除
CALL Pro_Temp_ColumnWork('auth_user_bustype', 'updateTime', 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'updateTime', 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'updateTime', 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 1);
CALL Pro_Temp_ColumnWork('auth_dept_user', 'updateTime', 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 1);
CALL Pro_Temp_ColumnWork('auth_user_bustype', 'updateTime',
'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'updateTime',
'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'updateTime',
'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 1);
CALL Pro_Temp_ColumnWork('auth_dept_user', 'updateTime',
'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'department', 'tinyint ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'warehouseDict', 'tinyint ', 1);
@ -183,6 +187,14 @@ CALL Pro_Temp_ColumnWork('inv_product', 'planOutCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'onWayCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product', 'availableStock', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product_detail', 'inCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_product_detail', 'outCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'inCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'outCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'inCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'outCount', 'int ', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'updateTime', 'datetime ', 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'basicType', 'tinyint', 1);

Loading…
Cancel
Save