中继服务同步修改,分库功能修改

fengcang
anthonyywj2 3 years ago
parent 37b8dcb6b4
commit 4e9b3cc6f7

@ -401,8 +401,10 @@ public class StockOrderController {
String oldOrderId = originOrder.getId(); String oldOrderId = originOrder.getId();
String replicateNo = originOrder.getReplicateNo(); //复制单号 String replicateNo = originOrder.getReplicateNo(); //复制单号
List<WarehouseEntity> originCodes = codesService.findByReceiptId(originOrder.getId()); List<WarehouseEntity> originCodes = codesService.findByReceiptId(originOrder.getId());
originOrder.setActDate(DateUtil.formatDate(new Date())); originOrder.setActDate(DateUtil.formatDateTime(new Date()));
originOrder.setCreateTime(originOrder.getActDate()); originOrder.setCreateTime(originOrder.getActDate());
originOrder.setFromSubInvCode(addStockOrderChangeRequest.getFromSubInvCode());
originOrder.setInvWarehouseCode(addStockOrderChangeRequest.getInvWarehouseCode());
originOrder.setFromCorp(addStockOrderChangeRequest.getFromCorp()); originOrder.setFromCorp(addStockOrderChangeRequest.getFromCorp());
originOrder.setFromCorpId(addStockOrderChangeRequest.getFromCorpId()); originOrder.setFromCorpId(addStockOrderChangeRequest.getFromCorpId());
originOrder.setCorpOrderId(CustomUtil.getId() + "x"); originOrder.setCorpOrderId(CustomUtil.getId() + "x");
@ -440,6 +442,7 @@ public class StockOrderController {
supplementCode.setFromCorpId(originOrder.getFromCorpId()); supplementCode.setFromCorpId(originOrder.getFromCorpId());
supplementCode.setFromCorp(originOrder.getFromCorp()); supplementCode.setFromCorp(originOrder.getFromCorp());
supplementCode.setLocStorageCode(originOrder.getLocStorageCode()); supplementCode.setLocStorageCode(originOrder.getLocStorageCode());
supplementCode.setInvWarehouseCode(originOrder.getInvWarehouseCode());
supplementCode.setOrderId(supplementOrderNo); supplementCode.setOrderId(supplementOrderNo);
//查询补单设置 //查询补单设置
supplementCode.setAction(originOrder.getAction()); supplementCode.setAction(originOrder.getAction());

@ -22,6 +22,7 @@ import com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity;
import com.glxp.api.admin.entity.inout.WarehouseEntity; import com.glxp.api.admin.entity.inout.WarehouseEntity;
import com.glxp.api.admin.entity.inout.WarehouseUserEntity; import com.glxp.api.admin.entity.inout.WarehouseUserEntity;
import com.glxp.api.admin.entity.inventory.InvProductDetailEntity; import com.glxp.api.admin.entity.inventory.InvProductDetailEntity;
import com.glxp.api.admin.entity.inventory.InvSubWarehouseEntity;
import com.glxp.api.admin.exception.JsonException; import com.glxp.api.admin.exception.JsonException;
import com.glxp.api.admin.httpclient.SpsDirectClient; import com.glxp.api.admin.httpclient.SpsDirectClient;
import com.glxp.api.admin.req.basic.CompanyProductRelevanceRequest; import com.glxp.api.admin.req.basic.CompanyProductRelevanceRequest;
@ -45,12 +46,15 @@ import com.glxp.api.admin.service.inout.*;
import com.glxp.api.admin.service.inventory.InvPreInProductDetailService; import com.glxp.api.admin.service.inventory.InvPreInProductDetailService;
import com.glxp.api.admin.service.inventory.InvPreProductDetailService; import com.glxp.api.admin.service.inventory.InvPreProductDetailService;
import com.glxp.api.admin.service.inventory.InvProductDetailService; import com.glxp.api.admin.service.inventory.InvProductDetailService;
import com.glxp.api.admin.service.inventory.InvSubWarehouseService;
import com.glxp.api.admin.thread.IoTransInoutService; import com.glxp.api.admin.thread.IoTransInoutService;
import com.glxp.api.admin.util.*; import com.glxp.api.admin.util.*;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -108,6 +112,8 @@ public class WareHouseController {
@Resource @Resource
InvWarehouseDao invWarehouseService; InvWarehouseDao invWarehouseService;
@Resource @Resource
InvSubWarehouseService invSubWarehouseService;
@Resource
private UdiInfoService udiInfoService; private UdiInfoService udiInfoService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@ -1175,15 +1181,17 @@ public class WareHouseController {
public BaseResponse saveWarehouseUser(@RequestBody Map<String, Object> params) { public BaseResponse saveWarehouseUser(@RequestBody Map<String, Object> params) {
String code = String.valueOf(params.get("code")); String code = String.valueOf(params.get("code"));
String userListJson = String.valueOf(params.get("userList")); String userListJson = String.valueOf(params.get("userList"));
if (StrUtil.isBlank(code) || StrUtil.isBlank(userListJson)) { if (StrUtil.isBlank(code) || StrUtil.isBlank(userListJson))
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
List<AuthAdmin> userList = JSONUtil.toList(userListJson, AuthAdmin.class); List<AuthAdmin> userList = JSONUtil.toList(userListJson, AuthAdmin.class);
if (CollUtil.isEmpty(userList)) { if (CollUtil.isEmpty(userList)) {
return ResultVOUtils.error(500, "用户列表不能为空"); return ResultVOUtils.error(500, "用户列表不能为空");
} }
warehouseUserService.saveWarehouseUser(code, userList);
invWarehouseService.updateTime(code, new Date()); warehouseUserService.saveWarehouseUser(code, JSONUtil.toList(userListJson, AuthAdmin.class));
InvSubWarehouseEntity invSubWarehouseEntity =
invSubWarehouseService.findByInvSubByCode(code);
invWarehouseService.updateTime(invSubWarehouseEntity.getParentId(), new Date());
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@ -1195,7 +1203,9 @@ public class WareHouseController {
if (StrUtil.isBlank(code) || StrUtil.isBlank(bussinessTypeJson)) if (StrUtil.isBlank(code) || StrUtil.isBlank(bussinessTypeJson))
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
warehouseBussinessTypeService.saveWarehouseBussinessType(code, JSONUtil.toList(bussinessTypeJson, BussinessTypResponse.class)); warehouseBussinessTypeService.saveWarehouseBussinessType(code, JSONUtil.toList(bussinessTypeJson, BussinessTypResponse.class));
invWarehouseService.updateTime(code, new Date()); InvSubWarehouseEntity invSubWarehouseEntity =
invSubWarehouseService.findByInvSubByCode(code);
invWarehouseService.updateTime(invSubWarehouseEntity.getParentId(), new Date());
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@ -1215,7 +1225,9 @@ public class WareHouseController {
if (null == id) if (null == id)
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
WarehouseUserEntity warehouseUserEntity = warehouseUserService.selectById(id); WarehouseUserEntity warehouseUserEntity = warehouseUserService.selectById(id);
invWarehouseService.updateTime(warehouseUserEntity.getCode(), new Date()); InvSubWarehouseEntity invSubWarehouseEntity =
invSubWarehouseService.findByInvSubByCode(warehouseUserEntity.getCode());
invWarehouseService.updateTime(invSubWarehouseEntity.getParentId(), new Date());
warehouseUserService.deleteWarehouseUser(id); warehouseUserService.deleteWarehouseUser(id);
return ResultVOUtils.success(); return ResultVOUtils.success();
} }
@ -1226,7 +1238,10 @@ public class WareHouseController {
if (null == id) if (null == id)
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
WarehouseBussinessTypeEntity warehouseBussinessTypeEntity = warehouseBussinessTypeService.selectById(id); WarehouseBussinessTypeEntity warehouseBussinessTypeEntity = warehouseBussinessTypeService.selectById(id);
invWarehouseService.updateTime(warehouseBussinessTypeEntity.getCode(), new Date());
InvSubWarehouseEntity invSubWarehouseEntity =
invSubWarehouseService.findByInvSubByCode(warehouseBussinessTypeEntity.getCode());
invWarehouseService.updateTime(invSubWarehouseEntity.getParentId(), new Date());
warehouseBussinessTypeService.deleteWarehouseByssuinessType(id); warehouseBussinessTypeService.deleteWarehouseByssuinessType(id);
return ResultVOUtils.success(); return ResultVOUtils.success();
} }

@ -3,12 +3,14 @@ package com.glxp.api.admin.controller.inventory;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.glxp.api.admin.annotation.AuthRuleAnnotation; import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.entity.auth.AuthAdmin; import com.glxp.api.admin.entity.auth.AuthAdmin;
import com.glxp.api.admin.entity.inout.WarehouseBussinessTypeEntity;
import com.glxp.api.admin.entity.inventory.InvSubWarehouseEntity; import com.glxp.api.admin.entity.inventory.InvSubWarehouseEntity;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity; import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.req.inout.DeleteRequest; import com.glxp.api.admin.req.inout.DeleteRequest;
import com.glxp.api.admin.req.inventory.FilterInvSubWarehouseRequest; import com.glxp.api.admin.req.inventory.FilterInvSubWarehouseRequest;
import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest; import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest;
import com.glxp.api.admin.service.auth.CustomerService; import com.glxp.api.admin.service.auth.CustomerService;
import com.glxp.api.admin.service.inout.WarehouseBussinessTypeService;
import com.glxp.api.admin.service.inventory.InvSubWarehouseService; import com.glxp.api.admin.service.inventory.InvSubWarehouseService;
import com.glxp.api.admin.service.inventory.InvWarehouseService; import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
@ -22,7 +24,10 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
@RestController @RestController
public class InvSubWarehouseController { public class InvSubWarehouseController {
@ -33,6 +38,8 @@ public class InvSubWarehouseController {
InvWarehouseService invWarehouseService; InvWarehouseService invWarehouseService;
@Resource @Resource
CustomerService customerService; CustomerService customerService;
@Resource
WarehouseBussinessTypeService warehouseBussinessTypeService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("spms/sub/inv/warehouse/filter") @GetMapping("spms/sub/inv/warehouse/filter")
@ -45,8 +52,16 @@ public class InvSubWarehouseController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("spms/sub/inv/warehouse/findByInv") @GetMapping("spms/sub/inv/warehouse/findByInv")
public BaseResponse findByInv(FilterInvWarehouseRequest filterInvWarehouseRequest) { public BaseResponse findByInv(FilterInvWarehouseRequest filterInvWarehouseRequest) {
// if (StrUtil.isEmpty(filterInvWarehouseRequest.getPcode()) || filterInvWarehouseRequest.getUserId() == null) {
// return ResultVOUtils.error(500, "用户或仓库不能未空!");
// }
AuthAdmin authAdmin = customerService.getUserBean(); AuthAdmin authAdmin = customerService.getUserBean();
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue()); if (filterInvWarehouseRequest.getFilter() == null || filterInvWarehouseRequest.getFilter() == 1) {
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue());
}
List<InvSubWarehouseEntity> invSubWarehouseEntities = invSubWarehouseService.filterGroupInvSub(filterInvWarehouseRequest); List<InvSubWarehouseEntity> invSubWarehouseEntities = invSubWarehouseService.filterGroupInvSub(filterInvWarehouseRequest);
return ResultVOUtils.success(invSubWarehouseEntities); return ResultVOUtils.success(invSubWarehouseEntities);
} }
@ -106,7 +121,22 @@ public class InvSubWarehouseController {
if (deleteRequest.getId() == null) { if (deleteRequest.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
} }
InvSubWarehouseEntity invSubWarehouseEntity = invSubWarehouseService.findById(deleteRequest.getId());
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setCode(invSubWarehouseEntity.getParentId());
List<InvWarehouseEntity> warehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest);
if (!warehouseEntities.isEmpty()) {
return ResultVOUtils.error(500, "请先移除该仓库关联用户和单据类型!");
}
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities = warehouseBussinessTypeService.getListByCode(invSubWarehouseEntity.getCode());
if (!warehouseBussinessTypeEntities.isEmpty()) {
return ResultVOUtils.error(500, "请先移除该仓库关联用户和单据类型!");
}
boolean b = invSubWarehouseService.deleteById(deleteRequest.getId()); boolean b = invSubWarehouseService.deleteById(deleteRequest.getId());
if (!b) { if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK); return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
} }

@ -285,19 +285,10 @@ public class InvWarehouseController {
return ResultVOUtils.error(500, "该仓库已有库存,不能删除!"); return ResultVOUtils.error(500, "该仓库已有库存,不能删除!");
} }
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); List<InvSubWarehouseEntity> invSubWarehouseEntities = invSubWarehouseService.findByParentId(invWarehouseEntity.getCode());
filterInvWarehouseRequest.setCode(invWarehouseEntity.getCode()); if (CollUtil.isNotEmpty(invSubWarehouseEntities)) {
List<InvWarehouseEntity> warehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest); return ResultVOUtils.error(500, "请先移除该仓库关联的分库!");
if (!warehouseEntities.isEmpty()) {
return ResultVOUtils.error(500, "请先移除该仓库关联用户和单据类型!");
}
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities = warehouseBussinessTypeService.getListByCode(invWarehouseEntity.getCode());
if (!warehouseBussinessTypeEntities.isEmpty()) {
return ResultVOUtils.error(500, "请先移除该仓库关联用户和单据类型!");
} }
boolean b = invWarehouseService.deleteById(deleteRequest.getId()); boolean b = invWarehouseService.deleteById(deleteRequest.getId());
if (!b) { if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK); return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
@ -312,18 +303,9 @@ public class InvWarehouseController {
if (request.getCode() == null) { if (request.getCode() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
} }
List<InvSubWarehouseEntity> invSubWarehouseEntities = invSubWarehouseService.findByParentId(request.getCode());
InvWarehouseEntity invWarehouseEntity = invWarehouseService.selectByCode(request.getCode()); if (CollUtil.isNotEmpty(invSubWarehouseEntities)) {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); return ResultVOUtils.error(500, "请先移除该仓库关联的分库!");
filterInvWarehouseRequest.setCode(invWarehouseEntity.getCode());
List<InvWarehouseEntity> warehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest);
if (!warehouseEntities.isEmpty()) {
return ResultVOUtils.error(500, "请先移除该仓库关联用户和单据类型!");
}
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities = warehouseBussinessTypeService.getListByCode(invWarehouseEntity.getCode());
if (!warehouseBussinessTypeEntities.isEmpty()) {
return ResultVOUtils.error(500, "请先移除该仓库关联用户和单据类型!");
} }

@ -19,7 +19,6 @@ public class AuthAdminSaveRequest {
// 登录密码 // 登录密码
private String passWord; private String passWord;
// 状态 // 状态
@NotNull(message = "请选择状态")
private Integer userFlag; private Integer userFlag;
private String employeeName; private String employeeName;

@ -16,7 +16,6 @@ public class AuthPermissionRuleSaveRequest {
private String name; private String name;
@NotEmpty(message = "请输入规则标题") @NotEmpty(message = "请输入规则标题")
private String title; private String title;
@NotNull(message = "请选择状态")
private Integer status; private Integer status;
private String condition; private String condition;
private Integer listorder; private Integer listorder;

@ -19,6 +19,8 @@ public class AddStockOrderChangeRequest {
private String actDate; private String actDate;
private String billType; private String billType;
private String locStorageCode; private String locStorageCode;
private String fromSubInvCode;
private String invWarehouseCode;
private String orderId; private String orderId;
private String customerId; private String customerId;
private String stockOrderId; private String stockOrderId;

@ -6,7 +6,7 @@ import lombok.Data;
@Data @Data
public class FilterInvSubWarehouseRequest extends ListPageRequest { public class FilterInvSubWarehouseRequest extends ListPageRequest {
private Integer id; private String id;
private String code; private String code;
private String name; private String name;
private String parentId; private String parentId;

@ -29,7 +29,6 @@ public class SpsSyncDataResponse {
List<ThrOrderEntity> thrOrderEntities; List<ThrOrderEntity> thrOrderEntities;
List<CompanyProductRelevanceEntity> companyProductRelevanceEntities; List<CompanyProductRelevanceEntity> companyProductRelevanceEntities;
List<UdiRelevanceEntity> udiRelevanceEntities; List<UdiRelevanceEntity> udiRelevanceEntities;
List<InvSubWarehouseEntity> invSubWarehouseEntities; List<InvSubWarehouseEntity> invSubWarehouseEntities;
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities; List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities;
List<WarehouseUserEntity> warehouseUserEntities; List<WarehouseUserEntity> warehouseUserEntities;

@ -219,6 +219,7 @@ public class CodesServiceImpl implements CodesService {
filterInvProductRequest.setRelIdFk(invProductDetailEntity.getProductIdFk()); filterInvProductRequest.setRelIdFk(invProductDetailEntity.getProductIdFk());
filterInvProductRequest.setSupId(invProductDetailEntity.getSupId()); filterInvProductRequest.setSupId(invProductDetailEntity.getSupId());
filterInvProductRequest.setInvStorageCode(invProductDetailEntity.getInvStorageCode()); filterInvProductRequest.setInvStorageCode(invProductDetailEntity.getInvStorageCode());
filterInvProductRequest.setInvWarehouseCode(invProductDetailEntity.getInvWarehouseCode());
if (StrUtil.isBlank(invProductDetailEntity.getBatchNo())) { if (StrUtil.isBlank(invProductDetailEntity.getBatchNo())) {
filterInvProductRequest.setBatchNo("empty"); filterInvProductRequest.setBatchNo("empty");
} else { } else {

@ -375,10 +375,6 @@ public class OrderServiceImpl implements OrderService {
return stockOrderDao.selectWaitSubmitOrders(); return stockOrderDao.selectWaitSubmitOrders();
} }
@Override
public boolean updateReplicateNo(String orderId, String replicateNo) {
return orderDao.updateReplicateNo(orderId, replicateNo);
}
@Override @Override
public List<OrderEntity> filterOrderForDelete(String billNo) { public List<OrderEntity> filterOrderForDelete(String billNo) {
@ -461,6 +457,10 @@ public class OrderServiceImpl implements OrderService {
return orders; return orders;
} }
@Override
public boolean updateReplicateNo(String orderId, String replicateNo) {
return orderDao.updateReplicateNo(orderId, replicateNo);
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
@ -485,6 +485,7 @@ public class OrderServiceImpl implements OrderService {
filterInvProductRequest.setRelIdFk(invProductDetailEntity.getProductIdFk()); filterInvProductRequest.setRelIdFk(invProductDetailEntity.getProductIdFk());
filterInvProductRequest.setSupId(invProductDetailEntity.getSupId()); filterInvProductRequest.setSupId(invProductDetailEntity.getSupId());
filterInvProductRequest.setInvStorageCode(invProductDetailEntity.getInvStorageCode()); filterInvProductRequest.setInvStorageCode(invProductDetailEntity.getInvStorageCode());
filterInvProductRequest.setInvWarehouseCode(invProductDetailEntity.getInvWarehouseCode());
if (StrUtil.isBlank(invProductDetailEntity.getBatchNo())) { if (StrUtil.isBlank(invProductDetailEntity.getBatchNo())) {
filterInvProductRequest.setBatchNo("empty"); filterInvProductRequest.setBatchNo("empty");
} else { } else {

@ -9,6 +9,8 @@ import java.util.List;
public interface InvSubWarehouseService { public interface InvSubWarehouseService {
InvSubWarehouseEntity findById(String id);
List<InvSubWarehouseEntity> filterInvSubWarehouse(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest); List<InvSubWarehouseEntity> filterInvSubWarehouse(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest);
List<InvSubWarehouseEntity> filterGroupInvSub(FilterInvWarehouseRequest filterInvSubWarehouseRequest); List<InvSubWarehouseEntity> filterGroupInvSub(FilterInvWarehouseRequest filterInvSubWarehouseRequest);
@ -26,4 +28,5 @@ public interface InvSubWarehouseService {
boolean deleteById(String id); boolean deleteById(String id);
boolean deleteByParentCode(String code); boolean deleteByParentCode(String code);
} }

@ -20,6 +20,17 @@ public class InvSubWarehouseServiceImpl implements InvSubWarehouseService {
@Resource @Resource
InvSubWarehouseDao invSubWarehouseDao; InvSubWarehouseDao invSubWarehouseDao;
@Override
public InvSubWarehouseEntity findById(String id) {
FilterInvSubWarehouseRequest filterInvSubWarehouseRequest = new FilterInvSubWarehouseRequest();
filterInvSubWarehouseRequest.setId(id);
List<InvSubWarehouseEntity> data = invSubWarehouseDao.filterInvSubWarehouse(filterInvSubWarehouseRequest);
if (CollUtil.isNotEmpty(data)) {
return data.get(0);
}
return null;
}
@Override @Override
public List<InvSubWarehouseEntity> filterInvSubWarehouse(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest) { public List<InvSubWarehouseEntity> filterInvSubWarehouse(FilterInvSubWarehouseRequest filterInvSubWarehouseRequest) {
if (filterInvSubWarehouseRequest == null) { if (filterInvSubWarehouseRequest == null) {

@ -19,8 +19,8 @@ logging.level.com.glxp.api.admin.erp.second=debug
logging.path=output/logs logging.path=output/logs
# 不指定的情况下默认生成在项目根目录,按照配置生成所需的日志名称 # 不指定的情况下默认生成在项目根目录,按照配置生成所需的日志名称
#logging.file=D:/udi.log #logging.file=D:/udi.log
#file_path=D:/udi/udiwms/udiwmsfile/ file_path=D:/udi/udiwms/udiwmsfile/
file_path=/home/glxp/udiwms #file_path=/home/glxp/udiwms
#UDI数据下载 #UDI数据下载
UDI_KEY=6b137c66-6286-46c6-8efa-c2f5dd9237df UDI_KEY=6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL=https://www.udims.com/UDI_DL_Server_test UDI_SERVER_URL=https://www.udims.com/UDI_DL_Server_test

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false"> <configuration scan="true" scanPeriod="60 seconds" debug="false">
<contextName>logback</contextName> <contextName>logback</contextName>
<property name="log.path" value="/home/glxpdata/udiwms/UDI_WMS_MC/" /> <property name="log.path" value="D:\\udi\\logs\\UDI_WMS_MC\\" />
<!--输出到控制台/home/glxpdata/udiwms/UDI_WMS_MC/--> <!--输出到控制台/home/glxpdata/udiwms/UDI_WMS_MC/-->
<!-- <property name="log.path" value="/home/glxpdata/udiwms/UDI_WMS_MC/" />-->
<!--D:\\udi\\logs\\UDI_WMS_MC\\--> <!--D:\\udi\\logs\\UDI_WMS_MC\\-->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">

@ -122,7 +122,7 @@
<if test="lastLoginTime != null">lastLoginTime=#{lastLoginTime},</if> <if test="lastLoginTime != null">lastLoginTime=#{lastLoginTime},</if>
<if test="lastModifyTime != null">lastModifyTime=#{lastModifyTime},</if> <if test="lastModifyTime != null">lastModifyTime=#{lastModifyTime},</if>
<if test="userFlag != null">userFlag=#{userFlag},</if> <if test="userFlag != null">userFlag=#{userFlag},</if>
<if test="employeeName != null">employeeName=#{employeeName}</if> <if test="employeeName != null">employeeName=#{employeeName},</if>
<if test="locInvCode != null">locInvCode=#{locInvCode},</if> <if test="locInvCode != null">locInvCode=#{locInvCode},</if>
<if test="locSubInvCode != null">locSubInvCode=#{locSubInvCode},</if> <if test="locSubInvCode != null">locSubInvCode=#{locSubInvCode},</if>
</set> </set>

@ -58,7 +58,7 @@
AND originAction =#{originAction} AND originAction =#{originAction}
</if> </if>
<if test="spUse != ''and spUse != null"> <if test="spUse != ''and spUse != null">
AND spUse =#{spUse} AND basic_bustype_local.spUse =#{spUse}
</if> </if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''"> <if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
@ -90,7 +90,7 @@
AND basic_bussiness_type.enable =#{enabled} AND basic_bussiness_type.enable =#{enabled}
</if> </if>
<if test="spUse != ''and spUse != null"> <if test="spUse != ''and spUse != null">
AND basic_bustype_local.spUse =#{spUse} AND basic_bustype_local.spUse =#{spUse}
</if> </if>
</where> </where>
group by basic_bussiness_type.action group by basic_bussiness_type.action
@ -133,8 +133,9 @@
FROM basic_bustype_local FROM basic_bustype_local
inner join basic_bussiness_type on basic_bustype_local.action = basic_bussiness_type.localAction inner join basic_bussiness_type on basic_bustype_local.action = basic_bussiness_type.localAction
INNER JOIN inv_warehouse_bussiness_type on basic_bussiness_type.action = inv_warehouse_bussiness_type.action INNER JOIN inv_warehouse_bussiness_type on basic_bussiness_type.action = inv_warehouse_bussiness_type.action
INNER JOIN inv_warehouse on inv_warehouse_bussiness_type.`code` = inv_warehouse.`code` INNER JOIN inv_warehouse_sub on inv_warehouse_sub.`code` = inv_warehouse_bussiness_type.code
INNER JOIN inv_warehouse_user on inv_warehouse.`code` =inv_warehouse_user.`code` INNER JOIN inv_warehouse on inv_warehouse_sub.parentId = inv_warehouse.`code`
INNER JOIN inv_warehouse_user on inv_warehouse_sub.`code` =inv_warehouse_user.`code`
left join basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action left join basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action
<where> <where>
<if test="name != ''and name != null"> <if test="name != ''and name != null">
@ -166,8 +167,8 @@
localAction,originAction, localAction,originAction,
basic_bussiness_type.name , basic_bussiness_type.name ,
basic_bussiness_type.action,basic_bussiness_type.checkEnable,basic_bustype_local.advanceType,basic_bustype_local.changeEnable, basic_bussiness_type.action,basic_bussiness_type.checkEnable,basic_bustype_local.advanceType,basic_bustype_local.changeEnable,
basic_bustype_local.spUse,basic_bussiness_type.storageCode,basic_bussiness_type.corpType,basic_bussiness_type.mainAction,basic_bussiness_type.prefix,basic_bustype_local.prefix localPrefix basic_bustype_local.spUse,basic_bussiness_type.storageCode,basic_bussiness_type.corpType,basic_bussiness_type.mainAction
,basic_bustype_local.preIn ,basic_bussiness_type.prefix,basic_bustype_local.prefix localPrefix,preIn
FROM basic_bustype_local FROM basic_bustype_local
LEFT JOIN basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action LEFT JOIN basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action
<where> <where>
@ -186,20 +187,11 @@
<insert id="insertBussinessType" keyProperty="id" <insert id="insertBussinessType" keyProperty="id"
parameterType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> parameterType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
replace replace INTO basic_bustype_local
INTO basic_bustype_local
(action, name, remark, originAction, advanceType, changeEnable, spUse,updateTime,prefix,preIn) (action, name, remark, originAction, advanceType, changeEnable, spUse,updateTime,prefix,preIn)
values ( values (#{action},
#{action},
#{name}, #{name},
#{remark}, #{remark}, #{originAction}, #{advanceType}, #{changeEnable}, #{spUse},#{updateTime},#{prefix},#{preIn})
#{originAction},
#{advanceType},
#{changeEnable},
#{spUse},
#{updateTime},#{prefix},#{preIn}
)
</insert> </insert>
<update id="updateBusLocalType" parameterType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity"> <update id="updateBusLocalType" parameterType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
@ -215,6 +207,7 @@
<if test="updateTime != null">updateTime = #{updateTime},</if> <if test="updateTime != null">updateTime = #{updateTime},</if>
<if test="prefix != null">prefix = #{prefix},</if> <if test="prefix != null">prefix = #{prefix},</if>
<if test="preIn != null">preIn = #{preIn},</if> <if test="preIn != null">preIn = #{preIn},</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>

@ -155,7 +155,8 @@
<if test="userId!=null"> <if test="userId!=null">
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or
invWarehouseCode is null) invWarehouseCode is null or
invWarehouseCode ='')
</if> </if>
<if test="customerId != '' and customerId!=null"> <if test="customerId != '' and customerId!=null">
@ -287,7 +288,8 @@
</if> </if>
<if test="userId!=null"> <if test="userId!=null">
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or
invWarehouseCode is null) invWarehouseCode is null or
invWarehouseCode ='')
</if> </if>
</where> </where>

@ -255,7 +255,8 @@
</if> </if>
<if test="userId != '' and userId!=null"> <if test="userId != '' and userId!=null">
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or
invWarehouseCode is null) invWarehouseCode is null or
invWarehouseCode ='')
</if> </if>
<if test="ullageSupNo != '' and ullageSupNo!=null"> <if test="ullageSupNo != '' and ullageSupNo!=null">
@ -349,7 +350,8 @@
</if> </if>
<if test="userId!=null"> <if test="userId!=null">
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or
invWarehouseCode is null) invWarehouseCode is null or
invWarehouseCode ='')
</if> </if>
</where> </where>
@ -424,7 +426,8 @@
</if> </if>
<if test="userId != '' and userId!=null"> <if test="userId != '' and userId!=null">
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or
invWarehouseCode is null) invWarehouseCode is null or
invWarehouseCode ='')
</if> </if>
<if test="locStorageCode != '' and locStorageCode!=null"> <if test="locStorageCode != '' and locStorageCode!=null">
@ -498,7 +501,8 @@
</if> </if>
<if test="userId != '' and userId!=null"> <if test="userId != '' and userId!=null">
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or
invWarehouseCode is null) invWarehouseCode is null or
invWarehouseCode ='')
</if> </if>
<if test="locStorageCode != '' and locStorageCode!=null"> <if test="locStorageCode != '' and locStorageCode!=null">

Loading…
Cancel
Save