平衡补单,线上修改,有重大修改

master
anthonyywj2 3 years ago
parent 7938c80929
commit f3dd6cce03

@ -0,0 +1,18 @@
package com.glxp.sale.admin.controller.auth;
import com.glxp.sale.admin.req.auth.ConnectRequest;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ConnectTestController {
@GetMapping("/udiwms/auth/device/connect")
public BaseResponse index(ConnectRequest connequest) {
return ResultVOUtils.success("连接UDI自助平台成功");
}
}

@ -0,0 +1,98 @@
package com.glxp.sale.admin.controller.basic;
//委托验收
import cn.hutool.core.collection.CollUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.basic.BussinessTypeEntity;
import com.glxp.sale.admin.entity.basic.EntrustReceEntity;
import com.glxp.sale.admin.req.basic.BasicEntrustRecRequest;
import com.glxp.sale.admin.req.basic.BussinessTypeFilterRequest;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.res.basic.EntrustReceRespose;
import com.glxp.sale.admin.service.auth.CustomerService;
import com.glxp.sale.admin.service.basic.BussinessTypeService;
import com.glxp.sale.admin.service.basic.EntrustReceService;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
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 javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@RestController
public class EntrustReceController {
@Resource
EntrustReceService entrustReceService;
@Resource
CustomerService customerService;
@Resource
private BussinessTypeService bussinessTypeService;
@GetMapping("/spms/entrust/rece/filter")
public BaseResponse getEntrustRece(BasicEntrustRecRequest basicExportStatusRequest) {
List<EntrustReceRespose> entrustReceEntities = entrustReceService.filterJoinEntrustRec(basicExportStatusRequest);
PageInfo<EntrustReceRespose> pageInfo;
pageInfo = new PageInfo<>(entrustReceEntities);
PageSimpleResponse<EntrustReceRespose> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(entrustReceEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@GetMapping("/spms/entrust/rece/filterAllNoUse")
public BaseResponse filterAllNoUse(BasicEntrustRecRequest basicExportStatusRequest) {
Integer uerId = customerService.getUserId();
BussinessTypeFilterRequest bussinessTypeFilterRequest = new BussinessTypeFilterRequest();
bussinessTypeFilterRequest.setUserId(uerId);
List<BussinessTypeEntity> bussinessTypeEntities = bussinessTypeService.filterAllByUser(bussinessTypeFilterRequest);
return ResultVOUtils.success(bussinessTypeEntities);
}
@PostMapping("/spms/entrust/rece/add")
public BaseResponse aadEntrustRece(@RequestBody EntrustReceEntity entrustReceEntity) {
Integer userId = customerService.getUserId();
entrustReceEntity.setUserId(userId + "");
entrustReceEntity.setUpdateTime(new Date());
boolean b = entrustReceService.insertEntrustRec(entrustReceEntity);
if (b) {
return ResultVOUtils.success("添加成功!");
} else {
return ResultVOUtils.error(500, "添加失败!");
}
}
@PostMapping("/spms/entrust/rece/update")
public BaseResponse updateEntrustRece(@RequestBody EntrustReceEntity entrustReceEntity) {
boolean b = entrustReceService.updateEntrustRec(entrustReceEntity);
if (b) {
return ResultVOUtils.success("添加成功!");
} else {
return ResultVOUtils.error(500, "添加失败!");
}
}
@PostMapping("/spms/entrust/rece/delete")
public BaseResponse deleteByStatus(@RequestBody DeleteRequest deleteRequest) {
boolean b = entrustReceService.deleteById(deleteRequest.getId());
if (b)
return ResultVOUtils.success("删除成功!");
else
return ResultVOUtils.error(500, "删除失败!");
}
}

@ -76,7 +76,7 @@ public class SpsSyncDownloadService {
if (syncDataSetEntity.isBasicInv()) {
//仓库字典
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setLastUpdateTime(spsSyncDataRequest.getLastUpdateTime());
BeanUtils.copyProperties(spsSyncDataRequest, filterInvWarehouseRequest);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterGroupInvWarehouse(filterInvWarehouseRequest);
syncDataResponse.setInvWarehouseEntities(invWarehouseEntities);
}
@ -84,7 +84,7 @@ public class SpsSyncDownloadService {
if (syncDataSetEntity.isBasicProducts()) {
//耗材字典
FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest();
filterUdiInfoRequest.setLastUpdateTime(spsSyncDataRequest.getLastUpdateTime());
BeanUtils.copyProperties(spsSyncDataRequest, filterUdiInfoRequest);
List<UdiRelevanceEntity> udiRelevanceEntities = udiRelevanceService.filterUdiEntity(filterUdiInfoRequest);
List<String> results = new ArrayList<>();
udiRelevanceEntities.forEach(
@ -109,7 +109,7 @@ public class SpsSyncDownloadService {
if (syncDataSetEntity.isBasicCorp()) {
//往来单位字典
BasicUnitMaintainFilterRequest basicUnitMaintainFilterRequest = new BasicUnitMaintainFilterRequest();
basicUnitMaintainFilterRequest.setLastUpdateTime(spsSyncDataRequest.getLastUpdateTime());
BeanUtils.copyProperties(spsSyncDataRequest, basicUnitMaintainFilterRequest);
List<BasicUnitMaintainEntity> basicUnitMaintainEntities = basicUnitMaintainService.filterList(basicUnitMaintainFilterRequest);
syncDataResponse.setBasicUnitMaintainEntities(basicUnitMaintainEntities);
}
@ -117,7 +117,7 @@ public class SpsSyncDownloadService {
if (syncDataSetEntity.isBasicThirdInv()) {
//第三方仓库信息
FilterThrInvWarehouseRequest filterThrInvWarehouseRequest = new FilterThrInvWarehouseRequest();
filterThrInvWarehouseRequest.setLastUpdateTime(spsSyncDataRequest.getLastUpdateTime());
BeanUtils.copyProperties(spsSyncDataRequest, filterThrInvWarehouseRequest);
List<ThrInvWarehouseEntity> thrInvWarehouseEntities = thrInvWarehouseService.filterThrInvWarehouse(filterThrInvWarehouseRequest);
syncDataResponse.setThrInvWarehouseEntities(thrInvWarehouseEntities);
}
@ -168,7 +168,6 @@ public class SpsSyncDownloadService {
BussinessOriginTypeService bussinessOriginTypeService;
@GetMapping("sps/sync/busType")
public BaseResponse findBusType(SpsSyncDataRequest spsSyncDataRequest) {
SyncDataSetResponse syncDataSetEntity = syncDataSetService.selectSet();
@ -212,27 +211,12 @@ public class SpsSyncDownloadService {
OrderDetailService orderDetailService;
@GetMapping("sps/sync/order")
public BaseResponse findOrder(SpsSyncDataRequest spsSyncDataRequest) {
SpsSyncOrderResponse syncOrderResponse = new SpsSyncOrderResponse();
SyncDataSetResponse syncDataSetEntity = syncDataSetService.selectSet();
if (syncDataSetEntity.isOrderScanFinish()) {
List<OrderEntity> orderEntities = new ArrayList<>();
if (syncDataSetEntity.isOrderScanFinish()) {
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
orderFilterRequest.setFilterActions(syncDataSetEntity.getBusTypes());
if (CollUtil.isNotEmpty(orderFilterRequest.getFilterActions())) {
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderFilterRequest.setReceiveStatus(ConstantStatus.RECEIVE_ED);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
}
}
}
if (syncDataSetEntity.isOrderUnReceive()) {
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
@ -308,16 +292,15 @@ public class SpsSyncDownloadService {
UdiCompanyService udiCompanyService;
//udi同步数据
@GetMapping("sps/sync/syncUdis")
public BaseResponse syncUdi(SpsSyncDataRequest spsSyncDataRequest) {
SpSyncUdiResponse spSyncUdiResponse = new SpSyncUdiResponse();
SyncDataSetResponse syncDataSetEntity = syncDataSetService.selectSet();
if (syncDataSetEntity.isDbDiProducts()) {
ProductInfoFilterRequest productInfoFilterRequest = new ProductInfoFilterRequest();
productInfoFilterRequest.setUpdateTime(spsSyncDataRequest.getLastUpdateTime());
BeanUtils.copyProperties(spsSyncDataRequest, productInfoFilterRequest);
List<ProductInfoEntity> productInfoEntityList = productInfoService.syncDlUdi(productInfoFilterRequest);
UdiCompanyRequest udiCompanyRequest = new UdiCompanyRequest();
udiCompanyRequest.setUpdateTime(spsSyncDataRequest.getLastUpdateTime());
BeanUtils.copyProperties(spsSyncDataRequest, udiCompanyRequest);
List<UdiCompanyEntity> udiCompanyEntities = udiCompanyService.syncDlCompany(udiCompanyRequest);
spSyncUdiResponse.setUdiCompanyEntities(udiCompanyEntities);
spSyncUdiResponse.setProductInfoEntityList(productInfoEntityList);

@ -1,6 +1,7 @@
package com.glxp.sale.admin.controller.basic;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.github.pagehelper.PageInfo;
@ -114,9 +115,13 @@ public class SpsSyncExportStatusController {
//自动创建要求被下载已完成单据任务
BasicExportStatusEntity basicExportStatusEntity1 = basicExportService.findByData(ConstantStatus.SYNC_SCAN_ORDER, 0);
if (basicExportStatusEntity1 == null) {
BaseResponse<SpsSyncOrderResponse> baseResponse = spsSyncDownloadService.findOrder(getRequest(ConstantStatus.SYNC_SCAN_ORDER));
BaseResponse<SpsSyncOrderResponse> baseResponse = spsSyncDownloadService.findOrder(getRequest(ConstantStatus.SYNC_SCAN_ORDER, basicExportStatusRequest.getSyncTime()));
SpsSyncOrderResponse syncOrderResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(syncOrderResponse.getOrderEntities())) {
BasicExportStatusTimeEntity basicExportStatusTimeEntity = basicExportTimeService.findByType(ConstantStatus.SYNC_SCAN_ORDER);
if (basicExportStatusTimeEntity != null) {
basicExportStatusTimeEntity.setLastUpdateTime(basicExportStatusRequest.getSyncTime());
}
BasicExportStatusEntity orderStatusEntity = new BasicExportStatusEntity();
orderStatusEntity.setId(CustomUtil.getId());
orderStatusEntity.setIdDatas(ConstantStatus.SYNC_SCAN_ORDER);
@ -136,11 +141,15 @@ public class SpsSyncExportStatusController {
//自动创建要求被下载单据类型任务
BasicExportStatusEntity basicExportStatusEntity2 = basicExportService.findByData(ConstantStatus.SYNC_BUS_TYPE, 0);
if (basicExportStatusEntity2 == null) {
BaseResponse<SpsSyncBusResponse> baseResponse = spsSyncDownloadService.findBusType(getRequest(ConstantStatus.SYNC_BUS_TYPE));
BaseResponse<SpsSyncBusResponse> baseResponse = spsSyncDownloadService.findBusType(getRequest(ConstantStatus.SYNC_BUS_TYPE, basicExportStatusRequest.getSyncTime()));
SpsSyncBusResponse spsSyncBusResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessLocalTypeEntities())
|| CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessOriginTypeEntities())
|| CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessTypeEntities())) {
BasicExportStatusTimeEntity basicExportStatusTimeEntity = basicExportTimeService.findByType(ConstantStatus.SYNC_BUS_TYPE);
if (basicExportStatusTimeEntity != null) {
basicExportStatusTimeEntity.setLastUpdateTime(basicExportStatusRequest.getSyncTime());
}
BasicExportStatusEntity busTypetatusEntity = new BasicExportStatusEntity();
busTypetatusEntity.setId(CustomUtil.getId());
busTypetatusEntity.setIdDatas(ConstantStatus.SYNC_BUS_TYPE);
@ -162,7 +171,7 @@ public class SpsSyncExportStatusController {
//自动创建要求被下载基础信息任务
BasicExportStatusEntity basicExportStatusEntity3 = basicExportService.findByData(ConstantStatus.SYNC_BASIC_DATA, 0);
if (basicExportStatusEntity3 == null) {
BaseResponse<SpsSyncDataResponse> baseResponse = spsSyncDownloadService.findProductInfo(getRequest(ConstantStatus.SYNC_BASIC_DATA));
BaseResponse<SpsSyncDataResponse> baseResponse = spsSyncDownloadService.findProductInfo(getRequest(ConstantStatus.SYNC_BASIC_DATA, basicExportStatusRequest.getSyncTime()));
SpsSyncDataResponse spsSyncDataResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spsSyncDataResponse.getThrOrderDetailEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getThrOrderEntities())
@ -175,6 +184,10 @@ public class SpsSyncExportStatusController {
|| CollUtil.isNotEmpty(spsSyncDataResponse.getThrProductsEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getThrInvWarehouseEntities())
) {
BasicExportStatusTimeEntity basicExportStatusTimeEntity = basicExportTimeService.findByType(ConstantStatus.SYNC_BASIC_DATA);
if (basicExportStatusTimeEntity != null) {
basicExportStatusTimeEntity.setLastUpdateTime(basicExportStatusRequest.getSyncTime());
}
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_BASIC_DATA);
@ -195,10 +208,14 @@ public class SpsSyncExportStatusController {
//自动创建要求被下载同步库DI信息
BasicExportStatusEntity basicExportStatusEntity4 = basicExportService.findByData(ConstantStatus.SYNC_DI_PRODUCTS, 0);
if (basicExportStatusEntity4 == null) {
BaseResponse<SpSyncUdiResponse> baseResponse = spsSyncDownloadService.syncUdi(getRequest(ConstantStatus.SYNC_DI_PRODUCTS));
BaseResponse<SpSyncUdiResponse> baseResponse = spsSyncDownloadService.syncUdi(getRequest(ConstantStatus.SYNC_DI_PRODUCTS, basicExportStatusRequest.getSyncTime()));
SpSyncUdiResponse spSyncUdiResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spSyncUdiResponse.getProductInfoEntityList())
|| CollUtil.isNotEmpty(spSyncUdiResponse.getUdiCompanyEntities())) {
BasicExportStatusTimeEntity basicExportStatusTimeEntity = basicExportTimeService.findByType(ConstantStatus.SYNC_DI_PRODUCTS);
if (basicExportStatusTimeEntity != null) {
basicExportStatusTimeEntity.setLastUpdateTime(basicExportStatusRequest.getSyncTime());
}
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
@ -220,12 +237,16 @@ public class SpsSyncExportStatusController {
}
public SpsSyncDataRequest getRequest(String type) {
public SpsSyncDataRequest getRequest(String type, String syncTime) {
SpsSyncDataRequest spsSyncDataRequest = new SpsSyncDataRequest();
spsSyncDataRequest.setPage(1);
spsSyncDataRequest.setLimit(1);
BasicExportStatusTimeEntity basicExportStatusTimeEntity = basicExportTimeService.findByType(type);
spsSyncDataRequest.setLastUpdateTime(basicExportStatusTimeEntity.getLastUpdateTime());
if (StrUtil.isEmpty(syncTime)) {
BasicExportStatusTimeEntity basicExportStatusTimeEntity = basicExportTimeService.findByType(type);
spsSyncDataRequest.setLastUpdateTime(basicExportStatusTimeEntity.getLastUpdateTime());
} else {
spsSyncDataRequest.setLastUpdateTime(syncTime);
}
return spsSyncDataRequest;
}
}

@ -262,11 +262,13 @@ public class UdiRelevanceController {
@AuthRuleAnnotation("")
@PostMapping("/udi/udirel/update")
public BaseResponse updateRelevanceEntity(@RequestBody UdiRelevanceEntity udiRelevanceEntity, BindingResult bindingResult) {
public BaseResponse updateRelevanceEntity(@RequestBody UdiRelevanceResponse udiRelevanceResponse, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
BeanUtils.copyProperties(udiRelevanceResponse, udiRelevanceEntity);
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
long customerId = customerService.getCustomerId();
@ -278,6 +280,9 @@ public class UdiRelevanceController {
}
}
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
BeanUtils.copyProperties(udiRelevanceResponse, udiInfoEntity);
udiInfoService.updateUdiInfo(udiInfoEntity);
return ResultVOUtils.success("更新成功");
}

@ -1,6 +1,5 @@
package com.glxp.sale.admin.controller.info;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.entity.info.DeviceKeyEntity;
import com.glxp.sale.admin.req.info.FilterDeviceKeyRequest;
@ -12,9 +11,6 @@ import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -22,7 +18,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import java.security.MessageDigest;
import java.util.List;

@ -273,18 +273,13 @@ public class OrderController {
public BaseResponse updateStatus(@RequestBody UpdateExportStatusRequest updateExportStatusRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
AuthAdmin authAdmin = customerService.getUserBean();
OrderEntity orderEntity = orderService.findById(updateExportStatusRequest.getOrderId());
orderEntity.setReceiveStatus(1);
long customerId = customerService.getCustomerId();
if (customerId == 110) {
orderEntity.setReviewUser(authAdmin.getId().intValue());
}
orderEntity.setUpdateTime(new Date());
orderService.updateOrder(orderEntity);
List<String> erpIds = DataTransUtil.strToErpList(orderEntity.getErpFk());
@ -298,7 +293,6 @@ public class OrderController {
stockOrderEntity.setReviewUser(authAdmin.getId().intValue());
}
stockOrderService.updateById(stockOrderEntity);
}
} else {
StockOrderFilterRequest stockOrderFilterRequest = new StockOrderFilterRequest();
@ -313,14 +307,31 @@ public class OrderController {
stockOrderService.updateById(stockOrderEntity);
}
}
}
invProductsTrService.genInvProducts(orderEntity.getId());
return ResultVOUtils.success("更新成功");
}
//前端直接验收完成
@AuthRuleAnnotation("")
@PostMapping("/spms/inout/order/web/updateStatus")
public BaseResponse webUpdateStatus(@RequestBody UpdateExportStatusRequest updateExportStatusRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
StockOrderEntity temp = stockOrderService.findByBillNo(updateExportStatusRequest.getStockOrderId());
if (temp == null) {
return ResultVOUtils.error(500, "未找到该业务单据");
}
updateExportStatusRequest.setOrderId(temp.getOrderIdFk());
return updateStatus(updateExportStatusRequest, null);
}
@AuthRuleAnnotation("")
@GetMapping("/udiwms/inout/order/filterCode")
public BaseResponse filterOrderByCode(OrderFilterByCodeRequest orderFilterByCodeRequest,

@ -421,7 +421,7 @@ public class StockOrderController {
}
);
originOrder.setUpdateTime(new Date());
orderService.insertOrder(originOrder);
codesTempService.insertCodesTemp(supplementCodes);

@ -13,16 +13,17 @@ import com.glxp.sale.admin.entity.basic.BasicUnitMaintainEntity;
import com.glxp.sale.admin.entity.basic.BussinessTypeEntity;
import com.glxp.sale.admin.entity.basic.UdiInfoEntity;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.entity.inout.OrderEntity;
import com.glxp.sale.admin.entity.inout.StockOrderEntity;
import com.glxp.sale.admin.entity.inout.WarehouseEntity;
import com.glxp.sale.admin.entity.inout.WarehouseUserEntity;
import com.glxp.sale.admin.entity.info.CompanyProductRelevanceEntity;
import com.glxp.sale.admin.entity.inout.*;
import com.glxp.sale.admin.entity.inventory.InvProductDetailEntity;
import com.glxp.sale.admin.entity.param.SystemParamConfigEntity;
import com.glxp.sale.admin.entity.udid.UdiEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.basic.CompanyProductRelevanceRequest;
import com.glxp.sale.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.sale.admin.req.info.FilterCompanyProductRelevanceRequest;
import com.glxp.sale.admin.req.inout.*;
import com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.res.basic.BussinessTypResponse;
import com.glxp.sale.admin.res.basic.CompanyProductRelevanceResponse;
@ -45,6 +46,8 @@ import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
@ -54,10 +57,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
@RestController
@ -93,6 +93,7 @@ public class WareHouseController {
CompanyProductRelevanceService companyProductRelevanceService;
@Resource
SystemParamConfigService systemParamConfigService;
Logger logger = LoggerFactory.getLogger(StockOrderController.class);
@Resource
StockOrderService stockOrderService;
@Resource
@ -280,6 +281,16 @@ public class WareHouseController {
return ResultVOUtils.success();
}
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/saveTempCode")
public BaseResponse saveCode(@RequestBody WarehouseEntity warehouseEntity) {
boolean b = codesTempService.update(warehouseEntity);
if (b)
return ResultVOUtils.success("修改成功");
else return ResultVOUtils.error(500, "修改失败!");
}
@AuthRuleAnnotation("")
@GetMapping("warehouse/inout/deleteCodesTempById")
public BaseResponse deleteCodesTempById(@RequestParam("id") Long id) {
@ -336,6 +347,132 @@ public class WareHouseController {
@Resource
InvPreInProductDetailService invPreInProductDetailService;
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/enterCode")
public BaseResponse addEndterCode(@RequestBody AddEnterCodeRequest addEnterCodeRequest, BindingResult bindingResult) {
if (StrUtil.isEmpty(addEnterCodeRequest.getCode())) {
return ResultVOUtils.error(500, "条码不能为空!");
}
String code = "";
String originCode = addEnterCodeRequest.getOriginCode();
if (originCode == null)
originCode = "";
code = originCode + addEnterCodeRequest.getCode();
String newCode = addEnterCodeRequest.getCode();
//重复判断
if (StrUtil.isNotEmpty(addEnterCodeRequest.getOriginCode())) {
String tempOriginCode = addEnterCodeRequest.getOriginCode();
if (tempOriginCode.endsWith("\u001D")) {
tempOriginCode = tempOriginCode.replace("\u001D", "");
}
UdiEntity originUdiEntity = FilterUdiUtils.getUdi(tempOriginCode);
if (StrUtil.isNotEmpty(newCode)) {
if (newCode.startsWith("10")) {
if (StrUtil.isNotEmpty(originUdiEntity.getBatchNo())) {
BaseResponse baseResponse = ResultVOUtils.error(501, "DI格式错误");
baseResponse.setData(originCode);
return baseResponse;
}
} else if (newCode.startsWith("17")) {
if (StrUtil.isNotEmpty(originUdiEntity.getExpireDate())) {
BaseResponse baseResponse = ResultVOUtils.error(501, "DI格式错误");
baseResponse.setData(originCode);
return baseResponse;
}
} else if (newCode.startsWith("11")) {
if (StrUtil.isNotEmpty(originUdiEntity.getProduceDate())) {
BaseResponse baseResponse = ResultVOUtils.error(501, "DI格式错误");
baseResponse.setData(originCode);
return baseResponse;
}
} else if (newCode.startsWith("21")) {
if (StrUtil.isNotEmpty(originUdiEntity.getSerialNo())) {
BaseResponse baseResponse = ResultVOUtils.error(501, "DI格式错误");
baseResponse.setData(originCode);
return baseResponse;
}
// else {
// return ResultVOUtils.success(code);
// }
} else {
BaseResponse baseResponse = ResultVOUtils.error(501, "DI格式错误");
baseResponse.setData(originCode);
return baseResponse;
}
}
}
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
if (udiEntity == null) {
BaseResponse baseResponse = ResultVOUtils.error(501, "DI格式错误");
baseResponse.setData(originCode);
return baseResponse;
}
if (StrUtil.isNotEmpty(udiEntity.getBatchNo())) {
if (code.endsWith("10" + udiEntity.getBatchNo())) {
code = code + "\u001D";
}
}
UdiRelevanceResponse checkUdi = udiRelevanceService.selectByNameCode(udiEntity.getUdi());
if (checkUdi == null) {
return ResultVOUtils.error(500, "耗材字典不存在此产品!");
}
boolean checkSuccess = true;
//校验条码完整性
if (("是".equals(checkUdi.getScbssfbhph()) && StrUtil.isEmpty(udiEntity.getBatchNo()))) {
if (!checkUdi.isAllowNoBatch())
checkSuccess = false;
}
if (("是".equals(checkUdi.getScbssfbhscrq()) && StrUtil.isEmpty(udiEntity.getProduceDate()))
) {
if (!checkUdi.isAllowNoProduct())
checkSuccess = false;
}
if (("是".equals(checkUdi.getScbssfbhsxrq()) && StrUtil.isEmpty(udiEntity.getExpireDate()))
) {
if (!checkUdi.isAllowNoExpire())
checkSuccess = false;
}
if (("是".equals(checkUdi.getScbssfbhxlh()) && StrUtil.isEmpty(udiEntity.getSerialNo()))
) {
checkSuccess = false;
}
if (StrUtil.isNotEmpty(udiEntity.getSerialNo()) && udiEntity.getSerialNo().length() > 20) {
checkSuccess = false;
return ResultVOUtils.error(504, "序列号超出20位");
}
if (StrUtil.isNotEmpty(udiEntity.getBatchNo()) && udiEntity.getBatchNo().length() > 20) {
checkSuccess = false;
return ResultVOUtils.error(504, "批次号超出20位");
}
if (StrUtil.isEmpty(udiEntity.getSerialNo()) && StrUtil.isEmpty(udiEntity.getBatchNo())) {
checkSuccess = false;
}
if (checkSuccess) {
if (code.endsWith("\u001D")) {
code = code.replace("\u001D", "");
}
return ResultVOUtils.success(code);
} else {
if (newCode.startsWith("21")) {
BaseResponse baseResponse = ResultVOUtils.error(503, "当前条码未完成,是否继续添加?");
baseResponse.setData(code);
return baseResponse;
}
}
BaseResponse baseResponse = ResultVOUtils.error(502, "校验未完成");
baseResponse.setData(code);
return baseResponse;
}
//网页端数据上传调用接口
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/addOrderWeb")
@ -352,6 +489,20 @@ public class WareHouseController {
if (udiEntity == null)
return ResultVOUtils.error(500, "无效条码!");
if (StrUtil.isNotEmpty(addOrderRequest.getBatchNo())) {
udiEntity.setBatchNo(addOrderRequest.getBatchNo());
}
if (StrUtil.isNotEmpty(addOrderRequest.getProduceDate())) {
udiEntity.setProduceDate(addOrderRequest.getProduceDate());
}
if (StrUtil.isNotEmpty(addOrderRequest.getExpireDate())) {
udiEntity.setExpireDate(addOrderRequest.getExpireDate());
}
if (StrUtil.isNotEmpty(addOrderRequest.getSerialNo())) {
udiEntity.setSerialNo(addOrderRequest.getSerialNo());
}
if (StrUtil.isNotEmpty(udiEntity.getSerialNo()) && udiEntity.getSerialNo().length() > 20) {
return ResultVOUtils.error(500, "无效条码!序列号超出最大范围");
}
@ -365,6 +516,9 @@ public class WareHouseController {
if (StrUtil.isEmpty(udiEntity.getSerialNo()) && StrUtil.isEmpty(udiEntity.getBatchNo())) {
return ResultVOUtils.error(500, "批次号不能为空!");
}
BaseResponse checkOriginCodeRes = checkOriginCode(udiEntity);
if (checkOriginCodeRes != null)
return checkOriginCodeRes;
//过期提醒:
SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip");
@ -417,8 +571,8 @@ public class WareHouseController {
return ResultVOUtils.error(500, "超出预验收库存数量");
}
}
} else {
if (invProductDetailEntity.getCount() < 1) {
}else {
if(invProductDetailEntity.getCount()<1){
return ResultVOUtils.error(500, "超出预验收库存数量");
}
}
@ -585,7 +739,7 @@ public class WareHouseController {
return null;
}
//校验产品ID唯一性
public BaseResponse checkRelId(BussinessTypeEntity bussinessTypeEntity, WarehouseEntity warehouseEntity) {
String unitFk = null;
@ -615,6 +769,7 @@ public class WareHouseController {
return null;
}
//校验供应商唯一性
public BaseResponse checkSupId(BussinessTypeEntity bussinessTypeEntity, WarehouseEntity warehouseEntity) {
String originSupId = ioTransInoutService.checkOriginExitSup(bussinessTypeEntity, warehouseEntity);
if (originSupId != null) {
@ -643,6 +798,63 @@ public class WareHouseController {
return null;
}
//校验条码完整性
public BaseResponse checkCode(WarehouseEntity warehouseEntity) {
//校验条码的完整性
String errMsg = "";
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectGroupById(warehouseEntity.getRelId());
if (StrUtil.isEmpty(warehouseEntity.getBatchNo()) &&
"是".equals(udiRelevanceResponse.getScbssfbhph()) && !udiRelevanceResponse.isAllowNoBatch()) {
errMsg = errMsg + ",批次号";
}
if (StrUtil.isEmpty(warehouseEntity.getProduceDate()) &&
"是".equals(udiRelevanceResponse.getScbssfbhscrq()) && !udiRelevanceResponse.isAllowNoProduct()) {
errMsg = errMsg + ",生产日期";
}
if (StrUtil.isEmpty(warehouseEntity.getExpireDate()) &&
"是".equals(udiRelevanceResponse.getScbssfbhsxrq()) && !udiRelevanceResponse.isAllowNoExpire()) {
errMsg = errMsg + ",失效日期";
}
if (StrUtil.isNotEmpty(errMsg)) {
BaseResponse baseResponse = ResultVOUtils.error(507, "请补齐" + errMsg.substring(1) + "");
baseResponse.setData(warehouseEntity);
return baseResponse;
}
return null;
}
public BaseResponse checkOriginCode(UdiEntity udiEntity) {
//校验条码的完整性
String errMsg = "";
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectByNameCode(udiEntity.getUdi());
if (StrUtil.isEmpty(udiEntity.getBatchNo()) &&
"是".equals(udiRelevanceResponse.getScbssfbhph()) && !udiRelevanceResponse.isAllowNoBatch()) {
errMsg = errMsg + ",批次号";
}
if (StrUtil.isEmpty(udiEntity.getProduceDate()) &&
"是".equals(udiRelevanceResponse.getScbssfbhscrq()) && !udiRelevanceResponse.isAllowNoProduct()) {
errMsg = errMsg + ",生产日期";
}
if (StrUtil.isEmpty(udiEntity.getExpireDate()) &&
"是".equals(udiRelevanceResponse.getScbssfbhsxrq()) && !udiRelevanceResponse.isAllowNoExpire()) {
errMsg = errMsg + ",失效日期";
}
if (StrUtil.isEmpty(udiEntity.getSerialNo()) &&
"是".equals(udiRelevanceResponse.getScbssfbhxlh())) {
errMsg = errMsg + ",序列号";
}
if (StrUtil.isNotEmpty(errMsg)) {
BaseResponse baseResponse = ResultVOUtils.error(507, "请补齐" + errMsg.substring(1) + "");
baseResponse.setData(udiEntity);
return baseResponse;
}
return null;
}
@AuthRuleAnnotation("")
@PostMapping("/udiwms/addCode/updateBindSup")
@ -680,11 +892,11 @@ public class WareHouseController {
try {
String customerId = getCustomerId();
if (customerId.equals("110")) {
if(customerId.equals("110")){
Integer userId = customerService.getUserId();
postOrderRequest.setCustomerId(customerId);
postOrderRequest.setUserId(userId);
} else {
}else {
postOrderRequest.setUserId(null);
}

@ -136,6 +136,8 @@ public class CheckOrderUtils {
}
}
if (status.equals(ConstantStatus.SORDER_DELIVER)) {
orderEntity.setReceiveStatus(1);
orderService.updateOrder(orderEntity);
invProductsTrService.genInvProducts(orderEntity.getId());
}

@ -184,9 +184,9 @@ public class InoutUtils {
}
public UdiInfoEntity getUdiInfo(UdiInfoService udiInfoService, UdiRelevanceService udiRelevanceService, String code, UdiDlHttpClient udiDlHttpClient) {
public UdiInfoEntity getUdiInfo(UdiInfoService udiInfoService, UdiRelevanceService udiRelevanceService, WarehouseEntity warehouseEntity, UdiDlHttpClient udiDlHttpClient) {
String prefix;
prefix = FilterUdiUtils.getDiStr(code);
prefix = FilterUdiUtils.getDiStr(warehouseEntity.getCode());
UdiInfoEntity udiInfoEntity = udiInfoService.findByNameCode(prefix);
if (udiInfoEntity == null) {
List<UdiInfoEntity> froms = udiDlHttpClient.getUdiByDi(prefix);
@ -207,14 +207,19 @@ public class InoutUtils {
}
}
udiInfoEntity.setCode(code);
udiInfoEntity = FilterUdiUtils.transUdi(udiInfoEntity);
udiInfoEntity.setCode(warehouseEntity.getCode());
udiInfoEntity.setBatchNo(warehouseEntity.getBatchNo());
udiInfoEntity.setProduceDate(warehouseEntity.getProduceDate());
udiInfoEntity.setExpireDate(warehouseEntity.getExpireDate());
udiInfoEntity.setSerialNo(warehouseEntity.getSerialNo());
udiInfoEntity.setUdi(warehouseEntity.getNameCode());
return udiInfoEntity;
}
public UdiInfoEntity getUdiInfoByRlId(UdiInfoService udiInfoService, UdiRelevanceService udiRelevanceService, String code, UdiDlHttpClient udiDlHttpClient) {
public UdiInfoEntity getUdiInfoByRlId(UdiInfoService udiInfoService, UdiRelevanceService udiRelevanceService, WarehouseEntity warehouseEntity, UdiDlHttpClient udiDlHttpClient) {
String prefix;
String code = warehouseEntity.getCode();
prefix = FilterUdiUtils.getDiStr(code);
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
@ -225,12 +230,18 @@ public class InoutUtils {
udiRelevanceResponse = udiRelevanceResponses.get(0);
}
if (udiRelevanceResponse == null) {
udiInfoEntity = getUdiInfo(udiInfoService, udiRelevanceService, code, udiDlHttpClient);
udiInfoEntity = getUdiInfo(udiInfoService, udiRelevanceService, warehouseEntity, udiDlHttpClient);
} else {
BeanUtils.copyProperties(udiRelevanceResponse, udiInfoEntity);
udiInfoEntity.setRelId(udiRelevanceResponse.getId() + "");
udiInfoEntity.setCode(code);
udiInfoEntity = FilterUdiUtils.transUdi(udiInfoEntity);
// udiInfoEntity = FilterUdiUtils.transUdi(udiInfoEntity);
udiInfoEntity.setCode(warehouseEntity.getCode());
udiInfoEntity.setBatchNo(warehouseEntity.getBatchNo());
udiInfoEntity.setProduceDate(warehouseEntity.getProduceDate());
udiInfoEntity.setExpireDate(warehouseEntity.getExpireDate());
udiInfoEntity.setSerialNo(warehouseEntity.getSerialNo());
udiInfoEntity.setUdi(warehouseEntity.getNameCode());
udiInfoEntity.setNameCode(udiRelevanceResponse.getNameCode());
}
@ -248,7 +259,7 @@ public class InoutUtils {
List<UdiInfoEntity> udiInfoEntities = new ArrayList<>();
for (WarehouseEntity warehouseEntity : warehouseEntityList) {
UdiInfoEntity udiInfoEntity = null;
udiInfoEntity = new InoutUtils(udiUrl).getUdiInfoByRlId(udiInfoService, udiRelevanceService, warehouseEntity.getCode(), udiDlHttpClient);
udiInfoEntity = new InoutUtils(udiUrl).getUdiInfoByRlId(udiInfoService, udiRelevanceService, warehouseEntity, udiDlHttpClient);
if (udiInfoEntity != null) {
udiInfoEntity.setCount(getActCount(warehouseEntity, udiRelevanceService) * warehouseEntity.getCount());
udiInfoEntity.setRelId(warehouseEntity.getRelId());
@ -326,7 +337,7 @@ public class InoutUtils {
if (CollUtil.isNotEmpty(udiRelevanceEntities)) {
for (UdiRelevanceEntity udiRelevanceEntity : udiRelevanceEntities) {
if (udiRelevanceEntity.getId().equals(erpOrderEntity.getBindRlFk()) && StrUtil.isNotEmpty(udimsOrderDetailBean.getBatchNo()) &&
StrUtil.isNotEmpty(erpOrderEntity.getBatchNo())&& udimsOrderDetailBean.getBatchNo().equals(erpOrderEntity.getBatchNo())) {
StrUtil.isNotEmpty(erpOrderEntity.getBatchNo()) && udimsOrderDetailBean.getBatchNo().equals(erpOrderEntity.getBatchNo())) {
return udimsOrderDetailBean;
}
}

@ -105,8 +105,7 @@ public class InvPreInProductsController {
if (Constant.SYSTEM_CUSTOMER_ID.equals(filterInvProductRequest.getCustomerId())) {
filterInvProductRequest.setCustomerId(null);
}
if(StrUtil.isEmpty(filterInvProductRequest.getBatchNo()))
{
if (StrUtil.isEmpty(filterInvProductRequest.getBatchNo())) {
filterInvProductRequest.setBatchNo("empty");
}
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailService.filterInvProduct(filterInvProductRequest);
@ -159,7 +158,7 @@ public class InvPreInProductsController {
@PostMapping("spms/prein/inv/products/clearAll")
public BaseResponse clearAllInvProduct(@RequestBody DeleteRequest deleteRequest) {
boolean b = invProductService.deleteAll();
boolean b = invProductService.deleteAll();
if (b) {
return ResultVOUtils.success("删除成功");
} else {

@ -95,15 +95,10 @@ public class InvProductsController {
});
filterInvProductRequest.setInvCodes(invCodes);
}
}
} else {
CompanyEntity companyEntity = companyService.findCompany(Long.parseLong(customerId));
filterInvProductRequest.setSupId(companyEntity.getUnitIdFk());
// InvWarehouseEntity invWarehouseEntity = invWarehouseService.findDefault(false, true);
// filterInvProductRequest.setInvStorageCode(invWarehouseEntity.getCode());
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setSpUse(true);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterInvWarehouse(filterInvWarehouseRequest);
@ -115,8 +110,6 @@ public class InvProductsController {
filterInvProductRequest.setCustomerId(null);
}
// filterInvProductRequest.setGroupType("invStorageCode");
List<InvProductResponse> invProductResponses = invProductService.filterJoinInvProduct(filterInvProductRequest);
PageInfo<InvProductResponse> pageInfo;
@ -307,7 +300,6 @@ public class InvProductsController {
if (udiInfoEntities != null && udiInfoEntities.size() > 1) {
filterInvProductDetailRequest.setProductIdFk(udiInfoBean.getId() + "");
filterInvProductDetailRequest.setBatchNo(udiEntity.getBatchNo());
} else {
filterInvProductDetailRequest.setOriginCode(filterCodeTraceRequest.getCode());
}

@ -0,0 +1,24 @@
package com.glxp.sale.admin.dao.basic;
import com.glxp.sale.admin.entity.basic.EntrustReceEntity;
import com.glxp.sale.admin.req.basic.BasicEntrustRecRequest;
import com.glxp.sale.admin.res.basic.EntrustReceRespose;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface EntrustReceDao {
List<EntrustReceEntity> filterEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
List<EntrustReceRespose> filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
boolean insertEntrustRec(EntrustReceEntity ioOrderStatusEntity);
boolean deleteById(String id);
boolean updateEntrustRec(EntrustReceEntity warehouseEntity);
}

@ -0,0 +1,22 @@
package com.glxp.sale.admin.entity.basic;
import lombok.Data;
import java.util.Date;
@Data
public class EntrustReceEntity {
private Integer id;
private String action;
private String entrustInv;
private String entrustUser;
private String userId;
private String entrustAction;
private Date updateTime;
private String remark;
private boolean finishRece;
}

@ -59,6 +59,9 @@ public class UdiInfoEntity {
private String supId;
private Boolean isCheck;
private boolean allowNoBatch;
private boolean allowNoExpire;
private boolean allowNoProduct;
public Integer getId() {
return id;

@ -32,8 +32,6 @@ public class UdiRelevanceEntity {
private Boolean isAdavence;
private String supName;
private String originUuid;
private boolean allowNoBatch;
private String price;
public Integer getLockStatus() {

@ -0,0 +1,7 @@
package com.glxp.sale.admin.req.auth;
import lombok.Data;
@Data
public class ConnectRequest {
}

@ -11,4 +11,5 @@ public class BasicExportStatusRequest extends ListPageRequest {
private Integer scheduleType;
private String idDatas;
public Integer createType;
private String syncTime;
}

@ -0,0 +1,9 @@
package com.glxp.sale.admin.req.inout;
import lombok.Data;
@Data
public class AddEnterCodeRequest {
private String originCode;
private String code;
}

@ -0,0 +1,8 @@
package com.glxp.sale.admin.req.inout;
import lombok.Data;
@Data
public class AddEnterCodeResult {
String resultCode;
}

@ -23,5 +23,10 @@ public class AddOrderRequest {
private boolean outChangeEnable;
private boolean ignoreExpire;
private boolean ignoreRecentExpire;
private boolean ignoreCode;
private boolean preCheck;
private String batchNo;
private String produceDate;
private String expireDate;
private String serialNo;
}

@ -8,5 +8,5 @@ public class UpdateExportStatusRequest {
private String orderId;
private Integer exportStatus;
private Integer checkStatus;
private String stockOrderId;
}

@ -66,6 +66,9 @@ public class CompanyProductRelevanceResponse {
private String cpms;
private String supName;
private boolean allowNoBatch;
private boolean allowNoExpire;
private boolean allowNoProduct;
private String price;
}

@ -0,0 +1,23 @@
package com.glxp.sale.admin.res.basic;
import lombok.Data;
import java.util.Date;
@Data
public class EntrustReceRespose {
private Integer id;
private String action;
private String entrustInv;
private String entrustUser;
private String userId;
private String entrustAction;
private Date updateTime;
private String remark;
private boolean finishRece;
private String curName;
private String entrustName;
private String employeeName;
private String entrustInvName;
}

@ -67,6 +67,9 @@ public class UdiRelevanceResponse {
private String companyName;
private String originUuid;
private boolean allowNoBatch;
private boolean allowNoExpire;
private boolean allowNoProduct;
private String price;
public int getBhzxxsbzsl() {

@ -0,0 +1,24 @@
package com.glxp.sale.admin.service.basic;
import com.glxp.sale.admin.entity.basic.BasicExportStatusEntity;
import com.glxp.sale.admin.entity.basic.EntrustReceEntity;
import com.glxp.sale.admin.req.basic.BasicEntrustRecRequest;
import com.glxp.sale.admin.req.basic.BasicExportStatusRequest;
import com.glxp.sale.admin.res.basic.EntrustReceRespose;
import java.util.List;
public interface EntrustReceService {
List<EntrustReceEntity> filterEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
List<EntrustReceRespose> filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest);
boolean insertEntrustRec(EntrustReceEntity ioOrderStatusEntity);
boolean deleteById(String id);
boolean updateEntrustRec(EntrustReceEntity warehouseEntity);
}

@ -0,0 +1,62 @@
package com.glxp.sale.admin.service.basic.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.dao.basic.EntrustReceDao;
import com.glxp.sale.admin.entity.basic.CorpImportLogEntity;
import com.glxp.sale.admin.entity.basic.EntrustReceEntity;
import com.glxp.sale.admin.req.basic.BasicEntrustRecRequest;
import com.glxp.sale.admin.res.basic.EntrustReceRespose;
import com.glxp.sale.admin.service.basic.EntrustReceService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class EntrustReceServiceImpl implements EntrustReceService {
@Resource
EntrustReceDao entrustReceDao;
@Override
public List<EntrustReceEntity> filterEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest) {
if (basicEntrustRecRequest == null) {
return Collections.emptyList();
}
if (basicEntrustRecRequest.getPage() != null) {
int offset = (basicEntrustRecRequest.getPage() - 1) * basicEntrustRecRequest.getLimit();
PageHelper.offsetPage(offset, basicEntrustRecRequest.getLimit());
}
return entrustReceDao.filterEntrustRec(basicEntrustRecRequest);
}
@Override
public List<EntrustReceRespose> filterJoinEntrustRec(BasicEntrustRecRequest basicEntrustRecRequest) {
if (basicEntrustRecRequest == null) {
return Collections.emptyList();
}
if (basicEntrustRecRequest.getPage() != null) {
int offset = (basicEntrustRecRequest.getPage() - 1) * basicEntrustRecRequest.getLimit();
PageHelper.offsetPage(offset, basicEntrustRecRequest.getLimit());
}
return entrustReceDao.filterJoinEntrustRec(basicEntrustRecRequest);
}
@Override
public boolean insertEntrustRec(EntrustReceEntity entrustReceEntity) {
return entrustReceDao.insertEntrustRec(entrustReceEntity);
}
@Override
public boolean deleteById(String id) {
return entrustReceDao.deleteById(id);
}
@Override
public boolean updateEntrustRec(EntrustReceEntity entrustReceEntity) {
return entrustReceDao.updateEntrustRec(entrustReceEntity);
}
}

@ -120,8 +120,12 @@ public class ProductInfoServiceImpl implements ProductInfoService {
@Override
public List<ProductInfoEntity> syncDlUdi(ProductInfoFilterRequest productInfoFilterRequest) {
int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit() + 1;
productInfoFilterRequest.setPage(offset);
// if (productInfoFilterRequest.getPage() != null) {
// int offset = (productInfoFilterRequest.getPage() - 1) * productInfoFilterRequest.getLimit();
// PageHelper.offsetPage(offset, productInfoFilterRequest.getLimit());
// }
return productInfoDao.syncDlUdi(productInfoFilterRequest);
}

@ -54,6 +54,7 @@ public class AsyncDiDlHelper {
});
List<UdiCompanyEntity> udiCompanyEntities = baseResponse.getData();
return udiCompanyEntities;
} catch (Exception e) {

@ -264,6 +264,9 @@ public class InvProductsTrService {
//缺量补单时是否全量补单
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("ullage_supplement_all");
if (systemParamConfigEntity != null && systemParamConfigEntity.getParamValue().equals("1")) {
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(orderEntity.getAction());
insetInv(bussinessTypeEntity, invProductDetailEntities);//2.插入当前库存
WarehouseEntity warehouseEntity = warehouseEntities.get(0);
InvWarehouseEntity locWarehouseEntity = invWarehouseService.selectByCode(warehouseEntity.getLocStorageCode());
if (locWarehouseEntity.getLevel() == 1 && isAdavnce(warehouseEntity)) {//补寄售转入
@ -329,10 +332,10 @@ public class InvProductsTrService {
warehouseEntity.setFromCorp(invWarehouseEntity.getName());
if (invCount > 0) {//仓库已存在该产品
if (count > invCount) { //当前数量>结余数量,说明该产品是无序列号或者是多级包装
UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
// UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
if (actCount > invCount) { //该产品实际数量大于结余数量,说明是多级包装,直接补
preiInList.add(warehouseEntity);
} else if (udiEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
} else if (warehouseEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
int lea = count - invCount;
warehouseEntity.setCount(lea / (warehouseEntity.getCount())); //
preiInList.add(warehouseEntity);
@ -374,10 +377,10 @@ public class InvProductsTrService {
if (invCount > 0) {//仓库已存在该产品
if (count > invCount) { //当前数量>结余数量,说明该产品是无序列号或者是多级包装
UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
// UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
if (actCount > invCount) { //该产品实际数量大于结余数量,说明是多级包装,直接补
inList.add(warehouseEntity);
} else if (udiEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
} else if (warehouseEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
int lea = count - invCount;
warehouseEntity.setCount(lea / (warehouseEntity.getCount())); //
inList.add(warehouseEntity);
@ -444,10 +447,10 @@ public class InvProductsTrService {
int invCount = getPreCountByOrder(null, udiInfoEntity.getRelId(), warehouseEntity.getBatchNo(), warehouseEntity.getSupId(), warehouseEntity.getLocStorageCode());
if (invCount > 0) {//仓库已存在该产品
if (count > invCount) { //当前数量>结余数量,说明该产品是无序列号或者是多级包装
UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
// UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
if (actCount > invCount) { //该产品实际数量大于结余数量,说明是多级包装,直接补
prePutList.add(warehouseEntity);
} else if (udiEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
} else if (warehouseEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
int lea = count - invCount;
warehouseEntity.setCount(lea / (warehouseEntity.getCount())); //
prePutList.add(warehouseEntity);
@ -514,6 +517,7 @@ public class InvProductsTrService {
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
outOrder.setPreCheck(false);
outOrder.setReceiveStatus(0);
orderService.insertOrder(outOrder);
for (WarehouseEntity warehouseEntity : preOutList) {
warehouseEntity.setOrderId(outOrder.getId());
@ -590,6 +594,7 @@ public class InvProductsTrService {
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
outOrder.setPreCheck(false);
outOrder.setReceiveStatus(0);
orderService.insertOrder(outOrder);
for (WarehouseEntity warehouseEntity : temps) {
warehouseEntity.setOrderId(outOrder.getId());
@ -634,6 +639,7 @@ public class InvProductsTrService {
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
outOrder.setPreCheck(false);
outOrder.setReceiveStatus(0);
orderService.insertOrder(outOrder);
warehouseEntity.setOrderId(outOrder.getId());
warehouseEntity.setId(null);
@ -706,6 +712,7 @@ public class InvProductsTrService {
outOrder.setCreateUser(null);
outOrder.setReviewUser(null);
outOrder.setPreCheck(false);
outOrder.setReceiveStatus(0);
orderService.insertOrder(outOrder);
for (WarehouseEntity warehouseEntity : temps) {
warehouseEntity.setOrderId(outOrder.getId());
@ -768,6 +775,7 @@ public class InvProductsTrService {
outOrder.setLocStorageCode(orderEntity.getLocStorageCode());
outOrder.setErpFk(null);
outOrder.setFromType(ConstantStatus.FROM_CHANGE);
outOrder.setReceiveStatus(0);
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + MyStrUtil.trim(bussinessTypeEntity.getPrefix()), "yyyyMMdd"));
outOrder.setId(orderNo);
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("additional_auto_submit");

@ -822,11 +822,11 @@ public class IoTransInoutService {
orderEntity.setErpFk(stockOrderEntity.getBillNo());
orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_UN);
orderEntity.setUpdateTime(new Date());
orderService.updateOrder(orderEntity);
if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_DELIVER)) {
orderEntity.setReceiveStatus(1);
invProductsTrService.genInvProducts(orderEntity.getId());
}
orderService.updateOrder(orderEntity);
} else {
orderEntity.setRemark("该产品DI绑定多个产品ID请在扫码单据详情绑定对应产品ID");
orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_FAIL);
@ -895,6 +895,8 @@ public class IoTransInoutService {
}
} else {
stockOrderEntity.setStatus(ConstantStatus.SORDER_DELIVER);
orderEntity.setReceiveStatus(1);
// invProductsTrService.genInvProducts(orderEntity.getId());
}
stockOrderEntity.setSupplementNo(orderEntity.getSupplementNo());
@ -907,7 +909,8 @@ public class IoTransInoutService {
stockOrderFilterRequest.setBillNo(stockOrderEntity.getBillNo());
stockOrderEntity = stockOrderService.findOne(stockOrderFilterRequest);
stockOrderDetailService.deleteByOrderIdFk(stockOrderEntity.getId());
orderEntity.setUpdateTime(new Date());
orderService.updateOrder(orderEntity);
return stockOrderEntity;
}

@ -247,7 +247,7 @@ public class FilterUdiUtils {
}
public static UdiInfoEntity transUdi(UdiInfoEntity data) {
public static UdiInfoEntity transUdi1(UdiInfoEntity data) {
UdiEntity udiEntity = getUdi(data.getCode());
if (udiEntity != null) {
data.setBatchNo(udiEntity.getBatchNo());

@ -94,7 +94,7 @@ public class GennerOrderUtils {
* @time: 14:15
* @return: java.lang.String
**/
public String createScOrderNo(OrderNoTypeBean orderNoTypeEnum) {
public synchronized String createScOrderNo(OrderNoTypeBean orderNoTypeEnum) {
//获得单号前缀
//格式 固定前缀 +时间前缀 示例
String formNoPrefix = getFormNoPrefix(orderNoTypeEnum);

@ -0,0 +1,94 @@
<?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.sale.admin.dao.basic.EntrustReceDao">
<select id="filterEntrustRec" parameterType="com.glxp.sale.admin.req.basic.BasicEntrustRecRequest"
resultType="com.glxp.sale.admin.entity.basic.EntrustReceEntity">
select * from basic_entrust_accept
<where>
<if test="id != '' and id!=null">
and id = #{id}
</if>
<if test="action!=null">
and action = #{action}
</if>
<if test="entrustInv!=null">
and entrustInv = #{entrustInv}
</if>
<if test="entrustUser != '' and entrustUser!=null">
and entrustUser = #{entrustUser}
</if>
<if test="userId!=null">
and userId = #{userId}
</if>
</where>
order by updateTime desc
</select>
<select id="filterJoinEntrustRec" parameterType="com.glxp.sale.admin.req.basic.BasicEntrustRecRequest"
resultType="com.glxp.sale.admin.res.basic.EntrustReceRespose">
select basic_entrust_accept.* ,
a.name curName, b.name entrustName,auth_user.employeeName
,inv_warehouse.name entrustInvName
from basic_entrust_accept
LEFT JOIN basic_bussiness_type a on basic_entrust_accept.action = a.action
LEFT JOIN basic_bussiness_type b on basic_entrust_accept.entrustAction = b.action
LEFT JOIN auth_user on basic_entrust_accept.entrustUser = auth_user.id
LEFT JOIN inv_warehouse on basic_entrust_accept.entrustInv = inv_warehouse.`code`
<where>
<if test="id != '' and id!=null">
and id = #{id}
</if>
<if test="action!=null">
and action = #{action}
</if>
<if test="entrustInv!=null">
and entrustInv = #{entrustInv}
</if>
<if test="entrustUser != '' and entrustUser!=null">
and entrustUser = #{entrustUser}
</if>
<if test="userId!=null">
and userId = #{userId}
</if>
</where>
order by updateTime desc
</select>
<insert id="insertEntrustRec" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.basic.EntrustReceEntity">
replace
INTO basic_entrust_accept(`action`, entrustInv, `entrustUser`, userId, updateTime, remark,entrustAction,finishRece)
values (
#{action},
#{entrustInv},
#{entrustUser},
#{userId},
#{updateTime},
#{remark},
#{entrustAction},
#{finishRece}
)
</insert>
<update id="updateEntrustRec" parameterType="com.glxp.sale.admin.entity.basic.EntrustReceEntity">
UPDATE basic_entrust_accept
<trim prefix="set" suffixOverrides=",">
<if test="action != null">action=#{action},</if>
<if test="entrustInv != null">entrustInv=#{entrustInv},</if>
<if test="entrustUser != null">entrustUser=#{entrustUser},</if>
<if test="userId != null">userId=#{userId},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="remark != null">remark=#{remark},</if>
</trim>
WHERE id = #{id}
</update>
<delete id="deleteById" parameterType="Map">
DELETE
FROM basic_entrust_accept
WHERE id = #{id}
</delete>
</mapper>

@ -43,7 +43,8 @@
basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.scbssfbhsxrq,basic_products.cpms,basic_products.originUuid
basic_products.scbssfbhsxrq,basic_products.cpms,basic_products.originUuid,basic_products.allowNoBatch,
basic_products.allowNoExpire,basic_products.allowNoProduct
FROM (company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id)
@ -130,7 +131,7 @@
nameCode,packRatio,packLevel,bhxjsl,
bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,addType,deviceRecordKey,
cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber
,diType,productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,manufactory,originUuid)
,diType,productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,manufactory,originUuid,allowNoBatch,allowNoExpire,allowNoProduct)
values
(
#{id},
@ -163,7 +164,7 @@
#{scbssfbhscrq},
#{scbssfbhsxrq},
#{cpms},
#{manufactory},#{originUuid}
#{manufactory},#{originUuid},,#{allowNoBatch},#{allowNoExpire},#{allowNoProduct}
)
</insert>
@ -173,7 +174,7 @@
nameCode,packRatio,packLevel,bhxjsl,
bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,addType,deviceRecordKey,
cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber
,diType,productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,manufactory,originUuid
,diType,productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,manufactory,originUuid,allowNoBatch,allowNoExpire,allowNoProduct
)
values
@ -205,7 +206,7 @@
#{item.diType},#{item.productType}, #{item.scbssfbhph},
#{item.scbssfbhxlh},
#{item.scbssfbhscrq},
#{item.scbssfbhsxrq},#{item.cpms},#{item.manufactory},#{item.originUuid}
#{item.scbssfbhsxrq},#{item.cpms},#{item.manufactory},#{item.originUuid},#{item.allowNoBatch},#{item.allowNoExpire},#{item.allowNoProduct}
)
</foreach>
</insert>
@ -257,7 +258,9 @@
<if test="scbssfbhsxrq != null">scbssfbhsxrq=#{scbssfbhsxrq},</if>
<if test="cpms != null">cpms=#{cpms},</if>
<if test="originUuid != null">originUuid=#{originUuid},</if>
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if>
<if test="allowNoExpire != null">allowNoExpire=#{allowNoExpire},</if>
<if test="allowNoProduct != null">allowNoProduct=#{allowNoProduct},</if>
</trim>
WHERE nameCode = #{nameCode}
</update>
@ -284,7 +287,7 @@
(id, nameCode, packRatio, packLevel, bhxjsl, bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, addType,
deviceRecordKey, cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, ylqxzcrbarmc, zczbhhzbapzbh,
ylqxzcrbarywmc, sydycpbs, uuid, sjcpbm, versionNumber, diType, ybbm, sptm, manufactory, measname,
productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,originUuid) values
productType,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,originUuid,allowNoBatch,allowNoExpire,allowNoProduct) values
<foreach collection="udiInfoEntities" item="item" index="index" separator=",">
(#{item.id},
#{item.nameCode},
@ -318,7 +321,7 @@
#{item.productType}, #{item.scbssfbhph},
#{item.scbssfbhxlh},
#{item.scbssfbhscrq},
#{item.scbssfbhsxrq},#{item.cpms},#{item.originUuid})
#{item.scbssfbhsxrq},#{item.cpms},#{item.originUuid},#{allowNoBatch},#{allowNoExpire},#{allowNoProduct})
</foreach>
</insert>
</mapper>

@ -12,7 +12,10 @@
basic_udirel.thirdName1,basic_udirel.thirdName2,basic_udirel.thirdName3,basic_udirel.thirdName4,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.ybbm,basic_udirel.sptm,
basic_udirel.isDisable, basic_udirel.isLock,basic_udirel.lockStatus,basic_udirel.udplatCode,
basic_udirel.isAdavence,basic_udirel.mainId,basic_udirel.allowNoBatch,basic_udirel.price,
basic_udirel.isAdavence,basic_udirel.mainId,basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_udirel.price,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,
basic_products.bhxjsl,basic_products.bhzxxsbzsl,basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,basic_products.bzcj,
@ -97,7 +100,9 @@
basic_udirel.thirdName1,basic_udirel.thirdName2,basic_udirel.thirdName3,basic_udirel.thirdName4,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.ybbm,basic_udirel.sptm,basic_udirel.price,
basic_udirel.isDisable, basic_udirel.isLock,basic_udirel.lockStatus,basic_udirel.udplatCode,
basic_udirel.isAdavence,basic_udirel.mainId,basic_udirel.allowNoBatch,
basic_udirel.isAdavence,basic_udirel.mainId,basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,
basic_products.bhxjsl,basic_products.bhzxxsbzsl,basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,basic_products.bzcj,
@ -187,7 +192,9 @@
basic_udirel.thirdId1,basic_udirel.thirdId2,basic_udirel.thirdId3,basic_udirel.thirdId4,
basic_udirel.ybbm,basic_udirel.sptm,basic_udirel.isDisable, basic_udirel.isLock,basic_udirel.lockStatus,
basic_udirel.thirdName1,basic_udirel.thirdName2,basic_udirel.thirdName3,basic_udirel.thirdName4,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.udplatCode,basic_udirel.allowNoBatch,basic_udirel.price,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.udplatCode,basic_products.allowNoBatch,
basic_products.allowNoExpire,basic_products.allowNoProduct,
basic_udirel.price,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,basic_products.bhxjsl,
basic_products.bhzxxsbzsl,basic_products.zxxsbzbhsydysl,basic_products.bhxjcpbm,basic_products.bzcj,
basic_products.addType,basic_products.deviceRecordKey,basic_products.cpmctymc,basic_products.cplb,
@ -393,7 +400,7 @@
(id,
thirdId,thirdName,uuid,isUseDy,updateTime,
thirdId1,thirdId2,thirdId3,thirdId4,thirdName1,thirdName2,thirdName3,thirdName4,manufactory,measname,ybbm,sptm,isDisable,isLock
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,allowNoBatch,price
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,price
)
values
(
@ -422,8 +429,7 @@
#{lockStatus},
#{udplatCode},
#{isAdavence},
#{supName},
#{allowNoBatch},#{price}
#{supName},#{price}
)
</insert>
@ -436,7 +442,7 @@
(id,
thirdId,thirdName,uuid,isUseDy,updateTime,
thirdId1,thirdId2,thirdId3,thirdId4,thirdName1,thirdName2,thirdName3,thirdName4,manufactory,measname,ybbm,sptm,isDisable,isLock
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,allowNoBatch,price
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,price
)
values
(
@ -466,7 +472,7 @@
#{udplatCode},
#{isAdavence},
#{supName},
#{allowNoBatch},#{price}
#{price}
)
</insert>
@ -515,7 +521,6 @@
<if test="udplatCode != null">udplatCode=#{udplatCode},</if>
<if test="isAdavence != null">isAdavence=#{isAdavence},</if>
<if test="supName != null">supName=#{supName},</if>
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if>
<if test="price != null">price=#{price},</if>
</trim>
@ -542,7 +547,7 @@
<insert id="importUdiRelevance" parameterType="java.util.List">
replace into basic_udirel (id, thirdId, thirdName, uuid, isUseDy, updateTime, thirdId1, thirdId2, thirdId3,
thirdId4, thirdName1, thirdName2, thirdName3, thirdName4, ybbm, sptm, manufactory,
measname, isDisable, mainId, mainName, udplatCode,supName,allowNoBatch,price)
measname, isDisable, mainId, mainName, udplatCode,supName,price)
values
<foreach collection="udiRelevanceEntities" item="item" index="index" separator=",">
(#{item.id},
@ -566,7 +571,7 @@
#{item.isDisable},
#{item.mainId},
#{item.mainName},
#{item.udplatCode},#{item.supName},#{item.allowNoBatch},#{item.price})
#{item.udplatCode},#{item.supName},#{item.price})
</foreach>
</insert>
</mapper>

@ -36,7 +36,9 @@
basic_udirel.thirdName1,basic_udirel.thirdName2,
basic_udirel.thirdName3,basic_udirel.thirdName4,
basic_udirel.ybbm,basic_udirel.sptm,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.lockStatus,basic_udirel.allowNoBatch,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.lockStatus,basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,basic_products.bhxjsl,
basic_products.bhzxxsbzsl,basic_products.zxxsbzbhsydysl,basic_products.bhxjcpbm,
basic_products.bzcj,basic_products.addType,basic_udirel.isDisable,

@ -123,6 +123,9 @@
<if test="fromCorpId != null">`fromCorpId`=#{fromCorpId},</if>
<if test="fromCorp != null">`fromCorp`=#{fromCorp},</if>
<if test="locStorageCode != null">`locStorageCode`=#{locStorageCode},</if>
<if test="produceDate != null">`produceDate`=#{produceDate},</if>
<if test="expireDate != null">`expireDate`=#{expireDate},</if>
<if test="batchNo != null">`batchNo`=#{batchNo},</if>
<if test="supId != null">`supId`=#{supId},</if>
<if test="relId != null">`relId`=#{relId},</if>
</set>
@ -138,6 +141,9 @@
<if test="fromCorp != null">`fromCorp`=#{fromCorp},</if>
<if test="locStorageCode != null">`locStorageCode`=#{locStorageCode},</if>
<if test="supId != null">`supId`=#{supId},</if>
<if test="produceDate != null">`produceDate`=#{produceDate},</if>
<if test="expireDate != null">`expireDate`=#{expireDate},</if>
<if test="batchNo != null">`batchNo`=#{batchNo},</if>
<if test="relId != null">`relId`=#{relId},</if>
</set>
WHERE id=#{id}

@ -5,7 +5,7 @@
<select id="filterStockOrderDetail" parameterType="com.glxp.sale.admin.req.inout.StockOrderDetailFilterRequest"
resultType="com.glxp.sale.admin.entity.inout.StockOrderDetailEntity">
select stock_order_detail.*,basic_udirel.allowNoBatch from stock_order_detail
select stock_order_detail.* from stock_order_detail
left join basic_udirel on stock_order_detail.relId = basic_udirel.id
<where>
<if test="orderIdFk != '' and orderIdFk!=null">

@ -240,6 +240,13 @@
</select>
<select id="selectListByAction" resultMap="BaseResultMap">
select inv_warehouse_bussiness_type.id, inv_warehouse_bussiness_type.code, inv_warehouse_bussiness_type.action, basic_bussiness_type.name
from inv_warehouse_bussiness_type
inner join basic_bussiness_type on inv_warehouse_bussiness_type.action = basic_bussiness_type.action
where code = #{code}
</select>
<delete id="deleteByCode">
delete

@ -223,9 +223,6 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="supId != '' and supId != null">
AND supId = #{supId}
</if>
@ -277,9 +274,6 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>

@ -163,9 +163,6 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="supId != '' and supId != null">
AND supId = #{supId}
</if>
@ -217,9 +214,6 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>

@ -163,9 +163,6 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="supId != '' and supId != null">
AND supId = #{supId}
</if>
@ -217,9 +214,6 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -266,9 +260,6 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>

Loading…
Cancel
Save