代码同步,平和接口对接修改

purchase
anthonyywj2 3 years ago
parent 90a424dd12
commit 43c2b5a72e

@ -23,4 +23,12 @@ public class Constant {
public static String DELAY_SYNC_TIME = "DELAY_SYNC_TIME";
public static String LAST_THIRD_UPLOAD_TIME = "LAST_THIRD_UPLOAD_TIME"; //最后一次上传第三方单据时间
public static final int DB_CHECK_ED = 1; //已校驗
public static final int DB_CHECK_UN = 0; //未校驗
public static final int CHECK_EXIT = 1; //校驗成功,存在
public static final int CHECK_REPEAT = 2; //重複校驗
public static final int CHECK_NULL = 3; //校驗失敗,不存在
}

@ -146,4 +146,8 @@ public class ConstantStatus {
public static final int THIRD_ORDER_UPLOAD = 1; //业务单据上传至第三方
public static final int THIRD_ORDER_RECEIVE = 2; //接收第三方上传扫码单据
public static final String REDIS_BILLNO = "ACCEPT_"; //缓存单据前缀
public static final String REDIS_BILLNO_CODES = "ACCEPT_CODES";
}

@ -223,6 +223,10 @@ public class BussinessLocalTypeController {
if (bussinessTypeEntity != null) {
bussinessTypeEntity.setAction("ST" + CustomUtil.getId());
BussinessLocalTypeEntity bussinessLocalTypeEntity = bussinessLocalTypeService.findByAction(bussinessTypeEntity.getAction());
BussinessLocalTypeEntity bussinessLocalTypeEntity1 = bussinessLocalTypeService.findBTByName(bussinessTypeEntity.getName());
if (bussinessLocalTypeEntity1 != null) {
return ResultVOUtils.error(999, "业务单据类型名称已存在!");
}
if (bussinessLocalTypeEntity != null) {
ResultVOUtils.error(999, "业务类型已存在!");
} else {

@ -120,6 +120,8 @@ public class UdiContrastController {
udiInfoService.deleteByUuid(udiRelevanceEntity.getUuid());
for (UdiInfoEntity udiInfoEntity : udiInfoEntities) {
udiInfoEntity.setUuid(udiRelevanceEntity.getUuid());
udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
}
udiInfoService.insertUdiInfos(UdiInfoUtil.initUdiInfoEntitys(udiInfoEntities));
// udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());

@ -17,6 +17,7 @@ import com.glxp.api.admin.entity.business.StockOrderDetailEntity;
import com.glxp.api.admin.entity.business.StockOrderEntity;
import com.glxp.api.admin.entity.business.StockQRCodeTextEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.entity.inout.AcceptOrderEntity;
import com.glxp.api.admin.entity.inout.OrderEntity;
import com.glxp.api.admin.entity.inout.WarehouseEntity;
import com.glxp.api.admin.entity.inout.WarehouseUserEntity;
@ -112,6 +113,9 @@ public class StockOrderController {
private BussinessTypeService bussinessTypeService;
@Resource
private OrderDao orderDao;
@Resource
private RedisUtil redisUtil;
@AuthRuleAnnotation("")
@GetMapping("/udiwms/stock/order/error")
@ -721,4 +725,155 @@ public class StockOrderController {
}
return ResultVOUtils.error(ResultEnum.NOT_NETWORK, "撤回失败");
}
//验收单据
@AuthRuleAnnotation("")
@GetMapping("/udiwms/stock/order/accept/getOrder")
public BaseResponse getAcceptOrder(String billNo) {
if (StrUtil.isBlank(billNo)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
StockOrderEntity stockOrderEntity = stockOrderService.findByBillNo(billNo);
AcceptOrderEntity acceptOrderEntity = new AcceptOrderEntity();
acceptOrderEntity.setBillNo(billNo);
List<StockOrderDetailEntity> datas = (List<StockOrderDetailEntity>) redisUtil.get(ConstantStatus.REDIS_BILLNO + billNo);
if (CollUtil.isNotEmpty(datas)) {
acceptOrderEntity.setOrderDetailEntities(datas);
acceptOrderEntity.setExitAccept(true);
} else {
List<StockOrderDetailEntity> stockOrderDetailEntities = stockOrderDetailService.findByOrderIdFk(stockOrderEntity.getId());
acceptOrderEntity.setOrderDetailEntities(stockOrderDetailEntities);
acceptOrderEntity.setExitAccept(false);
}
return ResultVOUtils.success(acceptOrderEntity);
}
@AuthRuleAnnotation("")
@PostMapping("/udiwms/stock/order/acceptClear")
public BaseResponse acceptClear(@RequestBody AcceptOrderEntity acceptOrderEntity) {
String billNo = acceptOrderEntity.getBillNo();
redisUtil.del(ConstantStatus.REDIS_BILLNO + billNo);
redisUtil.del(ConstantStatus.REDIS_BILLNO_CODES + billNo);
StockOrderEntity stockOrderEntity = stockOrderService.findByBillNo(billNo);
List<StockOrderDetailEntity> stockOrderDetailEntities = stockOrderDetailService.findByOrderIdFk(stockOrderEntity.getId());
acceptOrderEntity.setOrderDetailEntities(stockOrderDetailEntities);
return ResultVOUtils.success(acceptOrderEntity);
}
@AuthRuleAnnotation("")
@PostMapping("/udiwms/stock/order/accept/addCode")
public BaseResponse acceptAddCode(@RequestBody AcceptOrderEntity acceptOrderEntity) {
StockOrderEntity stockOrderEntity = stockOrderService.findByBillNo(acceptOrderEntity.getBillNo());
//
// if (warehouseEntity == null) {
// return ResultVOUtils.error(500, "非此单UDI码");
// }
List<WarehouseEntity> codeList;
List<WarehouseEntity> warehouseEntityList = (List<WarehouseEntity>) redisUtil.get(ConstantStatus.REDIS_BILLNO_CODES + acceptOrderEntity.getBillNo());
if (CollUtil.isEmpty(warehouseEntityList)) {
codeList = codesService.findByReceiptId(stockOrderEntity.getOrderIdFk());
} else {
codeList = warehouseEntityList;
}
WarehouseEntity warehouseEntity = isExit(codeList, acceptOrderEntity.getCode());
if (warehouseEntity == null) {
return ResultVOUtils.error(500, "非此单UDI码");
}
int status = checkCodeExit(warehouseEntity.getCode(), codeList);
if (status == Constant.CHECK_REPEAT) {
return ResultVOUtils.error(500, "重复扫码!");
} else if (status == Constant.CHECK_NULL) {
return ResultVOUtils.error(500, "非此单UDI码");
}
List<StockOrderDetailEntity> stockOrderDetailEntities = acceptOrderEntity.getOrderDetailEntities();
if (StrUtil.isNotEmpty(acceptOrderEntity.getCode()) && CollUtil.isNotEmpty(stockOrderDetailEntities)) {
boolean isExit = false;
for (StockOrderDetailEntity stockOrderDetailEntity : stockOrderDetailEntities) {
if (stockOrderDetailEntity.getRelId().equals(warehouseEntity.getRelId()) &&
StrUtil.trimToEmpty(stockOrderDetailEntity.getBatchNo()).equals(StrUtil.trimToEmpty(warehouseEntity.getBatchNo()))
) {
stockOrderDetailEntity.setAcceptCount(stockOrderDetailEntity.getAcceptCount() + warehouseEntity.getCount());
if (stockOrderDetailEntity.getAcceptCount() > stockOrderDetailEntity.getReCount()) {
return ResultVOUtils.error(500, "数量溢出!");
}
isExit = true;
break;
}
}
if (isExit) {
redisUtil.set(ConstantStatus.REDIS_BILLNO + acceptOrderEntity.getBillNo(), stockOrderDetailEntities);
redisUtil.set(ConstantStatus.REDIS_BILLNO_CODES + acceptOrderEntity.getBillNo(), codeList);
acceptOrderEntity.setOrderDetailEntities(stockOrderDetailEntities);
if (vailFinish(stockOrderDetailEntities)) {
acceptOrderEntity.setFinishAccept(true);
return ResultVOUtils.success(acceptOrderEntity);
}
return ResultVOUtils.success(acceptOrderEntity);
}
}
return ResultVOUtils.error(500, "非此单条码!");
}
public WarehouseEntity isExit(List<WarehouseEntity> codeList, String code) {
if (CollUtil.isNotEmpty(codeList)) {
for (WarehouseEntity warehouseEntity : codeList) {
if (warehouseEntity.getCode().equals(code)) {
return warehouseEntity;
}
}
}
return null;
}
@Resource
UdiInfoUtils udiInfoUtils;
public int checkCodeExit(String code, List<WarehouseEntity> codesList) {
if (StrUtil.isNotEmpty(code)) {
code = code.replace("\r\n", "");
}
for (WarehouseEntity checkOrderCodesBean : codesList) {
if (checkOrderCodesBean.getCode().toUpperCase(Locale.ROOT).equals(code.toUpperCase(Locale.ROOT))) {
if (checkOrderCodesBean.getStatus() == Constant.DB_CHECK_ED
&& checkOrderCodesBean.getCount() == checkOrderCodesBean.getScanCount()) {
return Constant.CHECK_REPEAT;
}
int curCount = checkOrderCodesBean.getScanCount() + udiInfoUtils.getActCount(checkOrderCodesBean);
if (curCount == checkOrderCodesBean.getCount()) {
checkOrderCodesBean.setStatus(Constant.DB_CHECK_ED);
}
checkOrderCodesBean.setScanCount(curCount);
return Constant.CHECK_EXIT;
}
}
return Constant.CHECK_NULL;
}
public boolean vailFinish(List<StockOrderDetailEntity> stockOrderDetailEntities) {
if (CollUtil.isNotEmpty(stockOrderDetailEntities)) {
for (StockOrderDetailEntity stockOrderDetailEntity : stockOrderDetailEntities) {
if (stockOrderDetailEntity.getReCount() != stockOrderDetailEntity.getAcceptCount()) {
return false;
}
}
return true;
}
return false;
}
}

@ -349,6 +349,10 @@ public class OrderController {
return ResultVOUtils.success(pageSimpleResponse);
}
@Resource
RedisUtil redisUtil;
//手持终端验收完成后,更新订单状态
@AuthRuleAnnotation("")
@PostMapping("/spms/inout/order/check/updateStatus")
@ -390,6 +394,9 @@ public class OrderController {
for (StockOrderEntity stockOrderEntity : stockOrderEntityLit) {
stockOrderEntity.setEntrustEnd(true);
stockOrderService.updateById(stockOrderEntity);
redisUtil.del(ConstantStatus.REDIS_BILLNO + stockOrderEntity.getBillNo());
redisUtil.del(ConstantStatus.REDIS_BILLNO_CODES + stockOrderEntity.getBillNo());
}
}
return ResultVOUtils.success("验收成功!");
@ -492,6 +499,9 @@ public class OrderController {
}
stockOrderEntity.setEntrustEnd(true);
stockOrderService.updateById(stockOrderEntity);
redisUtil.del(ConstantStatus.REDIS_BILLNO + stockOrderEntity.getBillNo());
redisUtil.del(ConstantStatus.REDIS_BILLNO_CODES + stockOrderEntity.getBillNo());
}
} else {
StockOrderFilterRequest stockOrderFilterRequest = new StockOrderFilterRequest();

@ -25,9 +25,6 @@ import com.glxp.api.admin.entity.thrsys.ThrOrderDetailEntity;
import com.glxp.api.admin.entity.thrsys.ThrOrderEntity;
import com.glxp.api.admin.httpclient.ErpOrderClient;
import com.glxp.api.admin.httpclient.SpsDirectClient;
import com.glxp.api.admin.httpclient.req.UdiwmsOrderDetail;
import com.glxp.api.admin.httpclient.req.UdiwmsOrderRequest;
import com.glxp.api.admin.httpclient.req.UdiwmsPreInOrderRequest;
import com.glxp.api.admin.req.business.StockOrderDetailFilterRequest;
import com.glxp.api.admin.req.business.StockOrderFilterRequest;
import com.glxp.api.admin.req.info.SystemParamConfigRequest;
@ -643,6 +640,14 @@ public class OrderDetailController {
return ResultVOUtils.error(500, "所选单据类型不一致!");
}
if (orderEntity.getInvStorageCode().equals(erpOrderEntities.get(i).getLocStorageCode())) {
return ResultVOUtils.error(500, "扫码单据与业务单据当前仓库不一致!");
}
if (orderEntity.getInvWarehouseCode().equals(erpOrderEntities.get(i).getInvWarehouseCode())) {
return ResultVOUtils.error(500, "扫码单据与业务单据当前分库不一致!");
}
}
@ -696,33 +701,6 @@ public class OrderDetailController {
orderService.updateOrder(orderEntity);
}
}
// if (!bussinessTypeEntity.getCheckEnable()
// || (orderEntity.getFromType().intValue() == ConstantStatus.FROM_CHANGE && !bussinessTypeEntity.isCheckChange())) { //不需要校验,则直接生成库存
// orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_UN);
// orderService.updateOrder(orderEntity);
// transInoutService.checkMutiDi(orderEntity.getId());
// if (orderEntity.getContrastStatus() != ConstantStatus.ORDER_CHECK_FAIL) {
// orderService.updateOrderStatus(orderEntity.getId(), ConstantStatus.ORDER_STATUS_SUCCESS);
// if (orderEntity.getCustomerId().equals(Constant.SYSTEM_CUSTOMER_ID)) {
// invProductsTrService.genInvProducts(orderEntity.getId());
// }
// transInoutService.printOrder(orderEntity.getId());
// }
// } else {
//
// List<String> erpIds = DataTransUtil.strToErpList(orderEntity.getErpFk());
// if (erpIds != null && erpIds.size() > 0) { //已经绑定ERPID则自动校验
// List<ErpOrderEntity> erpOrderEntities = thrDataService.getStockOrders(erpIds);
// checkOrderUtils.check(orderEntity.getId(), erpOrderEntities);
// } else {
// //未绑定Id,则更改状态,等待校验
// orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_UN);
// orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
// orderService.updateOrder(orderEntity);
// }
//
// }
return ResultVOUtils.success("后台已开始校验,请稍后刷新重试!");
}
}

