1.修复建垛bug

master
x_z 2 years ago
parent d860a9f444
commit 0f4d098f83

@ -8,14 +8,6 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface StackOrderDao extends BaseMapper<StackOrder> {
/**
* ID
*
* @param id
* @return
*/
String selectOrderIdById(@Param("id") Integer id);
/**
*
*

@ -13,7 +13,6 @@ import com.glxp.udi.admin.common.enums.ResultEnum;
import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.common.util.ResultVOUtils;
import com.glxp.udi.admin.dao.info.PlatformDao;
import com.glxp.udi.admin.dao.inout.UnitMaintainDao;
import com.glxp.udi.admin.dao.inout.UnitMaintainPlatformDao;
import com.glxp.udi.admin.entity.info.PlatformEntity;
import com.glxp.udi.admin.entity.inout.UnitMaintainPlatform;
@ -38,8 +37,6 @@ public class PlatformService {
@Resource
private PlatformDao platformDao;
@Resource
private UnitMaintainDao unitMaintainDao;
@Resource
private UnitMaintainPlatformDao unitMaintainPlatformDao;
public int save(PlatformEntity platformEntity) {

@ -90,9 +90,11 @@ public class StackCodeService {
public StackCodeResponse addCode(AddStackCodeRequest addStackCodeRequest) {
StackCode stackCode = new StackCode();
stackCode.setCode(addStackCodeRequest.getCode());
String stackId = addStackCodeRequest.getOrderId();
if (StrUtil.isBlank(addStackCodeRequest.getOrderId())) {
//垛号为空,此条码为这个垛的第一个条码数据,先生垛号和垛数据,再添加条码
String stackId = idUtil.getStackId(addStackCodeRequest.getCustomerId());
stackId = idUtil.getStackId(addStackCodeRequest.getCustomerId());
//创建垛数据
StackOrder stackOrder = new StackOrder();
//垛码
@ -104,7 +106,9 @@ public class StackCodeService {
stackOrderDao.insert(stackOrder);
stackCode.setOrderIdFk(String.valueOf(stackOrder.getId()));
} else {
stackCode.setOrderIdFk(addStackCodeRequest.getOrderId());
//查询此垛号的id
Integer orderIdFk = stackOrderDao.selectId(stackId, Long.valueOf(addStackCodeRequest.getCustomerId()));
stackCode.setOrderIdFk(String.valueOf(orderIdFk));
}
UdiEntity udi = FilterUdiUtils.getUdi(stackCode.getCode());
BeanUtil.copyProperties(udi, stackCode);
@ -113,7 +117,7 @@ public class StackCodeService {
StackCodeResponse response = new StackCodeResponse();
BeanUtil.copyProperties(stackCode, response);
response.setStackId(stackOrderDao.selectOrderIdById(Integer.valueOf(stackCode.getOrderIdFk())));
response.setStackId(stackId);
return response;
}

@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udi.admin.dao.product.StackOrderDao">
<select id="selectOrderIdById" resultType="java.lang.String">
select orderId
from stack_order
where id = #{id}
</select>
<update id="updateExportStatus">
update stack_order

Loading…
Cancel
Save