界面修改

master
anthonyywj2 3 years ago
parent 6163771510
commit bb4b592466

@ -42,6 +42,8 @@ import com.glxp.api.admin.service.info.CompanyProductRelevanceService;
import com.glxp.api.admin.service.info.SystemParamConfigService;
import com.glxp.api.admin.service.inout.*;
import com.glxp.api.admin.service.inventory.InvPreInProductDetailService;
import com.glxp.api.admin.service.inventory.InvPreProductDetailService;
import com.glxp.api.admin.service.inventory.InvProductDetailService;
import com.glxp.api.admin.thread.IoTransInoutService;
import com.glxp.api.admin.util.*;
import com.glxp.api.common.enums.ResultEnum;
@ -588,7 +590,7 @@ public class WareHouseController {
// String isCheck = systemParamConfigService.selectValueByParamKey("code_fill_check");
//三期校验
if (bussinessTypeEntity.isCodeFillCheck()) {
if (addOrderRequest.isCodeFillCheck()) {
BaseResponse checkOriginCodeRes = checkOriginCode(udiEntity);
if (checkOriginCodeRes != null)
return checkOriginCodeRes;
@ -652,7 +654,20 @@ public class WareHouseController {
}
}
}
}
} else //是否查询库存
if (addOrderRequest.isVailInv()) {
if (bussinessTypeEntity.isAdvanceType()) {
InvProductDetailEntity invProductDetailEntity = invPreProductDetailService.statInvPreInDetail(code);
if (invProductDetailEntity == null) {
addCodeResult.setErrMsg("库存不存在此产品!");
}
} else {
InvProductDetailEntity invProductDetailEntity = invProductDetailService.statInvPreInDetail(code);
if (invProductDetailEntity == null) {
addCodeResult.setErrMsg("库存不存在此产品!");
}
}
}
if (addOrderRequest.getFromCorpId() == null) {
@ -678,19 +693,23 @@ public class WareHouseController {
WarehouseQueryRequest warehouseQueryRequest = new WarehouseQueryRequest();
warehouseQueryRequest.setOrderId(orderId);
warehouseQueryRequest.setCode(code);
// warehouseQueryRequest.setCode(code);
List<WarehouseEntity> warehouseEntitys = codesTempService.findByOrderIdAndCode(warehouseQueryRequest);
WarehouseEntity warehouseEntity = new WarehouseEntity();
WarehouseEntity exitLocalEntity = null;
if (warehouseEntitys.size() > 0) {
warehouseEntity = warehouseEntitys.get(0);
warehouseEntity.setCount(warehouseEntity.getCount() + 1);
if (StringUtils.isBlank(warehouseEntity.getSerialNo())) {
codesTempService.updateById(warehouseEntity);
} else {
return ResultVOUtils.error(ResultEnum.DATA_REPEAT);
exitLocalEntity = isExitLocal(code, warehouseEntitys);
if (exitLocalEntity != null) {
warehouseEntity = exitLocalEntity;
warehouseEntity.setCount(warehouseEntity.getCount() + 1);
if (StringUtils.isBlank(warehouseEntity.getSerialNo())) {
codesTempService.updateById(warehouseEntity);
} else {
return ResultVOUtils.error(ResultEnum.DATA_REPEAT);
}
}
} else {
}
if (exitLocalEntity == null) {
warehouseEntity.setCode(code);
warehouseEntity.setOrderId(orderId);
warehouseEntity.setCorpOrderId(addOrderRequest.getCorpOrderId());
@ -803,6 +822,34 @@ public class WareHouseController {
return null;
}
//判断本单是否存在
public WarehouseEntity isExitLocal(String code, List<WarehouseEntity> warehouseEntityList) {
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
for (int i = 0; i < warehouseEntityList.size(); i++) {
WarehouseEntity drugCodeSelectEntity = warehouseEntityList.get(i);
if (warehouseEntityList.get(i).getCode().equals(code)) {
return drugCodeSelectEntity;
}
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getNameCode()).equals(StrUtil.emptyIfNull(udiEntity.getUdi()))) {
continue;
}
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getBatchNo()).equals(StrUtil.emptyIfNull(udiEntity.getBatchNo()))) {
continue;
}
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getProduceDate()).equals(StrUtil.emptyIfNull(udiEntity.getProduceDate()))) {
continue;
}
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getExpireDate()).equals(StrUtil.emptyIfNull(udiEntity.getExpireDate()))) {
continue;
}
return drugCodeSelectEntity;
}
return null;
}
//校验产品ID唯一性
public BaseResponse checkRelId(BussinessTypeEntity bussinessTypeEntity, WarehouseEntity warehouseEntity) {
@ -944,6 +991,11 @@ public class WareHouseController {
return ResultVOUtils.success("绑定成功");
}
@Resource
InvPreProductDetailService invPreProductDetailService;
@Resource
InvProductDetailService invProductDetailService;
//网页端数据上传调用接口
@AuthRuleAnnotation("")

@ -29,5 +29,9 @@ public class BussinessLocalTypeEntity {
private String localPrefix;
private boolean preIn;
private boolean outTospms;
private boolean ullageFill;
private boolean scanPreIn;
private boolean vailInv;
private boolean codeFillCheck;
}

@ -26,4 +26,9 @@ public class AddOrderRequest {
private String produceDate;
private String expireDate;
private String serialNo;
private boolean vailInv;
private boolean codeFillCheck;
}

@ -395,6 +395,9 @@ public class OrderServiceImpl implements OrderService {
public List<String> getOneOrderById(String id) {
List<String> orderIds = new ArrayList<>();
OrderNoResult orderNo = orderDao.selectOrderNos(id);
if (orderNo == null) {
return orderIds;
}
Field[] fields = ReflectUtil.getFields(OrderNoResult.class);
for (Field field : fields) {
String value = String.valueOf(ReflectUtil.getFieldValue(orderNo, field));
@ -511,10 +514,12 @@ public class OrderServiceImpl implements OrderService {
StockOrderFilterRequest stockOrderFilterRequest = new StockOrderFilterRequest();
stockOrderFilterRequest.setBillNo(orderEntity.getErpFk());
StockOrderEntity stockOrderEntity = stockOrderDao.findOne(stockOrderFilterRequest);
//删除业务单据详情
stockOrderDetailDao.deleteByOrderIdFk(stockOrderEntity.getId());
//删除业务单据
stockOrderDao.deleteById(stockOrderEntity.getId());
if (stockOrderEntity != null) {
//删除业务单据详情
stockOrderDetailDao.deleteByOrderIdFk(stockOrderEntity.getId());
//删除业务单据
stockOrderDao.deleteById(stockOrderEntity.getId());
}
//删除扫码单据详情
orderDetailDao.deleteByOrderId(id);
//删除扫码单据
@ -534,10 +539,12 @@ public class OrderServiceImpl implements OrderService {
StockOrderFilterRequest stockOrderFilterRequest = new StockOrderFilterRequest();
stockOrderFilterRequest.setBillNo(orderEntity.getErpFk());
StockOrderEntity stockOrderEntity = stockOrderDao.findOne(stockOrderFilterRequest);
//删除业务单据详情
stockOrderDetailDao.deleteByOrderIdFk(stockOrderEntity.getId());
//删除业务单据
stockOrderDao.deleteById(stockOrderEntity.getId());
if (stockOrderEntity != null) {
//删除业务单据详情
stockOrderDetailDao.deleteByOrderIdFk(stockOrderEntity.getId());
//删除业务单据
stockOrderDao.deleteById(stockOrderEntity.getId());
}
//删除码
codesDao.deleteByOrderId(id);
} catch (Exception e) {

@ -127,7 +127,8 @@
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.defaultUnit,basic_bussiness_type.genUnit,basic_bustype_origin.action
thirdAction,basic_bustype_origin.thirdSys,basic_bussiness_type.prefix,basic_bustype_local.prefix localPrefix,basic_bustype_local.preIn
thirdAction,basic_bustype_origin.thirdSys,basic_bussiness_type.prefix,basic_bustype_local.prefix localPrefix,preIn,
basic_bussiness_type.ullageFill, basic_bussiness_type.scanPreIn, basic_bussiness_type.vailInv, basic_bussiness_type.codeFillCheck
FROM basic_bustype_local
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

Loading…
Cancel
Save