@ -748,14 +748,14 @@ public class WareHouseController {
} else //是否查询库存
if (addOrderRequest.isVailInv()) {
if (bussinessTypeEntity.isAdvanceType()) {
InvProductDetailEntity invProductDetailEntity = invPreProductDetailService.statInvPreInDetail(code);
if (invProductDetailEntity == null) {
addCodeResult.setErrMsg("库存不存在此产品!");
int count = invPreProductDetailService.vailStockCount(code);
if (count < 0) {
return ResultVOUtils.error(500, "当前库存不足不允许0库存出库");
}
} else {
InvProductDetailEntity invProductDetailEntity = invProductDetailService.statInvPreInDetail(code);
if (invProductDetailEntity == null) {
addCodeResult.setErrMsg("库存不存在此产品!");
int count = invProductDetailService.vailStockCount(code);
if (count <= 0) {
return ResultVOUtils.error(500, "当前库存不足不允许0库存出库");
}
}
}

@ -163,4 +163,11 @@ public class InvPreProductsController {
return ResultVOUtils.error(501, "寄售库存不存在此产品");
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/products/pre/vailInvCount")
public BaseResponse vailInvCount(FilterInvProductDetailRequest filterInvProductDetailRequest) {
int count = invProductDetailService.vailStockCount(filterInvProductDetailRequest.getCode());
return ResultVOUtils.success(count);
}
}

@ -429,4 +429,12 @@ public class InvProductsController {
return ResultVOUtils.error(501, "库存不存在此产品");
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/products/vailInvCount")
public BaseResponse vailInvCount(FilterInvProductDetailRequest filterInvProductDetailRequest) {
int count = invProductDetailService.vailStockCount(filterInvProductDetailRequest.getCode());
return ResultVOUtils.success(count);
}
}

@ -42,4 +42,7 @@ public class StockOrderDetailEntity {
private Integer codeId;
private int acceptCount;
}

@ -0,0 +1,22 @@
package com.glxp.api.admin.entity.inout;
import com.glxp.api.admin.entity.business.StockOrderDetailEntity;
import lombok.Data;
import java.util.List;
@Data
public class AcceptOrderEntity {
private String billNo;
private String code;
private boolean isExitAccept;
private boolean finishAccept;
private List<StockOrderDetailEntity> orderDetailEntities;
}

@ -37,6 +37,8 @@ public class WarehouseEntity {
private String mySupId;
private int scanCount;
public String getSupId() {
if (supId == null) {

@ -1,6 +1,7 @@
package com.glxp.api.admin.httpclient;
import cn.hutool.core.collection.CollUtil;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.basic.ProductInfoEntity;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.req.receipt.ProductInfoFilterRequest;
@ -83,6 +84,7 @@ public class UdiDlHttpClient {
BeanUtils.copyProperties(productInfoEntity, udiInfoEntity);
udiInfoEntity.setQxlb(productInfoEntity.getCplx());
udiInfoEntity.setCplb(productInfoEntity.getHchzsb());
udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
udiInfoEntities.add(udiInfoEntity);
}
return udiInfoEntities;

@ -29,5 +29,7 @@ public class FilterThrProductsRequest extends ListPageRequest {
private String supId;
private Long id;
private String uuid;
}

@ -70,6 +70,7 @@ public class CompanyProductRelevanceResponse {
private String price;
private String spmc;
private Integer productType;
//产品代理商
private String cpdls;

@ -148,6 +148,9 @@ public class BussinessLocalTypeServiceImpl implements BussinessLocalTypeService
@Override
public BussinessLocalTypeEntity findBTByName(String name) {
if (StrUtil.isEmpty(name)) {
return null;
}
BussinessLocalTypeFilterRequest bussinessTypeFilterRequest = new BussinessLocalTypeFilterRequest();
bussinessTypeFilterRequest.setName(name);
List<BussinessLocalTypeEntity> data = bussinessLocalTypeDao.filterList(bussinessTypeFilterRequest);

@ -9,6 +9,8 @@ import java.util.List;
public interface StockOrderDetailService {
List<StockOrderDetailEntity> findByOrderIdFk(String orderFk);
List<StockOrderDetailEntity> filterStockOrderDetail(StockOrderDetailFilterRequest stockOrderDetailFilterRequest);
List<StockOrderDetailResponse> filterStockOrderDetail2(StockOrderDetailFilterRequest stockOrderDetailFilterRequest);

@ -23,6 +23,17 @@ public class StockOrderDetailServiceImpl implements StockOrderDetailService {
@Resource
private SystemParamConfigDao systemParamConfigDao;
@Override
public List<StockOrderDetailEntity> findByOrderIdFk(String orderFk) {
if (StrUtil.isEmpty(orderFk)) {
return null;
} else {
StockOrderDetailFilterRequest stockOrderDetailFilterRequest = new StockOrderDetailFilterRequest();
stockOrderDetailFilterRequest.setOrderIdFk(orderFk);
return stockOrderDetailDao.filterStockOrderDetail(stockOrderDetailFilterRequest);
}
}
@Override
public List<StockOrderDetailEntity> filterStockOrderDetail(StockOrderDetailFilterRequest stockOrderDetailFilterRequest) {
if (stockOrderDetailFilterRequest == null) {

@ -181,6 +181,10 @@ public class StockOrderServiceImpl implements StockOrderService {
@Override
public StockOrderEntity findByBillNo(String orderId) {
if (StrUtil.isEmpty(orderId)) {
return null;
}
StockOrderFilterRequest stockOrderFilterRequest = new StockOrderFilterRequest();
stockOrderFilterRequest.setBillNo(orderId);
if (orderId == null) {

@ -32,4 +32,6 @@ public interface InvPreProductDetailService {
int statCount(FilterInvProductDetailRequest filterInvProductDetailRequest);
InvProductDetailEntity statInvPreInDetail(String code);
int vailStockCount(String code);
}

@ -34,4 +34,6 @@ public interface InvProductDetailService {
int statCount(FilterInvProductDetailRequest filterInvProductDetailRequest);
InvProductDetailEntity statInvPreInDetail(String code);
int vailStockCount(String code);
}

@ -3,6 +3,7 @@ package com.glxp.api.admin.service.inventory.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.constant.ConstantType;
import com.glxp.api.admin.dao.inventory.InvPreProductDetailDao;
import com.glxp.api.admin.entity.basic.UdiEntity;
import com.glxp.api.admin.entity.inventory.InvProductDetailEntity;
@ -121,4 +122,39 @@ public class InvPreProductDetailServiceImpl implements InvPreProductDetailServic
}
return null;
}
@Override
public int vailStockCount(String code) {
if (StrUtil.isEmpty(code)) {
return 0;
}
FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest();
filterInvProductDetailRequest.setOriginCode(code);
List<InvProductDetailEntity> datas = invPreProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest);
if (CollUtil.isEmpty(datas)) {
filterInvProductDetailRequest.setOriginCode(null);
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
if (StrUtil.isNotEmpty(udiEntity.getBatchNo()))
filterInvProductDetailRequest.setBatchNo(udiEntity.getBatchNo());
else
filterInvProductDetailRequest.setBatchNo("empty");
filterInvProductDetailRequest.setProductionDate(udiEntity.getProduceDate());
filterInvProductDetailRequest.setExpireDate(udiEntity.getExpireDate());
datas = invPreProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest);
}
int count = 0;
if (CollUtil.isNotEmpty(datas)) {
for (InvProductDetailEntity invProductDetailEntity : datas) {
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT))
count = count + invProductDetailEntity.getCount();
else {
count = count - invProductDetailEntity.getCount();
}
}
}
return count;
}
}

@ -3,6 +3,7 @@ package com.glxp.api.admin.service.inventory.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.constant.ConstantType;
import com.glxp.api.admin.dao.inventory.InvProductDetailDao;
import com.glxp.api.admin.entity.basic.UdiEntity;
import com.glxp.api.admin.entity.inventory.InvProductDetailEntity;
@ -130,4 +131,38 @@ public class InvProductDetailServiceImpl implements InvProductDetailService {
return null;
}
@Override
public int vailStockCount(String code) {
if (StrUtil.isEmpty(code)) {
return 0;
}
FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest();
filterInvProductDetailRequest.setOriginCode(code);
List<InvProductDetailEntity> datas = invProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest);
if (CollUtil.isEmpty(datas)) {
filterInvProductDetailRequest.setOriginCode(null);
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
if (StrUtil.isNotEmpty(udiEntity.getBatchNo()))
filterInvProductDetailRequest.setBatchNo(udiEntity.getBatchNo());
else
filterInvProductDetailRequest.setBatchNo("empty");
filterInvProductDetailRequest.setProductionDate(udiEntity.getProduceDate());
filterInvProductDetailRequest.setExpireDate(udiEntity.getExpireDate());
datas = invProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest);
}
int count = 0;
if (CollUtil.isNotEmpty(datas)) {
for (InvProductDetailEntity invProductDetailEntity : datas) {
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT))
count = count + invProductDetailEntity.getCount();
else {
count = count - invProductDetailEntity.getCount();
}
}
}
return count;
}
}

@ -1,5 +1,6 @@
package com.glxp.api.admin.thread;
import cn.hutool.core.util.StrUtil;
import com.glxp.api.admin.entity.basic.CompanyProductRelevanceEntity;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.req.basic.UdiInfoExportRequest;
@ -9,6 +10,7 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@ -149,7 +149,8 @@ public class OrderSubmitTask implements SchedulingConfigurer {
continue;
}
if (orderEntity.getFromType() == ConstantStatus.FROM_UDISP) {
orderEntity.setFromType(orderEntity.getOriginFromType());
if (orderEntity.getOriginFromType() != null)
orderEntity.setFromType(orderEntity.getOriginFromType());
}
if (orderEntity.getFromType() == ConstantStatus.FROM_UDIMS) {

@ -2,6 +2,7 @@ package com.glxp.api.admin.util;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import java.util.List;
@ -25,6 +26,7 @@ public class UdiInfoUtil {
public static List<UdiInfoEntity> initUdiInfoEntitys(List<UdiInfoEntity> udiInfoEntitys) {
if (CollUtil.isNotEmpty(udiInfoEntitys)) {
for (UdiInfoEntity udiInfoEntity : udiInfoEntitys) {
udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_UDI);
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhph()) && "否".equals(udiInfoEntity.getScbssfbhph())) {
udiInfoEntity.setAllowNoBatch(true);
}

@ -0,0 +1,35 @@
package com.glxp.api.admin.util;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.entity.inout.WarehouseEntity;
import com.glxp.api.admin.res.basic.UdiRelevanceResponse;
import com.glxp.api.admin.service.basic.UdiRelevanceService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class UdiInfoUtils {
@Resource
UdiRelevanceService udiRelevanceService;
public int getActCount(WarehouseEntity warehouseEntity) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(warehouseEntity.getRelId());
UdiRelevanceResponse udiInfoBean = udiRelevanceService.selectByNameCode(warehouseEntity.getNameCode());
if (udiInfoBean != null) {
if ((udiRelevanceEntity.getIsUseDy() != null && udiRelevanceEntity.getIsUseDy()) && udiInfoBean.getDiType() != 2) {
if (udiInfoBean.getBhzxxsbzsl() == 0)
return udiInfoBean.getZxxsbzbhsydysl();
else
return udiInfoBean.getZxxsbzbhsydysl() * udiInfoBean.getBhzxxsbzsl();
} else {
return udiInfoBean.getBhzxxsbzsl();
}
}
return 1;
}
}

@ -1,6 +1,6 @@
server.port=9991
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://192.168.0.109:3306/udiwms?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.jdbc-url=jdbc:mysql://192.168.0.109:3306/udiwms_ph1?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.hikari.connection-timeout=60000

@ -65,8 +65,8 @@
AND basic_bustype_origin.action LIKE concat(#{action},'%')
</if>
<if test="key != ''and key != null">
AND( (basic_bustype_origin.name LIKE concat(#{key},'%') )or( basic_bustype_origin.action LIKE
concat(#{key},'%')) )
AND( (basic_bustype_origin.name LIKE concat('%',#{key},'%') )or( basic_bustype_origin.action LIKE
concat('%',#{key},'%')) )
</if>
<if test="thirdSys != ''and thirdSys != null">

@ -38,7 +38,7 @@
basic_udirel.ybbm,basic_udirel.sptm,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.lockStatus,basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_products.allowNoProduct,,basic_products.productType,
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,

@ -152,7 +152,8 @@
<if test="invoiceDate != null">invoiceDate=#{invoiceDate},</if>
<if test="relId != null">relId=#{relId},</if>
<if test="manufactory != null">manufactory=#{manufactory},</if>
<if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if>
0
</set>
WHERE id = #{id}
</update>

@ -35,6 +35,9 @@
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
<if test="thirdSys != '' and thirdSys != null">
AND thirdSysFk = #{thirdSys}
</if>
<if test="supName != '' and supName != null">
AND supName LIKE concat('%',#{supName},'%')
</if>

Loading…
Cancel
Save