选入阿里单据

dev_unify
yewj 4 months ago
parent e7a5145063
commit c69a08bac7

@ -766,15 +766,16 @@ public class IoOrderDetailBizController extends BaseController {
addBizProductReqeust.setCount(aliYljgBillDetailDrugCodeList1.size() * udiCalCountUtil.getCirActCount(udiRelevanceResponse));
addBizProductReqeust.setBatchNo(aliYljgBillDetailDrug.getProduceBatchNo());
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getProduceDate())){
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getProduceDate())) {
addBizProductReqeust.setProductDate(aliYljgBillDetailDrug.getProduceDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
}
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())){
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())) {
addBizProductReqeust.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
}
if (i == 0) {
addBizProductReqeust.setOrderEntity(ioOrderEntity);
}
addBizProductReqeust.setProductType(udiRelevanceResponse.getProductType());
BaseResponse response = orderDetailBizService.addBizProduct(addBizProductReqeust);
if (response.getCode() != 20000) {
return response;
@ -791,27 +792,27 @@ public class IoOrderDetailBizController extends BaseController {
AliYljgBillDetailDrugCode aliYljgBillDetailDrugCode = aliYljgBillDetailDrugCodeList.get(j);
addOrderRequest.setCode(aliYljgBillDetailDrugCode.getCode());
IoCodeLostEntity codeLostEntity = ioCodeLostService.findByCode(code);
IoCodeLostEntity codeLostEntity = ioCodeLostService.findByCode(aliYljgBillDetailDrugCode.getCode());
if (codeLostEntity == null) {
codeLostEntity = new IoCodeLostEntity();
codeLostEntity.setId(IdUtil.getSnowflakeNextId());
codeLostEntity.setNameCode(nameCode);
codeLostEntity.setCode(code);
codeLostEntity.setCode(aliYljgBillDetailDrugCode.getCode());
codeLostEntity.setBatchNo(aliYljgBillDetailDrug.getProduceBatchNo());
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getProduceDate())){
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getProduceDate())) {
codeLostEntity.setProduceDate(aliYljgBillDetailDrug.getProduceDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
}
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())){
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())) {
codeLostEntity.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
}
}else {
} else {
codeLostEntity.setBatchNo(aliYljgBillDetailDrug.getProduceBatchNo());
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getProduceDate())){
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getProduceDate())) {
codeLostEntity.setProduceDate(aliYljgBillDetailDrug.getProduceDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
}
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())){
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())) {
codeLostEntity.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
}
}

@ -22,6 +22,7 @@ public class AddBizProductReqeust {
private String productDate;
private String expireDate;
private Integer count;
private Integer productType;
List<AddBizProductReqeust> datas; //多选添加
AliYljgSearchbill aliData; //多选添加

@ -334,7 +334,7 @@ public class IoCheckInoutService {
if (vailBatchNo) {
bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo());
} else {
bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), null, null);
bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate());
}
if (bizEntity == null) {
return "非此单产品!";

@ -40,6 +40,7 @@ public interface IoOrderDetailBizService {
IoOrderDetailBizEntity findByRelId(String orderId, Long relId);
List<IoOrderDetailBizResponse> filterList(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderDetailBizResponse> filterDrugList(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderDetailCodeResponse> getfilterList(FilterOrderDetailCodeRequest orderDetailBizRequest);
@ -60,6 +61,7 @@ public interface IoOrderDetailBizService {
/**
*
*
* @param newBillNo
* @param oldBillNo
*/

@ -217,10 +217,10 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
public List<IoOrderDetailBizEntity> checkOrderList(String orderId) {
IoOrderEntity orderEntity = orderService.findByBillNo(orderId);
List<IoOrderDetailBizEntity> orderDetailBizEntities = findByOrderId(orderId);
for (IoOrderDetailBizEntity orderDetailBizEntity : orderDetailBizEntities){
if (orderDetailBizEntity.getBzgg() == null){
for (IoOrderDetailBizEntity orderDetailBizEntity : orderDetailBizEntities) {
if (orderDetailBizEntity.getBzgg() == null) {
UdiProductEntity product = udiProductService.findByNameCode(orderDetailBizEntity.getNameCode());
if (product.getBzgg() != null && product.getProductsType() == 2){
if (product.getBzgg() != null && product.getProductsType() == 2) {
orderDetailBizEntity.setBzgg(product.getBzgg());
}
}
@ -265,10 +265,10 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
public boolean copyOrderDetailBiz(String newBillNo, String oldBillNo) {
//获取旧列表数据
List<IoOrderDetailBizEntity> oldOrderDetailBiz = findByOrderIdAndNameCode(oldBillNo, false);
if (CollUtil.isNotEmpty(oldOrderDetailBiz)){
if (CollUtil.isNotEmpty(oldOrderDetailBiz)) {
List<IoOrderDetailBizEntity> newOrderDetailBiz = new ArrayList<>(oldOrderDetailBiz.size());
//遍历修改新单号为新订单号
oldOrderDetailBiz.forEach( x -> {
oldOrderDetailBiz.forEach(x -> {
x.setOrderIdFk(newBillNo);
x.setId(IdUtil.getSnowflakeNextId());
newOrderDetailBiz.add(x);
@ -330,6 +330,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
orderEntity.setDeptCode(invWarehouseEntity.getParentId());
orderEntity.setInvCode(orderEntity.getInvCode());
orderEntity.setBusType(bussinessTypeEntity.getBusType());
orderEntity.setProductType(addBizProductReqeust.getProductType());
orderService.insertOrder(orderEntity);
}
@ -442,7 +443,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
ioOrderDetailBizEntity.setExpireDate(item.getExpireDate());
ioOrderDetailBizEntity.setBatchNo(item.getBatchNo());
ioOrderDetailBizEntity.setSupId(item.getSupId());
if (item.getCount() != null) ioOrderDetailBizEntity.setCount(item.getCount());
if (item.getCount() != null) ioOrderDetailBizEntity.setCount(item.getCount());
this.insert(ioOrderDetailBizEntity);
}

@ -72,6 +72,7 @@ public class UdiCalCountUtil {
public int getActCountByRelId(String relId) {
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectByRelId(relId);
int count = getActCount(udiRelevanceResponse);
return count;
}

Loading…
Cancel
Save