单据详情改为雪花ID

pro
anthonywj 2 years ago
parent db77297df4
commit e4864f67e4

@ -483,8 +483,8 @@ public class IoOrderDetailBizController extends BaseController {
@PostMapping("/udiwms/inout/order/delBizProduct")
@Log(title = "单据管理", businessType = BusinessType.DELETE)
public BaseResponse delBizProduct(@RequestBody DeleteRequest deleteRequest) {
IoOrderDetailBizEntity orderDetailBizEntity = orderDetailBizService.selectById(Integer.parseInt(deleteRequest.getId()));
int result = orderDetailBizService.deleteById(Integer.parseInt(deleteRequest.getId()));
IoOrderDetailBizEntity orderDetailBizEntity = orderDetailBizService.selectById(Long.parseLong(deleteRequest.getId()));
int result = orderDetailBizService.deleteById(Long.parseLong(deleteRequest.getId()));
if (result > 0) {
boolean r1 = orderDetailBizService.isExit(orderDetailBizEntity.getOrderIdFk());
boolean r2 = orderDetailCodeService.isExit(orderDetailBizEntity.getOrderIdFk());
@ -572,8 +572,7 @@ public class IoOrderDetailBizController extends BaseController {
ioOrderDetailBizEntity.setOrderIdFk(ioOrderInvoiceEntity.getOrderIdFk());
ioOrderDetailBizEntity.setId(ioOrderInvoiceResponse.getBizIdFk().intValue());
ioOrderDetailBizEntity.setId(ioOrderInvoiceResponse.getBizIdFk().longValue());
ioOrderInvoiceService.deleteByInvId(ioOrderInvoiceEntity.getId() + "");
List<IoOrderInvoiceResponse> list = orderDetailBizService.filterListInv(filterOrderDetailBizRequest);
if (list.size() == 0) {
@ -583,7 +582,6 @@ public class IoOrderDetailBizController extends BaseController {
return ResultVOUtils.success();
}
/**
@ -641,7 +639,6 @@ public class IoOrderDetailBizController extends BaseController {
}
/**
*
*

@ -9,8 +9,8 @@ import java.util.List;
@Data
@TableName(value = "io_order_detail_biz")
public class IoOrderDetailBizEntity {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/**
*
@ -187,7 +187,6 @@ public class IoOrderDetailBizEntity {
private String checkFileName;
@TableField(exist = false)
private boolean checkSuccess;
@ -202,5 +201,4 @@ public class IoOrderDetailBizEntity {
private boolean regStatus;
}

@ -11,8 +11,8 @@ import java.math.BigDecimal;
@Data
@TableName(value = "io_order_detail_code")
public class IoOrderDetailCodeEntity {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/**
*

@ -106,7 +106,7 @@ public class IoOrderInvoiceEntity {
private String remark;
@TableField(value = "bizIdFk")
private Integer bizIdFk;
private Long bizIdFk;
@TableField(exist = false)
private Integer regId;

@ -5,7 +5,7 @@ import lombok.Data;
@Data
public class BizBindUpdateRequest {
private Integer id;
private Long id;
private Long bindRlFk;
private String supId;

@ -67,7 +67,7 @@ public class IoOrderInvoiceRequest {
private String remark;
private Integer bizIdFk;
private Long bizIdFk;
public static final String COL_ID = "id";

@ -10,7 +10,7 @@ import java.math.BigDecimal;
@Data
public class IoOrderDetailBizResponse {
private Integer id;
private Long id;
/**
*

@ -11,7 +11,7 @@ import java.math.BigDecimal;
@Data
public class IoOrderDetailCodeResponse {
private Integer id;
private Long id;
/**
*

@ -12,7 +12,7 @@ import java.util.List;
public interface IoOrderDetailBizService {
IoOrderDetailBizEntity selectById(Integer id);
IoOrderDetailBizEntity selectById(Long id);
List<IoOrderDetailBizEntity> findByOrderId(String orderId);
@ -22,13 +22,13 @@ public interface IoOrderDetailBizService {
int update(IoOrderDetailBizEntity orderDetailBizEntity);
int deleteById(Integer id);
int deleteById(Long id);
int deleteByOrderId(String billNo);
boolean isExit(String billNo);
boolean isExit(Long relId, String bacthNo, Integer ignoreId, String orderId);
boolean isExit(Long relId, String bacthNo, Long ignoreId, String orderId);
IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate);

@ -19,7 +19,7 @@ public interface IoOrderDetailCodeService {
int update(IoOrderDetailCodeEntity orderDetailCodeEntity);
int deleteById(Integer id);
int deleteById(Long id);
/**
* VO

@ -1,6 +1,7 @@
package com.glxp.api.service.inout.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
@ -34,7 +35,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
IoOrderDetailBizDao ioOrderDetailBizDao;
@Override
public IoOrderDetailBizEntity selectById(Integer id) {
public IoOrderDetailBizEntity selectById(Long id) {
return ioOrderDetailBizDao.selectById(id);
}
@ -59,7 +60,8 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Override
public int insert(IoOrderDetailBizEntity orderDetailBizEntity) {
orderDetailBizEntity.setId(null);
if (orderDetailBizEntity.getId() == null)
orderDetailBizEntity.setId(IdUtil.getSnowflakeNextId());
return ioOrderDetailBizDao.insert(orderDetailBizEntity);
}
@ -69,7 +71,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
}
@Override
public int deleteById(Integer id) {
public int deleteById(Long id) {
return ioOrderDetailBizDao.deleteById(id);
}
@ -87,7 +89,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Override
public boolean isExit(Long relId, String bacthNo, Integer ignoreId, String orderId) {
public boolean isExit(Long relId, String bacthNo, Long ignoreId, String orderId) {
return ioOrderDetailBizDao.exists(new QueryWrapper<IoOrderDetailBizEntity>().eq("bindRlFk", relId).eq(StrUtil.isNotEmpty(bacthNo), "batchNo", bacthNo)
.isNull(StrUtil.isEmpty(bacthNo), "batchNo").eq("orderIdFk", orderId).ne("id", ignoreId));
}

@ -2,6 +2,7 @@ package com.glxp.api.service.inout.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
@ -55,7 +56,9 @@ public class IoOrderDetailCodeServiceImpl implements IoOrderDetailCodeService {
@Override
public int insert(IoOrderDetailCodeEntity orderDetailCodeEntity) {
orderDetailCodeEntity.setId(null);
if (orderDetailCodeEntity.getId() == null) {
orderDetailCodeEntity.setId(IdUtil.getSnowflakeNextId());
}
return ioOrderDetailCodeDao.insert(orderDetailCodeEntity);
}
@ -65,7 +68,7 @@ public class IoOrderDetailCodeServiceImpl implements IoOrderDetailCodeService {
}
@Override
public int deleteById(Integer id) {
public int deleteById(Long id) {
return ioOrderDetailCodeDao.deleteById(id);
}

@ -37,7 +37,6 @@ CALL Pro_Temp_ColumnWork('io_order', 'regStatus', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('thr_bustype_origin', 'thirdSysName', 'varchar(255) ', 3);
@ -372,4 +371,10 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'spaceOut', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_code', 'id', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'id', 'bigint ', 2);

Loading…
Cancel
Save