发票bug修复

dev
郑明梁 2 years ago
parent 95e5787b1f
commit bfb9746a97

@ -43,6 +43,7 @@ import com.glxp.api.util.OrderNoTypeBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
@ -798,6 +799,10 @@ public class IoOrderController extends BaseController {
List<IoOrderInvoiceEntity> ioOrderInvoiceEntity = orderInvoiceService.list(ew);
List<String> orderIds = ioOrderInvoiceEntity.stream().map(IoOrderInvoiceEntity::getOrderIdFk).collect(Collectors.toList());
filterOrderRequest.setOrderIds(orderIds);
if(CollectionUtils.isEmpty(orderIds)){
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>();
return ResultVOUtils.page(pageInfo);
}
}

@ -27,6 +27,7 @@ import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService;
import com.glxp.api.service.inout.impl.IoOrderInvoiceService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -193,4 +194,20 @@ public class IoOrderInvoiceController {
else
return ResultVOUtils.error(500, "删除失败!");
}
@AuthRuleAnnotation("")
@PostMapping("/udiwms/inout/invoice/checkInvoiceCode")
public BaseResponse checkInvoiceCode(@RequestBody DeleteRequest deleteRequest) {
if (StrUtil.isEmpty(deleteRequest.getInvoiceEncode()))
return ResultVOUtils.error(500, "发票编码不能为空");
List<IoOrderInvoiceEntity> ioOrderInvoiceEntityList = ioOrderInvoiceService.list(new QueryWrapper<IoOrderInvoiceEntity>().eq("invoiceEncode", deleteRequest.getInvoiceEncode()));
if (CollectionUtils.isNotEmpty(ioOrderInvoiceEntityList) && ioOrderInvoiceEntityList.size()>0){
return ResultVOUtils.error(999,"发票编码已存在!");
}
return ResultVOUtils.success();
}
}

@ -87,6 +87,9 @@ public class IoOrderInvoiceService extends ServiceImpl<IoOrderInvoiceMapper, IoO
}
}
orderResponse.setAllAmount(amount);
if(StrUtil.isBlank(orderResponse.getCheckStatus())){
orderResponse.setCheckStatus("0");
}
} else
return orderResponse;

Loading…
Cancel
Save