1.修改第三方系统,提交单据接口绑定单据类型,一个业务单据类型,只可以被一个系统绑定

2.已核对单据查询接口增加是否可以提交判断,并返回标识符到前端
master
x_z 3 years ago
parent 678af45fbe
commit d53d819a74

@ -3,13 +3,10 @@ package com.glxp.api.admin.controller.basic;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.constant.Constant;
import com.glxp.api.admin.entity.auth.AuthAdmin;
import com.glxp.api.admin.entity.basic.BussinessChangeTypeEntity;
import com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity;
import com.glxp.api.admin.entity.basic.BussinessTypeEntity;
import com.glxp.api.admin.entity.business.StockOrderEntity;
import com.glxp.api.admin.exception.JsonException;
import com.glxp.api.admin.req.basic.BusNoUserRequest;
import com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest;
import com.glxp.api.admin.req.business.StockOrderFilterRequest;
@ -30,11 +27,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -227,5 +221,16 @@ public class BussinessLocalTypeController {
return ResultVOUtils.success("更新成功");
}
/**
*
*
* @return
*/
@GetMapping("/udiwms/localBusType/filterForThirdSys")
public BaseResponse filterForThirdSys() {
List<BussinessLocalTypeEntity> list = bussinessLocalTypeService.filterForThirdSys();
return ResultVOUtils.success(list);
}
}

