1.修复平衡补单失败问题

2.条码删除完,删除单据时同步重置补单字段,修复单据删除但无法补单导致的无头数据问题
master
x_z 3 years ago
parent f443525d18
commit 177178a6a2

@ -53,4 +53,20 @@ public interface OrderDao extends BaseMapper<OrderEntity> {
* @param orderId * @param orderId
*/ */
void updateOrderStatus(@Param("orderStatus") Integer orderStatus, @Param("orderId") String orderId); void updateOrderStatus(@Param("orderStatus") Integer orderStatus, @Param("orderId") String orderId);
/**
*
*
* @param orderId
* @return
*/
String selectOrderIdInSupplementNo(@Param("orderId") String orderId);
/**
*
*
* @param supplementNo
* @param orderId
*/
void updateSupplementNo(@Param("supplementNo") String supplementNo, @Param("orderId") String orderId);
} }

@ -220,6 +220,7 @@ public class OrderService {
codes.forEach(code -> { codes.forEach(code -> {
WarehousetempEntity supplementCode = new WarehousetempEntity(); WarehousetempEntity supplementCode = new WarehousetempEntity();
BeanUtil.copyProperties(code, supplementCode); BeanUtil.copyProperties(code, supplementCode);
supplementCode.setId(null);
supplementCode.setFromCorpId(supplementOrder.getFromCorpId()); supplementCode.setFromCorpId(supplementOrder.getFromCorpId());
supplementCode.setFromCorp(supplementOrder.getFromCorp()); supplementCode.setFromCorp(supplementOrder.getFromCorp());
supplementCode.setLocStorageCode(supplementOrder.getLocStorageCode()); supplementCode.setLocStorageCode(supplementOrder.getLocStorageCode());

@ -112,6 +112,12 @@ public class WarehouseTempService {
//判断此单据是否还存在条码,如果不存在,则直接删除此单据 //判断此单据是否还存在条码,如果不存在,则直接删除此单据
int count = codesTempDao.countByOrderId(warehousetemp.getOrderId()); int count = codesTempDao.countByOrderId(warehousetemp.getOrderId());
if (count == 0) { if (count == 0) {
//查询此单据是否存在补单数据,如果有,则清空对向单据的补单单号字段
String orderId = orderDao.selectOrderIdInSupplementNo(warehousetemp.getOrderId());
if (StrUtil.isNotBlank(orderId)) {
//将此单据的补单单号清空
orderDao.updateSupplementNo(null, orderId);
}
orderDao.deleteById(warehousetemp.getOrderId()); orderDao.deleteById(warehousetemp.getOrderId());
} }
return ResultVOUtils.success(); return ResultVOUtils.success();

@ -51,7 +51,7 @@ public class InoutUtils {
} }
List<WarehouseEntity> inList = new ArrayList<>(); List<WarehouseEntity> inList = new ArrayList<>();
List<WarehouseEntity> outList = new ArrayList<>(); List<WarehouseEntity> outList = new ArrayList<>();
if (warehouseEntityList != null && warehouseEntityList.size() > 0) { if (CollUtil.isNotEmpty(warehouseEntityList)) {
for (int i = 0; i < warehouseEntityList.size(); i++) { for (int i = 0; i < warehouseEntityList.size(); i++) {
WarehouseEntity temp = warehouseEntityList.get(i); WarehouseEntity temp = warehouseEntityList.get(i);
if (temp.getAction().equals(TypeConstant.TYPE_CODE_DESTORY)) { //过滤已销毁的 if (temp.getAction().equals(TypeConstant.TYPE_CODE_DESTORY)) { //过滤已销毁的

@ -25,10 +25,26 @@
</update> </update>
<select id="selectStatusByOrderId" resultType="int"> <select id="selectStatusByOrderId" resultType="int">
select status from io_order where orderId = #{orderId} select status
from io_order
where orderId = #{orderId}
</select> </select>
<update id="updateOrderStatus"> <update id="updateOrderStatus">
update io_order set status = #{orderStatus} where orderId = #{orderId} update io_order
set status = #{orderStatus}
where orderId = #{orderId}
</update>
<select id="selectOrderIdInSupplementNo" resultType="java.lang.String">
select orderId
from io_order
where supplementNo = #{orderId}
</select>
<update id="updateSupplementNo">
update io_order
set supplementNo = null
where orderId = #{orderId}
</update> </update>
</mapper> </mapper>
Loading…
Cancel
Save