@ -5,9 +5,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.constant.Constant;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.controller.inventory.InvPrintController;
import com.glxp.api.admin.entity.auth.AuthAdmin;
import com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity;
@ -15,7 +13,6 @@ import com.glxp.api.admin.entity.basic.BussinessTypeEntity;
import com.glxp.api.admin.entity.business.StockOrderDetailEntity;
import com.glxp.api.admin.entity.business.StockOrderEntity;
import com.glxp.api.admin.entity.business.StockQRCodeTextEntity;
import com.glxp.api.admin.entity.info.CompanyEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.entity.inout.OrderEntity;
import com.glxp.api.admin.entity.inout.WarehouseEntity;
@ -50,7 +47,6 @@ import com.glxp.api.admin.service.inout.CodesService;
import com.glxp.api.admin.service.inout.CodesTempService;
import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.service.inout.WarehouseUserService;
import com.glxp.api.admin.service.inventory.InCodeLogService;
import com.glxp.api.admin.service.inventory.InvStockPrintService;
import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.admin.util.*;
@ -59,7 +55,6 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.RequestContextHolder;
@ -278,9 +273,6 @@ public class StockOrderController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<StockOrderEntity> stockOrderEntityList;
// if (stockOrderFilterRequest.getStatus() == null) {
// stockOrderFilterRequest.setStatus(0 + "");
// }
if (StringUtils.isNotBlank(stockOrderFilterRequest.getCorpId())) {
Integer userId = customerService.getUserId();
@ -308,6 +300,7 @@ public class StockOrderController {
//判断订单是否可以补单
List<StockOrderResponse> resultList = orderService.checkSupplementOrder(stockOrderEntityList);
resultList = orderService.checkSubmitOrder(resultList);
PageSimpleResponse<StockOrderResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(resultList);

@ -24,4 +24,6 @@ public interface BasicThirdSysBusApiDao {
boolean saveBusTypes(@Param("list") List<BasicThirdSysBusApiEntity> list);
boolean deleteById(@Param("id") Integer id);
BasicThirdSysBusApiEntity selectByCode(@Param("code") String code);
}

@ -3,7 +3,6 @@ package com.glxp.api.admin.dao.basic;
import com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity;
import com.glxp.api.admin.req.basic.BusOriginJoinFilterRequest;
import com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest;
import com.glxp.api.admin.req.receipt.BussinessTypeFilterRequest;
import com.glxp.api.admin.res.basic.BussinessOriginTypeResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -37,4 +36,6 @@ public interface BussinessLocalTypeDao {
boolean insertBussinessType(BussinessLocalTypeEntity bussinessTypeEntity);
boolean deleteById(@Param("id") String id);
List<BussinessLocalTypeEntity> filterFoeThirdSys();
}

@ -54,4 +54,5 @@ public interface OrderDao {
List<OrderEntity> findAllByTime(OrderFilterRequest orderFilterRequest);
Integer selectExportStatus(@Param("id") String id);
}

@ -6,6 +6,13 @@ import lombok.Data;
@Data
public class StockOrderResponse extends StockOrderEntity {
//是否可以补单
private boolean enableSupplementOrder;
//此单据是否可以提交
private boolean submitFlag;
//单据导出状态
private Integer exportStatus;
}

@ -37,5 +37,6 @@ public interface BussinessLocalTypeService {
boolean deleteById(String id);
List<BussinessLocalTypeEntity> filterForThirdSys();
}

@ -28,10 +28,13 @@ public interface BussinessOriginTypeService {
List<BussinessOriginTypeResponse> filterJoinList(BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest);
//第三方单据类型
BussinessOriginTypeResponse finByThirdAction(String action);
//业务单据
BussinessOriginTypeResponse finByLocalAction(String action);
//扫码单据
BussinessOriginTypeResponse finByMainAction(String action);
}

@ -4,10 +4,8 @@ import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.dao.basic.BussinessLocalTypeDao;
import com.glxp.api.admin.entity.basic.BasicThirdSysDetailEntity;
import com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity;
import com.glxp.api.admin.entity.basic.BussinessTypeEntity;
import com.glxp.api.admin.req.basic.BusOriginJoinFilterRequest;
import com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest;
import com.glxp.api.admin.req.receipt.BussinessTypeFilterRequest;
import com.glxp.api.admin.res.basic.BussinessOriginTypeResponse;
import com.glxp.api.admin.service.basic.BasicThirdSysDetailService;
import com.glxp.api.admin.service.basic.BussinessLocalTypeService;
@ -157,4 +155,10 @@ public class BussinessLocalTypeServiceImpl implements BussinessLocalTypeService
public boolean deleteById(String id) {
return bussinessLocalTypeDao.deleteById(id);
}
@Override
public List<BussinessLocalTypeEntity> filterForThirdSys() {
//查询第三方系统,订单提交接口未绑定的业务单据类型
return bussinessLocalTypeDao.filterFoeThirdSys();
}
}

@ -71,4 +71,12 @@ public interface OrderService {
* @return
*/
List<StockOrderResponse> checkSupplementOrder(List<StockOrderEntity> stockOrderEntityList);
/**
*
*
* @param orderResponseList
* @return
*/
List<StockOrderResponse> checkSubmitOrder(List<StockOrderResponse> orderResponseList);
}

@ -5,12 +5,14 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.dao.basic.BasicThirdSysBusApiDao;
import com.glxp.api.admin.dao.basic.BussinessTypeDao;
import com.glxp.api.admin.dao.business.StockOrderDao;
import com.glxp.api.admin.dao.inout.CodesDao;
import com.glxp.api.admin.dao.inout.CodesTempDao;
import com.glxp.api.admin.dao.inout.OrderDao;
import com.glxp.api.admin.dao.inout.CodesDao;
import com.glxp.api.admin.dao.inventory.InvWarehouseDao;
import com.glxp.api.admin.entity.basic.BasicThirdSysBusApiEntity;
import com.glxp.api.admin.entity.basic.BussinessTypeEntity;
import com.glxp.api.admin.entity.business.StockOrderEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
@ -32,9 +34,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.*;
@Slf4j
@Service
@ -57,6 +57,8 @@ public class OrderServiceImpl implements OrderService {
SystemParamConfigService systemParamConfigService;
@Resource
GennerOrderUtils gennerOrderUtils;
@Resource
private BasicThirdSysBusApiDao basicThirdSysBusApiDao;
@Override
public List<OrderEntity> listOrders(OrderQueryRequest orderQueryRequest) {
@ -296,5 +298,29 @@ public class OrderServiceImpl implements OrderService {
return result;
}
@Override
public List<StockOrderResponse> checkSubmitOrder(List<StockOrderResponse> orderResponseList) {
if (CollUtil.isEmpty(orderResponseList)) {
return Collections.emptyList();
}
//查询第三方系统的
List<String> actions = new ArrayList<>();
for (StockOrderResponse stockOrderResponse : orderResponseList) {
if (!actions.contains(stockOrderResponse.getBillType())) {
BasicThirdSysBusApiEntity basicThirdSysBusApiEntity = basicThirdSysBusApiDao.selectByCode(stockOrderResponse.getBillType());
actions.add(basicThirdSysBusApiEntity.getCode());
}
if (actions.contains(stockOrderResponse.getBillType())) {
stockOrderResponse.setSubmitFlag(true);
Integer exportStatus = orderDao.selectExportStatus(stockOrderResponse.getOrderIdFk());
stockOrderResponse.setExportStatus(exportStatus);
}else {
stockOrderResponse.setSubmitFlag(false);
}
}
return orderResponseList;
}
}

@ -74,4 +74,9 @@
from basic_third_sys_bus_api
where id = #{id}
</delete>
<select id="selectByCode" resultType="com.glxp.api.admin.entity.basic.BasicThirdSysBusApiEntity">
select *
from basic_third_sys_bus_api
where code = #{code}
</select>
</mapper>

@ -228,5 +228,12 @@
WHERE id = #{id}
</select>
<select id="filterFoeThirdSys" resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
select action, name
from basic_bustype_local
where action not in (
select code
from basic_third_sys_bus_api
);
</select>
</mapper>

@ -518,4 +518,10 @@
#{item}
</foreach>
</select>
<select id="selectExportStatus" resultType="java.lang.Integer">
select exportStatus
from io_order
where id = #{id}
</select>
</mapper>
Loading…
Cancel
Save